Back to index

salome-med  6.5.0
Public Member Functions | Public Attributes | Static Public Attributes
MED::THexa20a Struct Reference

#include <MED_GaussUtils.hxx>

Inheritance diagram for MED::THexa20a:
Inheritance graph
[legend]
Collaboration diagram for MED::THexa20a:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 THexa20a (TInt theDim=3, TInt theNbRef=20)
virtual void InitFun (const TCCoordSliceArr &theRef, const TCCoordSliceArr &theGauss, TFun &theFun) const

Public Attributes

TInt myNbRef
TDoubleVector myRefCoord

Static Public Attributes

TInt myDim

Detailed Description

Definition at line 284 of file MED_GaussUtils.hxx.


Constructor & Destructor Documentation

MED::THexa20a::THexa20a ( TInt  theDim = 3,
TInt  theNbRef = 20 
)

Definition at line 1078 of file MED_GaussUtils.cxx.

                                              :
    TShapeFun(theDim,theNbRef)
  {
    TInt aNbRef = myRefCoord.size();
    for(TInt aRefId = 0; aRefId < aNbRef; aRefId++){
      TCoordSlice aCoord = GetCoord(aRefId);
      switch(aRefId){
      case  0: aCoord[0] = -1.0;  aCoord[1] = -1.0;  aCoord[2] = -1.0; break;
      case  1: aCoord[0] =  1.0;  aCoord[1] = -1.0;  aCoord[2] = -1.0; break;
      case  2: aCoord[0] =  1.0;  aCoord[1] =  1.0;  aCoord[2] = -1.0; break;
      case  3: aCoord[0] = -1.0;  aCoord[1] =  1.0;  aCoord[2] = -1.0; break;
      case  4: aCoord[0] = -1.0;  aCoord[1] = -1.0;  aCoord[2] =  1.0; break;
      case  5: aCoord[0] =  1.0;  aCoord[1] = -1.0;  aCoord[2] =  1.0; break;
      case  6: aCoord[0] =  1.0;  aCoord[1] =  1.0;  aCoord[2] =  1.0; break;
      case  7: aCoord[0] = -1.0;  aCoord[1] =  1.0;  aCoord[2] =  1.0; break;

      case  8: aCoord[0] =  0.0;  aCoord[1] = -1.0;  aCoord[2] = -1.0; break;
      case  9: aCoord[0] =  1.0;  aCoord[1] =  0.0;  aCoord[2] = -1.0; break;
      case 10: aCoord[0] =  0.0;  aCoord[1] =  1.0;  aCoord[2] = -1.0; break;
      case 11: aCoord[0] = -1.0;  aCoord[1] =  0.0;  aCoord[2] = -1.0; break;
      case 12: aCoord[0] = -1.0;  aCoord[1] = -1.0;  aCoord[2] =  0.0; break;
      case 13: aCoord[0] =  1.0;  aCoord[1] = -1.0;  aCoord[2] =  0.0; break;
      case 14: aCoord[0] =  1.0;  aCoord[1] =  1.0;  aCoord[2] =  0.0; break;
      case 15: aCoord[0] = -1.0;  aCoord[1] =  1.0;  aCoord[2] =  0.0; break;
      case 16: aCoord[0] =  0.0;  aCoord[1] = -1.0;  aCoord[2] =  1.0; break;
      case 17: aCoord[0] =  1.0;  aCoord[1] =  0.0;  aCoord[2] =  1.0; break;
      case 18: aCoord[0] =  0.0;  aCoord[1] =  1.0;  aCoord[2] =  1.0; break;
      case 19: aCoord[0] = -1.0;  aCoord[1] =  0.0;  aCoord[2] =  1.0; break;
      }
    }
  }

Here is the call graph for this function:


Member Function Documentation

void MED::THexa20a::InitFun ( const TCCoordSliceArr theRef,
const TCCoordSliceArr theGauss,
TFun &  theFun 
) const [virtual]

Reimplemented in MED::THexa27a.

