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
96 virtual bool needs_surface_stabilization()
const;
108 compute_initial_deformation_on_boundary(
const types::boundary_id boundary_indicator,
109 const Point<dim> &position)
const;
120 compute_velocity_constraints_on_boundary(
const DoFHandler<dim> &mesh_deformation_dof_handler,
121 AffineConstraints<double> &mesh_velocity_constraints,
122 const std::set<types::boundary_id> &boundary_id)
const;
193 void parse_parameters (ParameterHandler &prm);
214 register_mesh_deformation
215 (
const std::string &name,
216 const std::string &description,
217 void (*declare_parameters_function) (ParameterHandler &),
224 const std::map<types::boundary_id, std::vector<std::string>> &
225 get_active_mesh_deformation_names ()
const;
231 const std::map<types::boundary_id,std::vector<std::unique_ptr<Interface<dim>>>> &
232 get_active_mesh_deformation_models ()
const;
238 const std::set<types::boundary_id> &
239 get_active_mesh_deformation_boundary_indicators ()
const;
245 const std::set<types::boundary_id> &
246 get_boundary_indicators_requiring_stabilization ()
const;
253 const std::set<types::boundary_id> &
254 get_free_surface_boundary_indicators ()
const;
259 double get_free_surface_theta ()
const;
276 get_initial_topography ()
const;
283 get_mesh_displacements ()
const;
288 const DoFHandler<dim> &
289 get_mesh_deformation_dof_handler ()
const;
300 template <
typename MeshDeformationType,
301 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
303 has_matching_mesh_deformation_object ()
const;
316 template <
typename MeshDeformationType,
317 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
318 const MeshDeformationType &
319 get_matching_mesh_deformation_object ()
const;
328 get_level_mapping(
const unsigned int level)
const;
348 <<
"Could not find entry <" 350 <<
"> among the names of registered mesh deformation objects.");
360 void make_initial_constraints ();
374 void make_constraints ();
380 void compute_mesh_displacements ();
386 void compute_mesh_displacements_gmg ();
403 void set_initial_topography ();
408 void interpolate_mesh_velocity ();
413 void update_multilevel_deformation ();
576 template <
typename MeshDeformationType,
typename>
581 for (
const auto &object_iterator : mesh_deformation_objects)
582 for (
const auto &p : object_iterator.second)
583 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
592 template <
typename MeshDeformationType,
typename>
594 const MeshDeformationType &
597 AssertThrow(has_matching_mesh_deformation_object<MeshDeformationType> (),
598 ExcMessage(
"You asked MeshDeformation::MeshDeformationHandler::get_matching_mesh_deformation_object() for a " 599 "mesh deformation object of type <" + boost::core::demangle(
typeid(MeshDeformationType).name()) +
"> " 600 "that could not be found in the current model. Activate this " 601 "mesh deformation in the input file."));
603 for (
const auto &object_iterator : mesh_deformation_objects)
604 for (
const auto &p : object_iterator.second)
605 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
606 return Plugins::get_plugin_as_type<MeshDeformationType>(*p);
609 typename std::vector<std::unique_ptr<Interface<dim>>>::const_iterator mesh_def;
610 return Plugins::get_plugin_as_type<MeshDeformationType>(*(*mesh_def));
634 #define ASPECT_REGISTER_MESH_DEFORMATION_MODEL(classname,name,description) \ 635 template class classname<2>; \ 636 template class classname<3>; \ 637 namespace ASPECT_REGISTER_MESH_DEFORMATION_MODEL_ ## classname \ 639 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<2>,classname<2>> \ 640 dummy_ ## classname ## _2d (&aspect::MeshDeformation::MeshDeformationHandler<2>::register_mesh_deformation, \ 641 name, description); \ 642 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<3>,classname<3>> \ 643 dummy_ ## classname ## _3d (&aspect::MeshDeformation::MeshDeformationHandler<3>::register_mesh_deformation, \ 644 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.")