ASPECT
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
aspect::MeshDeformation::ParallelUnstructuredInterface< dim > Class Template Referenceabstract
Inheritance diagram for aspect::MeshDeformation::ParallelUnstructuredInterface< dim >:
Inheritance graph
[legend]

Classes

struct  DofToEvalPointData
 

Public Member Functions

virtual void compute_velocity_constraints_on_boundary (const DoFHandler< dim > &mesh_deformation_dof_handler, AffineConstraints< double > &mesh_velocity_constraints, const std::set< types::boundary_id > &boundary_ids) const override
 
virtual std::vector< Tensor< 1, dim > > compute_updated_velocities_at_points (const std::vector< std::vector< double >> &current_solution_at_points) const =0
 
- Public Member Functions inherited from aspect::MeshDeformation::Interface< dim >
virtual bool needs_surface_stabilization () const
 
virtual Tensor< 1, dim > compute_initial_deformation_on_boundary (const types::boundary_id boundary_indicator, const Point< dim > &position) const
 
virtual void compute_initial_deformation_as_constraints (const Mapping< dim > &mapping, const DoFHandler< dim > &mesh_deformation_dof_handler, const types::boundary_id boundary_indicator, AffineConstraints< double > &constraints) const
 
- Public Member Functions inherited from aspect::Plugins::InterfaceBase
virtual ~InterfaceBase ()=default
 
virtual void initialize ()
 
virtual void update ()
 
virtual void parse_parameters (ParameterHandler &prm)
 
virtual void save (std::map< std::string, std::string > &status_strings) const
 
virtual void load (const std::map< std::string, std::string > &status_strings)
 
- Public Member Functions inherited from aspect::SimulatorAccess< dim >
 SimulatorAccess ()
 
 SimulatorAccess (const Simulator< dim > &simulator_object)
 
virtual ~SimulatorAccess ()
 
virtual void initialize_simulator (const Simulator< dim > &simulator_object)
 
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
 
const TimeStepping::Manager< dim > & get_timestepping_manager () 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
 
unsigned int get_checkpoint_id () const
 
bool include_adiabatic_heating () const
 
bool include_latent_heat () const
 
bool include_melt_transport () const
 
int get_stokes_velocity_degree () const
 
double get_adiabatic_surface_temperature () 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
 
double get_end_time () 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
 
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
 
const MaterialModel::Interface< dim > & get_material_model () const
 
const GravityModel::Interface< dim > & get_gravity_model () const
 
const InitialTopographyModel::Interface< dim > & get_initial_topography_model () const
 
const std::shared_ptr< const InitialTopographyModel::Interface< dim > > get_initial_topography_model_pointer () const
 
const GeometryModel::Interface< dim > & get_geometry_model () const
 
const AdiabaticConditions::Interface< dim > & get_adiabatic_conditions () const
 
bool has_boundary_temperature () const
 
const BoundaryTemperature::Manager< dim > & get_boundary_temperature_manager () const
 
const BoundaryConvectiveHeating::Manager< dim > & get_boundary_convective_heating_manager () const
 
const BoundaryHeatFlux::Interface< dim > & get_boundary_heat_flux () const
 
bool has_boundary_composition () const
 
const BoundaryComposition::Manager< dim > & get_boundary_composition_manager () const
 
const BoundaryTraction::Manager< dim > & get_boundary_traction_manager () const
 
std::shared_ptr< const InitialTemperature::Manager< dim > > get_initial_temperature_manager_pointer () const
 
const InitialTemperature::Manager< dim > & get_initial_temperature_manager () const
 
std::shared_ptr< const InitialComposition::Manager< dim > > get_initial_composition_manager_pointer () 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_convective_heating_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 PrescribedDilation::Manager< dim > & get_prescribed_dilation_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
 
const Postprocess::Manager< dim > & get_postprocess_manager () const
 
unsigned int n_particle_managers () const
 
const Particle::Manager< dim > & get_particle_manager (const unsigned int particle_manager_index) const
 
Particle::Manager< dim > & get_particle_manager (const unsigned int particle_manager_index)
 
bool is_stokes_matrix_free ()
 
const StokesMatrixFreeHandler< dim > & get_stokes_matrix_free () const
 
const PrescribedSolution::Manager< dim > & get_prescribed_solution () const
 
RotationProperties< dim > compute_net_angular_momentum (const bool use_constant_density, const LinearAlgebra::BlockVector &solution, const bool limit_to_top_faces=false) const
 
void remove_nullspace (LinearAlgebra::BlockVector &solution, LinearAlgebra::BlockVector &distributed_stokes_solution) const
 
double normalize_pressure (LinearAlgebra::BlockVector &vector) const
 
void denormalize_pressure (const double pressure_adjustment, LinearAlgebra::BlockVector &vector) const
 

Protected Member Functions

void set_evaluation_points (const std::vector< Point< dim >> &evaluation_points)
 
std::vector< std::vector< double > > evaluate_aspect_solution_at_points () const
 
LinearAlgebra::Vector interpolate_external_velocities_to_surface_support_points (const std::vector< Tensor< 1, dim >> &velocities) const
 

Protected Attributes

std::vector< Point< dim > > evaluation_points
 
std::unique_ptr< Utilities::MPI::RemotePointEvaluation< dim, dim > > remote_point_evaluator
 
std::vector< DofToEvalPointDatamap_dof_to_eval_point
 

Additional Inherited Members

- Static Public Member Functions inherited from aspect::Plugins::InterfaceBase
static void declare_parameters (ParameterHandler &prm)
 
- Static Public Member Functions inherited from aspect::SimulatorAccess< dim >
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::MeshDeformation::ParallelUnstructuredInterface< dim >

