LifeV
DOFInterface3Dto3D Class Reference

#include <DOFInterface3Dto3D.hpp>

+ Inheritance diagram for DOFInterface3Dto3D:
+ Collaboration diagram for DOFInterface3Dto3D:

Public Member Functions

template<typename Mesh >
void updateDofConnections (const Mesh &mesh1, const DOF &dof1, const Mesh &mesh2, const DOF &dof2, const Real &tol, const fct &coupled, Int const *const flag3)
 This method builds the connections between DOF at the interface (M_dofToDofConnectionList container) More...
 
- Public Member Functions inherited from DOFInterface
 DOFInterface ()
 Default Constructor. More...
 
virtual ~DOFInterface ()
 Virtual Destructor. More...
 
ID getInterfaceDof (const ID &i) const
 This method returns the corresponding dof number of the mesh2 at the interface for a specific dof number at the interface in mesh1. More...
 
bool isMyInterfaceDof (const ID &i) const
 This method says whether a specific dof number at the interface in mesh1 is on this processor. More...
 
std::ostream & showMe (bool verbose=false, std::ostream &out=std::cout) const
 output More...
 
void buildInverse (const DOFInterface &dofBase)
 Makes this DOFInterface to be the inverse map as the one defined by dofBase. More...
 
void set (const ID &key, const ID &value)
 Set value to be associated to key. More...
 
size_t nbInterfaceDof () const
 This method returns the number of dof that live on the interface. More...
 
const std::map< ID, ID > & localDofMap ()
 Return the correspondance map. More...
 

Private Types

typedef std::list< std::pair< ID, ID > >::iterator Iterator
 STL iterator type for the lists. More...
 

Private Attributes

const ReferenceFEM_refFE1
 ReferenceFE object used in the mesh in which we want to make the computations. More...
 
const DOFM_dof1
 DOF object of the mesh in which we want to make the computations. More...
 
const ReferenceFEM_refFE2
 ReferenceFE object used in the mesh which provides de data at the interface. More...
 
const DOFM_dof2
 DOF object of the mesh which provides the data at the interface. More...
 
std::shared_ptr< DOFM_dof
 Auxiliary DOF object of the mesh which provides the local to global table when interpolation is used. More...
 
std::list< std::pair< ID, ID > > M_facetToFacetConnectionList
 STL list which holds the connections between facets at the interface. More...
 
std::list< std::pair< ID, ID > > M_dofToDofConnectionList
 Auxiliary STL list which holds the connections between DOF at the interface Empty after calling update. More...
 

Public typedefs

typedef boost::numeric::ublas::vector< RealVector
 
typedef std::function< bool(const std::vector< Real > &, const std::vector< Real > &, const Real &) > fct
 

Constructor & Destructor

 DOFInterface3Dto3D ()
 default constructor More...
 
 DOFInterface3Dto3D (const ReferenceFE &refFE, const DOF &dof1, const DOF &dof2)
 Constructor for interfacing DOF of the same type (ReferenceFE) More...
 
 DOFInterface3Dto3D (const ReferenceFE &refFE1, const DOF &dof1, const ReferenceFE &refFE2, const DOF &dof2)
 Constructor for interfacing DOF of different type (ReferenceFE) More...
 
 DOFInterface3Dto3D (const ReferenceFE &refFE, const DOF &dof)
 Constructor for interfacing DOF of the same type (ReferenceFE) More...
 

Methods

void setup (const ReferenceFE &refFE, const DOF &dof1, const DOF &dof2)
 Setup method for common finite element. More...
 
void setup (const ReferenceFE &refFE1, const DOF &dof1, const ReferenceFE &refFE2, const DOF &dof2)
 Setup method for possibly different finite element. More...
 
template<typename MeshType >
void update (MeshType &mesh1, const markerID_Type &flag1, MeshType &mesh2, const markerID_Type &flag2, const Real &tol, Int const *const flag3=0)
 This method builds the DOF connections at the interface. More...
 
template<typename MeshType >
void update (MeshType &mesh, const markerID_Type &flag1, const markerID_Type &flag2, const Real &tol, const fct &coupled)
 This method builds the DOF connections between two matching surfaces belonging to the same mesh. More...
 
template<typename MeshType >
void interpolate (MeshType &mesh2, const UInt nbComp, const Vector &v, Vector &vI)
 This method interpolate data when using different FE. More...
 

Get Methods

const UIntnumTotalDof () const
 This method returns the corresponding dof object when interpolation is used. More...
 
const std::list< std::pair< ID, ID > > & connectedFacetMap () const
 reference to the list of connected facets. More...
 

Private Methods

template<typename MeshType >
void updateFacetConnections (const MeshType &mesh1, const markerID_Type &flag1, const MeshType &mesh2, const markerID_Type &flag2, const Real &tol, const fct &coupled)
 This method builds the connections between facets at the interface (M_facetToFacetConnectionList container) More...
 
