Back to index

salome-smesh  6.5.0
Defines | Functions | Variables
SMDS_VolumeTool.cxx File Reference
#include "SMDS_VolumeTool.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_VtkVolume.hxx"
#include "SMDS_Mesh.hxx"
#include "utilities.h"
#include <map>
#include <limits>
#include <cmath>

Go to the source code of this file.

Defines

#define SWAP_NODES(nodes, i1, i2)

Functions

static double getTetraVolume (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const SMDS_MeshNode *n3, const SMDS_MeshNode *n4)

Variables

static int Tetra_F [4][4]
static int Tetra_RE [4][4]
static int Tetra_nbN [] = { 3, 3, 3, 3 }
static int Pyramid_F [5][5]
static int Pyramid_RE [5][5]
static int Pyramid_nbN [] = { 4, 3, 3, 3, 3 }
static int Penta_F [5][5]
static int Penta_RE [5][5]
static int Penta_nbN [] = { 3, 3, 4, 4, 4 }
static int Hexa_F [6][5]
static int Hexa_RE [6][5]
static int Hexa_nbN [] = { 4, 4, 4, 4, 4, 4 }
static int HexPrism_F [8][7]
static int HexPrism_RE [8][7]
static int HexPrism_nbN [] = { 6, 6, 4, 4, 4, 4, 4, 4 }
static int QuadTetra_F [4][7]
static int QuadTetra_RE [4][7]
static int QuadTetra_nbN [] = { 6, 6, 6, 6 }
static int QuadPyram_F [5][9]
static int QuadPyram_RE [5][9]
static int QuadPyram_nbN [] = { 8, 6, 6, 6, 6 }
static int QuadPenta_F [5][9]
static int QuadPenta_RE [5][9]
static int QuadPenta_nbN [] = { 6, 6, 8, 8, 8 }
static int QuadHexa_F [6][9]
static int QuadHexa_RE [6][9]
static int QuadHexa_nbN [] = { 8, 8, 8, 8, 8, 8 }
static int TriQuadHexa_F [6][9]
static int TriQuadHexa_RE [6][9]
static int TriQuadHexa_nbN [] = { 9, 9, 9, 9, 9, 9 }

Define Documentation

#define SWAP_NODES (   nodes,
  i1,
  i2 
)
Value:
{                                         \
  const SMDS_MeshNode* tmp = nodes[ i1 ]; \
  nodes[ i1 ] = nodes[ i2 ];              \
  nodes[ i2 ] = tmp;                      \
}

Definition at line 537 of file SMDS_VolumeTool.cxx.


Function Documentation

static double getTetraVolume ( const SMDS_MeshNode *  n1,
const SMDS_MeshNode *  n2,
const SMDS_MeshNode *  n3,
const SMDS_MeshNode *  n4 
) [static]

Definition at line 652 of file SMDS_VolumeTool.cxx.

{
  double X1 = n1->X();
  double Y1 = n1->Y();
  double Z1 = n1->Z();

  double X2 = n2->X();
  double Y2 = n2->Y();
  double Z2 = n2->Z();

  double X3 = n3->X();
  double Y3 = n3->Y();
  double Z3 = n3->Z();

  double X4 = n4->X();
  double Y4 = n4->Y();
  double Z4 = n4->Z();

  double Q1 = -(X1-X2)*(Y3*Z4-Y4*Z3);
  double Q2 =  (X1-X3)*(Y2*Z4-Y4*Z2);
  double R1 = -(X1-X4)*(Y2*Z3-Y3*Z2);
  double R2 = -(X2-X3)*(Y1*Z4-Y4*Z1);
  double S1 =  (X2-X4)*(Y1*Z3-Y3*Z1);
  double S2 = -(X3-X4)*(Y1*Z2-Y2*Z1);

  return (Q1+Q2+R1+R2+S1+S2)/6.0;
}

Variable Documentation

int Hexa_F[6][5] [static]
Initial value:
 { 
  { 0, 1, 2, 3, 0 },
  { 4, 7, 6, 5, 4 },          
  { 0, 4, 5, 1, 0 },
  { 1, 5, 6, 2, 1 },
  { 3, 2, 6, 7, 3 }, 
  { 0, 3, 7, 4, 0 }}

Definition at line 143 of file SMDS_VolumeTool.cxx.

int Hexa_nbN[] = { 4, 4, 4, 4, 4, 4 } [static]

Definition at line 157 of file SMDS_VolumeTool.cxx.

int Hexa_RE[6][5] [static]
Initial value:
 { 
  { 0, 3, 2, 1, 0 },
  { 4, 5, 6, 7, 4 },          
  { 0, 1, 5, 4, 0 },
  { 1, 2, 6, 5, 1 },
  { 3, 7, 6, 2, 3 }, 
  { 0, 4, 7, 3, 0 }}

Definition at line 150 of file SMDS_VolumeTool.cxx.

