ASPECT
aspect::MaterialModel::Interface< dim > Class Template Referenceabstract
Inheritance diagram for aspect::MaterialModel::Interface< dim >:
[legend]

## Public Types

using MaterialModelInputs = MaterialModel::MaterialModelInputs< dim >

using MaterialModelOutputs = MaterialModel::MaterialModelOutputs< dim >

## Public Member Functions

virtual ~Interface ()=default

virtual void initialize ()

virtual void update ()

virtual void evaluate (const MaterialModel::MaterialModelInputs< dim > &in, MaterialModel::MaterialModelOutputs< dim > &out) const =0

virtual void create_additional_named_outputs (MaterialModelOutputs &outputs) const

virtual void fill_additional_material_model_inputs (MaterialModel::MaterialModelInputs< dim > &input, const LinearAlgebra::BlockVector &solution, const FEValuesBase< dim > &fe_values, const Introspection< dim > &introspection) const

Qualitative properties one can ask a material model
const NonlinearDependence::ModelDependenceget_model_dependence () const

virtual bool is_compressible () const =0

## Protected Attributes

NonlinearDependence::ModelDependence model_dependence

## Functions used in dealing with run-time parameters

virtual void parse_parameters (ParameterHandler &prm)

static void declare_parameters (ParameterHandler &prm)

## Detailed Description

### template<int dim> class aspect::MaterialModel::Interface< dim >

A base class for parameterizations of material models. Classes derived from this class will need to implement functions that provide material parameters such as the viscosity, density, etc, typically as a function of position, temperature and pressure at that location.

Implementing a material model requires you to override evaluate() and fill the output argument struct instead of implementing the functions viscosity(), density(), etc.. In this case, all other functions are being ignored.

In all cases, model_dependence values, is_compressible() need to be implemented.

Definition at line 65 of file simulator_access.h.

## § MaterialModelInputs

template<int dim>
 using aspect::MaterialModel::Interface< dim >::MaterialModelInputs = MaterialModel::MaterialModelInputs

A typedef to import the MaterialModelInputs name into the current class. This typedef primarily exists as a backward compatibility measure given that the referenced structure used to be a member of the current class.

Definition at line 1249 of file interface.h.

## § MaterialModelOutputs

template<int dim>
 using aspect::MaterialModel::Interface< dim >::MaterialModelOutputs = MaterialModel::MaterialModelOutputs

A typedef to import the MaterialModelOutputs name into the current class. This typedef primarily exists as a backward compatibility measure given that the referenced structure used to be a member of the current class.

Definition at line 1256 of file interface.h.

## § ~Interface()

template<int dim>
 virtual aspect::MaterialModel::Interface< dim >::~Interface ( )
virtualdefault

Destructor. Made virtual to enforce that derived classes also have virtual destructors.

## § initialize()

template<int dim>
 virtual void aspect::MaterialModel::Interface< dim >::initialize ( )
virtual

Initialization function. This function is called once at the beginning of the program after parse_parameters is run and after the SimulatorAccess (if applicable) is initialized.

## § update()

template<int dim>
 virtual void aspect::MaterialModel::Interface< dim >::update ( )
virtual

Called at the beginning of each time step and allows the material model to update internal data structures.

Reimplemented in aspect::MaterialModel::Steinberger< dim >, and aspect::MaterialModel::DepthDependent< dim >.

## § get_model_dependence()

template<int dim>
 const NonlinearDependence::ModelDependence& aspect::MaterialModel::Interface< dim >::get_model_dependence ( ) const

Return a structure that describes how each of the model's output variables (such as viscosity, density, etc) depend on the input variables pressure, temperature, strain rate, and compositional fields.

## § is_compressible()

template<int dim>
 virtual bool aspect::MaterialModel::Interface< dim >::is_compressible ( ) const
pure virtual

Return whether the model is compressible or not. Incompressibility does not necessarily imply that the density is constant; rather, it may still depend on temperature or pressure. In the current context, compressibility means whether we should solve the continuity equation as $$\nabla \cdot (\rho \mathbf u)=0$$ (compressible Stokes) or as $$\nabla \cdot \mathbf{u}=0$$ (incompressible Stokes).

## § evaluate()

template<int dim>
 virtual void aspect::MaterialModel::Interface< dim >::evaluate ( const MaterialModel::MaterialModelInputs< dim > & in, MaterialModel::MaterialModelOutputs< dim > & out ) const
pure virtual

Function to compute the material properties in out given the inputs in in. If MaterialModelInputs.strain_rate has the length 0, then the viscosity does not need to be computed.

## § declare_parameters()

template<int dim>
 static void aspect::MaterialModel::Interface< dim >::declare_parameters ( ParameterHandler & prm )
static

Declare the parameters this class takes through input files. The default implementation of this function does not describe any parameters. Consequently, derived classes do not have to overload this function if they do not take any runtime parameters.

## § parse_parameters()

template<int dim>
 virtual void aspect::MaterialModel::Interface< dim >::parse_parameters ( ParameterHandler & prm )
virtual

Read the parameters this class declares from the parameter file. The default implementation of this function does not read any parameters. Consequently, derived classes do not have to overload this function if they do not take any runtime parameters.

template<int dim>
 virtual void aspect::MaterialModel::Interface< dim >::create_additional_named_outputs ( MaterialModelOutputs & outputs ) const
virtual

If this material model can produce additional named outputs that are derived from NamedAdditionalOutputs, create them in here. By default, this does nothing.

template<int dim>
 virtual void aspect::MaterialModel::Interface< dim >::fill_additional_material_model_inputs ( MaterialModel::MaterialModelInputs< dim > & input, const LinearAlgebra::BlockVector & solution, const FEValuesBase< dim > & fe_values, const Introspection< dim > & introspection ) const
virtual

Fill the additional material model inputs that have been attached by the individual heating or material models in the create_additional_material_model_inputs function. This is done by looping over all material model inputs that have been created and calling their respective member functions.

## § model_dependence

template<int dim>
 NonlinearDependence::ModelDependence aspect::MaterialModel::Interface< dim >::model_dependence
protected

A structure that describes how each of the model's output variables (such as viscosity, density, etc) depend on the input variables pressure, temperature, strain rate, and compositional fields.

The constructor of this class calls the default constructor of this member variable which in turn initializes the object to invalid values. Derived classes then need to fill it either in their constructor (if they already know the correct dependencies at that time) or at the end of their parse_parameter() functions where they know the correct material parameters they will use.

Definition at line 1382 of file interface.h.

The documentation for this class was generated from the following files: