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

Wrapper around several functions in the NonMatching namespace. More...

#include <non_matching_coupling.h>

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

Public Types

enum class  CouplingType { approximate_L2 , exact_L2 = 1 << 3 }
 Types of coupling that can used in non-matching coupling. More...
 
enum class  RefinementStrategy { none = 1 << 1 , refine_space = 1 << 2 , refine_embedded = 1 << 3 }
 Refinement strategy. More...
 

Public Member Functions

 NonMatchingCoupling (const std::string &section_name="", const ComponentMask &embedded_mask=ComponentMask(), const ComponentMask &space_mask=ComponentMask(), const CouplingType coupling_type=CouplingType::approximate_L2, const RefinementStrategy refinement_strategy=RefinementStrategy::refine_embedded, const unsigned int space_pre_refinement=0, const unsigned int embedded_post_refinement=0, const std::string &quadrature_type="gauss", const unsigned int quadrature_order=2, const unsigned int quadrature_repetitions=1, double quadrature_tolerance=1e-9)
 Constructor. More...
 
void initialize (const GridTools::Cache< spacedim, spacedim > &space_cache, const DoFHandler< spacedim, spacedim > &space_dh, const AffineConstraints< double > &space_constraints, const GridTools::Cache< dim, spacedim > &embedded_cache, const DoFHandler< dim, spacedim > &embedded_dh, const AffineConstraints< double > &embedded_constraints)
 Initialize the class and return a linear operator representing the coupling matrix. More...
 
template<typename SparsityType >
void assemble_sparsity (SparsityType &sparsity_pattern) const
 Build the coupling sparsity pattern. More...
 
template<typename MatrixType >
void assemble_matrix (MatrixType &matrix) const
 Assemble the coupling matrix. More...
 
CouplingType get_coupling_type () const
 Get the coupling type object. More...
 
void adjust_grid_refinements (Triangulation< spacedim, spacedim > &space_tria, Triangulation< dim, spacedim > &embedded_tria, const bool apply_delta_refinements=true) const
 Adjust grid refinements according to the selected strategy. 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
 

Public Attributes

boost::signals2::signal< void()> embedded_post_refinemnt_signal
 Signals that embedded grid has been just refined. More...
 
boost::signals2::signal< void()> space_post_refinemnt_signal
 Signals that the space grid has been just refined. More...
 
- Public Attributes inherited from ParameterAcceptor
boost::signals2::signal< void()> declare_parameters_call_back
 
boost::signals2::signal< void()> parse_parameters_call_back
 

Protected Attributes

const ComponentMask embedded_mask
 Embedded component mask. More...
 
const ComponentMask space_mask
 Space component mask. More...
 
Quadrature< dim > embedded_quadrature
 Embedded quadrature rule. More...
 
CouplingType coupling_type
 Coupling type. More...
 
RefinementStrategy refinement_strategy
 Refinement strategy. More...
 
unsigned int space_pre_refinement
 Pre refinement to apply on the space mesh. More...
 
unsigned int embedded_post_refinement
 Post refinement to apply on the embedded mesh. More...
 
std::string embedded_quadrature_type
 Embedded quadrature type. More...
 
unsigned int quadrature_order
 Order of the base embedded quadrature. More...
 
unsigned int embedded_quadrature_repetitions
 Number of iterations of the base embedded quadrature. More...
 
SmartPointer< const GridTools::Cache< spacedim, spacedim >, NonMatchingCoupling< dim, spacedim > > space_cache
 Space cache. More...
 
SmartPointer< const DoFHandler< spacedim, spacedim >, NonMatchingCoupling< dim, spacedim > > space_dh
 Space dof handler. More...
 
SmartPointer< const AffineConstraints< double >, NonMatchingCoupling< dim, spacedim > > space_constraints
 Space constraints. More...
 
SmartPointer< const GridTools::Cache< dim, spacedim >, NonMatchingCoupling< dim, spacedim > > embedded_cache
 Embedded cache. More...
 
SmartPointer< const DoFHandler< dim, spacedim >, NonMatchingCoupling< dim, spacedim > > embedded_dh
 Embedded dof handler. More...
 
SmartPointer< const AffineConstraints< double >, NonMatchingCoupling< dim, spacedim > > embedded_constraints
 Embedded constraints. More...
 
double quadrature_tolerance
 Quadrature tolerance. More...
 
std::vector< std::tuple< typename Triangulation< spacedim, spacedim >::cell_iterator, typename Triangulation< dim, spacedim >::cell_iterator, Quadrature< spacedim > > > cells_and_quads
 Store cache information. More...
 
- Protected Attributes inherited from ParameterAcceptor
const std::string section_name
 
std::vector< std::string > subsections
 

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)
 
- Static Public Attributes inherited from ParameterAcceptor
static ParameterHandler prm
 