This class provides support for writing classes derived from MeshDeformation::Interface when implementing surface deformation models that are based on external tools such as Fastscape, Landlab, OpenLEM, etc. The primary complication of interacting with these external tools is that they generally use their own discretization of surface processes, using a mesh that, in most cases, will be different from the one used by ASPECT. (Of course, ASPECT's use is a volume mesh, whereas surface processes use surface meshes. ASPECT's own surface diffusion, for example, works on the surface faces of ASPECT's mesh, but in general, external tools use a mesh that is entirely unrelated to the surface cells of ASPECT's volume mesh.) In these cases, one needs to implement transfer operations to take ASPECT's solution and interpolate it to the external tool's mesh, run some surface evolution steps, and then interpolate back to the surface nodes of ASPECT's mesh. These interpolation operations are difficult to implement and are especially cumbersome in parallel. This is because the points at which the external tool wants to know the solution on any given MPI process will, in general, not be located on the part of ASPECT's mesh that is owned by that MPI process. As a consequence, implementing the interpolation requires finding the MPI process that owns the cell on which that point is is located, and then communicating back and forth.

This class implements the interpolation functionality for derived classes to use. It works through a two-stage approach:

All three of these functions are protected member functions of this class, ready to be called by derived classes.

All classes derived from MeshDeformation::Interface need to implement the MeshDeformation::Interface::compute_velocity_constraints_on_boundary() function. Because the basic outline of this function looks essentially the same for all external tools, this class also provides a high-level implementation of this function as part of this class. In essence

Definition at line 91 of file parallel_unstructured_interface.h.

Member Function Documentation

§ compute_velocity_constraints_on_boundary()

template<int dim>
virtual void aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::compute_velocity_constraints_on_boundary ( const DoFHandler< dim > &  mesh_deformation_dof_handler,
AffineConstraints< double > &  mesh_velocity_constraints,
const std::set< types::boundary_id > &  boundary_ids 
) const
overridevirtual

Main routine handling the mesh deformation

Reimplemented from aspect::MeshDeformation::Interface< dim >.

§ compute_updated_velocities_at_points()

template<int dim>
virtual std::vector<Tensor<1,dim> > aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::compute_updated_velocities_at_points ( const std::vector< std::vector< double >> &  current_solution_at_points) const
pure virtual

Given all solution variables at each surface point, compute velocities at these points. This needs to be implemented by the derived class and implement the "surface evolution".

§ set_evaluation_points()

template<int dim>
void aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::set_evaluation_points ( const std::vector< Point< dim >> &  evaluation_points)
protected

Declare at which points the external tool driven by a class derived from the current one needs to evaluate the ASPECT solution. Each process will call this function with the points it needs. Different processes will, in general, provide distinct sets of points.

The points provided here are given in the undeformed configuration that corresponds to the initial mesh. For example, if the mesh describes a box geometry, then the points should lie in the \(x\)- \(y\)-plane that forms the top reference surface of the model, and not on the currently deformed top surface that describes the current elevation map.

Note
This function sets up communication structures that encode, among other things, which process owns which points. This information becomes outdated when the ASPECT mesh changes for mesh refinement. As a consequence, the current function sets up a process that invalidates the communication structures upon mesh refinement. Derived classes therefore have to set up their own code to call set_evaluation_points() again when the ASPECT mesh changes, or perhaps simply check whether the information needs to be updated in an overload of the update() function called at the beginning of each time step.

§ evaluate_aspect_solution_at_points()

template<int dim>
std::vector<std::vector<double> > aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::evaluate_aspect_solution_at_points ( ) const
protected

Return the value of the ASPECT solution at the set of points previously set via set_evaluation_points().

For each point, the return object contains a vector with as many components as there are ASPECT solution components.

§ interpolate_external_velocities_to_surface_support_points()

template<int dim>
LinearAlgebra::Vector aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::interpolate_external_velocities_to_surface_support_points ( const std::vector< Tensor< 1, dim >> &  velocities) const
protected

Interpolate from velocities given in the evaluation points to ASPECT velocities on the surface in form of a finite element field.

The velocities, which are typically vertical, were previously computed by the external tool and belong to the current process. The output is a (global) finite element field vector that in the velocity components of surface nodes corresponds to an interpolation of the velocities provided.

The output of this function can then be used as input for a function that implements the compute_velocity_constraints_on_boundary() function of the base class.

Member Data Documentation

§ evaluation_points

template<int dim>
std::vector<Point<dim> > aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::evaluation_points
protected

The list of evaluation points owned by the current process. These are the points where the external tool will receive the ASPECT solution values and return the updated velocities.

Definition at line 178 of file parallel_unstructured_interface.h.

§ remote_point_evaluator

template<int dim>
std::unique_ptr<Utilities::MPI::RemotePointEvaluation<dim, dim> > aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::remote_point_evaluator
protected

deal.II RemotePointEvaluation object used to do point evaluation in the evaluation points.

Definition at line 183 of file parallel_unstructured_interface.h.

§ map_dof_to_eval_point

template<int dim>
std::vector<DofToEvalPointData> aspect::MeshDeformation::ParallelUnstructuredInterface< dim >::map_dof_to_eval_point
protected

A vector to store a map between Dof indices and evaluation points.

The map will contain an entry for each DoF on the surface of the ASPECT mesh and contains the index of the evaluation point that is closest to the DoF. As each support point has several components (x,y,z velocity), the map contains one entry for each component.

In a parallel computation, this map only contains entries for evaluation points owned by the current process. Note that the DoF indices are not necessarily locally owned.

This map is used in interpolate_external_velocities_to_surface_support_points() to copy external velocities to each surface DoF from the closest evaluation point.

Definition at line 221 of file parallel_unstructured_interface.h.


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