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
116 virtual void update();
122 virtual bool needs_surface_stabilization()
const;
134 compute_initial_deformation_on_boundary(
const types::boundary_id boundary_indicator,
135 const Point<dim> &position)
const;
146 compute_velocity_constraints_on_boundary(
const DoFHandler<dim> &mesh_deformation_dof_handler,
147 AffineConstraints<double> &mesh_velocity_constraints,
148 const std::set<types::boundary_id> &boundary_id)
const;
168 parse_parameters (ParameterHandler &prm);
239 void parse_parameters (ParameterHandler &prm);
260 register_mesh_deformation
261 (
const std::string &name,
262 const std::string &description,
263 void (*declare_parameters_function) (ParameterHandler &),
270 const std::map<types::boundary_id, std::vector<std::string>> &
271 get_active_mesh_deformation_names ()
const;
277 const std::map<types::boundary_id,std::vector<std::unique_ptr<Interface<dim>>>> &
278 get_active_mesh_deformation_models ()
const;
284 const std::set<types::boundary_id> &
285 get_active_mesh_deformation_boundary_indicators ()
const;
291 const std::set<types::boundary_id> &
292 get_boundary_indicators_requiring_stabilization ()
const;
299 const std::set<types::boundary_id> &
300 get_free_surface_boundary_indicators ()
const;
305 double get_free_surface_theta ()
const;
322 get_initial_topography ()
const;
329 get_mesh_displacements ()
const;
334 const DoFHandler<dim> &
335 get_mesh_deformation_dof_handler ()
const;
346 template <
typename MeshDeformationType,
347 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
349 has_matching_mesh_deformation_object ()
const;
362 template <
typename MeshDeformationType,
363 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
364 const MeshDeformationType &
365 get_matching_mesh_deformation_object ()
const;
374 get_level_mapping(
const unsigned int level)
const;
394 <<
"Could not find entry <" 396 <<
"> among the names of registered mesh deformation objects.");
406 void make_initial_constraints ();
420 void make_constraints ();
426 void compute_mesh_displacements ();
432 void compute_mesh_displacements_gmg ();
449 void set_initial_topography ();
454 void interpolate_mesh_velocity ();
459 void update_multilevel_deformation ();
622 template <
typename MeshDeformationType,
typename>
627 for (
const auto &object_iterator : mesh_deformation_objects)
628 for (
const auto &p : object_iterator.second)
629 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
638 template <
typename MeshDeformationType,
typename>
640 const MeshDeformationType &
643 AssertThrow(has_matching_mesh_deformation_object<MeshDeformationType> (),
644 ExcMessage(
"You asked MeshDeformation::MeshDeformationHandler::get_matching_mesh_deformation_object() for a " 645 "mesh deformation object of type <" + boost::core::demangle(
typeid(MeshDeformationType).name()) +
"> " 646 "that could not be found in the current model. Activate this " 647 "mesh deformation in the input file."));
649 for (
const auto &object_iterator : mesh_deformation_objects)
650 for (
const auto &p : object_iterator.second)
651 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
652 return Plugins::get_plugin_as_type<MeshDeformationType>(*p);
654 typename std::vector<std::unique_ptr<Interface<dim>>>::const_iterator mesh_def;
656 return Plugins::get_plugin_as_type<MeshDeformationType>(*(*mesh_def));
680 #define ASPECT_REGISTER_MESH_DEFORMATION_MODEL(classname,name,description) \ 681 template class classname<2>; \ 682 template class classname<3>; \ 683 namespace ASPECT_REGISTER_MESH_DEFORMATION_MODEL_ ## classname \ 685 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<2>,classname<2>> \ 686 dummy_ ## classname ## _2d (&aspect::MeshDeformation::MeshDeformationHandler<2>::register_mesh_deformation, \ 687 name, description); \ 688 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<3>,classname<3>> \ 689 dummy_ ## classname ## _3d (&aspect::MeshDeformation::MeshDeformationHandler<3>::register_mesh_deformation, \ 690 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.")