ASPECT
aspect::SimulatorAccess< dim > Class Template Reference

## Public Member Functions

SimulatorAccess ()

SimulatorAccess (const Simulator< dim > &simulator_object)

virtual ~SimulatorAccess ()=default

virtual void initialize_simulator (const Simulator< dim > &simulator_object)

template<typename PostprocessorType >
PostprocessorType * find_postprocessor () const

Accessing variables that identify overall properties of the simulator
const Introspection< dim > & introspection () const

const Simulator< dim > & get_simulator () const

const Parameters< dim > & get_parameters () const

SimulatorSignals< dim > & get_signals () const

MPI_Comm get_mpi_communicator () const

TimerOutputget_computing_timer () const

const ConditionalOStreamget_pcout () const

double get_time () const

double get_timestep () const

double get_old_timestep () const

unsigned int get_timestep_number () const

unsigned int get_nonlinear_iteration () const

const parallel::distributed::Triangulation< dim > & get_triangulation () const

double get_volume () const

const Mapping< dim > & get_mapping () const

std::string get_output_directory () const

bool include_latent_heat () const

bool include_melt_transport () const

int get_stokes_velocity_degree () const

double get_surface_pressure () const

bool convert_output_to_years () const

unsigned int get_pre_refinement_step () const

unsigned int n_compositional_fields () const

void get_refinement_criteria (Vector< float > &estimated_error_per_cell) const

void get_artificial_viscosity (Vector< float > &viscosity_per_cell, const bool skip_interior_cells=false) const

void get_artificial_viscosity_composition (Vector< float > &viscosity_per_cell, const unsigned int compositional_variable) const

Accessing variables that identify the solution of the problem
const LinearAlgebra::BlockVectorget_current_linearization_point () const

const LinearAlgebra::BlockVectorget_solution () const

const LinearAlgebra::BlockVectorget_old_solution () const

const LinearAlgebra::BlockVectorget_old_old_solution () const

const LinearAlgebra::BlockVectorget_reaction_vector () const

const LinearAlgebra::BlockVectorget_mesh_velocity () const

const DoFHandler< dim > & get_dof_handler () const

const FiniteElement< dim > & get_fe () const

const LinearAlgebra::BlockSparseMatrixget_system_matrix () const

const LinearAlgebra::BlockSparseMatrixget_system_preconditioner_matrix () const

## Private Attributes

const Simulator< dim > * simulator

## Accessing variables that identify aspects of the simulation

const MaterialModel::Interface< dim > & get_material_model () const

void compute_material_model_input_values (const LinearAlgebra::BlockVector &input_solution, const FEValuesBase< dim, dim > &input_finite_element_values, const typename DoFHandler< dim >::active_cell_iterator &cell, const bool compute_strainrate, MaterialModel::MaterialModelInputs< dim > &material_model_inputs) const

const GravityModel::Interface< dim > & get_gravity_model () const

const InitialTopographyModel::Interface< dim > & get_initial_topography_model () const

const GeometryModel::Interface< dim > & get_geometry_model () const

bool has_boundary_temperature () const

DEAL_II_DEPRECATED const BoundaryTemperature::Interface< dim > & get_boundary_temperature () const

const BoundaryTemperature::Manager< dim > & get_boundary_temperature_manager () const

const BoundaryHeatFlux::Interface< dim > & get_boundary_heat_flux () const

bool has_boundary_composition () const

DEAL_II_DEPRECATED const BoundaryComposition::Interface< dim > & get_boundary_composition () const

const BoundaryComposition::Manager< dim > & get_boundary_composition_manager () const

const std::map< types::boundary_id, std::unique_ptr< BoundaryTraction::Interface< dim > > > & get_boundary_traction () const

DEAL_II_DEPRECATED const InitialTemperature::Interface< dim > & get_initial_temperature () const

const InitialTemperature::Manager< dim > & get_initial_temperature_manager () const

DEAL_II_DEPRECATED const InitialComposition::Interface< dim > & get_initial_composition () const

