Back to index

salome-med  6.5.0
Public Member Functions | Static Public Member Functions | Private Attributes
MEDSPLITTER::MEDSPLITTER_FaceModel Class Reference

#include <MEDSPLITTER_FaceModel.hxx>

List of all members.

Public Member Functions

 MEDSPLITTER_FaceModel ()
virtual ~MEDSPLITTER_FaceModel ()
MED_EN::medGeometryElement getType () const
void setType (MED_EN::medGeometryElement type)
void setNbNodes (int nbnodes)
int & operator[] (int i)
int getGlobal ()
void setGlobal (int i)

Static Public Member Functions

static MEDSPLITTER_FaceModelgetCommonFace (const int *nodes1, const int *nodes1_local, const MEDMEM::CELLMODEL &celltype1, const int *nodes2, int nb_nodes2, int global_id)
 Makes a face common for two given cells.

Private Attributes

int _nbnodes
int * _conn
MED_EN::medGeometryElement _type
int _global

Detailed Description

Definition at line 31 of file MEDSPLITTER_FaceModel.hxx.


Constructor & Destructor Documentation

Definition at line 34 of file MEDSPLITTER_FaceModel.hxx.

:_conn(0){};

Definition at line 35 of file MEDSPLITTER_FaceModel.hxx.

{if (_conn!=0) delete[] _conn;}

Member Function Documentation

MEDSPLITTER_FaceModel * MEDSPLITTER_FaceModel::getCommonFace ( const int *  nodes1,
const int *  nodes1_local,
const MEDMEM::CELLMODEL &  celltype1,
const int *  nodes2,
int  nb_nodes2,
int  global_id 
) [static]

Makes a face common for two given cells.

Parameters:
nodes1- globl nodes of the first cell
nodes1_local- local nodes of the first cell
celltype1- cell model of the first cell
nodes2- globl nodes of the second cell
nb_nodes2- nb of nodes of the second cell
global_id- id of the new common face

Definition at line 2407 of file MEDSPLITTER_MESHCollection.cxx.

{
  int nbfaces= celltype1.getNumberOfConstituents(1);
  int ** faces = celltype1.getConstituents(1);
  MED_EN::medGeometryElement* types = celltype1.getConstituentsType(1);
  int iface=0;
  int dimension=celltype1.getDimension();

  while (iface<nbfaces)
  {
    //SCRUTE_MED (iface);
    int nbnodes= types[iface]%100;
    const int* nodes = celltype1.getNodesConstituent(1,iface+1);
    int common_nodes=0;
    for (int i=0; i<nbnodes;i++)
    {
      for (int i2=0; i2<nb_nodes2; i2++)
      {
        if (nodes1[nodes[i]-1]==nodes2[i2]) common_nodes++;
      }
    }
    if (common_nodes>=dimension) break;
    iface++;
  }

  if (iface==nbfaces)
    throw MEDEXCEPTION("MEDSPLITTER::getCommonFace - No common face found !");

  MEDSPLITTER_FaceModel* face_model = new MEDSPLITTER_FaceModel;
  face_model->setType(types[iface]);
  int nbnodes = types[iface]%100;
  face_model->setNbNodes(nbnodes);
  face_model->setGlobal(global_id); 
  for (int i=0; i<nbnodes; i++)
    (*face_model)[i]=nodes1_local[faces[iface][i]-1];

  return face_model;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 40 of file MEDSPLITTER_FaceModel.hxx.

{return _global;}

Here is the caller graph for this function:

Definition at line 36 of file MEDSPLITTER_FaceModel.hxx.

{return _type;}

Here is the caller graph for this function:

int& MEDSPLITTER::MEDSPLITTER_FaceModel::operator[] ( int  i) [inline]

Definition at line 39 of file MEDSPLITTER_FaceModel.hxx.

{return *(_conn+i);}

Definition at line 41 of file MEDSPLITTER_FaceModel.hxx.

{_global=i;}

Here is the caller graph for this function:

void MEDSPLITTER::MEDSPLITTER_FaceModel::setNbNodes ( int  nbnodes) [inline]

Definition at line 38 of file MEDSPLITTER_FaceModel.hxx.

{_conn=new int[nbnodes];}

Here is the caller graph for this function:

Definition at line 37 of file MEDSPLITTER_FaceModel.hxx.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 53 of file MEDSPLITTER_FaceModel.hxx.

Definition at line 55 of file MEDSPLITTER_FaceModel.hxx.

Definition at line 52 of file MEDSPLITTER_FaceModel.hxx.

Definition at line 54 of file MEDSPLITTER_FaceModel.hxx.


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