Detailed Description

template<int dim, int spacedim>
class ParsedTools::NonMatchingCoupling< dim, spacedim >

Wrapper around several functions in the NonMatching namespace.

Template Parameters
dimDimension of the embedded space
spacedimDimension of the embedding space
LacTypeLinear algebra types used to assemble the matrices

Definition at line 48 of file non_matching_coupling.h.

Member Enumeration Documentation

◆ CouplingType

template<int dim, int spacedim>
enum ParsedTools::NonMatchingCoupling::CouplingType
strong

Types of coupling that can used in non-matching coupling.

Enumerator
approximate_L2 
exact_L2 

Definition at line 54 of file non_matching_coupling.h.

◆ RefinementStrategy

template<int dim, int spacedim>
enum ParsedTools::NonMatchingCoupling::RefinementStrategy
strong

Refinement strategy.

Enumerator
none 

No refinement.

refine_space 

Force space grid to be locally smaller than embedded grid.

refine_embedded 

Force embedded grid to be locally smaller than embedded grid.

Definition at line 79 of file non_matching_coupling.h.

Constructor & Destructor Documentation

◆ NonMatchingCoupling()

template<int dim, int spacedim>
ParsedTools::NonMatchingCoupling< dim, spacedim >::NonMatchingCoupling ( const std::string &  section_name = "",
const ComponentMask embedded_mask = ComponentMask(),
const ComponentMask space_mask = ComponentMask(),
const CouplingType  coupling_type = CouplingType::approximate_L2,
const RefinementStrategy  refinement_strategy = RefinementStrategy::refine_embedded,
const unsigned int  space_pre_refinement = 0,
const unsigned int  embedded_post_refinement = 0,
const std::string &  quadrature_type = "gauss",
const unsigned int  quadrature_order = 2,
const unsigned int  quadrature_repetitions = 1,
double  quadrature_tolerance = 1e-9 
)

Member Function Documentation

◆ initialize()

template<int dim, int spacedim>
void ParsedTools::NonMatchingCoupling< dim, spacedim >::initialize ( const GridTools::Cache< spacedim, spacedim > &  space_cache,
const DoFHandler< spacedim, spacedim > &  space_dh,
const AffineConstraints< double > &  space_constraints,
const GridTools::Cache< dim, spacedim > &  embedded_cache,
const DoFHandler< dim, spacedim > &  embedded_dh,
const AffineConstraints< double > &  embedded_constraints 
)

Initialize the class and return a linear operator representing the coupling matrix.

Definition at line 99 of file non_matching_coupling.cc.

◆ assemble_sparsity()

template<int dim, int spacedim>
template<typename SparsityType >
void ParsedTools::NonMatchingCoupling< dim, spacedim >::assemble_sparsity ( SparsityType &  sparsity_pattern) const

Build the coupling sparsity pattern.

Template Parameters
SparsityType
Parameters
sparsity_pattern

◆ assemble_matrix()

template<int dim, int spacedim>
template<typename MatrixType >
void ParsedTools::NonMatchingCoupling< dim, spacedim >::assemble_matrix ( MatrixType &  matrix) const

Assemble the coupling matrix.

◆ get_coupling_type()

template<int dim, int spacedim>
NonMatchingCoupling< dim, spacedim >::CouplingType ParsedTools::NonMatchingCoupling< dim, spacedim >::get_coupling_type

Get the coupling type object.

Returns
const CouplingType

Definition at line 90 of file non_matching_coupling.cc.

◆ adjust_grid_refinements()

template<int dim, int spacedim>
void ParsedTools::NonMatchingCoupling< dim, spacedim >::adjust_grid_refinements ( Triangulation< spacedim, spacedim > &  space_tria,
Triangulation< dim, spacedim > &  embedded_tria,
const bool  apply_delta_refinements = true 
) const

Adjust grid refinements according to the selected strategy.

Definition at line 124 of file non_matching_coupling.cc.

References Assert, StandardExceptions::ExcMessage(), StandardExceptions::ExcNotInitialized(), and DoFHandler< int dim, int spacedim >::get_triangulation().

Member Data Documentation

◆ embedded_post_refinemnt_signal

template<int dim, int spacedim>
boost::signals2::signal<void()> ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_post_refinemnt_signal

Signals that embedded grid has been just refined.

Definition at line 156 of file non_matching_coupling.h.

◆ space_post_refinemnt_signal

template<int dim, int spacedim>
boost::signals2::signal<void()> ParsedTools::NonMatchingCoupling< dim, spacedim >::space_post_refinemnt_signal

Signals that the space grid has been just refined.

Definition at line 161 of file non_matching_coupling.h.

◆ embedded_mask

template<int dim, int spacedim>
const ComponentMask ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_mask
protected

