Fluid structure interaction suite
ParsedTools::MappingEulerian< dim, spacedim > Class Template Reference

A wrapper class for MappingFEField or MappingQEulerian. More...

#include <mapping_eulerian.h>

Inheritance diagram for ParsedTools::MappingEulerian< dim, spacedim >:
[legend]

Public Member Functions

 MappingEulerian (const DoFHandler< dim, spacedim > &dh, const std::string &section_name="", const std::string &initial_configuration_or_displacement="", const bool use_displacement=false, const ComponentMask &mask=ComponentMask())
 
template<typename VectorType >
void initialize (VectorType &configuration_or_displacement)
 Actually build the mapping from the given configuration or displacement. More...
 
template<typename VectorType >
void initialize (VectorType &configuration_or_displacement, VectorType &locally_relevant_configuration_or_displacement)
 Actually build the mapping from the given configuration or displacement. More...
 
 operator const Mapping< dim, spacedim > & () const
 Act as mapping. More...
 
const Mapping< dim, spacedim > & operator() () const
 Return a reference to the actual mapping. More...
 
- Public Member Functions inherited from ParameterAcceptor
 ParameterAcceptor (const std::string &section_name="")
 
unsigned int get_acceptor_id () const
 
virtual ~ParameterAcceptor () override
 
virtual void declare_parameters (ParameterHandler &prm)
 
virtual void parse_parameters (ParameterHandler &prm)
 
std::string get_section_name () const
 
std::vector< std::string > get_section_path () const
 
void add_parameter (const std::string &entry, ParameterType &parameter, const std::string &documentation="", ParameterHandler &prm_=prm, const Patterns::PatternBase &pattern=*Patterns::Tools::Convert< ParameterType >::to_pattern())
 
void enter_subsection (const std::string &subsection)
 
void leave_subsection ()
 
void enter_my_subsection (ParameterHandler &prm)
 
void leave_my_subsection (ParameterHandler &prm)
 
void serialize (Archive &ar, const unsigned int version)
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void serialize (Archive &ar, const unsigned int version)
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 

Private Attributes

const SmartPointer< const DoFHandler< dim, spacedim > > dof_handler
 A pointer to the dof handler. More...
 
const ComponentMask mask
 What components should be interpreted as the displacement. More...
 
bool use_displacement
 Switch from displacement to configuration. More...
 
std::string initial_configuration_or_displacement_expression
 What configuration to store when the mapping is initialized. More...
 
std::unique_ptr< Mapping< dim, spacedim > > mapping
 The actual mapping. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ParameterAcceptor
static void initialize (const std::string &filename="", const std::string &output_filename="", const ParameterHandler::OutputStyle output_style_for_output_filename=ParameterHandler::Short, ParameterHandler &prm=ParameterAcceptor::prm, const ParameterHandler::OutputStyle output_style_for_filename=ParameterHandler::DefaultStyle)
 
static void initialize (std::istream &input_stream, ParameterHandler &prm=ParameterAcceptor::prm)
 
static void clear ()
 
static void parse_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm)
 
static void declare_all_parameters (ParameterHandler &prm=ParameterAcceptor::prm)
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Public Attributes inherited from ParameterAcceptor
boost::signals2::signal< void()> declare_parameters_call_back
 
boost::signals2::signal< void()> parse_parameters_call_back
 
- Static Public Attributes inherited from ParameterAcceptor
static ParameterHandler prm
 
- Protected Attributes inherited from ParameterAcceptor
const std::string section_name
 
std::vector< std::string > subsections
 

Detailed Description

template<int dim, int spacedim = dim>
class ParsedTools::MappingEulerian< dim, spacedim >

A wrapper class for MappingFEField or MappingQEulerian.

This class can be used to create a mapping object that transforms the triangulation it is applied to, according to a FiniteElement field, defined by a vector based DoFHandler object and the corresponding field.

This class is used in the following way:

"2*x; .5*y");
Vector<double> position(dof_handler.n_dofs());
mapping.initialize(position);
// using mapping, now you can initialize an FEValues object which will see
// a grid which is strecthed by 2 in the horizontal
// direction, and compressed by 0.5 in the vertical direction
A wrapper class for MappingFEField or MappingQEulerian.
std::unique_ptr< Mapping< dim, spacedim > > mapping
The actual mapping.
const SmartPointer< const DoFHandler< dim, spacedim > > dof_handler
A pointer to the dof handler.

