ConformTransformationQ1CartesianHexahedron Class Reference

#include <ConformTransformation.hpp>

Collaboration diagram for ConformTransformationQ1CartesianHexahedron:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
ConformTransformationQ1Quadrangle 
BoundaryConformTransformation

Public Member Functions

void dx (const TinyVector< 3, real_t > &X, TinyVector< 3, real_t > &__result) const
void dx (const real_t &x, const real_t &y, const real_t &z, TinyVector< 3, real_t > &__result) const
void dy (const TinyVector< 3, real_t > &X, TinyVector< 3, real_t > &__result) const
void dy (const real_t &x, const real_t &y, const real_t &z, TinyVector< 3, real_t > &__result) const
void dz (const TinyVector< 3, real_t > &X, TinyVector< 3, real_t > &__result) const
void dz (const real_t &x, const real_t &y, const real_t &z, TinyVector< 3, real_t > &__result) const
void value (const TinyVector< 3, real_t > &X, TinyVector< 3, real_t > &result) const
 computes the value at X (X is inside the reference element).
void value (const real_t &x, const real_t &y, const real_t &z, TinyVector< 3, real_t > &result) const
 computes the value at (x,y,z) ((x,y,z) is inside the reference element).
bool invertT (const TinyVector< 3, real_t > &X, TinyVector< 3, real_t > &Xhat) const
 Computes Xhat, the point which transformed is X.
bool invertT (const real_t &x, const real_t &y, const real_t &z, TinyVector< 3, real_t > &Xhat) const
 Computes Xhat, the point which transformed is (x,y,z).
real_t integrate (const ScalarFunctionBase &f) const
real_t integrateCharacteristic (const Domain &d) const
 ConformTransformationQ1CartesianHexahedron (const CartesianHexahedron &H)

Private Attributes

const CartesianHexahedron__CH
const TinyVector< 3, real_t > __a
const TinyVector< 3, real_t > __h

Friends

class ConformTransformationQ1CartesianHexahedronJacobian


Detailed Description

Definition at line 602 of file ConformTransformation.hpp.


Member Typedef Documentation

Definition at line 607 of file ConformTransformation.hpp.


Constructor & Destructor Documentation

ConformTransformationQ1CartesianHexahedron::ConformTransformationQ1CartesianHexahedron ( const CartesianHexahedron H  )  [inline]

Definition at line 703 of file ConformTransformation.hpp.

00704     : __CH(H),
00705       __a(H(0)),
00706       __h(H(6)-H(0))
00707   {
00708     ;
00709   }


Member Function Documentation

void ConformTransformationQ1CartesianHexahedron::dx ( const TinyVector< 3, real_t > &  X,
TinyVector< 3, real_t > &  __result 
) const [inline]

Definition at line 616 of file ConformTransformation.hpp.

00618   {
00619     dx(X[0], X[1], X[2], __result);
00620   }

void ConformTransformationQ1CartesianHexahedron::dx ( const real_t &  x,
const real_t &  y,
const real_t &  z,
TinyVector< 3, real_t > &  __result 
) const [inline]

Definition at line 622 of file ConformTransformation.hpp.

References __h.

00624   {
00625     __result[0] = __h[0];
00626     __result[1] = 0;
00627     __result[2] = 0;
00628   }

void ConformTransformationQ1CartesianHexahedron::dy ( const TinyVector< 3, real_t > &  X,
TinyVector< 3, real_t > &  __result 
) const [inline]

Definition at line 630 of file ConformTransformation.hpp.

00632   {
00633     dy(X[0], X[1], X[2], __result);
00634   }

void ConformTransformationQ1CartesianHexahedron::dy ( const real_t &  x,
const real_t &  y,
const real_t &  z,
TinyVector< 3, real_t > &  __result 
) const [inline]

Definition at line 636 of file ConformTransformation.hpp.

References __h.

00638   {
00639     __result[0] = 0;
00640     __result[1] = __h[1];
00641     __result[2] = 0;
00642   }

void ConformTransformationQ1CartesianHexahedron::dz ( const TinyVector< 3, real_t > &  X,
TinyVector< 3, real_t > &  __result 
) const [inline]

Definition at line 644 of file ConformTransformation.hpp.

00646   {
00647     dz(X[0], X[1], X[2], __result);
00648   }

void ConformTransformationQ1CartesianHexahedron::dz ( const real_t &  x,
const real_t &  y,
const real_t &  z,
TinyVector< 3, real_t > &  __result 
) const [inline]