Definition at line 1111 of file MED_GaussUtils.cxx.

  {
    GetFun(theRef,theGauss,theFun);

    TInt aNbGauss = theGauss.size();
    for(TInt aGaussId = 0; aGaussId < aNbGauss; aGaussId++){
      const TCCoordSlice& aCoord = theGauss[aGaussId];
      TFloatVecSlice aSlice = theFun.GetFunSlice(aGaussId);

      aSlice[0] = 0.125*(1.0 - aCoord[0])*(1.0 - aCoord[1])*(1.0 - aCoord[2])*
        (-2.0 - aCoord[0] - aCoord[1] - aCoord[2]);
      aSlice[1] = 0.125*(1.0 + aCoord[0])*(1.0 - aCoord[1])*(1.0 - aCoord[2])*
        (-2.0 + aCoord[0] - aCoord[1] - aCoord[2]);
      aSlice[2] = 0.125*(1.0 + aCoord[0])*(1.0 + aCoord[1])*(1.0 - aCoord[2])*
        (-2.0 + aCoord[0] + aCoord[1] - aCoord[2]);
      aSlice[3] = 0.125*(1.0 - aCoord[0])*(1.0 + aCoord[1])*(1.0 - aCoord[2])*
        (-2.0 - aCoord[0] + aCoord[1] - aCoord[2]);
      aSlice[4] = 0.125*(1.0 - aCoord[0])*(1.0 - aCoord[1])*(1.0 + aCoord[2])*
        (-2.0 - aCoord[0] - aCoord[1] + aCoord[2]);
      aSlice[5] = 0.125*(1.0 + aCoord[0])*(1.0 - aCoord[1])*(1.0 + aCoord[2])*
        (-2.0 + aCoord[0] - aCoord[1] + aCoord[2]);
      aSlice[6] = 0.125*(1.0 + aCoord[0])*(1.0 + aCoord[1])*(1.0 + aCoord[2])*
        (-2.0 + aCoord[0] + aCoord[1] + aCoord[2]);
      aSlice[7] = 0.125*(1.0 - aCoord[0])*(1.0 + aCoord[1])*(1.0 + aCoord[2])*
        (-2.0 - aCoord[0] + aCoord[1] + aCoord[2]);

      aSlice[8] = 0.25*(1.0 - aCoord[0]*aCoord[0])*(1.0 - aCoord[1])*(1.0 - aCoord[2]);
      aSlice[9] = 0.25*(1.0 - aCoord[1]*aCoord[1])*(1.0 + aCoord[0])*(1.0 - aCoord[2]);
      aSlice[10] = 0.25*(1.0 - aCoord[0]*aCoord[0])*(1.0 + aCoord[1])*(1.0 - aCoord[2]);
      aSlice[11] = 0.25*(1.0 - aCoord[1]*aCoord[1])*(1.0 - aCoord[0])*(1.0 - aCoord[2]);
      aSlice[12] = 0.25*(1.0 - aCoord[2]*aCoord[2])*(1.0 - aCoord[0])*(1.0 - aCoord[1]);
      aSlice[13] = 0.25*(1.0 - aCoord[2]*aCoord[2])*(1.0 + aCoord[0])*(1.0 - aCoord[1]);
      aSlice[14] = 0.25*(1.0 - aCoord[2]*aCoord[2])*(1.0 + aCoord[0])*(1.0 + aCoord[1]);
      aSlice[15] = 0.25*(1.0 - aCoord[2]*aCoord[2])*(1.0 - aCoord[0])*(1.0 + aCoord[1]);
      aSlice[16] = 0.25*(1.0 - aCoord[0]*aCoord[0])*(1.0 - aCoord[1])*(1.0 + aCoord[2]);
      aSlice[17] = 0.25*(1.0 - aCoord[1]*aCoord[1])*(1.0 + aCoord[0])*(1.0 + aCoord[2]);
      aSlice[18] = 0.25*(1.0 - aCoord[0]*aCoord[0])*(1.0 + aCoord[1])*(1.0 + aCoord[2]);
      aSlice[19] = 0.25*(1.0 - aCoord[1]*aCoord[1])*(1.0 - aCoord[0])*(1.0 + aCoord[2]);
    }
  }

Member Data Documentation

TInt TShapeFun::myDim [static, inherited]

Definition at line 42 of file MEDMEM_GaussLocalization.cxx.

TInt TShapeFun::myNbRef [inherited]

Definition at line 43 of file MEDMEM_GaussLocalization.cxx.

TDoubleVector TShapeFun::myRefCoord [inherited]

Definition at line 44 of file MEDMEM_GaussLocalization.cxx.


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