ASPECT

Classes  
struct  AdvectionField 
struct  IntermediaryConstructorAction 
Public Types  
typedef Parameters< dim >::NonlinearSolver  NonlinearSolver 
typedef Parameters< dim >::NullspaceRemoval  NullspaceRemoval 
Public Member Functions  
Simulator (const MPI_Comm mpi_communicator, ParameterHandler &prm)  
~Simulator ()  
void  run () 
void  write_plugin_graph (std::ostream &output_stream) const 
Static Public Member Functions  
static void  declare_parameters (ParameterHandler &prm) 
Private Member Functions  
Toplevel functions in the overall flow of the numerical  
algorithm  
void  setup_dofs () 
void  setup_introspection () 
void  set_initial_temperature_and_compositional_fields () 
void  compute_initial_pressure_field () 
void  compute_initial_velocity_boundary_constraints (ConstraintMatrix &constraints) 
void  compute_current_velocity_boundary_constraints (ConstraintMatrix &constraints) 
void  compute_current_constraints () 
void  start_timestep () 
void  solve_timestep () 
void  solve_single_advection_single_stokes () 
void  solve_no_advection_iterated_stokes () 
void  solve_first_timestep_only_single_stokes () 
void  solve_iterated_advection_and_stokes () 
void  solve_single_advection_iterated_stokes () 
void  solve_iterated_advection_and_newton_stokes () 
void  solve_single_advection_no_stokes () 
void  solve_no_advection_no_stokes () 
void  build_stokes_preconditioner () 
void  build_advection_preconditioner (const AdvectionField &advection_field, aspect::LinearAlgebra::PreconditionILU &preconditioner) 
void  assemble_stokes_system () 
double  assemble_and_solve_temperature (const bool compute_initial_residual=false, double *initial_residual=nullptr) 
std::vector< double >  assemble_and_solve_composition (const bool compute_initial_residual=false, std::vector< double > *initial_residual=nullptr) 
double  assemble_and_solve_stokes (const bool compute_initial_residual=false, double *initial_residual=nullptr) 
void  assemble_advection_system (const AdvectionField &advection_field) 
double  solve_advection (const AdvectionField &advection_field) 
void  interpolate_particle_properties (const AdvectionField &advection_field) 
std::pair< double, double >  solve_stokes () 
void  postprocess () 
void  refine_mesh (const unsigned int max_grid_level) 
Functions used in saving the state of the program and  
restarting from a saved state  
void  create_snapshot () 
void  resume_from_snapshot () 
template<class Archive >  
void  serialize (Archive &ar, const unsigned int version) 
Functions used in setting up linear systems  
void  setup_system_matrix (const std::vector< IndexSet > &system_partitioning) 
void  setup_system_preconditioner (const std::vector< IndexSet > &system_partitioning) 
Helper functions  
void  make_pressure_rhs_compatible (LinearAlgebra::BlockVector &vector) 
template<typename T >  
void  get_artificial_viscosity (Vector< T > &viscosity_per_cell, const AdvectionField &advection_field, const bool skip_interior_cells=false) const 
void  compute_Vs_anomaly (Vector< float > &values) const 
void  compute_Vp_anomaly (Vector< float > &values) const 
double  normalize_pressure (LinearAlgebra::BlockVector &vector) const 
void  denormalize_pressure (const double pressure_adjustment, LinearAlgebra::BlockVector &vector, const LinearAlgebra::BlockVector &relevant_vector) const 
void  apply_limiter_to_dg_solutions (const AdvectionField &advection_field) 
void  compute_reactions () 
void  interpolate_material_output_into_compositional_field (const unsigned int compositional_index) 
void  interpolate_onto_velocity_system (const TensorFunction< 1, dim > &func, LinearAlgebra::Vector &vec) 
void  setup_nullspace_constraints (ConstraintMatrix &constraints) 
void  remove_nullspace (LinearAlgebra::BlockVector &relevant_dst, LinearAlgebra::BlockVector &tmp_distributed_stokes) 
void  remove_net_angular_momentum (const bool use_constant_density, LinearAlgebra::BlockVector &relevant_dst, LinearAlgebra::BlockVector &tmp_distributed_stokes) 
void  replace_outflow_boundary_ids (const unsigned int boundary_id_offset) 
void  restore_outflow_boundary_ids (const unsigned int boundary_id_offset) 
void  remove_net_linear_momentum (const bool use_constant_density, LinearAlgebra::BlockVector &relevant_dst, LinearAlgebra::BlockVector &tmp_distributed_stokes) 
double  get_maximal_velocity (const LinearAlgebra::BlockVector &solution) const 
double  get_entropy_variation (const double average_value, const AdvectionField &advection_field) const 
std::pair< double, double >  get_extrapolated_advection_field_range (const AdvectionField &advection_field) const 
void  maybe_write_timing_output () const 
bool  maybe_write_checkpoint (const time_t last_checkpoint_time, const std::pair< bool, bool > termination_output) 
bool  maybe_do_initial_refinement (const unsigned int max_refinement_level) 
void  maybe_refine_mesh (const double new_time_step, unsigned int &max_refinement_level) 
double  compute_time_step () const 
double  compute_viscosity (internal::Assembly::Scratch::AdvectionSystem< dim > &scratch, const double global_u_infty, const double global_T_variation, const double average_temperature, const double global_entropy_variation, const double cell_diameter, const AdvectionField &advection_field) const 
void  compute_advection_system_residual (internal::Assembly::Scratch::AdvectionSystem< dim > &scratch, const double average_field, const AdvectionField &advection_field, double &max_residual, double &max_velocity, double &max_density, double &max_specific_heat, double &conductivity) 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 
bool  stokes_matrix_depends_on_solution () const 
void  check_consistency_of_formulation () 
void  check_consistency_of_boundary_conditions () const 
double  compute_initial_newton_residual (const LinearAlgebra::BlockVector &linearized_stokes_initial_guess) 
double  compute_Eisenstat_Walker_linear_tolerance (const bool EisenstatWalkerChoiceOne, const double maximum_linear_stokes_solver_tolerance, const double linear_stokes_solver_tolerance, const double stokes_residual, const double newton_residual, const double newton_residual_old) 
void  output_statistics () 
double  compute_initial_stokes_residual () 
Friends  
class  boost::serialization::access 
class  SimulatorAccess< dim > 
class  FreeSurfaceHandler< dim > 
struct  Parameters< dim > 
Variables that have to do with input, output, parallel  
communication and interfacing with other parts of the program.  
typedef boost::iostreams::tee_device< std::ostream, std::ofstream >  TeeDevice 
typedef boost::iostreams::stream< TeeDevice >  TeeStream 
Parameters< dim >  parameters 
std::unique_ptr< MeltHandler< dim > >  melt_handler 
std::unique_ptr< NewtonHandler< dim > >  newton_handler 
SimulatorSignals< dim >  signals 
const IntermediaryConstructorAction  post_signal_creation 
Introspection< dim >  introspection 
MPI_Comm  mpi_communicator 
std::ofstream  log_file_stream 
TeeDevice  iostream_tee_device 
TeeStream  iostream_tee_stream 
ConditionalOStream  pcout 
TableHandler  statistics 
TimerOutput  computing_timer 
Threads::Thread  output_statistics_thread 
This is the main class of ASPECT. It implements the overall simulation algorithm using the numerical methods discussed in the papers and manuals that accompany ASPECT.
Definition at line 134 of file simulator.h.
typedef Parameters<dim>::NonlinearSolver aspect::Simulator< dim >::NonlinearSolver 
Import Nonlinear Solver type.
Definition at line 200 of file simulator.h.
typedef Parameters<dim>::NullspaceRemoval aspect::Simulator< dim >::NullspaceRemoval 
Import nullspace removal type.
Definition at line 205 of file simulator.h.

