![]() |
ASPECT
|
Public Member Functions | |
virtual | ~Interface ()=default |
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) |
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.
|
virtualdefault |
Destructor. Does nothing but is virtual so that derived classes destructors are also virtual.
|
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.
|
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::Isosurfaces< dim >, aspect::MeshRefinement::MinimumRefinementFunction< dim >, and aspect::MeshRefinement::MaximumRefinementFunction< dim >.
|
virtual |
Execute this mesh refinement criterion. The default implementation sets all the error indicators to zero.
[out] | error_indicators | A vector that for every active cell of the current mesh (which may be a partition of a distributed mesh) provides an error indicator. This vector will already have the correct size when the function is called. |
Reimplemented in aspect::MeshRefinement::ParticleDensity< dim >, aspect::MeshRefinement::Boundary< dim >, aspect::MeshRefinement::Slope< dim >, aspect::MeshRefinement::Density< dim >, aspect::MeshRefinement::Viscosity< dim >, aspect::MeshRefinement::ThermalEnergyDensity< dim >, aspect::MeshRefinement::Topography< dim >, aspect::MeshRefinement::Composition< dim >, aspect::MeshRefinement::CompositionApproximateGradient< dim >, aspect::MeshRefinement::CompositionGradient< dim >, aspect::MeshRefinement::NonadiabaticTemperature< dim >, aspect::MeshRefinement::StrainRate< dim >, aspect::MeshRefinement::Temperature< dim >, aspect::MeshRefinement::Velocity< dim >, and aspect::MeshRefinement::ArtificialViscosity< dim >.
|
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::Isosurfaces< dim >, aspect::MeshRefinement::MinimumRefinementFunction< dim >, aspect::MeshRefinement::MaximumRefinementFunction< dim >, aspect::MeshRefinement::CompactionLength< dim >, aspect::MeshRefinement::CompositionThreshold< dim >, aspect::MeshRefinement::NonadiabaticTemperatureThreshold< dim >, and aspect::MeshRefinement::VolumeOfFluidInterface< dim >.
|
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).
|
virtual |
Read the parameters this class declares from the parameter file. The default implementation in this class does nothing, so that derived classes that do not need any parameters do not need to implement it.
Reimplemented in aspect::MeshRefinement::Isosurfaces< dim >, aspect::MeshRefinement::MinimumRefinementFunction< dim >, aspect::MeshRefinement::MaximumRefinementFunction< dim >, aspect::MeshRefinement::Boundary< dim >, aspect::MeshRefinement::CompactionLength< dim >, aspect::MeshRefinement::Composition< dim >, aspect::MeshRefinement::CompositionApproximateGradient< dim >, aspect::MeshRefinement::CompositionGradient< dim >, aspect::MeshRefinement::CompositionThreshold< dim >, aspect::MeshRefinement::NonadiabaticTemperatureThreshold< dim >, aspect::MeshRefinement::VolumeOfFluidInterface< dim >, and aspect::MeshRefinement::ArtificialViscosity< dim >.