ASPECT
Public Member Functions | Static Public Member Functions | List of all members
aspect::MeshRefinement::Interface< dim > Class Template Reference
Inheritance diagram for aspect::MeshRefinement::Interface< dim >:
Inheritance graph
[legend]

Public Member Functions

virtual ~Interface ()
 
virtual void initialize ()
 
virtual void update ()
 
virtual void execute (Vector< float > &error_indicators) const
 
virtual void tag_additional_cells () const
 
virtual void parse_parameters (ParameterHandler &prm)
 

Static Public Member Functions

static void declare_parameters (ParameterHandler &prm)
 

Detailed Description

template<int dim>
class aspect::MeshRefinement::Interface< dim >

This class declares the public interface of mesh refinement plugins. Plugins have two different ways to influence adaptive refinement (and can make use of either or both):

First, execute() allows the plugin to specify weights for individual cells that are then used to coarsen and refine (where larger numbers indicate a larger error).

Second, after cells get flagged for coarsening and refinement (using the first approach), tag_additional_cells() is executed for each plugin. Here the plugin is free to set or clear coarsen and refine flags on any cell.

Access to the data of the simulator is granted by the protected member functions of the SimulatorAccess class, i.e., classes implementing this interface will in general want to derive from both this Interface class as well as from the SimulatorAccess class.

Definition at line 74 of file interface.h.

Constructor & Destructor Documentation

§ ~Interface()

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

Destructor. Does nothing but is virtual so that derived classes destructors are also virtual.

Member Function Documentation

§ initialize()

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

Initialization function. This function is called once at the beginning of the program after parse_parameters is run and after the SimulatorAccess (if applicable) is initialized.

§ update()

template<int dim>
virtual void aspect::MeshRefinement::Interface< dim >::update ( )
virtual

A function that is called once at the beginning of each timestep. The default implementation of the function does nothing, but derived classes that need more elaborate setups for a given time step may overload the function.

The point of this function is to allow refinement plugins to do an initialization once during each time step.

Reimplemented in aspect::MeshRefinement::MinimumRefinementFunction< dim >, and aspect::MeshRefinement::MaximumRefinementFunction< dim >.

§ execute()

template<int dim>
virtual void aspect::MeshRefinement::Interface< dim >::execute ( Vector< float > &  error_indicators) const
virtual

§ tag_additional_cells()

template<int dim>
virtual void aspect::MeshRefinement::Interface< dim >::tag_additional_cells ( ) const
virtual

After cells have been marked for coarsening/refinement, apply additional criteria independent of the error estimate. The default implementation does nothing.

This function is also called during the initial global refinement cycle. At this point you do not have access to solutions, DoFHandlers, or finite element spaces. You can check if this is the case by querying this->get_dof_handler().n_dofs() == 0.

Reimplemented in aspect::MeshRefinement::MinimumRefinementFunction< dim >, aspect::MeshRefinement::MaximumRefinementFunction< dim >, aspect::MeshRefinement::CompactionLength< dim >, and aspect::MeshRefinement::CompositionThreshold< dim >.

§ declare_parameters()

template<int dim>
static void aspect::MeshRefinement::Interface< dim >::declare_parameters ( ParameterHandler prm)
static

Declare the parameters this class takes through input files. Derived classes should overload this function if they actually do take parameters; this class declares a fall-back function that does nothing, so that postprocessor classes that do not take any parameters do not have to do anything at all.

This function is static (and needs to be static in derived classes) so that it can be called without creating actual objects (because declaring parameters happens before we read the input file and thus at a time when we don't even know yet which postprocessor objects we need).

§ parse_parameters()

template<int dim>
virtual void aspect::MeshRefinement::Interface< dim >::parse_parameters ( ParameterHandler prm)
virtual

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