LifeV
|
Class to transform a mesh. More...
#include <MeshUtility.hpp>
Public Member Functions | |
MeshTransformer (REGIONMESH &m) | |
the constructor may take a reference to the mesh to be manipulated More... | |
template<typename VECTOR > | |
void | moveMesh (const VECTOR &disp, UInt dim) |
Move the mesh according to a given displacement. More... | |
template<typename VECTOR > | |
void | transformMesh (const VECTOR &scale, const VECTOR &rotate, const VECTOR &translate) |
Transform the mesh. More... | |
template<typename function > | |
void | transformMesh (const function &meshMapping) |
Transform the mesh according to a given mapping. More... | |
bool | hasOldPoint () const |
Tells if we store old points. More... | |
void | savePoints () |
Saves the mesh points. More... | |
void | resetMovement () |
Resets movement. More... | |
REGIONMESH::point_Type const & | pointInitial (ID const i) const |
Returns the i-th mesh Point before the last movement. More... | |
REGIONMESH::points_Type const & | pointListInitial () const |
Returns a constant reference to the list of Points before the last movement. More... | |
Private Attributes | |
REGIONMESH & | M_mesh |
Appropriately sets internal switches. More... | |
REGIONMESH::points_Type | M_pointList |
Class to transform a mesh.
Fix mesh switches Using some heuristics it tries to fix mesh switches A class that implements methods to transform a mesh without changing mesh connectivities. It has a constructor that takes the mesh to be transformed
Definition at line 2386 of file MeshUtility.hpp.
MeshTransformer | ( | REGIONMESH & | m | ) |
the constructor may take a reference to the mesh to be manipulated
Definition at line 2517 of file MeshUtility.hpp.
void moveMesh | ( | const VECTOR & | disp, |
UInt | dim | ||
) |
Move the mesh according to a given displacement.
It moves the mesh from the last position saved with savePoints() For backward compatibility, if it is called before without calling savePoints(), the first time it is called it will save the current mesh point and then apply the movement.
Displacement is a 3*numpoints() VECTOR which stores the x-displacement first, then the y-displacements etc.
The VECTOR object must comply with lifeV distributed vector concept EpetraVector in particular it must have the methods isGlobalIDPresent(Uint i).
disp | Displacement vector. In this version it must be an EpetraVector |
dim | Length of vector disp. |
Definition at line 2523 of file MeshUtility.hpp.
void transformMesh | ( | const VECTOR & | scale, |
const VECTOR & | rotate, | ||
const VECTOR & | translate | ||
) |
Transform the mesh.
It uses boost::numeric::ublas (3,3) matrices scale, rotate and translate to perform the mesh movement (operations performed in this order).
scale | vector of three components for (x,y,z) scaling of the mesh |
rotate | vector of three components (radiants) for rotating the mesh |
translate | vector of three components for (x,y,z) translation the mesh |
Definition at line 2590 of file MeshUtility.hpp.
void transformMesh | ( | const function & | meshMapping | ) |
Transform the mesh according to a given mapping.
Transform the mesh according to a given meshMapping(Real& x, Real& y, Real& z).
meshMapping | function void meshMmapping(Real& x, Real& y, Real& z) which receive x, y, z, and transform them according to a certain mapping |
Definition at line 2669 of file MeshUtility.hpp.
|
inline |
Tells if we store old points.
If true than we can interrogate the old point position
Definition at line 2442 of file MeshUtility.hpp.
void savePoints | ( | ) |
Saves the mesh points.
Useful for algorithms which require to remember the position of the mesh before the movement
Definition at line 2555 of file MeshUtility.hpp.
|
inline |
Resets movement.
Next step is like the mesh has never moved
Definition at line 2454 of file MeshUtility.hpp.
const REGIONMESH::point_Type & pointInitial | ( | ID const | i | ) | const |
Returns the i-th mesh Point before the last movement.
If the mesh points have not been saved with a previous call to savePoints() the method returns the mesh point
i | Id of the Point. |
Definition at line 2574 of file MeshUtility.hpp.
const REGIONMESH::points_Type & pointListInitial | ( | ) | const |
Returns a constant reference to the list of Points before the last movement.
If the mesh points have not been saved with a previous call to savePoints() returns the current mesh Points
Definition at line 2582 of file MeshUtility.hpp.
|
private |
Appropriately sets internal switches.
It must be called by any mesh transformation method to ensure that the handling of (possibly) stored points works;
Definition at line 2485 of file MeshUtility.hpp.
|
private |
Definition at line 2486 of file MeshUtility.hpp.