![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <interface_property_model.h>
Public Member Functions | |
| InterfacePropertyModel () | |
| virtual | ~InterfacePropertyModel ()=default |
| bool | depends_on (const field &id) |
| virtual double | value (const std::map< field, double > &fields_value)=0 |
| virtual void | vector_value (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector)=0 |
| virtual double | jacobian (const std::map< field, double > &field_values, const field id)=0 |
| virtual void | vector_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector)=0 |
| double | numerical_jacobian (const std::map< field, double > &field_values, const field id) |
| void | vector_numerical_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) |
Protected Attributes | |
| std::map< field, bool > | model_depends_on |
Abstract class that defines the interface for a interface property model. Interface property model provides an abstract interface to calculate the value of an interface property or a vector of interface property value for given field value. By default, the interface does not require that all (or any) fields be specified. This is why a map is used to pass the dependent variable. To allow for the calculation of the appropriate jacobian matrix (when that is necessary) the interface also provides a jacobian function, which must provide the derivative with respect to the field specified as an argument.
Definition at line 23 of file interface_property_model.h.
|
inline |
class Default constructor. Set the model_depends_on to false for all variables.
Definition at line 29 of file interface_property_model.h.
References model_depends_on, phase_order_cahn_hilliard, pressure, shear_rate, temperature, and temperature_p1.
|
virtualdefault |
Default destructor.
|
inline |
Returns true if the InterfacePropertyModel depends on a field, false if not.
Definition at line 48 of file interface_property_model.h.
References model_depends_on.
|
pure virtual |
jacobian Calculates the jacobian (the partial derivative) of the interface property with respect to a field
| field_values | Value of the various fields on which the property may depend. |
| id | Indicator of the field with respect to which the jacobian should be calculated |
Implemented in MobilityCahnHilliardModelConstant, MobilityCahnHilliardModelQuartic, SurfaceTensionConstant, SurfaceTensionLinear, and SurfaceTensionPhaseChange.
|
inline |
numerical_jacobian Calculates the jacobian through a forward finite difference (Euler) approximation. This approach, although not preferable, is meant as a fall-back when calculating the jacobian manually is too difficult.
| fields_values | The values of the various fields |
| id | Field id of the field with respect to which the jacobian should be calculated |
Definition at line 104 of file interface_property_model.h.
References value().
|
pure virtual |
value Calculates the value of an interface property.
| fields_value | Value of the various field on which the property may depend. |
Implemented in MobilityCahnHilliardModelConstant, MobilityCahnHilliardModelQuartic, SurfaceTensionConstant, SurfaceTensionLinear, and SurfaceTensionPhaseChange.
|
pure virtual |
vector_jacobian Calculate the derivative of the property with respect to a field
| field_vectors | Vector for the values of the fields used to evaluate the property |
| id | Identifier of the field with respect to which a derivative should be calculated |
| jacobian | Vector of the value of the derivative of the property with respect to the field id |
Implemented in MobilityCahnHilliardModelConstant, MobilityCahnHilliardModelQuartic, SurfaceTensionConstant, SurfaceTensionLinear, and SurfaceTensionPhaseChange.
|
inline |
vector_numerical_jacobian Calculates the vector of jacobian through forward finite difference (Euler) approximation. This approach, although not preferable, is meant as a fall-back when calculating the jacobian manually is too difficult.
| field_vectors | |
| field_id | |
| jacobian_vector |
Definition at line 125 of file interface_property_model.h.
References vector_value().
|
pure virtual |
vector_value Calculates the values of an interface property for multiple points
| field_vectors |
Implemented in MobilityCahnHilliardModelConstant, MobilityCahnHilliardModelQuartic, SurfaceTensionConstant, SurfaceTensionLinear, and SurfaceTensionPhaseChange.
|
protected |
Definition at line 160 of file interface_property_model.h.