private 
Definition at line 1595 of file simulator.h.

private 
Definition at line 1596 of file simulator.h.
aspect::Simulator< dim >::Simulator  (  const MPI_Comm  mpi_communicator, 
ParameterHandler &  prm  
) 
Constructor.
mpi_communicator  The MPI communicator on which this class is to work. The class creates a clone of the actual communicator to make its communications private from the rest of the world. 
prm  The runtime parameter object from which this class obtains its settings. 
This function is implemented in source/simulator/core.cc
.
aspect::Simulator< dim >::~Simulator  (  ) 
Destructor. Destroy what needs to be destroyed after waiting for all threads that may still be doing something in the background.

static 
Declare the runtime parameters this class takes, and call the respective declare_parameters
functions of the namespaces that describe geometries, material models, etc.
prm  The object in which the runtime parameters are to be declared. 
This function is implemented in source/simulator/parameters.cc
.
void aspect::Simulator< dim >::run  (  ) 
The function that runs the overall algorithm. It contains the loop over all time steps as well as the logic of what to do when before the loop starts and within the time loop.
This function is implemented in source/simulator/core.cc
.
void aspect::Simulator< dim >::write_plugin_graph  (  std::ostream &  output_stream  )  const 
Write a connection graph of all of the plugins we know about, in the format that the programs dot and neato understand. This allows for a visualization of how all of the plugins that ASPECT knows about are interconnected, and connect to other parts of the ASPECT code.
This function is implemented in source/simulator/helper_functions.cc
.
output_stream  The stream to write the output to. 

private 
The function that sets up the DoFHandler objects, It also sets up the various partitioners and computes those constraints on the Stokes variable and temperature that are the same between all time steps.
This function is implemented in source/simulator/core.cc
.

private 
This function initializes the variables of the introspection object. It is called by setup_dofs() right after distributing degrees of freedom since this is when all of the information is available.
This function is implemented in source/simulator/core.cc
.

