22 #ifndef _aspect_mesh_deformation_interface_h 23 #define _aspect_mesh_deformation_interface_h 37 #include <deal.II/multigrid/mg_transfer_global_coarsening.templates.h> 77 namespace MeshDeformation
95 virtual bool needs_surface_stabilization()
const;
123 compute_initial_deformation_as_constraints(
const Mapping<dim> &mapping,
137 compute_velocity_constraints_on_boundary(
const DoFHandler<dim> &mesh_deformation_dof_handler,
139 const std::set<types::boundary_id> &boundary_ids)
const;
159 const unsigned int compositional_field)
const;
236 template <
class Archive>
237 void save (Archive &ar,
238 const unsigned int version)
const;
244 template <
class Archive>
245 void load (Archive &ar,
246 const unsigned int version);
248 BOOST_SERIALIZATION_SPLIT_MEMBER()
269 register_mesh_deformation
270 (
const std::string &name,
271 const std::string &description,
279 const std::map<types::boundary_id, std::vector<std::string>> &
280 get_active_mesh_deformation_names ()
const;
286 const std::map<types::boundary_id,std::vector<std::unique_ptr<Interface<dim>>>> &
287 get_active_mesh_deformation_models ()
const;
293 const std::set<types::boundary_id> &
294 get_active_mesh_deformation_boundary_indicators ()
const;
301 const std::set<types::boundary_id> &
302 get_tangential_velocity_with_active_mesh_deformation_boundary_indicators ()
const;
309 const std::set<types::boundary_id> &
310 get_tangential_velocity_without_active_mesh_deformation_boundary_indicators ()
const;
316 const std::set<types::boundary_id> &
317 get_boundary_indicators_requiring_stabilization ()
const;
324 const std::set<types::boundary_id> &
325 get_free_surface_boundary_indicators ()
const;
330 double get_free_surface_theta ()
const;
347 get_initial_topography ()
const;
354 get_mesh_displacements ()
const;
360 get_mesh_deformation_dof_handler ()
const;
371 template <
typename MeshDeformationType,
372 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
374 has_matching_mesh_deformation_object ()
const;
387 template <
typename MeshDeformationType,
388 typename =
typename std::enable_if_t<std::is_base_of<Interface<dim>,MeshDeformationType>::value>>
389 const MeshDeformationType &
390 get_matching_mesh_deformation_object ()
const;
399 get_level_mapping(
const unsigned int level)
const;
411 const unsigned int compositional_field)
const;
431 <<
"Could not find entry <" 433 <<
"> among the names of registered mesh deformation objects.");
443 void make_initial_constraints ();
457 void make_constraints ();
463 void compute_mesh_displacements ();
469 void compute_mesh_displacements_gmg ();
479 unsigned int get_mapping_degree ()
const;
486 template <
unsigned int mesh_deformation_fe_degree>
487 void compute_mesh_displacements_gmg_for_degree();
504 void set_initial_topography ();
509 void interpolate_mesh_velocity ();
514 void update_multilevel_deformation ();
702 template <
class Archive>
704 const unsigned int)
const 709 std::map<std::string,std::string> saved_text;
710 for (
const auto &boundary_id_and_mesh_deformation_objects : mesh_deformation_objects)
711 for (
const auto &p : boundary_id_and_mesh_deformation_objects.second)
712 p->
save (saved_text);
719 template <
class Archive>
727 std::map<std::string,std::string> saved_text;
730 for (
const auto &boundary_id_and_mesh_deformation_objects : mesh_deformation_objects)
731 for (
const auto &p : boundary_id_and_mesh_deformation_objects.second)
732 p->
load (saved_text);
739 template <
typename MeshDeformationType,
typename>
744 for (
const auto &object_iterator : mesh_deformation_objects)
745 for (
const auto &p : object_iterator.second)
746 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
755 template <
typename MeshDeformationType,
typename>
757 const MeshDeformationType &
760 AssertThrow(has_matching_mesh_deformation_object<MeshDeformationType> (),
761 ExcMessage(
"You asked MeshDeformation::MeshDeformationHandler::get_matching_mesh_deformation_object() for a " 762 "mesh deformation object of type <" + boost::core::demangle(
typeid(MeshDeformationType).name()) +
"> " 763 "that could not be found in the current model. Activate this " 764 "mesh deformation in the input file."));
766 for (
const auto &object_iterator : mesh_deformation_objects)
767 for (
const auto &p : object_iterator.second)
768 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
769 return Plugins::get_plugin_as_type<MeshDeformationType>(*p);
772 typename std::vector<std::unique_ptr<Interface<dim>>>::const_iterator mesh_def;
773 return Plugins::get_plugin_as_type<MeshDeformationType>(*(*mesh_def));
797 #define ASPECT_REGISTER_MESH_DEFORMATION_MODEL(classname,name,description) \ 798 template class classname<2>; \ 799 template class classname<3>; \ 800 namespace ASPECT_REGISTER_MESH_DEFORMATION_MODEL_ ## classname \ 802 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<2>,classname<2>> \ 803 dummy_ ## classname ## _2d (&aspect::MeshDeformation::MeshDeformationHandler<2>::register_mesh_deformation, \ 804 name, description); \ 805 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<3>,classname<3>> \ 806 dummy_ ## classname ## _3d (&aspect::MeshDeformation::MeshDeformationHandler<3>::register_mesh_deformation, \ 807 name, description); \
virtual void parse_parameters(ParameterHandler &prm)
std::vector< index_type > data
ApplyStabilization(const double stabilization_theta)
#define AssertThrow(cond, exc)
void write_plugin_graph(std::ostream &output_stream)
virtual void load(const std::map< std::string, std::string > &status_strings)
const double free_surface_theta
std::string get_valid_model_names_pattern()
static ::ExceptionBase & ExcMessage(std::string arg1)
void execute(internal::Assembly::Scratch::ScratchBase< dim > &scratch, internal::Assembly::CopyData::CopyDataBase< dim > &data) const override
virtual void save(std::map< std::string, std::string > &status_strings) const
virtual void initialize()
static void declare_parameters(ParameterHandler &prm)
ObserverPointer< const Simulator< dim >, SimulatorAccess< dim > > simulator
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.")