Embedded component mask.

Definition at line 167 of file non_matching_coupling.h.

◆ space_mask

template<int dim, int spacedim>
const ComponentMask ParsedTools::NonMatchingCoupling< dim, spacedim >::space_mask
protected

Space component mask.

Definition at line 172 of file non_matching_coupling.h.

◆ embedded_quadrature

template<int dim, int spacedim>
Quadrature<dim> ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_quadrature
protected

Embedded quadrature rule.

Definition at line 177 of file non_matching_coupling.h.

◆ coupling_type

template<int dim, int spacedim>
CouplingType ParsedTools::NonMatchingCoupling< dim, spacedim >::coupling_type
protected

Coupling type.

Definition at line 182 of file non_matching_coupling.h.

◆ refinement_strategy

template<int dim, int spacedim>
RefinementStrategy ParsedTools::NonMatchingCoupling< dim, spacedim >::refinement_strategy
protected

Refinement strategy.

Definition at line 187 of file non_matching_coupling.h.

◆ space_pre_refinement

template<int dim, int spacedim>
unsigned int ParsedTools::NonMatchingCoupling< dim, spacedim >::space_pre_refinement
protected

Pre refinement to apply on the space mesh.

Definition at line 192 of file non_matching_coupling.h.

◆ embedded_post_refinement

template<int dim, int spacedim>
unsigned int ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_post_refinement
protected

Post refinement to apply on the embedded mesh.

Definition at line 197 of file non_matching_coupling.h.

◆ embedded_quadrature_type

template<int dim, int spacedim>
std::string ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_quadrature_type
protected

Embedded quadrature type.

Definition at line 202 of file non_matching_coupling.h.

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

◆ quadrature_order

template<int dim, int spacedim>
unsigned int ParsedTools::NonMatchingCoupling< dim, spacedim >::quadrature_order
protected

Order of the base embedded quadrature.

Definition at line 207 of file non_matching_coupling.h.

◆ embedded_quadrature_repetitions

template<int dim, int spacedim>
unsigned int ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_quadrature_repetitions
protected

Number of iterations of the base embedded quadrature.

Definition at line 212 of file non_matching_coupling.h.

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

◆ space_cache

template<int dim, int spacedim>
SmartPointer<const GridTools::Cache<spacedim, spacedim>, NonMatchingCoupling<dim, spacedim> > ParsedTools::NonMatchingCoupling< dim, spacedim >::space_cache
protected

Space cache.

Definition at line 219 of file non_matching_coupling.h.

◆ space_dh

template<int dim, int spacedim>
SmartPointer<const DoFHandler<spacedim, spacedim>, NonMatchingCoupling<dim, spacedim> > ParsedTools::NonMatchingCoupling< dim, spacedim >::space_dh
protected

Space dof handler.

Definition at line 226 of file non_matching_coupling.h.

◆ space_constraints

template<int dim, int spacedim>
SmartPointer<const AffineConstraints<double>, NonMatchingCoupling<dim, spacedim> > ParsedTools::NonMatchingCoupling< dim, spacedim >::space_constraints
protected

Space constraints.

Definition at line 233 of file non_matching_coupling.h.

◆ embedded_cache

template<int dim, int spacedim>
SmartPointer<const GridTools::Cache<dim, spacedim>, NonMatchingCoupling<dim, spacedim> > ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_cache
protected

Embedded cache.

Definition at line 240 of file non_matching_coupling.h.

◆ embedded_dh

template<int dim, int spacedim>
SmartPointer<const DoFHandler<dim, spacedim>, NonMatchingCoupling<dim, spacedim> > ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_dh
protected

Embedded dof handler.

Definition at line 247 of file non_matching_coupling.h.

◆ embedded_constraints

template<int dim, int spacedim>
SmartPointer<const AffineConstraints<double>, NonMatchingCoupling<dim, spacedim> > ParsedTools::NonMatchingCoupling< dim, spacedim >::embedded_constraints
protected

Embedded constraints.

Definition at line 254 of file non_matching_coupling.h.

◆ quadrature_tolerance

template<int dim, int spacedim>
double ParsedTools::NonMatchingCoupling< dim, spacedim >::quadrature_tolerance
protected

Quadrature tolerance.

If an intersection integrates to a value smaller than this tolerance, it is discarded during exact intersection.

Definition at line 262 of file non_matching_coupling.h.

◆ cells_and_quads

template<int dim, int spacedim>
std::vector<std::tuple< typename Triangulation<spacedim, spacedim>::cell_iterator, typename Triangulation<dim, spacedim>::cell_iterator, Quadrature<spacedim> > > ParsedTools::NonMatchingCoupling< dim, spacedim >::cells_and_quads
mutableprotected

Store cache information.

Definition at line 271 of file non_matching_coupling.h.


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