private 
A function that is responsible for initializing the temperature/compositional field before the first time step. The temperature field then serves as the temperature from which the velocity is computed during the first time step, and is subsequently overwritten by the temperature field one gets by advancing by one time step.
This function is implemented in source/simulator/initial_conditions.cc
.

private 
A function that initializes the pressure variable before the first time step. It does so by either interpolating (for continuous pressure finite elements) or projecting (for discontinuous elements) the adiabatic pressure computed from the material model.
Note that the pressure so set is overwritten by the pressure in fact computed during the first time step. We need this function, however, so that the evaluation of pressuredependent coefficients (e.g. pressure dependent densities or thermal coefficients) during the first time step has some useful pressure to start with.
This function is implemented in source/simulator/initial_conditions.cc
.

private 
Fill the given constraints
with constraints coming from the velocity boundary conditions that do not change over time. This function is used by setup_dofs();

private 
Fill the given constraints
with constraints coming from the velocity boundary conditions that do can change over time. This function is used by compute_current_constraints().

private 
Given the 'constraints' member that contains all constraints that are independent of the time (e.g., hanging node constraints, tangential flow constraints, etc), copy it over to 'current_constraints' and add to the latter all constraints that do depend on time such as temperature or velocity Dirichlet boundary conditions. This function is therefore called at the beginning of every time step in start_timestep(), but also when setting up the initial values.
This function is implemented in source/simulator/core.cc
.

private 
Do some housekeeping at the beginning of each time step. This includes generating some screen output, adding some information to the statistics file, and interpolating timedependent boundary conditions specific to this particular time step (the time independent boundary conditions, for example for hanging nodes or for tangential flow, are computed only once per mesh in setup_dofs()).
This function is implemented in source/simulator/core.cc
.

private 
Do the various steps necessary to assemble and solve the things necessary in each time step.
This function is implemented in source/simulator/core.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
If `single Advection, single Stokes' is selected as the nonlinear solver scheme, no nonlinear iterations are done, and the temperature, compositional fields and Stokes equations are solved exactly once per time step, one after the other.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
The `no Advection, iterated Stokes' scheme only solves the Stokes system and ignores compositions and the temperature equation (careful, the material model must not depend on the temperature; mostly useful for Stokes benchmarks).
This function is implemented in source/simulator/solver_schemes.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
The `first timestep only, single Stokes' scheme only solves the Stokes system, for the initial timestep. This results in a `steady state' velocity field for particle calculations.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
The `iterated Advection and Stokes' scheme iterates by alternating the solution of the temperature, composition and Stokes systems. This is essentially a type of Picard iterations for the whole system of equations.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
The `single Advection, iterated Stokes' scheme solves the temperature and composition equations once at the beginning of each time step and then iterates out the solution of the Stokes equation using Picard iterations.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
The `iterated Advection and Newton Stokes' scheme iterates over solving the temperature, composition, and Stokes equations just like `iterated Advection and Stokes', but for the Stokes system it is able to switch from a defect correction form of Picard iterations to Newton iterations after a certain tolerance or number of iterations is reached. This can greatly improve the convergence rate for particularly nonlinear viscosities.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
The `single Advection, no Stokes' scheme only solves the temperature and other advection systems and instead of solving for the Stokes system, a prescribed velocity and pressure is used."
This function is implemented in source/simulator/solver_schemes.cc
.

private 
This function implements one scheme for the various steps necessary to assemble and solve the nonlinear problem.
The `no Advection, no Stokes' scheme skips solving the temperature, composition and Stokes equations, which permits to go directly to postprocessing after setting up the initial condition.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
Initiate the assembly of the Stokes preconditioner matrix via assemble_stokes_preconditoner(), then set up the data structures to actually build a preconditioner from this matrix.
This function is implemented in source/simulator/assembly.cc
.

private 
Initialize the preconditioner for the advection equation of field index.
This function is implemented in source/simulator/assembly.cc
.

private 
Initiate the assembly of the Stokes matrix and right hand side.
This function is implemented in source/simulator/assembly.cc
.

private 
Assemble and solve the temperature equation. This function returns the residual after solving and can optionally compute and store an initial residual before solving the equation.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
Solve the composition equations with whatever method is selected (fields or particles). This function returns the residuals for all fields after solving and can optionally compute and store the initial residuals before solving the equation. For lack of a definition the residuals of all compositional fields that are advected using particles are considered zero.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
Assemble and solve the Stokes equation. This function returns the nonlinear residual after solving and can optionally compute and store an initial residual before solving the equation in the second argument if the first argument is set to true
.
The returned nonlinear residual is normalized by the initial residual, i.e., it is the nonlinear residual computed by solve_stokes() divided by the initial residual as either already stored in the second argument, or as computed at the top of the function.
This function is implemented in source/simulator/solver_schemes.cc
.

private 
Initiate the assembly of one advection matrix and right hand side and build a preconditioner for the matrix.
This function is implemented in source/simulator/assembly.cc
.

