std::map<NormalizedCellType,CellModel> CellModel::_map_of_unique_instance;
- const CellModel& CellModel::getCellModel(NormalizedCellType type)
+ const CellModel& CellModel::GetCellModel(NormalizedCellType type)
{
if(_map_of_unique_instance.empty())
buildUniqueInstance();
{
if(_type==type)
return true;
- const CellModel& other=getCellModel(type);
+ const CellModel& other=GetCellModel(type);
if(_dim!=other.getDimension())
return false;
bool b1=isQuadratic();
CellModel(NormalizedCellType type);
static void buildUniqueInstance();
public:
- INTERPKERNEL_EXPORT static const CellModel& getCellModel(NormalizedCellType type);
+ INTERPKERNEL_EXPORT static const CellModel& GetCellModel(NormalizedCellType type);
INTERPKERNEL_EXPORT const char *getRepr() const;
INTERPKERNEL_EXPORT bool isDynamic() const { return _dyn; }
INTERPKERNEL_EXPORT bool isQuadratic() const { return _quadratic; }
void GaussInfo::initLocalInfo() throw (INTERP_KERNEL::Exception)
{
bool aSatify = false;
- const CellModel& cellModel=CellModel::getCellModel(_my_geometry);
+ const CellModel& cellModel=CellModel::GetCellModel(_my_geometry);
switch( _my_geometry )
{
case NORM_SEG2:
std::vector<Node *> nodes(nbNodes);
for(int i=0;i<nbNodes;i++)
nodes[i]=new Node(coords[i*SPACEDIM],coords[i*SPACEDIM+1]);
- if(!CellModel::getCellModel(type).isQuadratic())
+ if(!CellModel::GetCellModel(type).isQuadratic())
return QuadraticPolygon::buildLinearPolygon(nodes);
else
return QuadraticPolygon::buildArcCirclePolygon(nodes);
std::vector<Node *> nodes(nbOfPoints);
for(int i=0;i<nbOfPoints;i++)
nodes[i]=new Node(PlanarIntersector<MyMeshType,MyMatrix>::_coordsT+OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[i])*SPACEDIM);
- if(CellModel::getCellModel(type).isQuadratic())
+ if(CellModel::GetCellModel(type).isQuadratic())
return QuadraticPolygon::buildLinearPolygon(nodes);
else
return QuadraticPolygon::buildArcCirclePolygon(nodes);
INTERP_KERNEL::NormalizedCellType CellSimplify::simplifyDegeneratedCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth,
int *retConn, int& retLgth) throw(INTERP_KERNEL::Exception)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
std::set<int> c(conn,conn+lgth);
c.erase(-1);
bool isObviousNonDegeneratedCell=((int)c.size()==lgth);
int *CellSimplify::getFullPolyh3DCell(INTERP_KERNEL::NormalizedCellType type, const int *conn, int lgth,
int& retNbOfFaces, int& retLgth)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
unsigned nbOfFaces=cm.getNumberOfSons2(conn,lgth);
int *tmp=new int[nbOfFaces*(lgth+1)];
int *work=tmp;
getUCoordinates( icellT, uCoords );
NormalizedCellType tT = INTER_CU::_meshU.getTypeOfElement( _TMIU(icellT));
- bool is_tgt_quad = CellModel::getCellModel(tT).isQuadratic();
+ bool is_tgt_quad = CellModel::GetCellModel(tT).isQuadratic();
double quad[8] = { INTER_CU::_coordsC[0][icellS[0]], INTER_CU::_coordsC[1][icellS[1]],
INTER_CU::_coordsC[0][icellS[0]+1], INTER_CU::_coordsC[1][icellS[1]],
if(SPACEDIM==3)
orientation=PlanarIntersector<MyMeshType,MyMatrix>::projectionThis(&sourceCellCoordsTmp[0],quadrangle,sourceCellCoords.size()/SPACEDIM,4);
NormalizedCellType tS=PlanarIntersector<MyMeshType,MyMatrix>::_meshS.getTypeOfElement(OTT<ConnType,numPol>::indFC(iS));
- double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,sourceCellCoordsTmp,CellModel::getCellModel(tS).isQuadratic());
+ double surf=orientation*intersectGeometryWithQuadrangle(quadrangle,sourceCellCoordsTmp,CellModel::GetCellModel(tS).isQuadratic());
surf=PlanarIntersector<MyMeshType,MyMatrix>::getValueRegardingOption(surf);
if(surf!=0.)
{
int orientation=1;
PlanarIntersector<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(icellT),targetCellCoords);
NormalizedCellType tT=PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getTypeOfElement(OTT<ConnType,numPol>::indFC(icellT));
- bool isTargetQuad=CellModel::getCellModel(tT).isQuadratic();
+ bool isTargetQuad=CellModel::GetCellModel(tT).isQuadratic();
typename MyMatrix::value_type& resRow=res[icellT];
for(typename std::vector<ConnType>::const_iterator iter=icellsS.begin();iter!=icellsS.end();iter++)
{
std::vector<double> * tgtCoords = & tgtCellCoords;
int tgtNbNodes = tgtCellCoords.size()/SPACEDIM;
NormalizedCellType tT=PlanarIntersector<MyMeshType,MyMatrix>::_meshT.getTypeOfElement(OTT<ConnType,numPol>::indFC(icellT));
- bool isTargetQuad=CellModel::getCellModel(tT).isQuadratic();
+ bool isTargetQuad=CellModel::GetCellModel(tT).isQuadratic();
typename MyMatrix::value_type& resRow=res[icellT];
std::vector<Node *> nodes(nbNodes);
for(int i=0;i<nbNodes;i++)
nodes[i]=new Node(coords[i*SPACEDIM],coords[i*SPACEDIM+1]);
- if(!CellModel::getCellModel(type).isQuadratic())
+ if(!CellModel::GetCellModel(type).isQuadratic())
return QuadraticPolygon::buildLinearPolygon(nodes);
else
return QuadraticPolygon::buildArcCirclePolygon(nodes);
std::vector<Node *> nodes(nbOfPoints);
for(int i=0;i<nbOfPoints;i++)
nodes[i]=new Node(PlanarIntersector<MyMeshType,MyMatrix>::_coordsT+OTT<ConnType,numPol>::coo2C(startOfCellNodeConn[i])*SPACEDIM);
- if(CellModel::getCellModel(type).isQuadratic())
+ if(CellModel::GetCellModel(type).isQuadratic())
return QuadraticPolygon::buildLinearPolygon(nodes);
else
return QuadraticPolygon::buildArcCirclePolygon(nodes);
for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
{
NormalizedCellType tS=Intersector3DP0P0<MyMeshType,MyMatrix>::_src_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iterCellS));
- const CellModel& cmTypeS=CellModel::getCellModel(tS);
+ const CellModel& cmTypeS=CellModel::GetCellModel(tS);
std::vector<ConnType> connOfCurCellS;
Intersector3DP0P0<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(bary,&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision))
for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
{
NormalizedCellType tS=Intersector3DP0P1<MyMeshType,MyMatrix>::_src_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iterCellS));
- const CellModel& cmTypeS=CellModel::getCellModel(tS);
+ const CellModel& cmTypeS=CellModel::GetCellModel(tS);
std::vector<ConnType> connOfCurCellS;
Intersector3DP0P1<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
for(int nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
NormalizedCellType tS=Intersector3DP1P0<MyMeshType,MyMatrix>::_src_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iterCellS));
if(tS!=NORM_TETRA4)
throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==3. Only TETRA4 supported !");
- const CellModel& cmTypeS=CellModel::getCellModel(tS);
+ const CellModel& cmTypeS=CellModel::GetCellModel(tS);
std::vector<ConnType> connOfCurCellS;
Intersector3DP1P0<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
if( PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(baryT,&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision) )
NormalizedCellType tS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(*iterCellS));
if(tS!=NORM_TETRA4)
throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==3. Only TETRA4 supported !");
- const CellModel& cmTypeS=CellModel::getCellModel(tS);
+ const CellModel& cmTypeS=CellModel::GetCellModel(tS);
const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
{
typedef typename MyMeshType::MyConnType ConnType;
const NumberingPolicy numPol=MyMeshType::My_numPol;
- const CellModel& cmType=CellModel::getCellModel(type);
+ const CellModel& cmType=CellModel::GetCellModel(type);
//
if (SPACEDIM==2)
{
const ConnType* conn_elem=conn+OTT<ConnType,numPol>::ind2C(conn_index[i]);
int conn_elem_sz=conn_index[i+1]-conn_index[i];
NormalizedCellType type=_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(i));
- CellModel cell = CellModel::getCellModel(type);
+ CellModel cell = CellModel::GetCellModel(type);
if ( cell.isQuadratic() )
throw Exception("P2 not implemented yet");
// get type of cell
NormalizedCellType normCellType=_src_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(element));
- const CellModel& cellModelCell=CellModel::getCellModel(normCellType);
+ const CellModel& cellModelCell=CellModel::GetCellModel(normCellType);
unsigned nbOfNodes4Type=cellModelCell.isDynamic() ? _src_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(element)) : cellModelCell.getNumberOfNodes();
// halfspace filtering
bool isOutside[8] = {true, true, true, true, true, true, true, true};
else
{
faceType = cellModelCell.getSonType(ii);
- const CellModel& faceModel=CellModel::getCellModel(faceType);
+ const CellModel& faceModel=CellModel::GetCellModel(faceType);
assert(faceModel.getDimension() == 2);
faceNodes=new int[faceModel.getNumberOfNodes()];
cellModelCell.fillSonCellNodalConnectivity(ii,cellNodes,faceNodes);
if(!isTargetOutside)
{
- const CellModel& cellModelCell=CellModel::getCellModel(NORM_TETRA4);
+ const CellModel& cellModelCell=CellModel::GetCellModel(NORM_TETRA4);
int cellNodes[4] = { 0, 1, 2, 3 }, faceNodes[3];
for(unsigned ii = 0 ; ii < 4 ; ++ii)
// get type of cell and nb of cell nodes
NormalizedCellType normCellType=_target_mesh.getTypeOfElement(OTT<ConnType,numPol>::indFC(targetCell));
- const CellModel& cellModelCell=CellModel::getCellModel(normCellType);
+ const CellModel& cellModelCell=CellModel::GetCellModel(normCellType);
unsigned nbOfCellNodes=cellModelCell.isDynamic() ? _target_mesh.getNumberOfNodesOfElement(OTT<ConnType,numPol>::indFC(targetCell)) : cellModelCell.getNumberOfNodes();
// get nb of cell sons (faces)
int nbOfCells2D=_mesh2D->getNumberOfCells();
int locId=std::distance(ids,where)%nbOfCells2D;
INTERP_KERNEL::NormalizedCellType tmp=_mesh2D->getTypeOfCell(locId);
- return INTERP_KERNEL::CellModel::getCellModel(tmp).getExtrudedType();
+ return INTERP_KERNEL::CellModel::GetCellModel(tmp).getExtrudedType();
}
int MEDCouplingExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
for(int i=0;i<nbOfCells2D;i++)
{
INTERP_KERNEL::NormalizedCellType t=_mesh2D->getTypeOfCell(i);
- if(INTERP_KERNEL::CellModel::getCellModel(t).getExtrudedType()==type)
+ if(INTERP_KERNEL::CellModel::GetCellModel(t).getExtrudedType()==type)
ret++;
}
return ret*_mesh1D->getNumberOfCells();
const MEDCouplingGaussLocalization& cli=_loc[*it];//curLocInfo
INTERP_KERNEL::NormalizedCellType typ=cli.getType();
const std::vector<double>& wg=cli.getWeights();
- calculator.addGaussInfo(typ,INTERP_KERNEL::CellModel::getCellModel(typ).getDimension(),
+ calculator.addGaussInfo(typ,INTERP_KERNEL::CellModel::GetCellModel(typ).getDimension(),
&cli.getGaussCoords()[0],wg.size(),&cli.getRefCoords()[0],
- INTERP_KERNEL::CellModel::getCellModel(typ).getNumberOfNodes());
+ INTERP_KERNEL::CellModel::GetCellModel(typ).getNumberOfNodes());
}
int nbt=parts2[i]->getNumberOfTuples();
for(const int *w=parts2[i]->getConstPointer();w!=parts2[i]->getConstPointer()+nbt;w++)
void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType(const MEDCouplingMesh *m, INTERP_KERNEL::NormalizedCellType type, const std::vector<double>& refCoo,
const std::vector<double>& gsCoo, const std::vector<double>& wg) throw(INTERP_KERNEL::Exception)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
if((int)cm.getDimension()!=m->getMeshDimension())
{
std::ostringstream oss; oss << "MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType : mismatch of dimensions ! MeshDim==" << m->getMeshDimension();
for(int i=0;i<nbOfCells;i++)
{
INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
if(cm.isDynamic())
throw INTERP_KERNEL::Exception("Not implemented yet Gauss node on elements for polygons and polyedrons !");
ret+=cm.getNumberOfNodes();
for(int i=1;i<nbOfCells;i++)
{
INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(std::distance(array,std::find(array,array+nbOfCells,i-1)));
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
array3[i]=array3[i-1]+cm.getNumberOfNodes();
}
int j=0;
for(int i=0;i<nbOfCells;i++)
{
INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
for(int k=0;k<(int)cm.getNumberOfNodes();k++,j++)
array2[j]=array3[array[i]]+k;
}
for(int i=0;i<cellId;i++)
{
INTERP_KERNEL::NormalizedCellType type=mesh->getTypeOfCell(i);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
offset+=cm.getNumberOfNodes();
}
return da->getIJ(offset+nodeIdInCell,compoId);
void ParaMEDMEM::MEDCouplingGaussLocalization::checkCoherency() const throw(INTERP_KERNEL::Exception)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
int nbNodes=cm.getNumberOfNodes();
int dim=cm.getDimension();
if(!cm.isDynamic())
double ParaMEDMEM::MEDCouplingGaussLocalization::getRefCoord(int ptIdInCell, int comp) const throw(INTERP_KERNEL::Exception)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
int nbNodes=cm.getNumberOfNodes();
int dim=cm.getDimension();
if(ptIdInCell<0 || ptIdInCell>=nbNodes)
*/
void ParaMEDMEM::MEDCouplingGaussLocalization::setRefCoord(int ptIdInCell, int comp, double newVal) throw(INTERP_KERNEL::Exception)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
int nbNodes=cm.getNumberOfNodes();
int dim=cm.getDimension();
if(ptIdInCell<0 || ptIdInCell>=nbNodes)
int ParaMEDMEM::MEDCouplingGaussLocalization::checkCoherencyOfRequest(int gaussPtIdInCell, int comp) const throw(INTERP_KERNEL::Exception)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
int dim=cm.getDimension();
int nbGsPts=getNumberOfGaussPt();
if(gaussPtIdInCell<0 || gaussPtIdInCell>=nbGsPts)
throw INTERP_KERNEL::Exception("No mesh dimension specified !");
for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iter=_types.begin();iter!=_types.end();iter++)
{
- if((int)INTERP_KERNEL::CellModel::getCellModel(*iter).getDimension()!=_mesh_dim)
+ if((int)INTERP_KERNEL::CellModel::GetCellModel(*iter).getDimension()!=_mesh_dim)
{
std::ostringstream message;
message << "Mesh invalid because dimension is " << _mesh_dim << " and there is presence of cell(s) with type " << (*iter);
const int *ptrI=_nodal_connec_index->getConstPointer();
for(int i=0;i<nbOfCells;i++)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel((INTERP_KERNEL::NormalizedCellType)ptr[ptrI[i]]);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)ptr[ptrI[i]]);
if((int)cm.getDimension()!=meshDim)
{
std::ostringstream oss;
*/
void MEDCouplingUMesh::insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, const int *nodalConnOfCell) throw(INTERP_KERNEL::Exception)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
if(_nodal_connec_index==0)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::insertNextCell : nodal connectivity not set ! invoke allocateCells before calling insertNextCell !");
if((int)cm.getDimension()==_mesh_dim)
{
int pos=connIndex[eltId];
int posP1=connIndex[eltId+1];
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel((INTERP_KERNEL::NormalizedCellType)conn[pos]);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[pos]);
unsigned nbOfSons=cm.getNumberOfSons2(conn+pos+1,posP1-pos-1);
int *tmp=new int[posP1-pos];
for(unsigned i=0;i<nbOfSons;i++)
{
INTERP_KERNEL::NormalizedCellType cmsId;
unsigned nbOfNodesSon=cm.fillSonCellNodalConnectivity2(i,conn+pos+1,posP1-pos-1,tmp,cmsId);
- const INTERP_KERNEL::CellModel& cms=INTERP_KERNEL::CellModel::getCellModel(cmsId);
+ const INTERP_KERNEL::CellModel& cms=INTERP_KERNEL::CellModel::GetCellModel(cmsId);
std::set<int> shareableCells(revNodalB[tmp[0]].begin(),revNodalB[tmp[0]].end());
for(unsigned j=1;j<nbOfNodesSon && !shareableCells.empty();j++)
{
int pos=connIndex[*iter];
int posP1=connIndex[(*iter)+1];
int lgthOld=posP1-pos-1;
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel((INTERP_KERNEL::NormalizedCellType)connNew[pos]);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)connNew[pos]);
connNew[pos]=INTERP_KERNEL::NORM_POLYHED;
unsigned nbOfFaces=cm.getNumberOfSons2(&connNew[pos+1],lgthOld);
int *tmp=new int[nbOfFaces*lgthOld];
{
lgthOfCurCell=index[i+1]-posOfCurCell;
INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[posOfCurCell];
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
INTERP_KERNEL::NormalizedCellType newType=INTERP_KERNEL::NORM_ERROR;
int newLgth;
if(cm.isDynamic())
ret << "Cell types present : ";
for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iter=_types.begin();iter!=_types.end();iter++)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(*iter);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(*iter);
ret << cm.getRepr() << " ";
}
ret << "\n";
const int *ci=_nodal_connec_index->getConstPointer();
for(int i=0;i<nbOfCells;i++)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel((INTERP_KERNEL::NormalizedCellType)c[ci[i]]);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)c[ci[i]]);
stream << "Cell #" << i << " " << cm.getRepr() << " : ";
std::copy(c+ci[i]+1,c+ci[i+1],std::ostream_iterator<int>(stream," "));
stream << "\n";
int nbOfNodesForCell=connI[i+1]-offset-1;
if(nbOfNodesForCell<=3)
continue;
- bool isQuad=INTERP_KERNEL::CellModel::getCellModel((INTERP_KERNEL::NormalizedCellType)conn[offset]).isQuadratic();
+ bool isQuad=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[offset]).isQuadratic();
project2DCellOnXY(conn+offset+1,conn+connI[i+1],cell2DinS2);
if(isButterfly2DCell(cell2DinS2,isQuad))
cells.push_back(i);
for(int i=0;i<nbOfCells && ret;i++)
{
INTERP_KERNEL::NormalizedCellType type=getTypeOfCell(i);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
ret=cm.isQuadratic();
}
return ret;
for(int i=0;i<nbOfCells && !ret;i++)
{
INTERP_KERNEL::NormalizedCellType type=getTypeOfCell(i);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
ret=cm.isQuadratic();
}
return ret;
for(int i=0;i<nbOfCells;i++)
{
INTERP_KERNEL::NormalizedCellType type=getTypeOfCell(i);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
if(cm.isQuadratic())
{
INTERP_KERNEL::NormalizedCellType typel=cm.getLinearType();
- const INTERP_KERNEL::CellModel& cml=INTERP_KERNEL::CellModel::getCellModel(typel);
+ const INTERP_KERNEL::CellModel& cml=INTERP_KERNEL::CellModel::GetCellModel(typel);
delta+=cm.getNumberOfNodes()-cml.getNumberOfNodes();
}
}
for(int i=0;i<nbOfCells;i++,ociptr++)
{
INTERP_KERNEL::NormalizedCellType type=getTypeOfCell(i);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
if(!cm.isQuadratic())
{
_types.insert(type);
{
INTERP_KERNEL::NormalizedCellType typel=cm.getLinearType();
_types.insert(typel);
- const INTERP_KERNEL::CellModel& cml=INTERP_KERNEL::CellModel::getCellModel(typel);
+ const INTERP_KERNEL::CellModel& cml=INTERP_KERNEL::CellModel::GetCellModel(typel);
int newNbOfNodes=cml.getNumberOfNodes();
*ocptr++=(int)typel;
ocptr=std::copy(icptr+iciptr[i]+1,icptr+iciptr[i]+newNbOfNodes+1,ocptr);
const int *connI=_nodal_connec_index->getConstPointer();
for(int i=0;i<nbCells;i++)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[connI[i]]);
if(!cm.isSimplex())
return false;
}
}
else
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel((INTERP_KERNEL::NormalizedCellType)conn[*i]);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel((INTERP_KERNEL::NormalizedCellType)conn[*i]);
std::ostringstream oss; oss << "MEDCouplingUMesh::getLevArrPerCellTypes : Cell #" << std::distance(connI,i);
oss << " has a type " << cm.getRepr() << " not in input array of type !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
void MEDCouplingUMesh::appendExtrudedCell(const int *connBg, const int *connEnd, int nbOfNodesPerLev, bool isQuad, std::vector<int>& ret)
{
INTERP_KERNEL::NormalizedCellType flatType=(INTERP_KERNEL::NormalizedCellType)connBg[0];
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(flatType);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(flatType);
ret.push_back(cm.getExtrudedType());
int deltaz=isQuad?2*nbOfNodesPerLev:nbOfNodesPerLev;
switch(flatType)
{
for(std::set<INTERP_KERNEL::NormalizedCellType>::const_iterator iter=_types.begin();iter!=_types.end();iter++)
{
- if((int)INTERP_KERNEL::CellModel::getCellModel(*iter).getDimension()!=_mesh_dim)
+ if((int)INTERP_KERNEL::CellModel::GetCellModel(*iter).getDimension()!=_mesh_dim)
{
std::ostringstream message;
message << "MeshDesc invalid because dimension is " << _mesh_dim << " and there is presence of cell(s) with type " << (*iter);
INTERP_KERNEL::AutoPtr<char> sectionmeshname=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
MEDlocalizationInfoByName(fid,locName,&geotype,&_dim,&_nb_gauss_pt,geointerpname,sectionmeshname,&nsectionmeshcell,§iongeotype);
_geo_type=(INTERP_KERNEL::NormalizedCellType)(std::distance(typmai3,std::find(typmai3,typmai3+32,geotype)));
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_geo_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_geo_type);
_nb_node_per_cell=cm.getNumberOfNodes();
_ref_coo.resize(_dim*_nb_node_per_cell);
_gs_coo.resize(_dim*_nb_gauss_pt);
void MEDFileFieldPerMeshPerType::getDimension(int& dim) const
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_geo_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_geo_type);
int curDim=(int)cm.getDimension();
dim=std::max(dim,curDim);
}
{
if(_geo_type!=INTERP_KERNEL::NORM_ERROR)
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_geo_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_geo_type);
if(meshDim!=(int)cm.getDimension())
return ;
}
int MEDFileUMeshPerType::getDim() const
{
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_type);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(_type);
return cm.getDimension();
}
int dt,it;
double timm=m->getTime(dt,it);
INTERP_KERNEL::NormalizedCellType ikt=m->getTypeOfCell(0);
- const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(ikt);
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(ikt);
med_geometry_type curMedType=typmai3[(int)ikt];
const int *conn=m->getNodalConnectivity()->getConstPointer();
const int *connI=m->getNodalConnectivityIndex()->getConstPointer();
if(loc==locName)
break;
}
- int dim=(int)INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension();
- int nbPtPerCell=(int)INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getNumberOfNodes();
+ int dim=(int)INTERP_KERNEL::CellModel::GetCellModel((*iter).getType()).getDimension();
+ int nbPtPerCell=(int)INTERP_KERNEL::CellModel::GetCellModel((*iter).getType()).getNumberOfNodes();
std::vector<double> refcoo(nbPtPerCell*dim),gscoo(nbOfGaussPt*dim),w(nbOfGaussPt);
MEDlocalizationRd(fid,(*iter).getLocName().c_str(),MED_FULL_INTERLACE,&refcoo[0],&gscoo[0],&w[0]);
f->setGaussLocalizationOnType((*iter).getType(),refcoo,gscoo,w);
if(curNbOfElem>0)
{
INTERP_KERNEL::NormalizedCellType type=typmai2[i];
- int curDim=(int)INTERP_KERNEL::CellModel::getCellModel(type).getDimension();
+ int curDim=(int)INTERP_KERNEL::CellModel::GetCellModel(type).getDimension();
poss.insert(curDim);
}
}
unsigned ret=0;
for(typename std::list<T>::const_iterator iter=conn.begin();iter!=conn.end();iter++)
{
- unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension();
+ unsigned curDim=INTERP_KERNEL::CellModel::GetCellModel((*iter).getType()).getDimension();
if(ret<curDim)
ret=curDim;
}
{
for(typename std::list<T>::iterator iter=conn.begin();iter!=conn.end();)
{
- unsigned curDim=INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getDimension();
+ unsigned curDim=INTERP_KERNEL::CellModel::GetCellModel((*iter).getType()).getDimension();
if(curDim!=meshDim)
{
(*iter).releaseArray();
{
if((*iter).getGlobal()==0)
renumber=false;
- const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel((*iter).getType());
+ const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::GetCellModel((*iter).getType());
if(keepAll)
totalNbOfCells+=(*iter).getLength();
else
const int *sourceConn=(*iter).getArray();
const int *sourceIndex=(*iter).getIndex();
const int *globalNum=(*iter).getGlobal();
- const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::GetCellModel(type);
int nbOfCellsInCurType;
int nbOfNodesIn1Cell=cellMod.getNumberOfNodes();
nbOfCellsInCurType=(*iter).getLength();
std::vector<int>& connIndex4MEDFile, std::vector<int>& connIndexRk24MEDFile, std::vector<int>& fam4MEDFile, std::vector<int>& renumber)
{
- const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::getCellModel(type);
+ const INTERP_KERNEL::CellModel& cellMod=INTERP_KERNEL::CellModel::GetCellModel(type);
if(!cellMod.isDynamic())
return buildMEDSubConnectivityOfOneTypeStaticTypes(conn,connIndex,families,type,conn4MEDFile,fam4MEDFile,renumber);
else
prepareCellFieldDoubleForWriting(f,0,split);
for(std::list<MEDLoader::MEDFieldDoublePerCellType>::const_iterator iter=split.begin();iter!=split.end();iter++)
{
- int nbPtPerCell=(int)INTERP_KERNEL::CellModel::getCellModel((*iter).getType()).getNumberOfNodes();
+ int nbPtPerCell=(int)INTERP_KERNEL::CellModel::GetCellModel((*iter).getType()).getNumberOfNodes();
int nbOfEntity=f->getMesh()->getNumberOfCellsWithType((*iter).getType());
int nbOfValues=nbPtPerCell*nbOfEntity;
MEDfieldValueWithProfileWr(fid,f->getName(),numdt,numo,dt,MED_NODE_ELEMENT,typmai3[(int)(*iter).getType()],MED_COMPACT_PFLMODE,