This is the base class to be used in elasticity problems, where the mapping represents the actual physical configuration of the problem, or in ALE problems, where the computational domain is mapped back to a reference domain. In this case, the reference domain is the one stored in the DoFHandler and Triangulation objects, while the computational domain is the domain deformed according to the displacement vector used to initialize this class.

Upon construction, the class is not usable. Befor you can use it, you should call the initialize() method, or the reset() method.

Notice that the initialize() method actually sets the displacement vector according to what is specified in the paramter file, while the reset() method assumes that the vector is already initialized to the correct values, and simply resets the internal MappingEulerian or MappingQEulerian objects.

Definition at line 74 of file mapping_eulerian.h.

Constructor & Destructor Documentation

◆ MappingEulerian()

template<int dim, int spacedim>
ParsedTools::MappingEulerian< dim, spacedim >::MappingEulerian ( const DoFHandler< dim, spacedim > &  dh,
const std::string &  section_name = "",
const std::string &  initial_configuration_or_displacement = "",
const bool  use_displacement = false,
const ComponentMask mask = ComponentMask() 
)

Member Function Documentation

◆ initialize() [1/2]

template<int dim, int spacedim = dim>
template<typename VectorType >
void ParsedTools::MappingEulerian< dim, spacedim >::initialize ( VectorType &  configuration_or_displacement)

Actually build the mapping from the given configuration or displacement.

If the initial_configuration_or_displacement parameter is not empty, the input vector is modified to interpolate the given configuration or displacement, otherwise the identity configuration is used.

◆ initialize() [2/2]

template<int dim, int spacedim = dim>
template<typename VectorType >
void ParsedTools::MappingEulerian< dim, spacedim >::initialize ( VectorType &  configuration_or_displacement,
VectorType &  locally_relevant_configuration_or_displacement 
)

Actually build the mapping from the given configuration or displacement.

If the initial_configuration_or_displacement parameter is not empty, the input vector is modified to interpolate the given configuration or displacement, otherwise the identity configuration is used.

◆ operator const Mapping< dim, spacedim > &()

template<int dim, int spacedim>
ParsedTools::MappingEulerian< dim, spacedim >::operator const Mapping< dim, spacedim > &

Act as mapping.

Definition at line 57 of file mapping_eulerian.cc.

References AssertThrow, and StandardExceptions::ExcMessage().

◆ operator()()

template<int dim, int spacedim>
const Mapping< dim, spacedim > & ParsedTools::MappingEulerian< dim, spacedim >::operator()

Return a reference to the actual mapping.

Definition at line 70 of file mapping_eulerian.cc.

References AssertThrow, and StandardExceptions::ExcMessage().

Member Data Documentation

◆ dof_handler

template<int dim, int spacedim = dim>
const SmartPointer<const DoFHandler<dim, spacedim> > ParsedTools::MappingEulerian< dim, spacedim >::dof_handler
private

A pointer to the dof handler.

Definition at line 122 of file mapping_eulerian.h.

◆ mask

template<int dim, int spacedim = dim>
const ComponentMask ParsedTools::MappingEulerian< dim, spacedim >::mask
private

What components should be interpreted as the displacement.

Definition at line 127 of file mapping_eulerian.h.

Referenced by ParsedTools::MappingEulerian< dim, spacedim >::MappingEulerian().

◆ use_displacement

template<int dim, int spacedim = dim>
bool ParsedTools::MappingEulerian< dim, spacedim >::use_displacement
private

Switch from displacement to configuration.

Definition at line 132 of file mapping_eulerian.h.

◆ initial_configuration_or_displacement_expression

template<int dim, int spacedim = dim>
std::string ParsedTools::MappingEulerian< dim, spacedim >::initial_configuration_or_displacement_expression
private

What configuration to store when the mapping is initialized.

Definition at line 137 of file mapping_eulerian.h.

Referenced by ParsedTools::MappingEulerian< dim, spacedim >::MappingEulerian().

◆ mapping

template<int dim, int spacedim = dim>
std::unique_ptr<Mapping<dim, spacedim> > ParsedTools::MappingEulerian< dim, spacedim >::mapping
private

The actual mapping.

Definition at line 142 of file mapping_eulerian.h.


The documentation for this class was generated from the following files: