ASPECT
Classes | Enumerations | Functions
aspect::MaterialModel::NonlinearDependence Namespace Reference

Classes

struct  ModelDependence
 

Enumerations

enum  Dependence {
  uninitialized = 0, none = 1, temperature = 2, pressure = 4,
  strain_rate = 8, compositional_fields = 16, any_variable = temperature | pressure | strain_rate | compositional_fields
}
 

Functions

Dependence operator| (const Dependence d1, const Dependence d2)
 
Dependence operator|= (Dependence &d1, const Dependence d2)
 
bool identifies_single_variable (const Dependence dependence)
 

Detailed Description

A namespace whose enum members are used in querying the nonlinear dependence of physical parameters on other solution variables.

Enumeration Type Documentation

§ Dependence

An enum whose members are used in querying the nonlinear dependence of physical parameters on other solution variables.

The values of this enum are used in the NonlinearDependence::model_dependence, queried by get_model_dependence() to see if a coefficient like the viscosity, depends on the temperature, pressure, strain rate, or compositional field value. Because the values of the enum are chosen so that they represent single bits in an integer, the result here is a number that can be represented in base-2 as 101 (the number 100=4 for the strain rate and 001=1 for the temperature).

To query nonlinear dependence of a coefficient on any other variable, you can use

material_model.get_model_dependence();

and compare the result to NonlinearDependence::Dependence::Variable.

Enumerator
uninitialized 
none 
temperature 
pressure 
strain_rate 
compositional_fields 
any_variable 

Definition at line 91 of file interface.h.

Function Documentation

§ operator|()

Dependence aspect::MaterialModel::NonlinearDependence::operator| ( const Dependence  d1,
const Dependence  d2 
)
inline

Provide an operator that or's two Dependence variables.

Definition at line 108 of file interface.h.

§ operator|=()

Dependence aspect::MaterialModel::NonlinearDependence::operator|= ( Dependence d1,
const Dependence  d2 
)
inline

Definition at line 114 of file interface.h.

§ identifies_single_variable()

bool aspect::MaterialModel::NonlinearDependence::identifies_single_variable ( const Dependence  dependence)

Return whether the given argument dependence identifies a single variable (e.g., the pressure, the temperature, etc) or a combination of variables. Technically, this corresponds to the question of whether there is exactly one bit set in the argument.

Returns
true if yes, false otherwise.