MappingOrthoMesh Class Reference

#include <mappingorthomesh.h>

Collaboration diagram for MappingOrthoMesh:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void reinit (const OrthoMesh &mesh)
void reinit (OrthoMesh::Cell_It &cell)
virtual double J (Point3D &p)
virtual void Inv_T_Grad (const VecDouble &xi, Matrix &InvTGrad)
virtual void T_grad (const VecDouble &xi, Matrix &gradT)
virtual void T (const VecDouble &p, VecDouble &resp)

Protected Attributes

Point3D _X0
double _j
Matrix _invGradT
Matrix _GradT
double _dx
double _dy
double _dz
const OrthoMesh_pMesh

Detailed Description

Class that defines the mapping between the unit cube and the cells of the OrthoMesh

Definition at line 12 of file mappingorthomesh.h.


Member Function Documentation

virtual void MappingOrthoMesh::Inv_T_Grad ( const VecDouble xi,
Matrix InvTGrad 
) [inline, virtual]

Returns The derivative of the inverse of the transformation T evaluated in a point of the deformed domain x=T(xi), where xi is in reference domain.

Lets be smart here and use math to work for us. If T is a function xi -> x and InvT x->xi is its inverse then Dx InvT = 1/(Dxi T) where Dx denotes derivation in x and Dxi denotes derivation in xi.

In other words, for 1D, just returns the inverse of the value returned by the method J(xi).

This is another example of a very important truth in Computer Science: The more you know about a problem, The better you know how to solve it.

Definition at line 88 of file mappingorthomesh.h.

00089   {
00090     assert(xi.size() ==3);
00091     InvTGrad = _invGradT;
00092   }

virtual double MappingOrthoMesh::J ( Point3D p  )  [inline, virtual]

Implement the Jacobian of the transformation T() where T is the function that maps points in the reference element into the deformed element. In 1D the Jacobian is just the derivative of T() evaluated in xi.

Parameters: xi = The point in the reference element Pre: x in [0:1]

Definition at line 67 of file mappingorthomesh.h.

00068   {
00069     return _j;
00070   }

void MappingOrthoMesh::reinit ( OrthoMesh::Cell_It cell  )  [inline]

Definition at line 47 of file mappingorthomesh.h.

00048   {
00049     //Assert that the cell has as mesh,
00050     //the mesh passed in the reinit(OrthoMesh&) method
00051     assert(&(cell->getMesh()) == _pMesh); 
00052     cell->vertex(VERTEX_000,_X0);
00053   }

void MappingOrthoMesh::reinit ( const OrthoMesh mesh  )  [inline]

Definition at line 23 of file mappingorthomesh.h.

00024   {
00025     _j=mesh.cellVolume();
00026     _invGradT.reinit(3,3);
00027     _GradT.reinit(3,3);
00028     _invGradT=0.0;
00029     _GradT=0.0;
00030 
00031     _dx=mesh.get_dx();
00032     _dy=mesh.get_dy();
00033     _dz=mesh.get_dz();
00034     
00035     _invGradT(0,0)=1.0/_dx;
00036     _invGradT(1,1)=1.0/_dy;
00037     _invGradT(2,2)=1.0/_dz;
00038 
00039     _GradT(0,0)=_dx;
00040     _GradT(1,1)=_dy;
00041     _GradT(2,2)=_dz;
00042     _pMesh = &mesh;
00043   }

virtual void MappingOrthoMesh::T ( const VecDouble p,
VecDouble resp 
) [inline, virtual]

The transformation T(p,resp), mapping the reference domain to the deformed domain

Parameters:
p The point on the reference domain
resp To contain the point on the real domain
Returns:

Definition at line 117 of file mappingorthomesh.h.

00118   {
00119     assert(p.size() == 3);
00120     assert(resp.size() == 3);
00121     resp(0)=_X0[0] + _dx*p(0);
00122     resp(1)=_X0[1] + _dy*p(1);
00123     resp(2)=_X0[2] + _dz*p(2);
00124 
00125   }

virtual void MappingOrthoMesh::T_grad ( const VecDouble xi,
Matrix gradT 
) [inline, virtual]

We generally need the T_Grad when we are computing the jacobian on the faces, in the orthomesh case the gradient is always constant

Parameters:
xi The point on the reference domain
TGrad To contain the gradient of T on that point
Returns:

Definition at line 103 of file mappingorthomesh.h.

00104   {
00105     assert(xi.size() == 3);
00106     gradT=_GradT;
00107   }


Member Data Documentation

double MappingOrthoMesh::_dx [protected]

Definition at line 18 of file mappingorthomesh.h.

double MappingOrthoMesh::_dy [protected]

Definition at line 18 of file mappingorthomesh.h.

double MappingOrthoMesh::_dz [protected]

Definition at line 18 of file mappingorthomesh.h.

Definition at line 17 of file mappingorthomesh.h.

Definition at line 17 of file mappingorthomesh.h.

double MappingOrthoMesh::_j [protected]

Definition at line 16 of file mappingorthomesh.h.

const OrthoMesh* MappingOrthoMesh::_pMesh [protected]

Definition at line 19 of file mappingorthomesh.h.

Definition at line 15 of file mappingorthomesh.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Sun Apr 8 23:13:17 2012 for CO2INJECTION by  doxygen 1.6.3