private 
Solve one block of the temperature/composition linear system. Return the initial nonlinear residual, i.e., if the linear system to be solved is , then return where is the initial guess for the solution variable and is taken from the current_linearization_point member variable.
This function is implemented in source/simulator/solver.cc
.

private 
Interpolate a particular particle property to the solution field.

private 
Solve the Stokes linear system.
The function returns two pieces of information as a pair of doubles:
current_linearization_point
member variable. For the purpose of this function, this residual is computed only from the velocity and pressure equations (i.e., for the 2x2 block system involving the velocity and pressure variables). A rationale for why this number is computed is given below.The two values are used in nonlinear solver schemes to assess how accurate the solution was before the current solve (for the first element of the returned pair) and how accurately the next iteration will have to be solved (for the second element of the pair) when using the EisenstatWalker method.
current_linearization_point
is the solution of the previous iteration (or the solution extrapolated from the previous time steps, if this is the first nonlinear iteration). Let us call this solution as above, where is a twocomponent block vector that consists of velocity and pressure. This function then assumes that we have already built the system matrix and , both linearized around the previous solution. The function solves the linear system for the solution . If the linear system were solved exactly, then that would imply that the linear residual were zero, or at least small. In other words, its size does not tell us anything about how accurately we have solved the nonlinear system. On the other hand, the nonlinear residual tells us something about how accurately the previous guess already solved the nonlinear system. Consequently, this is what this function returns. (In some sense, this is not really what we are interested in: it tells us how accurate the solution already was, and if it was already pretty accurate, then we may not want to actually solve for . But, this would require that this function receives a tolerance so that it can bail out early without actually solving for if the tolerance is already reached. This function does not actually do that – in some sense, one may argue that if we have already built the matrix and right hand side, we may as well solve with them, whether or not the solution was already good. If it happens to have been good already, then it will be even better after the solve. If it was not good enough yet, then we have to solve anyway.) In contrast to all of this, if we are using a Newton solver, then is actually the Newton update vector, for which we have no initial guess other than the zero vector. In this case, the function simply returns as the first element of the pair, where is the residual vector for the previous solution .This function is implemented in source/simulator/solver.cc
.

private 
This function is called at the end of every time step. It runs all the postprocessors that have been listed in the input parameter file (see the manual) in turn. In particular, this usually includes generating graphical output every few time steps.
The function also updates the statistics output file at the end of each time step.
This function is implemented in source/simulator/core.cc
.

private 
Refine the mesh according to error indicators calculated by compute_refinement_criterion(), set up all necessary data structures on this new mesh, and interpolate the old solutions onto the new mesh.
[in]  max_grid_level  The maximum refinement level of the mesh. This is the sum of the initial global refinement and the initial adaptive refinement (as provided by the user in the input file) and in addition it gets increased by one at each additional refinement time. 
This function is implemented in source/simulator/core.cc
.

private 
Save the state of this program to a set of files in the output directory. In reality, however, only some variables are stored (in particular the mesh, the solution vectors, etc) whereas others can either be regenerated (matrices, DoFHandler objects, etc) or are read from the input parameter file. See the manual for more information.
This function is implemented in source/simulator/checkpoint_restart.cc
.

private 
Restore the state of this program from a set of files in the output directory. In reality, however, only some variables are stored (in particular the mesh, the solution vectors, etc) whereas others can either be regenerated (matrices, DoFHandler objects, etc) or are read from the input parameter file. See the manual for more information. This function only restores those variables that can neither be regenerated from other information nor are read from the input parameter file.
This function is implemented in source/simulator/checkpoint_restart.cc
.

private 
Save a number of variables using BOOST serialization mechanism.
This function is implemented in source/simulator/checkpoint_restart.cc
.

private 
Set up the size and structure of the matrix used to store the elements of the linear system.
This function is implemented in source/simulator/core.cc
.

private 
Set up the size and structure of the matrix used to store the elements of the matrix that is used to build the preconditioner for the system. This matrix is only used for the Stokes system, so while it has the size of the whole system, it only has entries in the velocity and pressure blocks.
This function is implemented in source/simulator/core.cc
.

private 
Determine, based on the runtime parameters of the current simulation, which functions need to be called in order to assemble linear systems, matrices, and right hand side vectors.
This function is implemented in source/simulator/assembly.cc
.

private 
Determine, based on the runtime parameters of the current simulation, which functions need to be called in order to assemble linear systems, matrices, and right hand side vectors. This function handles the default operation mode of ASPECT, i.e. without considering twophase flow, or Newton solvers.
This function is implemented in source/simulator/assembly.cc
.

private 
Initiate the assembly of the preconditioner for the Stokes system.
This function is implemented in source/simulator/assembly.cc
.

private 
Compute the integrals for the preconditioner for the Stokes system on a single cell.
This function is implemented in source/simulator/assembly.cc
.

private 
Copy the contribution to the preconditioner for the Stokes system from a single cell into the global matrix that stores these elements.
This function is implemented in source/simulator/assembly.cc
.