const InitialComposition::Manager< dim > & get_initial_composition_manager () const

const std::set< types::boundary_id > & get_fixed_temperature_boundary_indicators () const

const std::set< types::boundary_id > & get_fixed_heat_flux_boundary_indicators () const

const std::set< types::boundary_id > & get_fixed_composition_boundary_indicators () const

const std::set< types::boundary_id > & get_mesh_deformation_boundary_indicators () const

const BoundaryVelocity::Manager< dim > & get_boundary_velocity_manager () const

const HeatingModel::Manager< dim > & get_heating_model_manager () const

const MeshRefinement::Manager< dim > & get_mesh_refinement_manager () const

const MeltHandler< dim > & get_melt_handler () const

const VolumeOfFluidHandler< dim > & get_volume_of_fluid_handler () const

const NewtonHandler< dim > & get_newton_handler () const

const MeshDeformation::MeshDeformationHandler< dim > & get_mesh_deformation_handler () const

const LateralAveraging< dim > & get_lateral_averaging () const

const AffineConstraints< double > & get_current_constraints () const

bool simulator_is_past_initialization () const

double get_pressure_scaling () const

bool pressure_rhs_needs_compatibility_modification () const

bool model_has_prescribed_stokes_solution () const

TableHandlerget_statistics_object () const

template<typename PostprocessorType >
DEAL_II_DEPRECATED PostprocessorType * find_postprocessor () const

const Postprocess::Manager< dim > & get_postprocess_manager () const

const Particle::World< dim > & get_particle_world () const

Particle::World< dim > & get_particle_world ()

bool is_stokes_matrix_free ()

const StokesMatrixFreeHandler< dim > & get_stokes_matrix_free () const

RotationProperties< dim > compute_net_angular_momentum (const bool use_constant_density, const LinearAlgebra::BlockVector &solution, const bool limit_to_top_faces=false) const

static void get_composition_values_at_q_point (const std::vector< std::vector< double >> &composition_values, const unsigned int q, std::vector< double > &composition_values_at_q_point)

## Detailed Description

### template<int dim> class aspect::SimulatorAccess< dim >

SimulatorAccess is a base class for different plugins like postprocessors. It provides access to the various variables of the main class that plugins may want to use in their evaluations, such as solution vectors, the current time, time step sizes, material models, or the triangulations and DoFHandlers that correspond to solutions.

This class is the interface between plugins and the main simulator class. Using this insulation layer, the plugins need not know anything about the internal details of the simulation class.

Every Postprocessor is required to derive from SimulatorAccess. It is optional for other plugins like MaterialModel, GravityModel, etc..

Since the functions providing access to details of the simulator class are meant to be used only by derived classes of this class (rather than becoming part of the public interface of these classes), the functions of this class are made protected.

Definition at line 44 of file plugins.h.

## § SimulatorAccess() [1/2]

template<int dim>
 aspect::SimulatorAccess< dim >::SimulatorAccess ( )

Default constructor. Initialize the SimulatorAccess object without a reference to a particular Simulator object. You will later have to call initialize() to provide this reference to the Simulator object.

## § SimulatorAccess() [2/2]

template<int dim>
 aspect::SimulatorAccess< dim >::SimulatorAccess ( const Simulator< dim > & simulator_object )

Create a SimulatorAccess object that is already initialized for a particular Simulator.

## § ~SimulatorAccess()

template<int dim>
 virtual aspect::SimulatorAccess< dim >::~SimulatorAccess ( )
virtualdefault

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

## § initialize_simulator()

template<int dim>
 virtual void aspect::SimulatorAccess< dim >::initialize_simulator ( const Simulator< dim > & simulator_object )
virtual

Initialize this class for a given simulator. This function is marked as virtual so that derived classes can do something upon initialization as well, for example look up and cache data; derived classes should call this function from the base class as well, however.

Parameters
 simulator_object A reference to the main simulator object.

Reimplemented in aspect::MeltHandler< dim >, and aspect::TimeStepping::Manager< dim >.

## § introspection()

