ASPECT
Public Types | Public Member Functions | Protected Attributes | List of all members
aspect::MaterialModel::Interface< dim > Class Template Referenceabstract
Inheritance diagram for aspect::MaterialModel::Interface< dim >:
Inheritance graph
[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.

Member Typedef Documentation

§ 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

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.

Constructor & Destructor Documentation

§ ~Interface()

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

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

Member Function Documentation

§ initialize()

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

§ 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 >, aspect::MaterialModel::ReactiveFluidTransport< dim >, aspect::MaterialModel::DepthDependent< dim >, and aspect::MaterialModel::PrescribedViscosity< 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).

Implemented in aspect::MaterialModel::ViscoPlastic< dim >, aspect::MaterialModel::Steinberger< dim >, aspect::MaterialModel::Viscoelastic< dim >, aspect::MaterialModel::Averaging< dim >, aspect::MaterialModel::DruckerPrager< dim >, aspect::MaterialModel::GrainSize< dim >, aspect::MaterialModel::Compositing< dim >, aspect::MaterialModel::DiffusionDislocation< dim >, aspect::MaterialModel::MulticomponentCompressible< dim >, aspect::MaterialModel::PrescribedViscosity< dim >, aspect::MaterialModel::MeltBoukare< dim >, aspect::MaterialModel::Multicomponent< dim >, aspect::MaterialModel::ReplaceLithosphereViscosity< dim >, aspect::MaterialModel::SimpleCompressible< dim >, aspect::MaterialModel::AsciiReferenceProfile< dim >, aspect::MaterialModel::PerpleXLookup< dim >, aspect::MaterialModel::LatentHeatMelt< dim >, aspect::MaterialModel::LatentHeat< dim >, aspect::MaterialModel::ModifiedTait< dim >, aspect::MaterialModel::EntropyModel< dim >, aspect::MaterialModel::CompositionReaction< dim >, aspect::MaterialModel::MeltSimple< dim >, aspect::MaterialModel::DepthDependent< dim >, aspect::MaterialModel::Nondimensional< dim >, aspect::MaterialModel::Simple< dim >, aspect::MaterialModel::MeltGlobal< dim >, aspect::MaterialModel::ReactiveFluidTransport< dim >, and aspect::MaterialModel::Simpler< dim >.

§ evaluate()

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

§ 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.

Reimplemented in aspect::MaterialModel::ViscoPlastic< dim >, aspect::MaterialModel::Steinberger< dim >, aspect::MaterialModel::Viscoelastic< dim >, aspect::MaterialModel::DruckerPrager< dim >, aspect::MaterialModel::GrainSize< dim >, aspect::MaterialModel::MeltBoukare< dim >, aspect::MaterialModel::ReactiveFluidTransport< dim >, aspect::MaterialModel::Averaging< dim >, aspect::MaterialModel::MeltSimple< dim >, aspect::MaterialModel::DiffusionDislocation< dim >, aspect::MaterialModel::MulticomponentCompressible< dim >, aspect::MaterialModel::Multicomponent< dim >, aspect::MaterialModel::MeltGlobal< dim >, aspect::MaterialModel::EntropyModel< dim >, aspect::MaterialModel::LatentHeatMelt< dim >, aspect::MaterialModel::SimpleCompressible< dim >, aspect::MaterialModel::Compositing< dim >, aspect::MaterialModel::PerpleXLookup< dim >, aspect::MaterialModel::AsciiReferenceProfile< dim >, aspect::MaterialModel::LatentHeat< dim >, aspect::MaterialModel::ModifiedTait< dim >, aspect::MaterialModel::CompositionReaction< dim >, aspect::MaterialModel::Nondimensional< dim >, aspect::MaterialModel::DepthDependent< dim >, aspect::MaterialModel::Simple< dim >, aspect::MaterialModel::PrescribedViscosity< dim >, aspect::MaterialModel::ReplaceLithosphereViscosity< dim >, and aspect::MaterialModel::Simpler< dim >.

§ create_additional_named_outputs()

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

§ fill_additional_material_model_inputs()

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.

Member Data Documentation

§ 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 1381 of file interface.h.


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