private 
Compute the integrals for the Stokes matrix and right hand side on a single cell.
This function is implemented in source/simulator/assembly.cc
.

private 
Copy the contribution to the Stokes system from a single cell into the global matrix that stores these elements.
This function is implemented in source/simulator/assembly.cc
.

private 
Compute the integrals for one advection matrix and right hand side on the faces of a single cell.
This function is implemented in source/simulator/assembly.cc
.

private 
Compute the integrals for one advection matrix and right hand side on a single cell.
This function is implemented in source/simulator/assembly.cc
.

private 
Copy the contribution to the advection system from a single cell into the global matrix that stores these elements.
This function is implemented in source/simulator/assembly.cc
.

private 
This routine adjusts the second block of the right hand side of a Stokes system (containing the term that comes from compressibility, so that the system becomes compatible: . The vector to adjust is given as the argument of this function. This function makes use of the helper vector pressure_shape_function_integrals that contains with the pressure functions and we adjust the right hand side by .
The purpose of this function is described in the second paper on the numerical methods in Aspect.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Fills a vector with the artificial viscosity for the temperature or composition on each local cell.
viscosity_per_cell  Output vector 
advection_field  Determines whether this variable should select the temperature field or a compositional field. 
skip_interior_cells  A boolean flag. If set to true the function will only compute the artificial viscosity in cells at boundaries. 

private 
Compute the seismic shear wave speed, Vs anomaly per element. we compute the anomaly by computing a smoothed (over 200 km or so) laterally averaged temperature profile and associated seismic velocity that is then subtracted from the seismic velocity at the current pressure temperature conditions
values  The output vector of depth averaged values. The function takes the preexisting size of this vector as the number of depth slices. 

private 
Compute the seismic pressure wave speed, Vp anomaly per element. we compute the anomaly by computing a smoothed (over 200 km or so) laterally averaged temperature profile and associated seismic velocity that is then subtracted from the seismic velocity at the current pressure temperature conditions
This function is implemented in source/simulator/helper_functions.cc
.
values  The output vector of depth averaged values. The function takes the preexisting size of this vector as the number of depth slices. 

private 
Adjust the pressure variable (which is only determined up to a constant by the equations, though its value may enter traction boundary conditions) by adding a constant to it in such a way that the pressure on the surface or within the entire volume has a known average value. The point of this function is that the pressure that results from solving the linear system may not coincide with what we think of as the "physical pressure"; in particular, we typically think of the pressure as zero (on average) along the surface because it is the sum of the hydrostatic and dynamic pressure, where the former is thought of as zero along the surface. This function therefore converts from the "mathematical" pressure to the "physical" pressure so that all following postprocessing steps can use the latter.
In the case of the surface average, whether a face is part of the surface is determined by asking whether its depth of its midpoint (as determined by the geometry model) is less than 1/3*1/sqrt(dim1)*diameter of the face. For reasonably curved boundaries, this rules out side faces that are perpendicular to the surface boundary but includes those faces that are along the boundary even if the real boundary is curved.
Whether the pressure should be normalized based on the surface or volume average is decided by a parameter in the input file.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Invert the action of the normalize_pressure() function above. This means that we move from a pressure that satisfies the pressure normalization (e.g., has a zero average pressure, or a zero average surface pressure) to one that does not actually satisfy this normalization, and this doesn't seem to make sense because we are not interested in such a pressure.
Indeed, this function is only called at the very beginning of solve_stokes() before we compute the initial (linear) residual of the linear system that corresponds to the Stokes system, where is the variable for which the pressure is adjusted back to the "wrong" form. Because stokes_system() calls normalize_pressure() at the end of its operations, no such "wrong" pressure ever escapes the realm of solve_stokes(). The "wrong" pressure is then used for two purposes in that function: (i) To compute the initial Stokes residual, which makes sense because it can only be zero (if we solved the same linear system twice) if we reuse the exact same pressure as we got from the previous solve – i.e., before we called normalize_pressure() at the end of the solve. (ii) To initialize the solution vector before calling the GMRES solver, which also makes sense because the best guess vector for GMRES is the one that had previously come out of GMRES, namely the one on which we later called normalize_pressure().
This function modifies vector
inplace. In some cases, we need locally_relevant values of the pressure. To avoid creating a new vector and transferring data, this function uses a second vector with relevant dofs (relevant_vector
) for accessing these pressure values. Both vector
and relevant_vector
are expected to already contain the correct pressure values.
pressure_adjustment
function argument that would typically have been computed and returned by the normalize_pressure() function. This value is typically stored in the member variable last_pressure_normalization_adjustment
, but the current function doesn't read this variable but instead gets the adjustment variable from the given argument.This function is implemented in source/simulator/helper_functions.cc
.

private 
Apply the bound preserving limiter to the discontinuous Galerkin solutions: i.e., given two fixed upper and lower bound [min, max], after applying the limiter, the discontinuous Galerkin solution will stay in the prescribed bounds.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Compute the reactions in case of operator splitting: Using the current solution vector, this function makes a number of time steps determined by the size of the reaction time step, and solves a system of coupled ordinary differential equations for the reactions between compositional fields and temperature in each of them. To do that, is uses the reaction rates outputs from the material and heating models used in the computation. The solution vector is then updated with the new values of temperature and composition after the reactions.
As the ordinary differential equation in any given point is independent from the solution at all other points, we do not have to assemble a matrix, but just need to loop over all node locations for the temperature and compositional fields and compute the update to the solution.
The function also updates the old solution vectors with the reaction update so that the advection time stepping scheme will have the correct field terms for the righthand side when assembling the advection system.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Interpolate material model outputs onto a compositional field. For the field whose index is given in the compositional_index
, this function asks the material model to fill a MaterialModel::MaterialModelOutputs object that has an attached MaterialModel::PrescribedFieldOutputs "additional outputs" object. The MaterialModel::MaterialModelInputs object passed to the material model then contains the support points of the compositional field, thereby allowing the outputs to be interpolated to the finite element space and consequently into the solution vector. This is useful for compositional fields whose advection mode is set to Parameters::AdvectionFieldMethod::prescribed_field.
This function also sets the previous solution vectors (corresponding to the solution from previous time steps) to the same interpolated values. This implies that the compositional field method can then be combined with timedependent problems like advection or diffusion of the field.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Interpolate the given function onto the velocity FE space and write it into the given vector.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Add constraints to the given constraints
object that are required for unique solvability of the velocity block based on the nullspace removal settings.
This method will add a zero Dirichlet constraint for the first velocity unknown in the domain for each velocity component, which is later being processed for translational or linear momentum removal. This avoids breakdowns of the linear solvers that otherwise occurred in some instances.

private 
Eliminate the nullspace of the velocity in the given vector. Both vectors are expected to contain the up to date data.
relevant_dst  locally relevant vector for the whole FE, will be filled at the end. 
tmp_distributed_stokes  only contains velocity and pressure. 
This function is implemented in source/simulator/nullspace.cc
.

private 
Remove the angular momentum of the given vector
use_constant_density  determines whether to use a constant density (which corresponds to removing a net rotation instead of net angular momentum). 
relevant_dst  locally relevant vector for the whole FE, will be filled at the end. 
tmp_distributed_stokes  only contains velocity and pressure. 
This function is implemented in source/simulator/nullspace.cc
.

private 
Offset the boundary id of all faces located on an outflow boundary by a fixed value given by the input parameter boundary_id_offset
.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Undo the offset of the boundary ids done in replace_outflow_boundary_ids by resetting all boundary ids to their original value.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Remove the linear momentum of the given vector
use_constant_density  determines whether to use a constant density (which corresponds to removing a net translation instead of net linear momentum). 
relevant_dst  locally relevant vector for the whole FE, will be filled at the end. 
tmp_distributed_stokes  only contains velocity and pressure. 
This function is implemented in source/simulator/nullspace.cc
.

private 
Compute the maximal velocity throughout the domain. This is needed to compute the size of the time step.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Compute the variation (i.e., the difference between maximal and minimal value) of the entropy where is the average temperature throughout the domain given as argument to this function.
This function is used in computing the artificial diffusion stabilization term.
This function is implemented in source/simulator/assembly.cc
.

private 
Compute the minimal and maximal temperature throughout the domain from a solution vector extrapolated from the previous time steps. This is needed to compute the artificial diffusion stabilization terms.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Check if timing output should be written in this timestep, and if so write it.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Check if a checkpoint should be written in this timestep. Is so create one. Returns whether a checkpoint was written.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Check if we should do an initial refinement cycle in this timestep. This will only be checked in timestep 0, afterwards the variable pre_refinement_step variable is invalidated, and this function will return without doing refinement. An initial refinement cycle is different from a regular one, because time is not increased. Instead the same timestep is solved using the new mesh. Therefore, only output timing information and postprocessor output if required in the input file. But always output statistics (to have a history of the number of cells in the statistics file). This function returns whether an initial refinement was done.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Check if refinement is requested in this timestep. If so: Refine mesh. The max_refinement_level
might be increased from this time on if this is an additional refinement cycle.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Compute the size of the next time step from the mesh size and the velocity on each cell. The computed time step has to satisfy the CFL number chosen in the input parameter file on each cell of the mesh. If specified in the parameter file, the time step will be the minimum of the convection and conduction time steps.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Compute the artificial diffusion coefficient value on a cell given the values and gradients of the solution passed as arguments.
This function is implemented in source/simulator/assembly.cc
.

private 
Compute the residual of one advection equation to be used for the artificial diffusion coefficient value on a cell given the values and gradients of the solution passed as arguments.
This function is implemented in source/simulator/assembly.cc
.

private 
Extract the values of temperature, pressure, composition and optional strain rate for the current linearization point. These values are stored as input arguments for the material model. The compositional fields are extracted with the individual compositional fields as outer vectors and the values at each quadrature point as inner vectors, but the material model needs it the other way round. Hence, this vector of vectors is transposed.
[in]  input_solution  A solution vector (or linear combination of such vectors) with as many entries as there are degrees of freedom in the mesh. It will be evaluated on the cell with which the FEValues object was last reinitialized. 
[in]  input_finite_element_values  The FEValues object that describes the finite element space in use and that is used to evaluate the solution values at the quadrature points of the current cell. 
[in]  cell  The cell on which we are currently evaluating the material model. 
[in]  compute_strainrate  A flag determining whether the strain rate should be computed or not in the output structure. 
[out]  material_model_inputs  The output structure that contains the solution values evaluated at the quadrature points. 
This function is implemented in source/simulator/assembly.cc
.

private 
Return whether the Stokes matrix depends on the values of the solution at the previous time step. This is the case is the coefficients that appear in the matrix (i.e., the viscosity and, in the case of a compressible model, the density) depend on the solution.
This function exists to ensure that the Stokes matrix is rebuilt in time steps where it may have changed, while we want to save the effort of rebuilding it whenever we don't need to.
This function is implemented in source/simulator/helper_functions.cc
.

private 
This function checks that the userselected formulations of the equations are consistent with the other inputs. If an incorrect selection is detected it throws an exception. It for example assures that correct heating terms are selected, and the material model supports the selection of the mass conservation formulation (e.g. incompressible)). If the parameter 'parameters.formulation' is set to 'custom' it only ensures very basic consistency.
This function is implemented in source/simulator/helper_functions.cc
.