template<int dim>
 const Introspection& aspect::SimulatorAccess< dim >::introspection ( ) const

Return a reference to an introspection object that describes overall properties of the simulator. In particular, it provides symbolic names for extractors and component masks for each variable, etc, and thereby reduces the need for implicit knowledge throughout the code base.

## § get_simulator()

template<int dim>
 const Simulator& aspect::SimulatorAccess< dim >::get_simulator ( ) const

Return a reference to the Simulator itself. Note that you can not access any members or functions of the Simulator. This function exists so that any class with SimulatorAccess can create other objects with SimulatorAccess (because initializing them requires a reference to the Simulator).

## § get_parameters()

template<int dim>
 const Parameters& aspect::SimulatorAccess< dim >::get_parameters ( ) const

Return a reference to the parameters object that describes all run-time parameters used in the current simulation.

## § get_signals()

template<int dim>
 SimulatorSignals& aspect::SimulatorAccess< dim >::get_signals ( ) const

## § get_mpi_communicator()

template<int dim>
 MPI_Comm aspect::SimulatorAccess< dim >::get_mpi_communicator ( ) const

Return the MPI communicator for this simulation.

## § get_computing_timer()

template<int dim>
 TimerOutput& aspect::SimulatorAccess< dim >::get_computing_timer ( ) const

Return the timer object for this simulation. Since the timer is mutable in the Simulator class, this allows plugins to define their own sections in the timer to measure the time spent in sections of their code.

## § get_pcout()

template<int dim>
 const ConditionalOStream& aspect::SimulatorAccess< dim >::get_pcout ( ) const

Return a reference to the stream object that only outputs something on one processor in a parallel program and simply ignores output put into it on all other processors.

## § get_time()

template<int dim>
 double aspect::SimulatorAccess< dim >::get_time ( ) const

Return the current simulation time in seconds.

## § get_timestep()

template<int dim>
 double aspect::SimulatorAccess< dim >::get_timestep ( ) const

Return the size of the current time step.

## § get_old_timestep()

template<int dim>
 double aspect::SimulatorAccess< dim >::get_old_timestep ( ) const

Return the size of the last time step.

## § get_timestep_number()

template<int dim>
 unsigned int aspect::SimulatorAccess< dim >::get_timestep_number ( ) const

Return the current number of a time step.

## § get_nonlinear_iteration()

template<int dim>
 unsigned int aspect::SimulatorAccess< dim >::get_nonlinear_iteration ( ) const

Return the current nonlinear iteration number of a time step.

## § get_triangulation()

template<int dim>
 const parallel::distributed::Triangulation& aspect::SimulatorAccess< dim >::get_triangulation ( ) const

Return a reference to the triangulation in use by the simulator object.

## § get_volume()

template<int dim>
 double aspect::SimulatorAccess< dim >::get_volume ( ) const

Return the global volume of the computational domain.

## § get_mapping()

template<int dim>
 const Mapping& aspect::SimulatorAccess< dim >::get_mapping ( ) const

Return a reference to the mapping used to describe the boundary of the domain.

## § get_output_directory()

template<int dim>
 std::string aspect::SimulatorAccess< dim >::get_output_directory ( ) const

Return the directory specified in the input parameter file to be the place where output files are to be placed. The string is terminated by a directory separator (i.e., '/').

template<int dim>
 bool aspect::SimulatorAccess< dim >::include_adiabatic_heating ( ) const

Return whether we use the adiabatic heating term.

## § include_latent_heat()

template<int dim>
 bool aspect::SimulatorAccess< dim >::include_latent_heat ( ) const

Return whether we use the latent heat term.

## § include_melt_transport()

template<int dim>
 bool aspect::SimulatorAccess< dim >::include_melt_transport ( ) const

Return whether we solve the equations for melt transport.

## § get_stokes_velocity_degree()

template<int dim>
 int aspect::SimulatorAccess< dim >::get_stokes_velocity_degree ( ) const

Return the stokes velocity degree.

template<int dim>
 double aspect::SimulatorAccess< dim >::get_adiabatic_surface_temperature ( ) const

