ASPECT
aspect::Introspection< dim > Struct Template Reference
Inheritance diagram for aspect::Introspection< dim >:
[legend]

## Classes

struct  BaseElements

struct  BlockIndices

struct  ComponentIndices

struct  Extractors

struct  IndexSets

struct  PolynomialDegree

## Public Member Functions

Introspection (const std::vector< VariableDeclaration< dim >> &variables, const Parameters< dim > &parameters)

~Introspection ()

unsigned int compositional_index_for_name (const std::string &name) const

std::string name_for_compositional_index (const unsigned int index) const

const std::vector< std::string > & get_composition_names () const

const std::vector< typename Parameters< dim >::CompositionalFieldDescription > & get_composition_descriptions () const

bool composition_type_exists (const typename Parameters< dim >::CompositionalFieldDescription::Type &type) const

unsigned int find_composition_type (const typename Parameters< dim >::CompositionalFieldDescription::Type &type) const

bool compositional_name_exists (const std::string &name) const

bool is_stokes_component (const unsigned int component_index) const

Public Member Functions inherited from aspect::FEVariableCollection< dim >
FEVariableCollection ()

FEVariableCollection (const std::vector< VariableDeclaration< dim >> &variable_definitions)

void initialize (const std::vector< VariableDeclaration< dim >> &variable_definitions)

const FEVariable< dim > & variable (const std::string &name) const

bool variable_exists (const std::string &name) const

const std::vector< FEVariable< dim > > & get_variables () const

unsigned int n_components () const

unsigned int n_blocks () const

const std::vector< const FiniteElement< dim > * > & get_fes () const

const std::vector< unsigned int > & get_multiplicities () const

const std::vector< unsigned int > & get_components_to_blocks () const

## Public Attributes

Things that are independent of the current mesh
const unsigned int n_components

const unsigned int n_compositional_fields

const bool use_discontinuous_temperature_discretization

const bool use_discontinuous_composition_discretization

const ComponentIndices component_indices

const unsigned int n_blocks

const BlockIndices block_indices

const Extractors extractors

const BaseElements base_elements

const PolynomialDegree polynomial_degree

Things that depend on the current mesh
std::vector< types::global_dof_index > system_dofs_per_block

IndexSets index_sets

std::vector< typename Parameters< dim >::AdvectionFieldMethod::Kind > compositional_field_methods

## Private Attributes

std::vector< std::string > composition_names

std::vector< typename Parameters< dim >::CompositionalFieldDescription > composition_descriptions

Protected Attributes inherited from aspect::FEVariableCollection< dim >
std::vector< FEVariable< dim > > variables

unsigned int n_components_

unsigned int n_blocks_

std::vector< const FiniteElement< dim > * > fes

std::vector< unsigned int > multiplicities

std::vector< unsigned int > components_to_blocks

## Detailed Description

### template<int dim> struct aspect::Introspection< dim >

The introspection class provides information about the simulation as a whole. In particular, it provides symbolic names for things like the velocity, pressure and other variables, along with their corresponding vector and scalar FEValues extractors, component masks, etc.

The purpose of this class is primarily to provide these symbolic names so that we do not have to use implicit knowledge about the ordering of variables (e.g., earlier versions of ASPECT had many places where we built a scalar FEValues extractor at component 'dim' since that is where we knew that the pressure lies in the finite element; this kind of implicit knowledge is no longer necessary with the Introspection class). The Introspection class is used both by the Simulator class itself, but is also exported to plugins via the SimulatorAccess class.

Definition at line 67 of file introspection.h.

## § Introspection()

template<int dim>
 aspect::Introspection< dim >::Introspection ( const std::vector< VariableDeclaration< dim >> & variables, const Parameters< dim > & parameters )

Constructor.

## § ~Introspection()

template<int dim>
 aspect::Introspection< dim >::~Introspection ( )

Destructor.

## § compositional_index_for_name()

template<int dim>
 unsigned int aspect::Introspection< dim >::compositional_index_for_name ( const std::string & name ) const

A function that gets the name of a compositional field as an input parameter and returns its index. If the name is not found, an exception is thrown.

Parameters
 name The name of compositional field (as specified in the input file)

## § name_for_compositional_index()

template<int dim>
 std::string aspect::Introspection< dim >::name_for_compositional_index ( const unsigned int index ) const

A function that gets the index of a compositional field as an input parameter and returns its name.

Parameters
 index The index of compositional field

## § get_composition_names()

template<int dim>
 const std::vector& aspect::Introspection< dim >::get_composition_names ( ) const

A function that returns the full list of compositional field names.

## § get_composition_descriptions()

template<int dim>
 const std::vector::CompositionalFieldDescription>& aspect::Introspection< dim >::get_composition_descriptions ( ) const

A function that returns the full vector of compositional field descriptions.

## § composition_type_exists()

template<int dim>
 bool aspect::Introspection< dim >::composition_type_exists ( const typename Parameters< dim >::CompositionalFieldDescription::Type & type ) const

A function that gets the type of a compositional field as an input parameter and returns if any compositional field of that type is used in this simulation.

Parameters
 type The type of compositional field (as specified in the input file)

## § find_composition_type()

