#include <mappingorthomesh.h>
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 |
Class that defines the mapping between the unit cube and the cells of the OrthoMesh
Definition at line 12 of file mappingorthomesh.h.
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 }
The transformation T(p,resp), mapping the reference domain to the deformed domain
p | The point on the reference domain | |
resp | To contain the point on the real domain |
Definition at line 117 of file mappingorthomesh.h.
We generally need the T_Grad when we are computing the jacobian on the faces, in the orthomesh case the gradient is always constant
xi | The point on the reference domain | |
TGrad | To contain the gradient of T on that point |
Definition at line 103 of file mappingorthomesh.h.
00104 { 00105 assert(xi.size() == 3); 00106 gradT=_GradT; 00107 }
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.
Matrix MappingOrthoMesh::_GradT [protected] |
Definition at line 17 of file mappingorthomesh.h.
Matrix MappingOrthoMesh::_invGradT [protected] |
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.
Point3D MappingOrthoMesh::_X0 [protected] |
Definition at line 15 of file mappingorthomesh.h.