## § get_surface_pressure()

template<int dim>
 double aspect::SimulatorAccess< dim >::get_surface_pressure ( ) const

## § convert_output_to_years()

template<int dim>
 bool aspect::SimulatorAccess< dim >::convert_output_to_years ( ) const

Return whether things like velocities should be converted from the seconds in the MKS system to years. The value of this flag is set by the corresponding entry in the input parameter file.

## § get_pre_refinement_step()

template<int dim>
 unsigned int aspect::SimulatorAccess< dim >::get_pre_refinement_step ( ) const

Return the number of the current pre refinement step. This can be useful for plugins that want to function differently in the initial adaptive refinements and later on. This will be not initialized before Simulator<dim>::run() is called. It iterates upward from 0 to parameters.initial_adaptive_refinement during the initial adaptive refinement steps, and equals std::numeric_limits<unsigned int>::max() afterwards.

## § n_compositional_fields()

template<int dim>
 unsigned int aspect::SimulatorAccess< dim >::n_compositional_fields ( ) const

Return the number of compositional fields specified in the input parameter file that will be advected along with the flow field.

## § get_refinement_criteria()

template<int dim>
 void aspect::SimulatorAccess< dim >::get_refinement_criteria ( Vector< float > & estimated_error_per_cell ) const

Compute the error indicators in the same way they are normally used for mesh refinement. The mesh is not refined when doing so, but the indicators can be used when generating graphical output to check why mesh refinement is proceeding as it is.

## § get_artificial_viscosity()

template<int dim>
 void aspect::SimulatorAccess< dim >::get_artificial_viscosity ( Vector< float > & viscosity_per_cell, const bool skip_interior_cells = false ) const

Returns the entropy viscosity on each locally owned cell as it is used to stabilize the temperature equation.

Parameters
 viscosity_per_cell Output vector with as many entries as active cells. Each entry corresponding to a locally owned active cell index will contain the artificial viscosity for this cell. skip_interior_cells A boolean flag. If set to true the function will only compute the artificial viscosity in cells at boundaries.

## § get_artificial_viscosity_composition()

template<int dim>
 void aspect::SimulatorAccess< dim >::get_artificial_viscosity_composition ( Vector< float > & viscosity_per_cell, const unsigned int compositional_variable ) const

Returns the entropy viscosity on each locally owned cell as it is used to stabilize the composition equation.

## § get_current_linearization_point()

template<int dim>
 const LinearAlgebra::BlockVector& aspect::SimulatorAccess< dim >::get_current_linearization_point ( ) const

Return a reference to the vector that has the current linearization point of the entire system, i.e. the velocity and pressure variables as well as the temperature and compositional fields. This vector is associated with the DoFHandler object returned by get_dof_handler(). This vector is only different from the one returned by get_solution() during the solver phase.

Note
In general the vector is a distributed vector; however, it contains ghost elements for all locally relevant degrees of freedom.

## § get_solution()

template<int dim>
 const LinearAlgebra::BlockVector& aspect::SimulatorAccess< dim >::get_solution ( ) const

Return a reference to the vector that has the current solution of the entire system, i.e. the velocity and pressure variables as well as the temperature and compositional fields. This vector is associated with the DoFHandler object returned by get_dof_handler().

Note
In general the vector is a distributed vector; however, it contains ghost elements for all locally relevant degrees of freedom.

## § get_old_solution()

template<int dim>
 const LinearAlgebra::BlockVector& aspect::SimulatorAccess< dim >::get_old_solution ( ) const

Return a reference to the vector that has the solution of the entire system at the previous time step. This vector is associated with the DoFHandler object returned by get_stokes_dof_handler().

Note
In general the vector is a distributed vector; however, it contains ghost elements for all locally relevant degrees of freedom.

## § get_old_old_solution()

template<int dim>
 const LinearAlgebra::BlockVector& aspect::SimulatorAccess< dim >::get_old_old_solution ( ) const

