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

Classes

struct  BaseElements
 
struct  BlockIndices
 
struct  ComponentIndices
 
struct  ComponentMasks
 
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
 
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
 
const ComponentMasks component_masks
 
Things that depend on the current mesh
std::vector< types::global_dof_indexsystem_dofs_per_block
 
IndexSets index_sets
 
std::vector< typename Parameters< dim >::AdvectionFieldMethod::Kind > compositional_field_methods
 

Private Attributes

std::vector< std::string > composition_names
 

Additional Inherited Members

- 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 66 of file introspection.h.

Constructor & Destructor Documentation

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

Member Function Documentation

§ 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
nameThe 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
indexThe index of compositional field

§ get_composition_names()

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

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

§ 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
nameThe 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_indexThe component index to check.

Member Data Documentation

§ 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 94 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 99 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 105 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 111 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 128 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 135 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 152 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 171 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 194 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 213 of file introspection.h.

§ component_masks

template<int dim>
const ComponentMasks aspect::Introspection< dim >::component_masks

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 234 of file introspection.h.

§ system_dofs_per_block

template<int dim>
std::vector<types::global_dof_index> 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 249 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 317 of file introspection.h.

§ compositional_field_methods

template<int dim>
std::vector<typename Parameters<dim>::AdvectionFieldMethod::Kind> aspect::Introspection< dim >::compositional_field_methods

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 324 of file introspection.h.

§ composition_names

template<int dim>
std::vector<std::string> 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 382 of file introspection.h.


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