template<int dim>
 unsigned int aspect::Introspection< dim >::find_composition_type ( const typename Parameters< dim >::CompositionalFieldDescription::Type & type ) const

A function that gets the type of a compositional field as an input parameter and returns the index of the first compositional field of this type used in this simulation. If no such field is found, the function returns the number of compositional fields.

Parameters
 type The type of compositional field (as specified in the input file)

## § compositional_name_exists()

template<int dim>
 bool aspect::Introspection< dim >::compositional_name_exists ( const std::string & name ) const

A function that gets the name of a compositional field as an input parameter and returns if the compositional field is used in this simulation.

Parameters
 name The name of compositional field (as specified in the input file)

## § is_stokes_component()

template<int dim>
 bool aspect::Introspection< dim >::is_stokes_component ( const unsigned int component_index ) const

A function that gets a component index as an input parameter and returns if the component is one of the stokes system (i.e. if it is the pressure or one of the velocity components).

Parameters
 component_index The component index to check.

## § n_components

template<int dim>
 const unsigned int aspect::Introspection< dim >::n_components

The number of vector components used by the finite element description of this problem. It equals $$d+2+n_c$$ where $$d$$ is the dimension and equals the number of velocity components, and $$n_c$$ is the number of advected (compositional) fields. The remaining components are the scalar pressure and temperature fields.

Definition at line 95 of file introspection.h.

## § n_compositional_fields

template<int dim>
 const unsigned int aspect::Introspection< dim >::n_compositional_fields

The number of compositional fields.

Definition at line 100 of file introspection.h.

## § use_discontinuous_temperature_discretization

template<int dim>
 const bool aspect::Introspection< dim >::use_discontinuous_temperature_discretization

A variable that holds whether the temperature field should use a discontinuous discretization.

Definition at line 106 of file introspection.h.

## § use_discontinuous_composition_discretization

template<int dim>
 const bool aspect::Introspection< dim >::use_discontinuous_composition_discretization

A variable that holds whether the composition field(s) should use a discontinuous discretization.

Definition at line 112 of file introspection.h.

## § component_indices

template<int dim>
 const ComponentIndices aspect::Introspection< dim >::component_indices

A variable that enumerates the vector components of the finite element that correspond to each of the variables in this problem.

Definition at line 129 of file introspection.h.

## § n_blocks

template<int dim>
 const unsigned int aspect::Introspection< dim >::n_blocks

The number of vector blocks. This equals $$3+n_c$$ where, in comparison to the n_components field, the velocity components form a single block.

Definition at line 136 of file introspection.h.

## § block_indices

template<int dim>
 const BlockIndices aspect::Introspection< dim >::block_indices

A variable that enumerates the vector blocks of the finite element that correspond to each of the variables in this problem.

Definition at line 153 of file introspection.h.

## § extractors

template<int dim>
 const Extractors aspect::Introspection< dim >::extractors

A variable that contains extractors for every block of the finite element used in the overall description.

Definition at line 172 of file introspection.h.

## § base_elements

template<int dim>
 const BaseElements aspect::Introspection< dim >::base_elements

A variable that enumerates the base elements of the finite element that correspond to each of the variables in this problem.

Definition at line 195 of file introspection.h.

## § polynomial_degree

template<int dim>
 const PolynomialDegree aspect::Introspection< dim >::polynomial_degree

A variable that enumerates the polynomial degree of the finite element that correspond to each of the variables in this problem.

Definition at line 214 of file introspection.h.

template<int dim>

A variable that enumerates the polynomial degree of the finite element that correspond to each of the variables in this problem.

Definition at line 247 of file introspection.h.

template<int dim>

A variable that enumerates the polynomial degree of the finite element that correspond to each of the variables in this problem.

Definition at line 269 of file introspection.h.

template<int dim>

A variable that contains component masks for each of the variables in this problem. Component masks are a deal.II concept, see the deal.II glossary.

Definition at line 290 of file introspection.h.

## § system_dofs_per_block

template<int dim>
 std::vector aspect::Introspection< dim >::system_dofs_per_block

A variable that describes how many of the degrees of freedom on the current mesh belong to each of the n_blocks blocks of the finite element.

Definition at line 305 of file introspection.h.

## § index_sets

template<int dim>
 IndexSets aspect::Introspection< dim >::index_sets

A variable that contains index sets describing which of the globally enumerated degrees of freedom are owned by the current processor in a parallel computation.

Definition at line 373 of file introspection.h.

## § temperature_method

template<int dim>

A variable that contains the field method for the temperature field and is used to determine how to solve it when solving a timestep.

Definition at line 379 of file introspection.h.

## § compositional_field_methods

template<int dim>

A vector that contains a field method for every compositional field and is used to determine how to solve a particular field when solving a timestep.

Definition at line 386 of file introspection.h.

## § composition_names

template<int dim>
 std::vector aspect::Introspection< dim >::composition_names
private

A vector that stores the names of the compositional fields that will be used in the simulation.

Definition at line 477 of file introspection.h.

## § composition_descriptions

template<int dim>
 std::vector::CompositionalFieldDescription> aspect::Introspection< dim >::composition_descriptions
private

A vector that stores descriptions of each compositional field, including its type (i.e. whether the compositional field corresponds to chemical composition, porosity etc.).

Definition at line 484 of file introspection.h.

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