Return a reference to the vector that has the solution of the entire system at the second-to-last time step. This vector is associated with the DoFHandler object returned by get_stokes_dof_handler().

Note
In general the vector is a distributed vector; however, it contains ghost elements for all locally relevant degrees of freedom.

## § get_reaction_vector()

template<int dim>
 const LinearAlgebra::BlockVector& aspect::SimulatorAccess< dim >::get_reaction_vector ( ) const

Return a reference to the vector that has the reactions computed by the operator splitting scheme in the current time step.

Note
In general the vector is a distributed vector; however, it contains ghost elements for all locally relevant degrees of freedom.

## § get_mesh_velocity()

template<int dim>
 const LinearAlgebra::BlockVector& aspect::SimulatorAccess< dim >::get_mesh_velocity ( ) const

Return a reference to the vector that has the mesh velocity for simulations with mesh deformation.

Note
In general the vector is a distributed vector; however, it contains ghost elements for all locally relevant degrees of freedom.

## § get_dof_handler()

template<int dim>
 const DoFHandler& aspect::SimulatorAccess< dim >::get_dof_handler ( ) const

Return a reference to the DoFHandler that is used to discretize the variables at the current time step.

## § get_fe()

template<int dim>
 const FiniteElement& aspect::SimulatorAccess< dim >::get_fe ( ) const

Return a reference to the finite element that the DoFHandler that is used to discretize the variables at the current time step is built on. This is the finite element for the entire, couple problem, i.e., it contains sub-elements for velocity, pressure, temperature and all other variables in this problem (e.g., compositional variables, if used in this simulation).

## § get_system_matrix()

template<int dim>
 const LinearAlgebra::BlockSparseMatrix& aspect::SimulatorAccess< dim >::get_system_matrix ( ) const

Return a reference to the system matrix at the current time step.

## § get_system_preconditioner_matrix()

template<int dim>
 const LinearAlgebra::BlockSparseMatrix& aspect::SimulatorAccess< dim >::get_system_preconditioner_matrix ( ) const

Return a reference to the system preconditioner matrix at the current time step.

## § get_material_model()

template<int dim>
 const MaterialModel::Interface& aspect::SimulatorAccess< dim >::get_material_model ( ) const

Return a pointer to the material model to access functions like density().

## § compute_material_model_input_values()

template<int dim>
 void aspect::SimulatorAccess< dim >::compute_material_model_input_values ( const LinearAlgebra::BlockVector & input_solution, const FEValuesBase< dim, dim > & input_finite_element_values, const typename DoFHandler< dim >::active_cell_iterator & cell, const bool compute_strainrate, MaterialModel::MaterialModelInputs< dim > & material_model_inputs ) const

This function simply calls Simulator<dim>::compute_material_model_input_values() with the given arguments.

## § get_gravity_model()

template<int dim>
 const GravityModel::Interface& aspect::SimulatorAccess< dim >::get_gravity_model ( ) const

Return a pointer to the gravity model description.

## § get_initial_topography_model()

template<int dim>
 const InitialTopographyModel::Interface& aspect::SimulatorAccess< dim >::get_initial_topography_model ( ) const

Return a pointer to the initial topography model.

## § get_geometry_model()

template<int dim>
 const GeometryModel::Interface& aspect::SimulatorAccess< dim >::get_geometry_model ( ) const

Return a pointer to the geometry model.

template<int dim>

Return a pointer to the object that describes the adiabatic conditions.

## § has_boundary_temperature()

template<int dim>
 bool aspect::SimulatorAccess< dim >::has_boundary_temperature ( ) const

Return whether the current model has a boundary temperature object set. This is useful because a simulation does not actually have to declare any boundary temperature model, for example if all boundaries are insulating. In such cases, there is no boundary temperature model that can provide, for example, a minimal and maximal temperature on the boundary.

## § get_boundary_temperature()

template<int dim>
 DEAL_II_DEPRECATED const BoundaryTemperature::Interface& aspect::SimulatorAccess< dim >::get_boundary_temperature ( ) const

Return a reference to the object that describes the temperature boundary values.

