jaxdem.material_matchmakers#
Material mix rules and implementations.
Classes
Abstract base class for material property mixing rules. |
- class jaxdem.material_matchmakers.MaterialMatchmaker#
Bases:
Factory,ABCAbstract base class for material property mixing rules.
Notes
The
jaxdem.MaterialTableuses these matchmakers to pre-compute interaction matrices.
Example
To define a custom matchmaker, inherit from
MaterialMatchmakerand implement its abstract methods:>>> @MaterialMatchmaker.register("myCustomForce") ... @jax.tree_util.register_dataclass ... @dataclass(slots=True) ... class MyCustomMatchmaker(MaterialMatchmaker): ... ...
- abstractmethod static get_effective_property(prop1: Array, prop2: Array) Array[source]#
Compute the effective property from two material properties.
Concrete implementations define the specific mixing rule.
- Parameters:
prop1 (jax.Array) – The property value from the first material. Can be a scalar or an array.
prop2 (jax.Array) – The property value from the second material. Can be a scalar or an array.
- Returns:
The effective property, computed from prop1 and prop2 with the matchmaker’s mixing rule.
- Return type:
jax.Array
Modules