22 #ifndef _aspect_mesh_deformation_interface_h 23 #define _aspect_mesh_deformation_interface_h 29 #include <deal.II/fe/fe_system.h> 30 #include <deal.II/dofs/dof_handler.h> 31 #include <deal.II/lac/affine_constraints.h> 32 #include <deal.II/base/index_set.h> 33 #include <deal.II/base/mg_level_object.h> 34 #include <deal.II/lac/la_parallel_vector.h> 35 #include <deal.II/multigrid/mg_constrained_dofs.h> 36 #include <deal.II/multigrid/mg_transfer_matrix_free.h> 37 #include <deal.II/multigrid/mg_transfer_global_coarsening.templates.h> 80 namespace MeshDeformation
98 virtual bool needs_surface_stabilization()
const;
110 compute_initial_deformation_on_boundary(
const types::boundary_id boundary_indicator,
111 const Point<dim> &position)
const;
122 compute_velocity_constraints_on_boundary(
const DoFHandler<dim> &mesh_deformation_dof_handler,
123 AffineConstraints<double> &mesh_velocity_constraints,
124 const std::set<types::boundary_id> &boundary_id)
const;
195 void parse_parameters (ParameterHandler &prm);
216 register_mesh_deformation
217 (
const std::string &name,
218 const std::string &description,
219 void (*declare_parameters_function) (ParameterHandler &),
226 const std::map<types::boundary_id, std::vector<std::string>> &
227 get_active_mesh_deformation_names ()
const;
233 const std::map<types::boundary_id,std::vector<std::unique_ptr<Interface<dim>>>> &
234 get_active_mesh_deformation_models ()
const;
240 const std::set<types::boundary_id> &
241 get_active_mesh_deformation_boundary_indicators ()
const;
247 const std::set<types::boundary_id> &
248 get_boundary_indicators_requiring_stabilization ()
const;
255 const std::set<types::boundary_id> &
256 get_free_surface_boundary_indicators ()
const;
261 double get_free_surface_theta ()
const;
278 get_initial_topography ()
const;
285 get_mesh_displacements ()
const;
290 const DoFHandler<dim> &
291 get_mesh_deformation_dof_handler ()
const;
302 template <
typename MeshDeformationType,
303 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
305 has_matching_mesh_deformation_object ()
const;
318 template <
typename MeshDeformationType,
319 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
320 const MeshDeformationType &
321 get_matching_mesh_deformation_object ()
const;
330 get_level_mapping(
const unsigned int level)
const;
350 <<
"Could not find entry <" 352 <<
"> among the names of registered mesh deformation objects.");
362 void make_initial_constraints ();
376 void make_constraints ();
382 void compute_mesh_displacements ();
388 void compute_mesh_displacements_gmg ();
405 void set_initial_topography ();
410 void interpolate_mesh_velocity ();
415 void update_multilevel_deformation ();
578 template <
typename MeshDeformationType,
typename>
583 for (
const auto &object_iterator : mesh_deformation_objects)
584 for (
const auto &p : object_iterator.second)
585 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
594 template <
typename MeshDeformationType,
typename>
596 const MeshDeformationType &
599 AssertThrow(has_matching_mesh_deformation_object<MeshDeformationType> (),
600 ExcMessage(
"You asked MeshDeformation::MeshDeformationHandler::get_matching_mesh_deformation_object() for a " 601 "mesh deformation object of type <" + boost::core::demangle(
typeid(MeshDeformationType).name()) +
"> " 602 "that could not be found in the current model. Activate this " 603 "mesh deformation in the input file."));
605 for (
const auto &object_iterator : mesh_deformation_objects)
606 for (
const auto &p : object_iterator.second)
607 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
608 return Plugins::get_plugin_as_type<MeshDeformationType>(*p);
611 typename std::vector<std::unique_ptr<Interface<dim>>>::const_iterator mesh_def;
612 return Plugins::get_plugin_as_type<MeshDeformationType>(*(*mesh_def));
636 #define ASPECT_REGISTER_MESH_DEFORMATION_MODEL(classname,name,description) \ 637 template class classname<2>; \ 638 template class classname<3>; \ 639 namespace ASPECT_REGISTER_MESH_DEFORMATION_MODEL_ ## classname \ 641 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<2>,classname<2>> \ 642 dummy_ ## classname ## _2d (&aspect::MeshDeformation::MeshDeformationHandler<2>::register_mesh_deformation, \ 643 name, description); \ 644 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<3>,classname<3>> \ 645 dummy_ ## classname ## _3d (&aspect::MeshDeformation::MeshDeformationHandler<3>::register_mesh_deformation, \ 646 name, description); \
::TrilinosWrappers::MPI::BlockVector BlockVector
void write_plugin_graph(std::ostream &output_stream)
::TrilinosWrappers::MPI::Vector Vector
const double free_surface_theta
MGTransferMatrixFree< dim, NumberType > MGTransferMF
void declare_parameters(ParameterHandler &prm)
DeclException1(ProbabilityFunctionNegative, Point< dim >,<< "Your probability density function in the particle generator " "returned a negative probability density for the following position: "<< arg1<< ". Please check your function expression.")