Deprecated:

## § get_boundary_temperature_manager()

template<int dim>
 const BoundaryTemperature::Manager& aspect::SimulatorAccess< dim >::get_boundary_temperature_manager ( ) const

Return an reference to the manager of the boundary temperature models. This can then, for example, be used to get the names of the initial temperature models used in a computation, or to compute the initial temperature for a given position.

## § get_boundary_heat_flux()

template<int dim>
 const BoundaryHeatFlux::Interface& aspect::SimulatorAccess< dim >::get_boundary_heat_flux ( ) const

Return a reference to the object that describes heat flux boundary conditions.

## § has_boundary_composition()

template<int dim>
 bool aspect::SimulatorAccess< dim >::has_boundary_composition ( ) const

Return whether the current model has a boundary composition object set. This is useful because a simulation does not actually have to declare any boundary composition model, for example if all boundaries are reflecting. In such cases, there is no boundary composition model.

## § get_boundary_composition()

template<int dim>
 DEAL_II_DEPRECATED const BoundaryComposition::Interface& aspect::SimulatorAccess< dim >::get_boundary_composition ( ) const

Return a reference to the object that describes the composition boundary values.

Deprecated:

## § get_boundary_composition_manager()

template<int dim>
 const BoundaryComposition::Manager& aspect::SimulatorAccess< dim >::get_boundary_composition_manager ( ) const

Return an reference to the manager of the boundary composition models. This can then, for example, be used to get the names of the boundary composition models used in a computation, or to compute the boundary composition for a given position.

## § get_boundary_traction()

template<int dim>
 const std::map > >& aspect::SimulatorAccess< dim >::get_boundary_traction ( ) const

Return a reference to the object that describes traction boundary conditions.

## § get_initial_temperature()

template<int dim>
 DEAL_II_DEPRECATED const InitialTemperature::Interface& aspect::SimulatorAccess< dim >::get_initial_temperature ( ) const

Return a pointer to the object that describes the temperature initial values.

Deprecated:
Use  get_initial_temperature_manager  instead.

## § get_initial_temperature_manager()

template<int dim>
 const InitialTemperature::Manager& aspect::SimulatorAccess< dim >::get_initial_temperature_manager ( ) const

Return a reference to the manager of the initial temperature models. This can then, for example, be used to get the names of the initial temperature models used in a computation, or to compute the initial temperature for a given position.

## § get_initial_composition()

template<int dim>
 DEAL_II_DEPRECATED const InitialComposition::Interface& aspect::SimulatorAccess< dim >::get_initial_composition ( ) const

Return a pointer to the object that describes the composition initial values.

## § get_initial_composition_manager()

template<int dim>
 const InitialComposition::Manager& aspect::SimulatorAccess< dim >::get_initial_composition_manager ( ) const

Return a pointer to the manager of the initial composition model. This can then, for example, be used to get the names of the initial composition models used in a computation.

## § get_fixed_temperature_boundary_indicators()

template<int dim>
 const std::set& aspect::SimulatorAccess< dim >::get_fixed_temperature_boundary_indicators ( ) const

Return a set of boundary indicators that describes which of the boundaries have a fixed temperature.

## § get_fixed_heat_flux_boundary_indicators()

template<int dim>
 const std::set& aspect::SimulatorAccess< dim >::get_fixed_heat_flux_boundary_indicators ( ) const

Return a set of boundary indicators that describes which of the boundaries have a fixed heat flux.

## § get_fixed_composition_boundary_indicators()

template<int dim>
 const std::set& aspect::SimulatorAccess< dim >::get_fixed_composition_boundary_indicators ( ) const

Return a set of boundary indicators that describes which of the boundaries have a fixed composition.

## § get_mesh_deformation_boundary_indicators()

template<int dim>
 const std::set& aspect::SimulatorAccess< dim >::get_mesh_deformation_boundary_indicators ( ) const

Return a set of boundary indicators that describes which of the boundaries have a mesh deformation boundary condition. Note that it does not specify which boundaries have which mesh deformation condition, only which boundaries have a mesh deformation condition.

