ASPECT
Public Member Functions | Public Attributes | Private Attributes | List of all members
aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim > Class Template Reference
Inheritance diagram for aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >:
Inheritance graph
[legend]

Public Member Functions

 NamedAdditionalMaterialOutputs (const std::vector< std::string > &output_names)
 
 NamedAdditionalMaterialOutputs (const std::vector< std::string > &output_names, const unsigned int n_points)
 
 ~NamedAdditionalMaterialOutputs () override
 
const std::vector< std::string > & get_names () const
 
virtual std::vector< double > get_nth_output (const unsigned int idx) const
 
void average (const MaterialAveraging::AveragingOperation, const FullMatrix< double > &, const FullMatrix< double > &) override
 
- Public Member Functions inherited from aspect::MaterialModel::AdditionalMaterialOutputs< dim >
virtual ~AdditionalMaterialOutputs ()=default
 

Public Attributes

std::vector< std::vector< double > > output_values
 

Private Attributes

const std::vector< std::string > names
 

Detailed Description

template<int dim>
class aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >

Some material models can compute things that are not used anywhere in the physics modules of ASPECT, but that may be of interest for visualization purposes. An example would be a material model that can compute seismic velocities – these are irrelevant to the rest of ASPECT, but would be nice to have for postprocessing.

This class is a base class for material models to provide this kind of information. It follows the scheme laid out by AdditionalMaterialModelOutputs but also provides an interface by which consumers of these objects (e.g., the Postprocess::Visualization::NamedAdditionalOutputs class) can query the names and values material models have put into these additional outputs. (Because every material model can decide by itself which – if any – additional outputs it produces, there are no standard names. Consequently, the material models have to describe what values and how many values they can produce.)

This class is then this base class for additional named material model outputs to be added to the MaterialModel::MaterialModelOutputs structure.

Definition at line 874 of file interface.h.

Constructor & Destructor Documentation

§ NamedAdditionalMaterialOutputs() [1/2]

template<int dim>
aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >::NamedAdditionalMaterialOutputs ( const std::vector< std::string > &  output_names)

Base constructor.

Parameters
output_namesA list of names for the additional output variables this object will store. The length of the list also indicates how many additional output variables objects of derived classes will store.

§ NamedAdditionalMaterialOutputs() [2/2]

template<int dim>
aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >::NamedAdditionalMaterialOutputs ( const std::vector< std::string > &  output_names,
const unsigned int  n_points 
)

Constructor for case where outputs are stored for a number of points.

Parameters
output_namesA list of names for the additional output variables this object will store. The length of the list also indicates how many additional output variables objects of derived classes will store.
n_pointsThe number of points for which to store each of the output variables.

§ ~NamedAdditionalMaterialOutputs()

Destructor.

Member Function Documentation

§ get_names()

template<int dim>
const std::vector<std::string>& aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >::get_names ( ) const

Return a reference to the vector of names of the additional outputs.

§ get_nth_output()

template<int dim>
virtual std::vector<double> aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >::get_nth_output ( const unsigned int  idx) const
virtual

§ average()

template<int dim>
void aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >::average ( const MaterialAveraging::AveragingOperation  ,
const FullMatrix< double > &  ,
const FullMatrix< double > &   
)
inlineoverridevirtual

Reimplemented from aspect::MaterialModel::AdditionalMaterialOutputs< dim >.

Definition at line 917 of file interface.h.

Member Data Documentation

§ output_values

template<int dim>
std::vector<std::vector<double> > aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >::output_values

Values for the outputs at a set of evaluation points output_values[i][j] is the value of output i at point j.

Definition at line 927 of file interface.h.

§ names

template<int dim>
const std::vector<std::string> aspect::MaterialModel::NamedAdditionalMaterialOutputs< dim >::names
private

Definition at line 930 of file interface.h.


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