Definition at line 650 of file ConformTransformation.hpp.

References __h.

00652   {
00653     __result[0] = 0;
00654     __result[1] = 0;
00655     __result[2] = __h[2];
00656   }

void ConformTransformationQ1CartesianHexahedron::value ( const TinyVector< 3, real_t > &  X,
TinyVector< 3, real_t > &  result 
) const [inline]

computes the value at X (X is inside the reference element).

Definition at line 659 of file ConformTransformation.hpp.

Referenced by integrateCharacteristic(), and Convection< Structured3DMesh >::operator()().

00661   {
00662     value(X[0],X[1],X[2],result);
00663   }

void ConformTransformationQ1CartesianHexahedron::value ( const real_t &  x,
const real_t &  y,
const real_t &  z,
TinyVector< 3, real_t > &  result 
) const [inline]

computes the value at (x,y,z) ((x,y,z) is inside the reference element).

Definition at line 666 of file ConformTransformation.hpp.

References __a, and __h.

00668   {
00669     result  = __a;
00670     result[0] += __h[0]*x;
00671     result[1] += __h[1]*y;
00672     result[2] += __h[2]*z;
00673   }

bool ConformTransformationQ1CartesianHexahedron::invertT ( const TinyVector< 3, real_t > &  X,
TinyVector< 3, real_t > &  Xhat 
) const [inline]

Computes Xhat, the point which transformed is X.

Definition at line 676 of file ConformTransformation.hpp.

Referenced by Convection< Structured3DMesh >::operator()().

00678   {
00679     return invertT(X[0],X[1],X[2], Xhat);
00680   }

bool ConformTransformationQ1CartesianHexahedron::invertT ( const real_t &  x,
const real_t &  y,
const real_t &  z,
TinyVector< 3, real_t > &  Xhat 
) const [inline]

Computes Xhat, the point which transformed is (x,y,z).

Definition at line 683 of file ConformTransformation.hpp.

References __a, and __h.

00685   {
00686     Xhat[0] = (x-__a[0])/__h[0];
00687     Xhat[1] = (y-__a[1])/__h[1];
00688     Xhat[2] = (z-__a[2])/__h[2];
00689     return true;
00690   }

real_t ConformTransformationQ1CartesianHexahedron::integrate ( const ScalarFunctionBase f  )  const

Computes the integrale of the function f on an element using the reference element

real_t ConformTransformationQ1CartesianHexahedron::integrateCharacteristic ( const Domain d  )  const

Computes the integrale of the characteristic function of a domain on an element using the reference element

Definition at line 139 of file ConformTransformation.cpp.

References Domain::inside(), sum(), and value().

Referenced by FictitiousDomainMethod::__integrateCharacteristicFunction().

00140 {
00141   return 1;
00142   // Here we use order 4 Lobatto quadrature
00143 
00144   TinyVector<4, real_t>  x;
00145   x[0] = 0.;
00146   x[1] = .27639320225002103036; //(1-sqrt(5)/5)/2.;
00147   x[2] = .72360679774997896964; //(1+sqrt(5)/5)/2.;
00148   x[3] = 1.;
00149 
00150   TinyVector<4, real_t>  w;
00151   w[0] = 1./12.;
00152   w[1] = 5./12.;
00153   w[2] = 5./12.;
00154   w[3] = 1./12.;
00155 
00156   real_t sum = 0;
00157   TinyVector<3, real_t> X_hat;
00158   TinyVector<3, real_t> X;
00159   for (unsigned i=0; i<4; ++i) {
00160     X_hat[0] = x[i];
00161     for (unsigned j=0; j<4; ++j) {
00162       X_hat[1] = x[j];
00163       for (unsigned k=0; k<4; ++k) {
00164         X_hat[2] = x[k];
00165         this->value(X_hat, X);
00166         sum += w[i]*w[j]*w[k] * (d.inside(X) ? 1 : 0);
00167       }
00168     }
00169   }
00170   return sum;
00171 }

Here is the call graph for this function:


Friends And Related Function Documentation

Definition at line 605 of file ConformTransformation.hpp.


Member Data Documentation

Definition at line 610 of file ConformTransformation.hpp.

Definition at line 612 of file ConformTransformation.hpp.

Referenced by invertT(), and value().


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

Generated on Wed Nov 19 00:05:04 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6