## § get_boundary_velocity_manager()

template<int dim>
 const BoundaryVelocity::Manager& aspect::SimulatorAccess< dim >::get_boundary_velocity_manager ( ) const

Return an reference to the manager of the boundary velocity models. This can then, for example, be used to get the names of the boundary velocity models used in a computation, or to compute the boundary velocity for a given position.

## § get_heating_model_manager()

template<int dim>
 const HeatingModel::Manager& aspect::SimulatorAccess< dim >::get_heating_model_manager ( ) const

Return a pointer to the manager of the heating model. This can then, for example, be used to get the names of the heating models used in a computation.

## § get_mesh_refinement_manager()

template<int dim>
 const MeshRefinement::Manager& aspect::SimulatorAccess< dim >::get_mesh_refinement_manager ( ) const

Return a reference to the manager of the mesh refinement strategies. this can then, for example, be used to get the names of the active refinement strategies for such purposes as confirming that a particular one has been included.

## § get_melt_handler()

template<int dim>
 const MeltHandler& aspect::SimulatorAccess< dim >::get_melt_handler ( ) const

Return a reference to the melt handler.

## § get_volume_of_fluid_handler()

template<int dim>
 const VolumeOfFluidHandler& aspect::SimulatorAccess< dim >::get_volume_of_fluid_handler ( ) const

Return a reference to the VolumeOfFluid handler.

## § get_newton_handler()

template<int dim>
 const NewtonHandler& aspect::SimulatorAccess< dim >::get_newton_handler ( ) const

Return a reference to the Newton handler that controls the Newton iteration to resolve nonlinearities.

## § get_mesh_deformation_handler()

template<int dim>
 const MeshDeformation::MeshDeformationHandler& aspect::SimulatorAccess< dim >::get_mesh_deformation_handler ( ) const

Return a reference to the mesh deformation handler. This function will throw an exception if mesh deformation is not activated.

## § get_lateral_averaging()

template<int dim>
 const LateralAveraging& aspect::SimulatorAccess< dim >::get_lateral_averaging ( ) const

Return a reference to the lateral averaging object owned by the simulator, which can be used to query lateral averages of various quantities at depth slices.

## § get_current_constraints()

template<int dim>
 const AffineConstraints& aspect::SimulatorAccess< dim >::get_current_constraints ( ) const

Return a pointer to the object that describes the DoF constraints for the time step we are currently solving.

## § simulator_is_past_initialization()

template<int dim>
 bool aspect::SimulatorAccess< dim >::simulator_is_past_initialization ( ) const

Return whether the Simulator object has been completely initialized and has started to run its time stepping loop.