template<typename MeshType >
void updateDofConnections (const MeshType &mesh1, const DOF &dof1, const MeshType &mesh2, const DOF &dof2, const Real &tol, const fct &coupled, Int const *const flag3=0)
 This method builds the connections between DOF at the interface (M_dofToDofConnectionList container) More...
 

Additional Inherited Members

- Protected Attributes inherited from DOFInterface
std::map< ID, IDM_localDofMap
 STL map container which holds the connections between DOF at the interface. More...
 

Detailed Description

Base class which builds and holds the connections of the DOF associated with matching facets with given flags. The connections can be between two different matching meshes, or within the same mesh (having matching boundary facets).

In order to hold the interface connections the user must give the ReferenceFE elements and DOF used in both meshes. The connections may be built by calling the update method. An interpolate method has been provided in order to interpolate data at the interface. Finally method getInterfaceDof gives the connections.

Definition at line 72 of file DOFInterface3Dto3D.hpp.

Member Typedef Documentation

◆ Vector

typedef boost::numeric::ublas::vector<Real> Vector

Definition at line 78 of file DOFInterface3Dto3D.hpp.

◆ fct

typedef std::function<bool ( const std::vector<Real>&, const std::vector<Real>&, const Real& ) > fct

Definition at line 79 of file DOFInterface3Dto3D.hpp.

◆ Iterator

typedef std::list< std::pair<ID, ID> >::iterator Iterator
private

STL iterator type for the lists.

Definition at line 201 of file DOFInterface3Dto3D.hpp.

Constructor & Destructor Documentation

◆ DOFInterface3Dto3D() [1/4]

DOFInterface3Dto3D ( )
inline

default constructor

Definition at line 86 of file DOFInterface3Dto3D.hpp.

◆ DOFInterface3Dto3D() [2/4]

DOFInterface3Dto3D ( const ReferenceFE refFE,
const DOF dof1,
const DOF dof2 
)

Constructor for interfacing DOF of the same type (ReferenceFE)

Parameters
refFethe reference FE used in both meshes
dof1the DOF object of the mesh in which we want to make the computations
dof2the DOF object of the mesh which provides the data at the interface

Definition at line 50 of file DOFInterface3Dto3D.cpp.

◆ DOFInterface3Dto3D() [3/4]

DOFInterface3Dto3D ( const ReferenceFE refFE1,
const DOF dof1,
const ReferenceFE refFE2,
const DOF dof2 
)

Constructor for interfacing DOF of different type (ReferenceFE)

Parameters
refFe1the reference FE used in the mesh in which we want to make the computations
dof1the DOF object of the mesh in which we want to make the computations
refFe2the reference FE used in the mesh which provides the data at the interface
dof2the DOF object of the mesh which provides the data at the interface

Definition at line 60 of file DOFInterface3Dto3D.cpp.

◆ DOFInterface3Dto3D() [4/4]

DOFInterface3Dto3D ( const ReferenceFE refFE,
const DOF dof 
)

Constructor for interfacing DOF of the same type (ReferenceFE)

Parameters
dofthe DOF object of the mesh in which we want to make the computations

Definition at line 70 of file DOFInterface3Dto3D.cpp.

Member Function Documentation

◆ setup() [1/2]

void setup ( const ReferenceFE refFE,
const DOF dof1,
const DOF dof2 
)

Setup method for common finite element.

Definition at line 83 of file DOFInterface3Dto3D.cpp.

◆ setup() [2/2]

void setup ( const ReferenceFE refFE1,
const DOF dof1,
const ReferenceFE refFE2,
const DOF dof2 
)

Setup method for possibly different finite element.

Definition at line 93 of file DOFInterface3Dto3D.cpp.

◆ update() [1/2]

void update ( MeshType mesh1,
const markerID_Type flag1,
MeshType mesh2,
const markerID_Type flag2,
const Real tol,
Int const *const  flag3 = 0 
)

This method builds the DOF connections at the interface.

Parameters
mesh1the mesh in which we want to make the computations
flag1the marker of the interface in the mesh1
mesh2the mesh which provides de data at the interface
flag2the marker of the interface in the mesh2
toltolerance for connecting points of both meshes at the interface
flag3the marker of a region of interface in the mesh1 {The parameter flag3 is used in test_meshReorder to export the part of interface determined by flag3 on mesh2.}

Definition at line 277 of file DOFInterface3Dto3D.hpp.

◆ update() [2/2]

void update ( MeshType mesh,
const markerID_Type flag1,
const markerID_Type flag2,
const Real tol,
const fct coupled 
)

This method builds the DOF connections between two matching surfaces belonging to the same mesh.

Parameters
meshthe mesh in which we want to make the computations
flag1the marker of the first set of facets in the mesh
flag2the marker of facets to be connected with facets marked with flag1
toltolerance for connecting points of both meshes at the interface
coupleda function of points p1 and p2, that returns true if the points are coupled, false otherwise. points p1 and p2 are constituted of std::vector<Real>(3) containing the coordinates.

