Back to index

salome-med  6.5.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
INTERP_KERNEL::CellModel Class Reference

This class descibes all static elements (different from polygons and polyhedron) 3D, 2D and 1D. More...

#include <CellModel.hxx>

Collaboration diagram for INTERP_KERNEL::CellModel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

INTERPKERNEL_EXPORT const char * getRepr () const
INTERPKERNEL_EXPORT bool isExtruded () const
INTERPKERNEL_EXPORT bool isDynamic () const
INTERPKERNEL_EXPORT bool isQuadratic () const
INTERPKERNEL_EXPORT unsigned getDimension () const
INTERPKERNEL_EXPORT bool isCompatibleWith (NormalizedCellType type) const
 This method is compatible with all types including dynamic one.
INTERPKERNEL_EXPORT bool isSimplex () const
INTERPKERNEL_EXPORT const
unsigned * 
getNodesConstituentTheSon (unsigned sonId) const
 sonId is in C format.
INTERPKERNEL_EXPORT bool getOrientationStatus (unsigned lgth, const int *conn1, const int *conn2) const
 This method retrieves if cell1 represented by 'conn1' and cell2 represented by 'conn2' are equivalent by a permutation or not.
INTERPKERNEL_EXPORT unsigned getNumberOfNodes () const
INTERPKERNEL_EXPORT unsigned getNumberOfSons () const
INTERPKERNEL_EXPORT unsigned getNumberOfSons2 (const int *conn, int lgth) const
 Equivalent to getNumberOfSons except that this method deals with dynamic type.
INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon (unsigned sonId) const
INTERPKERNEL_EXPORT unsigned getNumberOfNodesConstituentTheSon2 (unsigned sonId, const int *nodalConn, int lgth) const
 Return number of nodes in sonId-th son of a Dynamic() cell.
INTERPKERNEL_EXPORT
NormalizedCellType 
getExtrudedType () const
INTERPKERNEL_EXPORT
NormalizedCellType 
getLinearType () const
INTERPKERNEL_EXPORT
NormalizedCellType 
getQuadraticType () const
INTERPKERNEL_EXPORT
NormalizedCellType 
getSonType (unsigned sonId) const
INTERPKERNEL_EXPORT
NormalizedCellType 
getSonType2 (unsigned sonId) const
 Equivalent to getSonType except that this method deals with dynamic type.
INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity (int sonId, const int *nodalConn, int *sonNodalConn) const
 WARNING this method do not manage correctly types that return true at the call of isDynamic.
INTERPKERNEL_EXPORT unsigned fillSonCellNodalConnectivity2 (int sonId, const int *nodalConn, int lgth, int *sonNodalConn, NormalizedCellType &typeOfSon) const

Static Public Member Functions

static INTERPKERNEL_EXPORT
const CellModel
GetCellModel (NormalizedCellType type)

Static Public Attributes

static const unsigned MAX_NB_OF_SONS = 8
static const unsigned MAX_NB_OF_NODES_PER_ELEM = 30

Private Member Functions

 CellModel (NormalizedCellType type)

Static Private Member Functions

static void buildUniqueInstance ()

Private Attributes

bool _dyn
bool _quadratic
bool _is_simplex
bool _is_extruded
unsigned _dim
unsigned _nb_of_pts
unsigned _nb_of_sons
NormalizedCellType _type
NormalizedCellType _extruded_type
NormalizedCellType _linear_type
NormalizedCellType _quadratic_type
unsigned _sons_con [MAX_NB_OF_SONS][MAX_NB_OF_NODES_PER_ELEM]
unsigned _nb_of_sons_con [MAX_NB_OF_SONS]
NormalizedCellType _sons_type [MAX_NB_OF_SONS]

Static Private Attributes

static std::map
< NormalizedCellType,
CellModel
_map_of_unique_instance
static const char * CELL_TYPES_REPR []

Detailed Description

This class descibes all static elements (different from polygons and polyhedron) 3D, 2D and 1D.

Definition at line 34 of file CellModel.hxx.


Constructor & Destructor Documentation