This function is useful to determine in a plugin whether some of the information one can query about the Simulator can be trusted because it has already been set up completely. For example, while the Simulator is being set up, plugins may already have access to it via the current SimulatorAccess object, but data such as the current time, the time step number, etc, may all still be in a state that is not reliable since it may not have been initialized at that time. (As an example, at the very beginning of the Simulator object's existence, the time step number is set to numbers::invalid_unsigned_int, and only when the time step loop is started is it set to a valid value). Similar examples are that at some point the Simulator sets the solution vector to the correct size, but only at a later time (though before the time stepping starts), the contents of the solution vector are set based on the initial conditions specified in the input file.

Only when this function returns true is all of the information returned by the SimulatorAccess object reliable and correct.

Note
This function returns true starting with the moment where the Simulator starts the time stepping loop. However, it may temporarily revert to returning false if, for example, the Simulator does the initial mesh refinement steps where it starts the time loop, but then goes back to initialization steps (mesh refinement, interpolation of initial conditions, etc.) before re-starting the time loop.

## § get_pressure_scaling()

template<int dim>
 double aspect::SimulatorAccess< dim >::get_pressure_scaling ( ) const

Return the value used for rescaling the pressure in the linear solver.

## § pressure_rhs_needs_compatibility_modification()

template<int dim>
 bool aspect::SimulatorAccess< dim >::pressure_rhs_needs_compatibility_modification ( ) const

Return whether we need to apply a compatibility modification to the pressure right hand side. See documentation of Simulator<dim>::do_pressure_rhs_compatibility_modification for more information.

## § model_has_prescribed_stokes_solution()

template<int dim>
 bool aspect::SimulatorAccess< dim >::model_has_prescribed_stokes_solution ( ) const

Return whether the model uses a prescribed Stokes solution.

## § get_composition_values_at_q_point()

template<int dim>
 static void aspect::SimulatorAccess< dim >::get_composition_values_at_q_point ( const std::vector< std::vector< double >> & composition_values, const unsigned int q, std::vector< double > & composition_values_at_q_point )
static

A convenience function that copies the values of the compositional fields at the quadrature point q given as input parameter to the output vector composition_values_at_q_point.

## § get_statistics_object()

template<int dim>
 TableHandler& aspect::SimulatorAccess< dim >::get_statistics_object ( ) const

Return a writable reference to the statistics object into which you can store additional data that then shows up in the output_dir/statistics file.

Postprocessor objects get a reference to this object automatically when called, but other plugins may not. They do not usually produce output anyway, but through this function they can still record information as necessary.

Returns

## § find_postprocessor() [1/2]

template<int dim>
template<typename PostprocessorType >
 DEAL_II_DEPRECATED PostprocessorType* aspect::SimulatorAccess< dim >::find_postprocessor ( ) const

This function can be used to find out whether the list of postprocessors that are run at the end of each time step contains an object of the given template type. If so, the function returns a pointer to the postprocessor object of this type. If no postprocessor of this type has been selected in the input file (or, has been required by another postprocessor using the Postprocess::Interface::required_other_postprocessors() mechanism), then the function returns a nullptr.

Deprecated:

## § get_postprocess_manager()

template<int dim>
 const Postprocess::Manager& aspect::SimulatorAccess< dim >::get_postprocess_manager ( ) const

Return a reference to the melt handler.

## § get_particle_world() [1/2]

template<int dim>
 const Particle::World& aspect::SimulatorAccess< dim >::get_particle_world ( ) const

Returns a const reference to the particle world, in case anyone wants to query something about particles.

## § get_particle_world() [2/2]

template<int dim>
 Particle::World& aspect::SimulatorAccess< dim >::get_particle_world ( )

Returns a reference to the particle world, in case anyone wants to change something within the particle world. Use with care, usually you want to only let the functions within the particle subsystem change member variables of the particle world.

## § is_stokes_matrix_free()

template<int dim>
 bool aspect::SimulatorAccess< dim >::is_stokes_matrix_free ( )

Return true if using the block GMG Stokes solver.

## § get_stokes_matrix_free()

template<int dim>
 const StokesMatrixFreeHandler& aspect::SimulatorAccess< dim >::get_stokes_matrix_free ( ) const

Return a reference to the StokesMatrixFreeHandler that controls the matrix-free Stokes solver.

## § compute_net_angular_momentum()

template<int dim>
 RotationProperties aspect::SimulatorAccess< dim >::compute_net_angular_momentum ( const bool use_constant_density, const LinearAlgebra::BlockVector & solution, const bool limit_to_top_faces = false ) const

Compute the angular momentum and other rotation properties of the velocities in the given solution vector.

Parameters
 use_constant_density determines whether to use a constant density (which corresponds to computing a net rotation instead of net angular momentum). solution Solution vector to compute the properties for. limit_to_top_faces allows to only compute the net angular momentum (or net rotation) of the top surface.

## § find_postprocessor() [2/2]

template<int dim>
template<typename PostprocessorType >
 PostprocessorType* aspect::SimulatorAccess< dim >::find_postprocessor ( ) const
inline

Definition at line 940 of file simulator_access.h.

## § simulator

template<int dim>
 const Simulator* aspect::SimulatorAccess< dim >::simulator
private

A pointer to the simulator object to which we want to get access.

Definition at line 933 of file simulator_access.h.

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