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
139 const std::set<types::boundary_id> &boundary_ids)
const;
216 template <
class Archive>
217 void save (Archive &ar,
218 const unsigned int version)
const;
224 template <
class Archive>
225 void load (Archive &ar,
226 const unsigned int version);
228 BOOST_SERIALIZATION_SPLIT_MEMBER()
250 (const
std::
string &name,
251 const
std::
string &description,
253 std::unique_ptr<
Interface<dim>> (*factory_function) ());
273 const
std::set<
types::boundary_id> &
281 const
std::set<
types::boundary_id> &
289 const
std::set<
types::boundary_id> &
296 const
std::set<
types::boundary_id> &
304 const
std::set<
types::boundary_id> &
351 template <typename MeshDeformationType,
352 typename = typename
std::enable_if_t<
std::is_base_of<
Interface<dim>,MeshDeformationType>::value>>
367 template <typename MeshDeformationType,
368 typename = typename
std::enable_if_t<
std::is_base_of<
Interface<dim>,MeshDeformationType>::value>>
369 const MeshDeformationType &
399 << "Could not find entry <"
401 << "> among the names of registered mesh deformation objects.");
454 template <
unsigned int mesh_deformation_fe_degree>
670 template <class Archive>
672 const
unsigned int)
const
677 std::map<std::string,std::string> saved_text;
679 for (
const auto &p : boundary_id_and_mesh_deformation_objects.second)
680 p->save (saved_text);
687 template <
class Archive>
695 std::map<std::string,std::string> saved_text;
699 for (
const auto &p : boundary_id_and_mesh_deformation_objects.second)
700 p->load (saved_text);
707 template <
typename MeshDeformationType,
typename>
713 for (
const auto &p : object_iterator.second)
714 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
723 template <
typename MeshDeformationType,
typename>
725 const MeshDeformationType &
728 AssertThrow(has_matching_mesh_deformation_object<MeshDeformationType> (),
729 ExcMessage(
"You asked MeshDeformation::MeshDeformationHandler::get_matching_mesh_deformation_object() for a "
730 "mesh deformation object of type <" + boost::core::demangle(
typeid(MeshDeformationType).name()) +
"> "
731 "that could not be found in the current model. Activate this "
732 "mesh deformation in the input file."));
735 for (
const auto &p : object_iterator.second)
736 if (Plugins::plugin_type_matches<MeshDeformationType>(*p))
737 return Plugins::get_plugin_as_type<MeshDeformationType>(*p);
740 typename std::vector<std::unique_ptr<Interface<dim>>>::const_iterator mesh_def;
741 return Plugins::get_plugin_as_type<MeshDeformationType>(*(*mesh_def));
765 #define ASPECT_REGISTER_MESH_DEFORMATION_MODEL(classname,name,description) \
766 template class classname<2>; \
767 template class classname<3>; \
768 namespace ASPECT_REGISTER_MESH_DEFORMATION_MODEL_ ## classname \
770 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<2>,classname<2>> \
771 dummy_ ## classname ## _2d (&aspect::MeshDeformation::MeshDeformationHandler<2>::register_mesh_deformation, \
772 name, description); \
773 aspect::internal::Plugins::RegisterHelper<aspect::MeshDeformation::Interface<3>,classname<3>> \
774 dummy_ ## classname ## _3d (&aspect::MeshDeformation::MeshDeformationHandler<3>::register_mesh_deformation, \
775 name, description); \
const double free_surface_theta
void execute(internal::Assembly::Scratch::ScratchBase< dim > &scratch, internal::Assembly::CopyData::CopyDataBase< dim > &data) const override
ApplyStabilization(const double stabilization_theta)
ObserverPointer< const Simulator< dim >, SimulatorAccess< dim > > simulator
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)