Definition at line 105 of file CellModel.cxx.

                                             :_type(type)
  {
    _is_extruded=false;
    _quadratic=false;
    _dyn=false;
    _extruded_type=NORM_ERROR;
    _linear_type=NORM_ERROR;
    _quadratic_type=NORM_ERROR;
    switch(type)
      {
      case NORM_POINT1:
        {
          _nb_of_pts=1; _nb_of_sons=0; _dim=0; _extruded_type=NORM_SEG2; _is_simplex=true;
        }
        break;
      case NORM_SEG2:
        {
          _nb_of_pts=2; _nb_of_sons=0; _dim=1; _extruded_type=NORM_QUAD4; _quadratic_type=NORM_SEG3; _is_simplex=true; _is_extruded=true;
        }
        break;
      case NORM_SEG3:
        {
          _nb_of_pts=3; _nb_of_sons=0; _dim=1; _extruded_type=NORM_QUAD8; _linear_type=NORM_SEG2; _quadratic=true; _is_simplex=false;
        }
        break;
      case NORM_TETRA4:
        {
          _nb_of_pts=4; _nb_of_sons=4; _dim=3; _quadratic_type=NORM_TETRA10; _is_simplex=true;
          _sons_type[0]=NORM_TRI3; _sons_type[1]=NORM_TRI3; _sons_type[2]=NORM_TRI3; _sons_type[3]=NORM_TRI3;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _nb_of_sons_con[0]=3;
          _sons_con[1][0]=0; _sons_con[1][1]=3; _sons_con[1][2]=1; _nb_of_sons_con[1]=3;
          _sons_con[2][0]=1; _sons_con[2][1]=3; _sons_con[2][2]=2; _nb_of_sons_con[2]=3;
          _sons_con[3][0]=2; _sons_con[3][1]=3; _sons_con[3][2]=0; _nb_of_sons_con[3]=3;
        }
        break;
      case NORM_HEXA8:
        {
          _nb_of_pts=8; _nb_of_sons=6; _dim=3; _quadratic_type=NORM_HEXA20; _is_simplex=false; _is_extruded=true;
          _sons_type[0]=NORM_QUAD4; _sons_type[1]=NORM_QUAD4; _sons_type[2]=NORM_QUAD4; _sons_type[3]=NORM_QUAD4; _sons_type[4]=NORM_QUAD4; _sons_type[5]=NORM_QUAD4;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _sons_con[0][3]=3; _nb_of_sons_con[0]=4;
          _sons_con[1][0]=4; _sons_con[1][1]=7; _sons_con[1][2]=6; _sons_con[1][3]=5; _nb_of_sons_con[1]=4;
          _sons_con[2][0]=0; _sons_con[2][1]=4; _sons_con[2][2]=5; _sons_con[2][3]=1; _nb_of_sons_con[2]=4;
          _sons_con[3][0]=1; _sons_con[3][1]=5; _sons_con[3][2]=6; _sons_con[3][3]=2; _nb_of_sons_con[3]=4;
          _sons_con[4][0]=2; _sons_con[4][1]=6; _sons_con[4][2]=7; _sons_con[4][3]=3; _nb_of_sons_con[4]=4;
          _sons_con[5][0]=3; _sons_con[5][1]=7; _sons_con[5][2]=4; _sons_con[5][3]=0; _nb_of_sons_con[5]=4;
        }
        break;
      case NORM_QUAD4:
        {
          _nb_of_pts=4; _nb_of_sons=4; _dim=2; _quadratic_type=NORM_QUAD8; _is_simplex=false; _is_extruded=true;
          _sons_type[0]=NORM_SEG2; _sons_type[1]=NORM_SEG2; _sons_type[2]=NORM_SEG2; _sons_type[3]=NORM_SEG2;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _nb_of_sons_con[0]=2;
          _sons_con[1][0]=1; _sons_con[1][1]=2; _nb_of_sons_con[1]=2;
          _sons_con[2][0]=2; _sons_con[2][1]=3; _nb_of_sons_con[2]=2;
          _sons_con[3][0]=3; _sons_con[3][1]=0; _nb_of_sons_con[3]=2; _extruded_type=NORM_HEXA8;
        }
        break;
      case NORM_TRI3:
        {
          _nb_of_pts=3; _nb_of_sons=3; _dim=2; _quadratic_type=NORM_TRI6; _is_simplex=true;
          _sons_type[0]=NORM_SEG2; _sons_type[1]=NORM_SEG2; _sons_type[2]=NORM_SEG2;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _nb_of_sons_con[0]=2;
          _sons_con[1][0]=1; _sons_con[1][1]=2; _nb_of_sons_con[1]=2;
          _sons_con[2][0]=2; _sons_con[2][1]=0; _nb_of_sons_con[2]=2; _extruded_type=NORM_PENTA6;
        }
        break;
      case NORM_TRI6:
        {
          _nb_of_pts=6; _nb_of_sons=3; _dim=2; _linear_type=NORM_TRI3; _is_simplex=false;
          _sons_type[0]=NORM_SEG3; _sons_type[1]=NORM_SEG3; _sons_type[2]=NORM_SEG3;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=3; _nb_of_sons_con[0]=3;
          _sons_con[1][0]=1; _sons_con[1][1]=2; _sons_con[1][2]=4; _nb_of_sons_con[1]=3;
          _sons_con[2][0]=2; _sons_con[2][1]=0; _sons_con[2][2]=5; _nb_of_sons_con[2]=3; _quadratic=true; _extruded_type=NORM_PENTA15;
        }
        break;
      case NORM_QUAD8:
        {
          _nb_of_pts=8; _nb_of_sons=4; _dim=2; _linear_type=NORM_QUAD4; _is_simplex=false;
          _sons_type[0]=NORM_SEG3; _sons_type[1]=NORM_SEG3; _sons_type[2]=NORM_SEG3; _sons_type[3]=NORM_SEG3;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=4; _nb_of_sons_con[0]=3;
          _sons_con[1][0]=1; _sons_con[1][1]=2; _sons_con[1][2]=5; _nb_of_sons_con[1]=3;
          _sons_con[2][0]=2; _sons_con[2][1]=3; _sons_con[2][2]=6; _nb_of_sons_con[2]=3;
          _sons_con[3][0]=3; _sons_con[3][1]=0; _sons_con[3][2]=7; _nb_of_sons_con[3]=3; _quadratic=true; _extruded_type=NORM_HEXA20;
        }
        break;
      case NORM_PYRA5:
        {
          _nb_of_pts=5; _nb_of_sons=5; _dim=3; _quadratic_type=NORM_PYRA13; _is_simplex=false;
          _sons_type[0]=NORM_QUAD4; _sons_type[1]=NORM_TRI3; _sons_type[2]=NORM_TRI3; _sons_type[3]=NORM_TRI3; _sons_type[4]=NORM_TRI3;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _sons_con[0][3]=3; _nb_of_sons_con[0]=4;
          _sons_con[1][0]=0; _sons_con[1][1]=4; _sons_con[1][2]=1; _nb_of_sons_con[1]=3;
          _sons_con[2][0]=1; _sons_con[2][1]=4; _sons_con[2][2]=2; _nb_of_sons_con[2]=3;
          _sons_con[3][0]=2; _sons_con[3][1]=4; _sons_con[3][2]=3; _nb_of_sons_con[3]=3;
          _sons_con[4][0]=3; _sons_con[4][1]=4; _sons_con[4][2]=0; _nb_of_sons_con[4]=3;
        }
        break;
      case NORM_PENTA6:
        {
          _nb_of_pts=6; _nb_of_sons=5; _dim=3; _quadratic_type=NORM_PENTA15; _is_simplex=false; _is_extruded=true;
          _sons_type[0]=NORM_TRI3; _sons_type[1]=NORM_TRI3; _sons_type[2]=NORM_QUAD4; _sons_type[3]=NORM_QUAD4; _sons_type[4]=NORM_QUAD4;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _nb_of_sons_con[0]=3;
          _sons_con[1][0]=3; _sons_con[1][1]=5; _sons_con[1][2]=4; _nb_of_sons_con[1]=3;
          _sons_con[2][0]=0; _sons_con[2][1]=3; _sons_con[2][2]=4; _sons_con[2][3]=1; _nb_of_sons_con[2]=4;
          _sons_con[3][0]=1; _sons_con[3][1]=4; _sons_con[3][2]=5; _sons_con[3][3]=2; _nb_of_sons_con[3]=4;
          _sons_con[4][0]=2; _sons_con[4][1]=5; _sons_con[4][2]=3; _sons_con[4][3]=0; _nb_of_sons_con[4]=4;
        }
        break;
      case NORM_TETRA10:
        {
          _nb_of_pts=10; _nb_of_sons=4; _dim=3; _linear_type=NORM_TETRA4; _is_simplex=false;
          _sons_type[0]=NORM_TRI6; _sons_type[1]=NORM_TRI6; _sons_type[2]=NORM_TRI6; _sons_type[3]=NORM_TRI6;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _sons_con[0][3]=4; _sons_con[0][4]=5; _sons_con[0][5]=6; _nb_of_sons_con[0]=6;
          _sons_con[1][0]=0; _sons_con[1][1]=3; _sons_con[1][2]=1; _sons_con[1][3]=7; _sons_con[1][4]=8; _sons_con[1][5]=4; _nb_of_sons_con[1]=6;
          _sons_con[2][0]=1; _sons_con[2][1]=3; _sons_con[2][2]=2; _sons_con[2][3]=8; _sons_con[2][4]=9; _sons_con[2][5]=5; _nb_of_sons_con[2]=6;
          _sons_con[3][0]=2; _sons_con[3][1]=3; _sons_con[3][2]=0; _sons_con[3][3]=9; _sons_con[3][4]=7; _sons_con[3][5]=6; _nb_of_sons_con[3]=6;  _quadratic=true;
        }
        break;
      case NORM_HEXGP12:
        {
          _nb_of_pts=12; _nb_of_sons=8; _dim=3; _is_simplex=false; _is_extruded=true;
          _sons_type[0]=NORM_POLYGON; _sons_type[1]=NORM_POLYGON; _sons_type[2]=NORM_QUAD4; _sons_type[3]=NORM_QUAD4; _sons_type[4]=NORM_QUAD4; _sons_type[5]=NORM_QUAD4;
          _sons_type[6]=NORM_QUAD4; _sons_type[7]=NORM_QUAD4;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _sons_con[0][3]=3; _sons_con[0][4]=4; _sons_con[0][5]=5; _nb_of_sons_con[0]=6;
          _sons_con[1][0]=6; _sons_con[1][1]=11; _sons_con[1][2]=10; _sons_con[1][3]=9; _sons_con[1][4]=8; _sons_con[1][5]=7; _nb_of_sons_con[1]=6;
          _sons_con[2][0]=0; _sons_con[2][1]=6; _sons_con[2][2]=7; _sons_con[2][3]=1; _nb_of_sons_con[2]=4;
          _sons_con[3][0]=1; _sons_con[3][1]=7; _sons_con[3][2]=8; _sons_con[3][3]=2; _nb_of_sons_con[3]=4;
          _sons_con[4][0]=2; _sons_con[4][1]=8; _sons_con[4][2]=9; _sons_con[4][3]=3; _nb_of_sons_con[4]=4;
          _sons_con[5][0]=3; _sons_con[5][1]=9; _sons_con[5][2]=10; _sons_con[5][3]=4; _nb_of_sons_con[5]=4;
          _sons_con[6][0]=4; _sons_con[6][1]=10; _sons_con[6][2]=11; _sons_con[6][3]=5; _nb_of_sons_con[6]=4;
          _sons_con[7][0]=5; _sons_con[7][1]=11; _sons_con[7][2]=6; _sons_con[7][3]=0; _nb_of_sons_con[7]=4;
        }
        break;
      case NORM_PYRA13:
        {
          _nb_of_pts=13; _nb_of_sons=5; _dim=3; _linear_type=NORM_PYRA5; _is_simplex=false;
          _sons_type[0]=NORM_QUAD8; _sons_type[1]=NORM_TRI6; _sons_type[2]=NORM_TRI6; _sons_type[3]=NORM_TRI6; _sons_type[4]=NORM_TRI6;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _sons_con[0][3]=3; _sons_con[0][4]=5; _sons_con[0][5]=6; _sons_con[0][6]=7; _sons_con[0][7]=8; _nb_of_sons_con[0]=8;
          _sons_con[1][0]=0; _sons_con[1][1]=4; _sons_con[1][2]=1; _sons_con[1][3]=9; _sons_con[1][4]=10; _sons_con[1][5]=5; _nb_of_sons_con[1]=6;
          _sons_con[2][0]=1; _sons_con[2][1]=4; _sons_con[2][2]=2; _sons_con[2][3]=10; _sons_con[2][4]=11; _sons_con[2][5]=6; _nb_of_sons_con[2]=6;
          _sons_con[3][0]=2; _sons_con[3][1]=4; _sons_con[3][2]=3; _sons_con[3][3]=11; _sons_con[3][4]=12; _sons_con[3][5]=7;  _nb_of_sons_con[3]=6;
          _sons_con[4][0]=3; _sons_con[4][1]=4; _sons_con[4][2]=0; _sons_con[4][3]=12; _sons_con[4][4]=9; _sons_con[4][5]=8; _nb_of_sons_con[4]=6; _quadratic=true;
        }
        break;
      case NORM_PENTA15:
        {
          _nb_of_pts=15; _nb_of_sons=5; _dim=3; _linear_type=NORM_PENTA6; _is_simplex=false;
          _sons_type[0]=NORM_TRI6; _sons_type[1]=NORM_TRI6; _sons_type[2]=NORM_QUAD8; _sons_type[3]=NORM_QUAD8; _sons_type[4]=NORM_QUAD8;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _sons_con[0][3]=6; _sons_con[0][4]=7; _sons_con[0][5]=8; _nb_of_sons_con[0]=6;
          _sons_con[1][0]=3; _sons_con[1][1]=5; _sons_con[1][2]=4; _sons_con[1][3]=11; _sons_con[1][4]=10; _sons_con[1][5]=9; _nb_of_sons_con[1]=6;
          _sons_con[2][0]=0; _sons_con[2][1]=3; _sons_con[2][2]=4; _sons_con[2][3]=1; _sons_con[2][4]=12; _sons_con[2][5]=9; _sons_con[2][6]=13; _sons_con[2][7]=6; _nb_of_sons_con[2]=8;
          _sons_con[3][0]=1; _sons_con[3][1]=4; _sons_con[3][2]=5; _sons_con[3][3]=2; _sons_con[3][4]=13; _sons_con[3][5]=10; _sons_con[3][6]=14; _sons_con[3][7]=7; _nb_of_sons_con[3]=8;
          _sons_con[4][0]=2; _sons_con[4][1]=4; _sons_con[4][2]=5; _sons_con[4][3]=0; _sons_con[4][4]=14; _sons_con[4][5]=11; _sons_con[4][6]=12; _sons_con[4][7]=8; _nb_of_sons_con[4]=8; _quadratic=true;
        }
        break;
      case NORM_HEXA20:
        {
          _nb_of_pts=20; _nb_of_sons=6; _dim=3; _linear_type=NORM_HEXA8; _is_simplex=false;
          _sons_type[0]=NORM_QUAD8; _sons_type[1]=NORM_QUAD8; _sons_type[2]=NORM_QUAD8; _sons_type[3]=NORM_QUAD8; _sons_type[4]=NORM_QUAD8; _sons_type[5]=NORM_QUAD8;
          _sons_con[0][0]=0; _sons_con[0][1]=1; _sons_con[0][2]=2; _sons_con[0][3]=3; _sons_con[0][4]=8; _sons_con[0][5]=9; _sons_con[0][6]=10; _sons_con[0][7]=11; _nb_of_sons_con[0]=8;
          _sons_con[1][0]=4; _sons_con[1][1]=7; _sons_con[1][2]=6; _sons_con[1][3]=5; _sons_con[1][4]=15; _sons_con[1][5]=14; _sons_con[1][6]=13; _sons_con[1][7]=12; _nb_of_sons_con[1]=8;
          _sons_con[2][0]=0; _sons_con[2][1]=4; _sons_con[2][2]=5; _sons_con[2][3]=1; _sons_con[2][4]=16; _sons_con[2][5]=12; _sons_con[2][6]=17; _sons_con[2][7]=8; _nb_of_sons_con[2]=8;
          _sons_con[3][0]=1; _sons_con[3][1]=5; _sons_con[3][3]=6; _sons_con[3][3]=2; _sons_con[3][4]=17; _sons_con[3][5]=13; _sons_con[3][6]=18; _sons_con[3][7]=9;_nb_of_sons_con[3]=8;
          _sons_con[4][0]=2; _sons_con[4][1]=6; _sons_con[4][3]=7; _sons_con[4][3]=3; _sons_con[4][4]=18; _sons_con[4][5]=14; _sons_con[4][6]=19; _sons_con[4][7]=10; _nb_of_sons_con[4]=8;
          _sons_con[5][0]=3; _sons_con[5][1]=7; _sons_con[5][3]=4; _sons_con[5][3]=0; _sons_con[5][4]=19; _sons_con[5][5]=15; _sons_con[5][6]=16; _sons_con[5][7]=11; _nb_of_sons_con[5]=8; _quadratic=true;
        }
        break;
      case NORM_POLYGON:
        {
          _nb_of_pts=0; _nb_of_sons=0; _dim=2; _dyn=true; _extruded_type=NORM_POLYHED; _is_simplex=false;
        }
        break;
      case NORM_POLYHED:
        {
          _nb_of_pts=0; _nb_of_sons=0; _dim=3; _dyn=true; _is_simplex=false;
        }
        break;
      case NORM_QPOLYG:
        {
          _nb_of_pts=0; _nb_of_sons=0; _dim=2; _dyn=true; _is_simplex=false; _quadratic=true;
        }
        break;
      case NORM_POLYL:
        {
          _nb_of_pts=0; _nb_of_sons=0; _dim=1; _dyn=true; _extruded_type=NORM_POLYGON; _is_simplex=false;
        }
      case NORM_ERROR:
        {
          _nb_of_pts=std::numeric_limits<unsigned>::max(); _nb_of_sons=std::numeric_limits<unsigned>::max(); _dim=std::numeric_limits<unsigned>::max();
        }
        break;
      }
  }