int HexPrism_F[8][7] [static]
Initial value:
 { 
  { 0, 1, 2, 3, 4, 5, 0 },
  { 6,11,10, 9, 8, 7, 6 },
  { 0, 6, 7, 1, 0, 0, 0 },
  { 1, 7, 8, 2, 1, 1, 1 },
  { 2, 8, 9, 3, 2, 2, 2 },
  { 3, 9,10, 4, 3, 3, 3 },
  { 4,10,11, 5, 4, 4, 4 },
  { 5,11, 6, 0, 5, 5, 5 }}

Definition at line 176 of file SMDS_VolumeTool.cxx.

int HexPrism_nbN[] = { 6, 6, 4, 4, 4, 4, 4, 4 } [static]

Definition at line 194 of file SMDS_VolumeTool.cxx.

int HexPrism_RE[8][7] [static]
Initial value:
 { 
  { 0, 5, 4, 3, 2, 1, 0 },
  { 6,11,10, 9, 8, 7, 6 },
  { 0, 6, 7, 1, 0, 0, 0 },
  { 1, 7, 8, 2, 1, 1, 1 },
  { 2, 8, 9, 3, 2, 2, 2 },
  { 3, 9,10, 4, 3, 3, 3 },
  { 4,10,11, 5, 4, 4, 4 },
  { 5,11, 6, 0, 5, 5, 5 }}

Definition at line 185 of file SMDS_VolumeTool.cxx.

int Penta_F[5][5] [static]
Initial value:
 { 
  { 0, 1, 2, 0, 0 },          
  { 3, 5, 4, 3, 3 },          
  { 0, 3, 4, 1, 0 },
  { 1, 4, 5, 2, 1 },
  { 0, 2, 5, 3, 0 }}

Definition at line 114 of file SMDS_VolumeTool.cxx.

int Penta_nbN[] = { 3, 3, 4, 4, 4 } [static]

Definition at line 126 of file SMDS_VolumeTool.cxx.

int Penta_RE[5][5] [static]
Initial value:
 { 
  { 0, 2, 1, 0, 0 },
  { 3, 4, 5, 3, 3 },
  { 0, 1, 4, 3, 0 },
  { 1, 2, 5, 4, 1 },
  { 0, 3, 5, 2, 0 }}

Definition at line 120 of file SMDS_VolumeTool.cxx.

int Pyramid_F[5][5] [static]
Initial value:
 { 
  { 0, 1, 2, 3, 0 },            
  { 0, 4, 1, 0, 4 },
  { 1, 4, 2, 1, 4 },
  { 2, 4, 3, 2, 4 },
  { 3, 4, 0, 3, 4 }
}

Definition at line 84 of file SMDS_VolumeTool.cxx.

int Pyramid_nbN[] = { 4, 3, 3, 3, 3 } [static]

Definition at line 97 of file SMDS_VolumeTool.cxx.

int Pyramid_RE[5][5] [static]
Initial value:
 { 
  { 0, 3, 2, 1, 0 },             
  { 0, 1, 4, 0, 4 },
  { 1, 2, 4, 1, 4 },
  { 2, 3, 4, 2, 4 },
  { 3, 0, 4, 3, 4 }}

Definition at line 91 of file SMDS_VolumeTool.cxx.

int QuadHexa_F[6][9] [static]
Initial value:
 {  
  { 0, 8, 1, 9, 2, 10,3, 11,0 },   
  { 4, 15,7, 14,6, 13,5, 12,4 },
  { 0, 16,4, 12,5, 17,1, 8, 0 },
  { 1, 17,5, 13,6, 18,2, 9, 1 },
  { 3, 10,2, 18,6, 14,7, 19,3 }, 
  { 0, 11,3, 19,7, 15,4, 16,0 }}

Definition at line 317 of file SMDS_VolumeTool.cxx.

int QuadHexa_nbN[] = { 8, 8, 8, 8, 8, 8 } [static]

Definition at line 331 of file SMDS_VolumeTool.cxx.

int QuadHexa_RE[6][9] [static]
Initial value:
 {  
  { 0, 11,3, 10,2, 9, 1, 8, 0 },   
  { 4, 12,5, 13,6, 14,7, 15,4 },
  { 0, 8, 1, 17,5, 12,4, 16,0 },
  { 1, 9, 2, 18,6, 13,5, 17,1 },
  { 3, 19,7, 14,6, 18,2, 10,3 }, 
  { 0, 16,4, 15,7, 19,3, 11,0 }}

Definition at line 324 of file SMDS_VolumeTool.cxx.

int QuadPenta_F[5][9] [static]
Initial value:
 {  
  { 0, 6, 1, 7, 2, 8, 0, 0, 0 },
  { 3,11, 5, 10,4, 9, 3, 3, 3 },
  { 0, 12,3, 9, 4, 13,1, 6, 0 },
  { 1, 13,4, 10,5, 14,2, 7, 1 },
  { 0, 8, 2, 14,5, 11,3, 12,0 }}