private 
This function checks that the userselected boundary conditions do not contain contradictions. If an incorrect selection is detected it throws an exception. This for example assures that not both velocity and traction boundary conditions are prescribed at the same boundary, and that no boundary temperatures are prescribed at a periodic boundary.
This function is implemented in source/simulator/helper_functions.cc
.

private 
Computes the initial Newton residual.

private 
This function computes the Eisenstat Walker linear tolerance used for the Newton iterations in the `iterated Advection and Newton Stokes' solver scheme. The Eisenstat and Walker (1996) method is used for determining the linear tolerance of the iteration after the first iteration. The paper gives two preferred choices of computing this tolerance. Both choices are implemented here with the suggested parameter values and safeguards.

private 
This function is called at the end of each time step and writes the statistics object that contains data like the current time, the number of linear solver iterations, and whatever the postprocessors have generated, to disk.
This function is implemented in source/simulator/helper_functions.cc
.

private 
This routine computes the initial (nonlinear) Stokes residual that is needed as a convergence criterion in models with solver schemes that do nonlinear iterations. We calculate it in the same way as the tolerance for the linear solver, using the norm of the pressure RHS for the pressure part and a residual with zero velocity for the velocity part to get the part of the RHS not balanced by the static pressure.
This function is implemented in source/simulator/helper_functions.cc
.

friend 
Definition at line 1820 of file simulator.h.

friend 
Definition at line 1821 of file simulator.h.

friend 
Definition at line 1822 of file simulator.h.

friend 
Definition at line 1823 of file simulator.h.

private 
A member variable that stores, for the current simulation, what functions need to be called in order to assemble linear systems, matrices, and right hand side vectors.
One would probably want this variable to just be a member of type Assemblers::Manager<dim>, but this requires that this type is declared in the current scope, and that would require including <simulator/assemblers/interface.h> which we don't want because it's big. Consequently, we just store a pointer to such an object, and create the object pointed to at the top of set_assemblers().
Definition at line 873 of file simulator.h.

private 
Definition at line 1566 of file simulator.h.

private 
Unique pointer for an instance of the MeltHandler. This way, if we do not need the machinery for doing melt stuff, we do not even allocate it.
Definition at line 1573 of file simulator.h.

private 
Unique pointer for an instance of the NewtonHandler. This way, if we do not need the machinery for doing Newton stuff, we do not even allocate it.
Definition at line 1580 of file simulator.h.

private 
Definition at line 1582 of file simulator.h.

private 
Definition at line 1583 of file simulator.h.

private 
Definition at line 1584 of file simulator.h.

private 
Definition at line 1587 of file simulator.h.

private 
This stream will log into the file output/log.txt (used automatically by pcout).
Definition at line 1593 of file simulator.h.

private 
Definition at line 1598 of file simulator.h.

private 
Definition at line 1599 of file simulator.h.

private 
Output stream for logging information. Will only output on processor 0.
Definition at line 1605 of file simulator.h.

private 
An object that stores a bunch of statistics such as the number of linear solver iterations, the time corresponding to each time step, etc, as well as whatever the various postprocessors want to put into it.
This variable is written to disk after every time step, by the Simulator::output_statistics() function.
Definition at line 1616 of file simulator.h.

mutableprivate 
Definition at line 1618 of file simulator.h.

private 
In output_statistics(), where we output the statistics object above, we do the actual writing on a separate thread. This variable is the handle we get for this thread so that we can wait for it to finish, either if we want to write the statistics object for the next thread, or if we want to terminate altogether.
Definition at line 1627 of file simulator.h.

private 
Definition at line 1636 of file simulator.h.

private 
Definition at line 1637 of file simulator.h.

private 
Definition at line 1638 of file simulator.h.

private 
Definition at line 1639 of file simulator.h.

private 
Definition at line 1640 of file simulator.h.

private 
Definition at line 1641 of file simulator.h.

private 
Definition at line 1642 of file simulator.h.

private 
Definition at line 1643 of file simulator.h.

private 
Definition at line 1644 of file simulator.h.

private 
Definition at line 1645 of file simulator.h.

private 
Definition at line 1646 of file simulator.h.

private 
Definition at line 1647 of file simulator.h.

private 
Definition at line 1648 of file simulator.h.

private 
Definition at line 1649 of file simulator.h.

private 
Definition at line 1650 of file simulator.h.

private 
Definition at line 1659 of file simulator.h.

private 
Definition at line 1660 of file simulator.h.

private 
Definition at line 1661 of file simulator.h.

private 
Definition at line 1662 of file simulator.h.

private 
Definition at line 1663 of file simulator.h.

private 
Definition at line 1664 of file simulator.h.

private 
Definition at line 1673 of file simulator.h.

private 
Definition at line 1682 of file simulator.h.

private 
Definition at line 1691 of file simulator.h.

private 
Definition at line 1692 of file simulator.h.

private 
Definition at line 1693 of file simulator.h.

private 
Definition at line 1695 of file simulator.h.

private 
Definition at line 1696 of file simulator.h.

private 
Pointer to the Mapping object used by the finite elements when going from the reference cell to the cell in the computational domain. We use a pointer since different mapping objects may be useful. In particular, when the mesh is deformable we use a MappingQ1Eulerian object to describe the mesh deformation, swapping it in for the original MappingQ or MappingCartesian object.
Definition at line 1706 of file simulator.h.

private 
Definition at line 1708 of file simulator.h.

private 
Definition at line 1710 of file simulator.h.

private 
Definition at line 1712 of file simulator.h.

private 
Constraint objects. The first of these describes all constraints that are not time dependent (e.g., hanging nodes, nonormalflux constraints), whereas the second one is initialized at the top of every time step by copying from the first and then adding to it constraints that are time dependent (e.g., time dependent velocity or temperature boundary conditions).
'constraints' is computed in setup_dofs(), 'current_constraints' is done in compute_current_constraints().
Definition at line 1725 of file simulator.h.

private 
Definition at line 1726 of file simulator.h.

private 
A place to store the latest correction computed by normalize_pressure(). We store this so we can undo the correction in denormalize_pressure().
Definition at line 1732 of file simulator.h.

private 
Scaling factor for the pressure as explained in the Kronbichler/Heister/Bangerth paper to ensure that the linear system that results from the Stokes equations is well conditioned.
Definition at line 1739 of file simulator.h.

private 
A variable that determines whether we need to do the correction of the Stokes right hand side vector to ensure that the average divergence is zero. This is necessary for compressible models, but only if there are no in/outflow boundaries.
Definition at line 1747 of file simulator.h.

private 
An object that contains the entries of the system matrix. It has a size equal to the total number of degrees of freedom, but since we typically do not solve for all variables at once, the content of the matrix at any given time is only appropriate for the part of the system we are currently solving.
Definition at line 1767 of file simulator.h.

private 
An object that contains the entries of preconditioner matrices for the system matrix. It has a size equal to the total number of degrees of freedom, but is only used for the Stokes system (that's the only part of the system where we use a matrix for preconditioning that is different from the matrix we solve). Consequently, the blocks in rows and columns corresponding to temperature or compositional fields are left empty when building the sparsity pattern of this matrix in the Simulator::setup_system_preconditioner() function.
Definition at line 1781 of file simulator.h.

private 
Definition at line 1783 of file simulator.h.

private 
Definition at line 1784 of file simulator.h.

private 
Definition at line 1785 of file simulator.h.

private 
Definition at line 1786 of file simulator.h.

private 
Definition at line 1788 of file simulator.h.

private 
Definition at line 1791 of file simulator.h.

private 
Definition at line 1794 of file simulator.h.

private 
Definition at line 1798 of file simulator.h.

private 
Definition at line 1799 of file simulator.h.

private 
Definition at line 1801 of file simulator.h.

private 
Definition at line 1802 of file simulator.h.

private 
Definition at line 1803 of file simulator.h.

private 
Definition at line 1804 of file simulator.h.

private 
Definition at line 1805 of file simulator.h.

private 
Unique pointer for an instance of the FreeSurfaceHandler. this way, if we do not need the machinery for doing free surface stuff, we do not even allocate it.
Definition at line 1818 of file simulator.h.