Here is the caller graph for this function:


Member Function Documentation

Definition at line 80 of file CellModel.cxx.

  {
    _map_of_unique_instance.insert(std::make_pair(NORM_POINT1,CellModel(NORM_POINT1)));
    _map_of_unique_instance.insert(std::make_pair(NORM_SEG2,CellModel(NORM_SEG2)));
    _map_of_unique_instance.insert(std::make_pair(NORM_SEG3,CellModel(NORM_SEG3)));
    _map_of_unique_instance.insert(std::make_pair(NORM_TRI3,CellModel(NORM_TRI3)));
    _map_of_unique_instance.insert(std::make_pair(NORM_QUAD4,CellModel(NORM_QUAD4)));
    _map_of_unique_instance.insert(std::make_pair(NORM_TRI6,CellModel(NORM_TRI6)));
    _map_of_unique_instance.insert(std::make_pair(NORM_QUAD8,CellModel(NORM_QUAD8)));
    _map_of_unique_instance.insert(std::make_pair(NORM_TETRA4,CellModel(NORM_TETRA4)));
    _map_of_unique_instance.insert(std::make_pair(NORM_HEXA8,CellModel(NORM_HEXA8)));
    _map_of_unique_instance.insert(std::make_pair(NORM_PYRA5,CellModel(NORM_PYRA5)));
    _map_of_unique_instance.insert(std::make_pair(NORM_PENTA6,CellModel(NORM_PENTA6)));
    _map_of_unique_instance.insert(std::make_pair(NORM_TETRA10,CellModel(NORM_TETRA10)));
    _map_of_unique_instance.insert(std::make_pair(NORM_HEXGP12,CellModel(NORM_HEXGP12)));
    _map_of_unique_instance.insert(std::make_pair(NORM_PYRA13,CellModel(NORM_PYRA13)));
    _map_of_unique_instance.insert(std::make_pair(NORM_PENTA15,CellModel(NORM_PENTA15)));
    _map_of_unique_instance.insert(std::make_pair(NORM_HEXA20,CellModel(NORM_HEXA20)));
    _map_of_unique_instance.insert(std::make_pair(NORM_POLYGON,CellModel(NORM_POLYGON)));
    _map_of_unique_instance.insert(std::make_pair(NORM_POLYHED,CellModel(NORM_POLYHED)));
    _map_of_unique_instance.insert(std::make_pair(NORM_QPOLYG,CellModel(NORM_QPOLYG)));
    _map_of_unique_instance.insert(std::make_pair(NORM_POLYL,CellModel(NORM_POLYL)));
    _map_of_unique_instance.insert(std::make_pair(NORM_ERROR,CellModel(NORM_ERROR)));
  }

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned INTERP_KERNEL::CellModel::fillSonCellNodalConnectivity ( int  sonId,
const int *  nodalConn,
int *  sonNodalConn 
) const