Definition at line 300 of file DOFInterface3Dto3D.hpp.

◆ interpolate()

void interpolate ( MeshType mesh2,
const UInt  nbComp,
const Vector v,
Vector vI 
)

This method interpolate data when using different FE.

Parameters
mesh2the mesh which provides de data at the interface
vthe data vector on mesh2 holding dofs of type refFE1
vIthe interpolated data vector on mesh2 holding dofs of type refFE2
Note
We should use this method ONLY when the accuracy of the data is less that the accuracy of the unknowns on mesh1, i.e., when refFE1 is more accurate than refFE2

Definition at line 312 of file DOFInterface3Dto3D.hpp.

◆ numTotalDof()

const UInt& numTotalDof ( ) const
inline

This method returns the corresponding dof object when interpolation is used.

Definition at line 185 of file DOFInterface3Dto3D.hpp.

◆ connectedFacetMap()

const std::list< std::pair<ID, ID> >& connectedFacetMap ( ) const
inline

reference to the list of connected facets.

Definition at line 191 of file DOFInterface3Dto3D.hpp.

◆ updateFacetConnections()

void updateFacetConnections ( const MeshType mesh1,
const markerID_Type flag1,
const MeshType mesh2,
const markerID_Type flag2,
const Real tol,
const fct coupled 
)
private

This method builds the connections between facets at the interface (M_facetToFacetConnectionList container)

Parameters
mesh1the mesh in which we want to make the computations
flag1the marker of the interface in the mesh1
mesh2the mesh which provides de data at the interface
flag2the marker of the interface in the mesh2
toltolerance for connecting points of both meshes at the interface
coupleda function of points p1 and p2, that returns true if the points are coupled, false otherwise. points p1 and p2 are constituted of std::vector<Real>(3) containing the coordinates.

Do the facets match?

Definition at line 465 of file DOFInterface3Dto3D.hpp.

◆ updateDofConnections() [1/2]

void updateDofConnections ( const MeshType mesh1,
const DOF dof1,
const MeshType mesh2,
const DOF dof2,
const Real tol,
const fct coupled,
Int const *const  flag3 = 0 
)
private

This method builds the connections between DOF at the interface (M_dofToDofConnectionList container)

Parameters
mesh1the mesh in which we want to make the computations
dof1the DOF object of the mesh in which we want to make the computations
mesh2the mesh which provides de data at the interface
dof2the DOF object of the mesh which provides de data at the interface
toltolerance for connecting points of both meshes at the interface
coupleda function of points p1 and p2, that returns true if the points are coupled, false otherwise. points p1 and p2 are constituted of std::vector<Real>(3) containing the coordinates.
flag3the marker of a region of interface in the mesh1 {The parameter flag3 is used in test_meshReorder to export the part of interface determined by flag3 on mesh2.}

◆ updateDofConnections() [2/2]

void updateDofConnections ( const Mesh &  mesh1,
const DOF dof1,
const Mesh &  mesh2,
const DOF dof2,
const Real tol,
const fct coupled,
Int const *const  flag3 
)

This method builds the connections between DOF at the interface (M_dofToDofConnectionList container)

Parameters
mesh1the mesh in which we want to make the computations
dof1the DOF object of the mesh in which we want to make the computations
mesh2the mesh which provides the data at the interface
dof2the DOF object of the mesh which provides the data at the interface
toltolerance for connecting points of both meshes at the interface

Definition at line 566 of file DOFInterface3Dto3D.hpp.

Field Documentation

◆ M_refFE1

const ReferenceFE* M_refFE1
private

ReferenceFE object used in the mesh in which we want to make the computations.

Definition at line 241 of file DOFInterface3Dto3D.hpp.

◆ M_dof1

const DOF* M_dof1
private

DOF object of the mesh in which we want to make the computations.

Definition at line 244 of file DOFInterface3Dto3D.hpp.

◆ M_refFE2

const ReferenceFE* M_refFE2
private

ReferenceFE object used in the mesh which provides de data at the interface.

Definition at line 247 of file DOFInterface3Dto3D.hpp.

◆ M_dof2

const DOF* M_dof2
private

DOF object of the mesh which provides the data at the interface.

Definition at line 250 of file DOFInterface3Dto3D.hpp.

◆ M_dof

std::shared_ptr<DOF> M_dof
private

Auxiliary DOF object of the mesh which provides the local to global table when interpolation is used.

Definition at line 254 of file DOFInterface3Dto3D.hpp.

◆ M_facetToFacetConnectionList

std::list< std::pair<ID, ID> > M_facetToFacetConnectionList
private

STL list which holds the connections between facets at the interface.

Definition at line 257 of file DOFInterface3Dto3D.hpp.

◆ M_dofToDofConnectionList

std::list< std::pair<ID, ID> > M_dofToDofConnectionList
private

Auxiliary STL list which holds the connections between DOF at the interface Empty after calling update.

Definition at line 261 of file DOFInterface3Dto3D.hpp.


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