Definition at line 280 of file SMDS_VolumeTool.cxx.

int QuadPenta_nbN[] = { 6, 6, 8, 8, 8 } [static]

Definition at line 292 of file SMDS_VolumeTool.cxx.

int QuadPenta_RE[5][9] [static]
Initial value:
 { 
  { 0, 8, 2, 7, 1, 6, 0, 0, 0 },
  { 3, 9, 4, 10,5, 11,3, 3, 3 },
  { 0, 6, 1, 13,4, 9, 3, 12,0 },
  { 1, 7, 2, 14,5, 10,4, 13,1 },
  { 0, 12,3, 11,5, 14,2, 8, 0 }}

Definition at line 286 of file SMDS_VolumeTool.cxx.

int QuadPyram_F[5][9] [static]
Initial value:
 {  
  { 0, 5, 1, 6, 2, 7, 3, 8, 0 },   
  { 0, 9, 4, 10,1, 5, 0, 4, 4 },
  { 1, 10,4, 11,2, 6, 1, 4, 4 },
  { 2, 11,4, 12,3, 7, 2, 4, 4 },
  { 3, 12,4, 9, 0, 8, 3, 4, 4 }}

Definition at line 244 of file SMDS_VolumeTool.cxx.

int QuadPyram_nbN[] = { 8, 6, 6, 6, 6 } [static]

Definition at line 256 of file SMDS_VolumeTool.cxx.

int QuadPyram_RE[5][9] [static]
Initial value:
 { 
  { 0, 8, 3, 7, 2, 6, 1, 5, 0 },   
  { 0, 5, 1, 10,4, 9, 0, 4, 4 },
  { 1, 6, 2, 11,4, 10,1, 4, 4 },
  { 2, 7, 3, 12,4, 11,2, 4, 4 },
  { 3, 8, 0, 9, 4, 12,3, 4, 4 }}

Definition at line 250 of file SMDS_VolumeTool.cxx.

int QuadTetra_F[4][7] [static]
Initial value:
 { 
  { 0, 4, 1, 5, 2, 6, 0 },        
  { 0, 7, 3, 8, 1, 4, 0 },
  { 1, 8, 3, 9, 2, 5, 1 },
  { 0, 6, 2, 9, 3, 7, 0 }}

Definition at line 211 of file SMDS_VolumeTool.cxx.

int QuadTetra_nbN[] = { 6, 6, 6, 6 } [static]

Definition at line 221 of file SMDS_VolumeTool.cxx.

int QuadTetra_RE[4][7] [static]
Initial value:
 { 
  { 0, 6, 2, 5, 1, 4, 0 },         
  { 0, 4, 1, 8, 3, 7, 0 },
  { 1, 5, 2, 9, 3, 8, 1 },
  { 0, 7, 3, 9, 2, 6, 0 }}

Definition at line 216 of file SMDS_VolumeTool.cxx.

int Tetra_F[4][4] [static]
Initial value:
 { 
  { 0, 1, 2, 0 },              
  { 0, 3, 1, 0 },
  { 1, 3, 2, 1 },
  { 0, 2, 3, 0 }}

Definition at line 69 of file SMDS_VolumeTool.cxx.

int Tetra_nbN[] = { 3, 3, 3, 3 } [static]

Definition at line 79 of file SMDS_VolumeTool.cxx.

int Tetra_RE[4][4] [static]
Initial value:
 { 
  { 0, 2, 1, 0 },              
  { 0, 1, 3, 0 },
  { 1, 2, 3, 1 },
  { 0, 3, 2, 0 }}

Definition at line 74 of file SMDS_VolumeTool.cxx.

int TriQuadHexa_F[6][9] [static]
Initial value:
 {  
  { 0, 8, 1, 9, 2, 10,3, 11, 20 },   
  { 4, 15,7, 14,6, 13,5, 12, 25 },
  { 0, 16,4, 12,5, 17,1, 8,  21 },
  { 1, 17,5, 13,6, 18,2, 9,  22 },
  { 3, 10,2, 18,6, 14,7, 19, 23 }, 
  { 0, 11,3, 19,7, 15,4, 16, 24 }}

Definition at line 333 of file SMDS_VolumeTool.cxx.

int TriQuadHexa_nbN[] = { 9, 9, 9, 9, 9, 9 } [static]

Definition at line 347 of file SMDS_VolumeTool.cxx.

int TriQuadHexa_RE[6][9] [static]
Initial value:
 {  
  { 0, 11,3, 10,2, 9, 1, 8,  20 },   
  { 4, 12,5, 13,6, 14,7, 15, 25 },   
  { 0, 8, 1, 17,5, 12,4, 16, 21 },
  { 1, 9, 2, 18,6, 13,5, 17, 22 },
  { 3, 19,7, 14,6, 18,2, 10, 23 }, 
  { 0, 16,4, 15,7, 19,3, 11, 24 }}

Definition at line 340 of file SMDS_VolumeTool.cxx.