WARNING this method do not manage correctly types that return true at the call of isDynamic.

Use fillSonCellNodalConnectivity2 instead.

Definition at line 341 of file CellModel.cxx.

  {
    unsigned nbOfTurnLoop=_nb_of_sons_con[sonId];
    const unsigned *sonConn=_sons_con[sonId];
    for(unsigned i=0;i<nbOfTurnLoop;i++)
      sonNodalConn[i]=nodalConn[sonConn[i]];
    return nbOfTurnLoop;
  }

Here is the caller graph for this function:

unsigned INTERP_KERNEL::CellModel::fillSonCellNodalConnectivity2 ( int  sonId,
const int *  nodalConn,
int  lgth,
int *  sonNodalConn,
NormalizedCellType typeOfSon 
) const

Definition at line 350 of file CellModel.cxx.

  {
    typeOfSon=getSonType2(sonId);
    if(!isDynamic())
      return fillSonCellNodalConnectivity(sonId,nodalConn,sonNodalConn);
    else
      {
        if(_dim==2)//polygon
          {
            if(_type==NORM_POLYGON)
              {
                sonNodalConn[0]=nodalConn[sonId];
                sonNodalConn[1]=nodalConn[(sonId+1)%lgth];
                return 2;
              }
            else
              {
                sonNodalConn[0]=nodalConn[sonId];
                sonNodalConn[1]=nodalConn[(sonId+1)%lgth];
                sonNodalConn[2]=nodalConn[sonId+lgth];
                return 3;
              }
          }
        else if(_dim==3)
          {//polyedron
            const int *where=nodalConn;
            for(int i=0;i<sonId;i++)
              {
                where=std::find(where,nodalConn+lgth,-1);
                where++;
              }
            const int *where2=std::find(where,nodalConn+lgth,-1);
            std::copy(where,where2,sonNodalConn);
            return where2-where;
          }
        else
          throw INTERP_KERNEL::Exception("CellModel::fillSonCellNodalConnectivity2 : no sons on NORM_POLYL !");
      }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 43 of file CellModel.cxx.

  {
    if(_map_of_unique_instance.empty())
      buildUniqueInstance();
    const std::map<NormalizedCellType,CellModel>::iterator iter=_map_of_unique_instance.find(type);
    if(iter==_map_of_unique_instance.end())
      {
        std::ostringstream stream; stream << "no cellmodel for normalized type " << type;
        throw Exception(stream.str().c_str());
      }
    return (*iter).second;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 48 of file CellModel.hxx.

{ return _dim; }

Here is the caller graph for this function:

Definition at line 59 of file CellModel.hxx.

{ return _extruded_type; }

Definition at line 60 of file CellModel.hxx.

{ return _linear_type; }

Here is the caller graph for this function:

INTERPKERNEL_EXPORT const unsigned* INTERP_KERNEL::CellModel::getNodesConstituentTheSon ( unsigned  sonId) const [inline]

sonId is in C format.

Definition at line 52 of file CellModel.hxx.

{ return _sons_con[sonId]; }

Definition at line 54 of file CellModel.hxx.

{ return _nb_of_pts; }

Here is the caller graph for this function:

Definition at line 57 of file CellModel.hxx.

{ return _nb_of_sons_con[sonId]; }

Here is the caller graph for this function:

unsigned INTERP_KERNEL::CellModel::getNumberOfNodesConstituentTheSon2 ( unsigned  sonId,
const int *  nodalConn,
int  lgth 
) const

Return number of nodes in sonId-th son of a Dynamic() cell.

Definition at line 396 of file CellModel.cxx.

  {
    if(!isDynamic())
      return getNumberOfNodesConstituentTheSon(sonId);

    if(_dim==2)//polygon
      {
        if(_type==NORM_POLYGON)
          return 2;
        else
          return 3;
      }
    else if(_dim==3)
      {//polyedron
        const int *where=nodalConn;
        for(unsigned int i=0;i<sonId;i++)
          {
            where=std::find(where,nodalConn+lgth,-1);
            where++;
          }
        const int *where2=std::find(where,nodalConn+lgth,-1);
        return where2-where;
      }
    else
      throw INTERP_KERNEL::Exception("CellModel::getNumberOfNodesConstituentTheSon2 : no sons on NORM_POLYL !");
  }

Here is the call graph for this function:

Definition at line 55 of file CellModel.hxx.

{ return _nb_of_sons; }

Here is the caller graph for this function:

unsigned INTERP_KERNEL::CellModel::getNumberOfSons2 ( const int *  conn,
int  lgth 
) const

Equivalent to getNumberOfSons except that this method deals with dynamic type.

Definition at line 301 of file CellModel.cxx.

  {
    if(!isDynamic())
      return getNumberOfSons();
    if(_dim==2)
      {
        if(_type==NORM_POLYGON)
          return lgth;
        else
          return lgth/2;
      }
    else if(_dim==1)
      return lgth;//NORM_POLYL
    else
      return std::count(conn,conn+lgth,-1)+1;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

bool INTERP_KERNEL::CellModel::getOrientationStatus ( unsigned  lgth,
const int *  conn1,
const int *  conn2 
) const

This method retrieves if cell1 represented by 'conn1' and cell2 represented by 'conn2' are equivalent by a permutation or not.

This method expects to work on 1D or 2D (only mesh dimension where it is possible to have a spaceDim) strictly higher than meshDim. If not an exception will be thrown.

Returns:
True if two cells have same orientation, false if not.

Definition at line 429 of file CellModel.cxx.

  {
    if(_dim!=1 && _dim!=2)
      throw INTERP_KERNEL::Exception("CellModel::getOrientationStatus : invalid dimension ! Must be 1 or 2 !");
    if(!_quadratic)
      {
        std::vector<int> tmp(2*lgth);
        std::vector<int>::iterator it=std::copy(conn1,conn1+lgth,tmp.begin());
        std::copy(conn1,conn1+lgth,it);
        it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth);
        if(it==tmp.begin())
          return true;
        if(it!=tmp.end())
          return _dim!=1;
        std::vector<int>::reverse_iterator it2=std::search(tmp.rbegin(),tmp.rend(),conn2,conn2+lgth);
        if(it2!=tmp.rend())
          return false;
        throw INTERP_KERNEL::Exception("CellModel::getOrientationStatus : Request of orientation status of non equal connectively cells !");
      }
    else
      {
        if(_dim!=1)
          {
            std::vector<int> tmp(lgth);
            std::vector<int>::iterator it=std::copy(conn1,conn1+lgth/2,tmp.begin());
            std::copy(conn1,conn1+lgth/2,it);
            it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth/2);
            int d=std::distance(tmp.begin(),it);
            if(it==tmp.end())
              return false;
            it=std::copy(conn1+lgth/2,conn1+lgth,tmp.begin());
            std::copy(conn1+lgth/2,conn1+lgth,it);
            it=std::search(tmp.begin(),tmp.end(),conn2,conn2+lgth);
            if(it==tmp.end())
              return false;
            int d2=std::distance(tmp.begin(),it);
            return d==d2;
          }
        else
          {
            int p=(lgth+1)/2;
            std::vector<int> tmp(2*p);
            std::vector<int>::iterator it=std::copy(conn1,conn1+p,tmp.begin());
            std::copy(conn1,conn1+p,it);
            it=std::search(tmp.begin(),tmp.end(),conn2,conn2+p);
            int d=std::distance(tmp.begin(),it);
            if(it==tmp.end())
              return false;
            tmp.resize(2*p-2);
            it=std::copy(conn1+p,conn1+lgth,tmp.begin());
            std::copy(conn1+p,conn1+lgth,it);
            it=std::search(tmp.begin(),tmp.end(),conn2+p,conn2+lgth);
            if(it==tmp.end())
              return false;
            int d2=std::distance(tmp.begin(),it);
            return d==d2;
          }
      }
  }

Definition at line 61 of file CellModel.hxx.

{ return _quadratic_type; }
const char * INTERP_KERNEL::CellModel::getRepr ( ) const

Definition at line 56 of file CellModel.cxx.

  {
    return CELL_TYPES_REPR[(int)_type];
  }

Here is the caller graph for this function:

Definition at line 62 of file CellModel.hxx.

{ return _sons_type[sonId]; }

Here is the caller graph for this function:

Equivalent to getSonType except that this method deals with dynamic type.

Definition at line 321 of file CellModel.cxx.

  {
    if(!isDynamic())
      return getSonType(sonId);
    if(_dim==2)
      {
        if(_type==NORM_POLYGON)
          return NORM_SEG2;
        else
          return NORM_SEG3;
      }
    else if(_dim==1)
      return NORM_ERROR;//NORM_POLYL
    //polyedron
    return NORM_POLYGON;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

This method is compatible with all types including dynamic one.

Definition at line 64 of file CellModel.cxx.

  {
    if(_type==type)
      return true;
    const CellModel& other=GetCellModel(type);
    if(_dim!=other.getDimension())
      return false;
    bool b1=isQuadratic();
    bool b2=other.isQuadratic();
    if((b1 && !b2) || (!b1 && b2))
      return false;
    b1=isDynamic();
    b2=other.isDynamic();
    return b1 || b2;
  }

Here is the call graph for this function:

Definition at line 46 of file CellModel.hxx.

{ return _dyn; }

Here is the caller graph for this function:

Definition at line 45 of file CellModel.hxx.

{ return _is_extruded; }

Here is the caller graph for this function:

Definition at line 47 of file CellModel.hxx.

{ return _quadratic; }

Here is the caller graph for this function:

Definition at line 50 of file CellModel.hxx.

{ return _is_simplex; }

Here is the caller graph for this function:


Member Data Documentation

unsigned INTERP_KERNEL::CellModel::_dim [private]

Definition at line 71 of file CellModel.hxx.

Definition at line 67 of file CellModel.hxx.

Definition at line 75 of file CellModel.hxx.

Definition at line 70 of file CellModel.hxx.

Definition at line 69 of file CellModel.hxx.

Definition at line 76 of file CellModel.hxx.

Definition at line 81 of file CellModel.hxx.

Definition at line 72 of file CellModel.hxx.

Definition at line 73 of file CellModel.hxx.

Definition at line 79 of file CellModel.hxx.

Definition at line 68 of file CellModel.hxx.

Definition at line 77 of file CellModel.hxx.

Definition at line 78 of file CellModel.hxx.

Definition at line 80 of file CellModel.hxx.

Definition at line 74 of file CellModel.hxx.

const char * INTERP_KERNEL::CellModel::CELL_TYPES_REPR [static, private]
Initial value:
{"NORM_POINT1", "NORM_SEG2", "NORM_SEG3", "NORM_TRI3", "NORM_QUAD4",
                                            "NORM_POLYGON", "NORM_TRI6", "" , "NORM_QUAD8", "",
                                            "", "", "", "", "NORM_TETRA4",
                                            "NORM_PYRA5", "NORM_PENTA6", "", "NORM_HEXA8", "",
                                            "NORM_TETRA10", "", "NORM_HEXGP12", "NORM_PYRA13", "",
                                            "NORM_PENTA15", "", "", "", "",
                                            "NORM_HEXA20", "NORM_POLYHED", "NORM_QPOLYG", "NORM_POLYL", "",
                                            "", "", "", "", "",
                                            "NORM_ERROR"}

Definition at line 82 of file CellModel.hxx.

Definition at line 38 of file CellModel.hxx.

const unsigned INTERP_KERNEL::CellModel::MAX_NB_OF_SONS = 8 [static]

Definition at line 37 of file CellModel.hxx.


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