-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#endif
using namespace SauvUtilities;
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
namespace
{
isRelocated = ( c2oIt->second != newOrder );
if ( isRelocated )
- {
- grp->_relocTable.resize( cell2order.size() );
- for ( newOrder = 0, c2oIt = cell2order.begin(); c2oIt != c2oEnd; ++c2oIt, ++newOrder )
- grp->_relocTable[ c2oIt->second ] = newOrder;
- }
+ {
+ grp->_relocTable.resize( cell2order.size() );
+ for ( newOrder = 0, c2oIt = cell2order.begin(); c2oIt != c2oEnd; ++c2oIt, ++newOrder )
+ grp->_relocTable[ c2oIt->second ] = newOrder;
+ }
}
}
}
default:
THROW_IK_EXCEPTION("TGaussDef: Invalid nb of gauss points for TRIA, variant 1: "
- <<nbGauss);
+ <<nbGauss);
}
}
else if ( variant == 2 ) {
}
default:
THROW_IK_EXCEPTION("TGaussDef: Invalid nb of gauss points for TRIA, variant 2: "
- <<nbGauss);
+ <<nbGauss);
}
}
else if ( variant == 3 ) {
}
default:
THROW_IK_EXCEPTION("TGaussDef: Invalid nb of gauss points for TRIA, variant 3: "
- <<nbGauss);
+ <<nbGauss);
}
}
break;
}
default:
THROW_IK_EXCEPTION("TGaussDef: Invalid nb of gauss points for QUAD, variant 1: "
- <<nbGauss);
+ <<nbGauss);
}
}
else if ( variant == 2 ) {
}
default:
THROW_IK_EXCEPTION("TGaussDef: Invalid nb of gauss points for QUAD, variant 1: "
- <<nbGauss);
+ <<nbGauss);
}
}
else if ( variant == 3 ) {
}
default:
THROW_IK_EXCEPTION("TGaussDef: Invalid nb of gauss points for QUAD, variant 3: "
- <<nbGauss);
+ <<nbGauss);
}
}
break;
static const int tria6 [] = {0,2,4, 1,3,5};
static const int seg3 [] = {0,2,1};
if ( conn.empty() )
- {
- conn.resize( MaxMedCellType + 1, 0 );
- conn[ NORM_HEXA20 ] = hexa20;
- conn[ NORM_PENTA15] = penta15;
- conn[ NORM_PYRA13 ] = pyra13;
- conn[ NORM_TETRA10] = tetra10;
- conn[ NORM_SEG3 ] = seg3;
- conn[ NORM_TRI6 ] = tria6;
- conn[ NORM_QUAD8 ] = quad8;
- }
+ {
+ conn.resize( MaxMedCellType + 1, 0 );
+ conn[ NORM_HEXA20 ] = hexa20;
+ conn[ NORM_PENTA15] = penta15;
+ conn[ NORM_PYRA13 ] = pyra13;
+ conn[ NORM_TETRA10] = tetra10;
+ conn[ NORM_SEG3 ] = seg3;
+ conn[ NORM_TRI6 ] = tria6;
+ conn[ NORM_QUAD8 ] = quad8;
+ }
return conn[ type ];
}
const TID* Cell::getSortedNodes() const
{
if ( !_sortedNodeIDs )
- {
- size_t l=_nodes.size();
- _sortedNodeIDs = new int[ l ];
+ {
+ size_t l=_nodes.size();
+ _sortedNodeIDs = new int[ l ];
- for (size_t i=0; i!=l; ++i)
- _sortedNodeIDs[i]=_nodes[i]->_number;
- std::sort( _sortedNodeIDs, _sortedNodeIDs + l );
- }
+ for (size_t i=0; i!=l; ++i)
+ _sortedNodeIDs[i]=_nodes[i]->_number;
+ std::sort( _sortedNodeIDs, _sortedNodeIDs + l );
+ }
return _sortedNodeIDs;
}
//0123456789012345678901234567890123456789012345678901234567890123456789
const size_t posE = 18;
std::string aStr (_curPos);
- if ( aStr.find('E') < 0 && aStr.find('e') < 0 )
+ if ( aStr.find('E') == std::string::npos && aStr.find('e') == std::string::npos )
{
if ( aStr.size() < posE+1 )
THROW_IK_EXCEPTION("No more doubles (line #" << lineNb() << ")");
#ifdef WIN32
if ((_xdrs_file = ::fopen(_fileName.c_str(), "rb")))
#else
- if ((_xdrs_file = ::fopen(_fileName.c_str(), "r")))
+ if ((_xdrs_file = ::fopen(_fileName.c_str(), "r")))
#endif
- {
- _xdrs = (XDR *)malloc(sizeof(XDR));
- xdrstdio_create((XDR*)_xdrs, _xdrs_file, XDR_DECODE);
+ {
+ _xdrs = (XDR *)malloc(sizeof(XDR));
+ xdrstdio_create((XDR*)_xdrs, _xdrs_file, XDR_DECODE);
- const int maxsize = 10;
- char icha[maxsize+1];
- char* icha2 = icha;
- if (( xdr_ok = xdr_string((XDR*)_xdrs, &icha2, maxsize)))
- {
- icha[maxsize] = '\0';
- xdr_ok = (strcmp(icha, "CASTEM XDR") == 0);
- }
- if ( !xdr_ok )
- {
- xdr_destroy((XDR*)_xdrs);
- free((XDR*)_xdrs);
- fclose(_xdrs_file);
- _xdrs_file = NULL;
- }
- }
+ const int maxsize = 10;
+ char icha[maxsize+1];
+ char* icha2 = icha;
+ if (( xdr_ok = xdr_string((XDR*)_xdrs, &icha2, maxsize)))
+ {
+ icha[maxsize] = '\0';
+ xdr_ok = (strcmp(icha, "CASTEM XDR") == 0);
+ }
+ if ( !xdr_ok )
+ {
+ xdr_destroy((XDR*)_xdrs);
+ free((XDR*)_xdrs);
+ fclose(_xdrs_file);
+ _xdrs_file = NULL;
+ }
+ }
#endif
return xdr_ok;
}
//================================================================================
/*!
- * \brief Makes ParaMEDMEM::MEDFileData from self
+ * \brief Makes MEDCoupling::MEDFileData from self
*/
//================================================================================
-ParaMEDMEM::MEDFileData* IntermediateMED::convertInMEDFileDS()
+MEDCoupling::MEDFileData* IntermediateMED::convertInMEDFileDS()
{
- MEDCouplingAutoRefCountObjectPtr< MEDFileUMesh > mesh = makeMEDFileMesh();
- MEDCouplingAutoRefCountObjectPtr< MEDFileFields > fields = makeMEDFileFields(mesh);
+ MCAuto< MEDFileUMesh > mesh = makeMEDFileMesh();
+ MCAuto< MEDFileFields > fields = makeMEDFileFields(mesh);
- MEDCouplingAutoRefCountObjectPtr< MEDFileMeshes > meshes = MEDFileMeshes::New();
- MEDCouplingAutoRefCountObjectPtr< MEDFileData > medData = MEDFileData::New();
+ MCAuto< MEDFileMeshes > meshes = MEDFileMeshes::New();
+ MCAuto< MEDFileData > medData = MEDFileData::New();
meshes->pushMesh( mesh );
medData->setMeshes( meshes );
if ( fields ) medData->setFields( fields );
//================================================================================
/*!
- * \brief Creates ParaMEDMEM::MEDFileUMesh from its data
+ * \brief Creates MEDCoupling::MEDFileUMesh from its data
*/
//================================================================================
-ParaMEDMEM::MEDFileUMesh* IntermediateMED::makeMEDFileMesh()
+MEDCoupling::MEDFileUMesh* IntermediateMED::makeMEDFileMesh()
{
// check if all needed piles are present
checkDataAvailability();
- // set long names
+ decreaseHierarchicalDepthOfSubgroups();
+
+ // set long names (before orienting!)
setGroupLongNames();
// fix element orientation
orientElements3D();
// process groups
- decreaseHierarchicalDepthOfSubgroups();
eraseUselessGroups();
//detectMixDimGroups();
void IntermediateMED::setGroupLongNames()
{
+ if ( _listGIBItoMED_mail.empty() )
+ return;
+
+ // IMP 0023285: only keep the meshes named in the table MED_MAIL
+ // clear all group names
+ for ( size_t i = 0; i < _groups.size(); ++i )
+ if ( !_groups[i]._isProfile )
+ _groups[i]._name.clear();
+
+
// IMP 0020434: mapping GIBI names to MED names
// set med names to objects (mesh, fields, support, group or other)
grp._refNames.push_back( _mapStrings[ (*itGIBItoMED).med_id ]);
}
}
+
+ // IMP 0023285: only keep the meshes named in the table MED_MAIL
+ // remove all cells belonging to non-named groups only
+
+ // use Cell::_reverse to mark cells to keep
+ for ( size_t i = 0; i < _groups.size(); ++i )
+ {
+ SauvUtilities::Group & grp = _groups[i];
+ if ( grp._isProfile || !grp._name.empty() )
+ {
+ for ( size_t iC = 0; iC < grp._cells.size(); ++iC )
+ grp._cells[iC]->_reverse = true;
+
+ for (size_t j = 0; j < grp._groups.size(); ++j )
+ for ( size_t iC = 0; iC < grp._groups[j]->_cells.size(); ++iC )
+ grp._groups[j]->_cells[iC]->_reverse = true;
+ }
+ }
+ // remove non-marked cells (with _reverse == false)
+ CellsByDimIterator cellsIt( *this );
+ while ( cellsIt.nextType() )
+ {
+ std::set<Cell> & cells = _cellsByType[ cellsIt.type() ];
+ std::set<Cell>::iterator cIt = cells.begin();
+ while ( cIt != cells.end() )
+ if ( cIt->_reverse )
+ {
+ cIt->_reverse = false;
+ ++cIt;
+ }
+ else
+ {
+ cells.erase( cIt++ );
+ }
+ }
}
//================================================================================
void IntermediateMED::decreaseHierarchicalDepthOfSubgroups()
{
for (size_t i=0; i!=_groups.size(); ++i)
- {
- Group& grp = _groups[i];
- for (size_t j = 0; j < grp._groups.size(); ++j )
{
- Group & sub_grp = *grp._groups[j];
- if ( !sub_grp._groups.empty() )
- {
- // replace j with its 1st subgroup
- grp._groups[j] = sub_grp._groups[0];
- // push back the rest subs
- grp._groups.insert( grp._groups.end(), ++sub_grp._groups.begin(), sub_grp._groups.end() );
- }
+ Group& grp = _groups[i];
+ for (size_t j = 0; j < grp._groups.size(); ++j )
+ {
+ Group & sub_grp = *grp._groups[j];
+ if ( !sub_grp._groups.empty() )
+ {
+ // replace j with its 1st subgroup
+ grp._groups[j] = sub_grp._groups[0];
+ // push back the rest subs
+ grp._groups.insert( grp._groups.end(), ++sub_grp._groups.begin(), sub_grp._groups.end() );
+ }
+ }
+ // remove empty sub-_groups
+ std::vector< Group* > newSubGroups;
+ newSubGroups.reserve( grp._groups.size() );
+ for (size_t j = 0; j < grp._groups.size(); ++j )
+ if ( !grp._groups[j]->empty() )
+ newSubGroups.push_back( grp._groups[j] );
+ if ( newSubGroups.size() < grp._groups.size() )
+ grp._groups.swap( newSubGroups );
}
- // remove empty sub-_groups
- std::vector< Group* > newSubGroups;
- newSubGroups.reserve( grp._groups.size() );
- for (size_t j = 0; j < grp._groups.size(); ++j )
- if ( !grp._groups[j]->empty() )
- newSubGroups.push_back( grp._groups[j] );
- if ( newSubGroups.size() < grp._groups.size() )
- grp._groups.swap( newSubGroups );
- }
}
//================================================================================
std::set<Group*> groups2convert;
// keep not named sub-groups of field supports
for (size_t i=0; i!=_groups.size(); ++i)
- {
- Group& grp = _groups[i];
- if ( grp._isProfile && !grp._groups.empty() )
- groups2convert.insert( grp._groups.begin(), grp._groups.end() );
- }
+ {
+ Group& grp = _groups[i];
+ if ( grp._isProfile && !grp._groups.empty() )
+ groups2convert.insert( grp._groups.begin(), grp._groups.end() );
+ }
// keep named groups and their subgroups
for (size_t i=0; i!=_groups.size(); ++i)
- {
- Group& grp = _groups[i];
- if ( !grp._name.empty() && !grp.empty() )
{
- groups2convert.insert( &grp );
- groups2convert.insert( grp._groups.begin(), grp._groups.end() );
+ Group& grp = _groups[i];
+ if ( !grp._name.empty() && !grp.empty() )
+ {
+ groups2convert.insert( &grp );
+ groups2convert.insert( grp._groups.begin(), grp._groups.end() );
+ }
}
- }
// erase groups that are not in groups2convert and not _isProfile
for (size_t i=0; i!=_groups.size(); ++i)
- {
- Group* grp = &_groups[i];
- if ( !grp->_isProfile && !groups2convert.count( grp ) )
{
- grp->_cells.clear();
- grp->_groups.clear();
+ Group* grp = &_groups[i];
+ if ( !grp->_isProfile && !groups2convert.count( grp ) )
+ {
+ grp->_cells.clear();
+ grp->_groups.clear();
+ }
}
- }
}
//================================================================================
{
//hasMixedCells = false;
for ( size_t i=0; i < _groups.size(); ++i )
- {
- Group& grp = _groups[i];
- if ( grp._groups.size() < 2 )
- continue;
-
- // check if sub-groups have different dimension
- unsigned dim1 = getDim( &grp );
- for ( size_t j = 1; j < grp._groups.size(); ++j )
{
- unsigned dim2 = getDim( grp._groups[j] );
- if ( dim1 != dim2 )
- {
- grp._cells.clear();
- grp._groups.clear();
- if ( !grp._name.empty() )
- std::cout << "Erase a group with elements of different dim |" << grp._name << "|"<< std::endl;
- break;
- }
+ Group& grp = _groups[i];
+ if ( grp._groups.size() < 2 )
+ continue;
+
+ // check if sub-groups have different dimension
+ unsigned dim1 = getDim( &grp );
+ for ( size_t j = 1; j < grp._groups.size(); ++j )
+ {
+ unsigned dim2 = getDim( grp._groups[j] );
+ if ( dim1 != dim2 )
+ {
+ grp._cells.clear();
+ grp._groups.clear();
+ if ( !grp._name.empty() )
+ std::cout << "Erase a group with elements of different dim |" << grp._name << "|"<< std::endl;
+ break;
+ }
+ }
}
- }
}
//================================================================================
std::vector< std::pair<int,int> > swapVec;
for ( int dim = 1; dim <= 3; ++dim )
- {
- CellsByDimIterator cellsIt( *this, dim );
- while ( const std::set<Cell > * elems = cellsIt.nextType() )
{
- TCellType cellType = cellsIt.type();
- bool isQuadratic = getGibi2MedQuadraticInterlace( cellType );
- getReverseVector( cellType, swapVec );
+ CellsByDimIterator cellsIt( *this, dim );
+ while ( const std::set<Cell > * elems = cellsIt.nextType() )
+ {
+ TCellType cellType = cellsIt.type();
+ bool isQuadratic = getGibi2MedQuadraticInterlace( cellType );
+ getReverseVector( cellType, swapVec );
- elemIt = elems->begin(), elemEnd = elems->end();
- for ( ; elemIt != elemEnd; elemIt++ )
- {
- // GIBI connectivity -> MED one
- if( isQuadratic )
- ConvertQuadratic( cellType, *elemIt );
+ elemIt = elems->begin(), elemEnd = elems->end();
+ for ( ; elemIt != elemEnd; elemIt++ )
+ {
+ // GIBI connectivity -> MED one
+ if( isQuadratic )
+ ConvertQuadratic( cellType, *elemIt );
- // reverse faces
- if ( elemIt->_reverse )
- reverse ( *elemIt, swapVec );
- }
+ // reverse faces
+ if ( elemIt->_reverse )
+ reverse ( *elemIt, swapVec );
+ }
+ }
}
- }
// COMMENTED for issue 0022612 note 17739
//orientVolumes();
// Each oriented link must appear in one face only, else a face is reversed.
std::queue<const Cell*> faceQueue; /* the queue contains well oriented faces
- whose neighbors orientation is to be checked */
+ whose neighbors orientation is to be checked */
bool manifold = true;
while ( !linkFacesMap.empty() )
{
TID typeSize = typeCells->size();
if ( typeSize != maxNumber - minNumber + 1 )
ok = false;
- if ( prevNbElems != 0 ) {
- if ( minNumber == 1 )
- renumEntity = true;
- else if ( prevNbElems+1 != (int)minNumber )
- ok = false;
- }
+ if ( prevNbElems+1 != (int)minNumber )
+ ok = false;
+ if ( prevNbElems != 0 && minNumber == 1 )
+ renumEntity = true;
+
prevNbElems += typeSize;
}
*/
//================================================================================
-ParaMEDMEM::DataArrayDouble * IntermediateMED::getCoords()
+MEDCoupling::DataArrayDouble * IntermediateMED::getCoords()
{
DataArrayDouble* coordArray = DataArrayDouble::New();
coordArray->alloc( _nbNodes, _spaceDim );
*/
//================================================================================
-void IntermediateMED::setConnectivity( ParaMEDMEM::MEDFileUMesh* mesh,
- ParaMEDMEM::DataArrayDouble* coords )
+void IntermediateMED::setConnectivity( MEDCoupling::MEDFileUMesh* mesh,
+ MEDCoupling::DataArrayDouble* coords )
{
int meshDim = 0;
std::set<Cell>::const_iterator elemIt, elemEnd;
for ( int dim = 3; dim > 0; --dim )
- {
- CellsByDimIterator dimCells( *this, dim );
+ {
+ CellsByDimIterator dimCells( *this, dim );
- int nbOfCells = 0;
- while ( const std::set<Cell > * cells = dimCells.nextType() )
- nbOfCells += cells->size();
- if ( nbOfCells == 0 )
- continue;
+ int nbOfCells = 0;
+ while ( const std::set<Cell > * cells = dimCells.nextType() )
+ nbOfCells += cells->size();
+ if ( nbOfCells == 0 )
+ continue;
- if ( !meshDim ) meshDim = dim;
+ if ( !meshDim ) meshDim = dim;
- MEDCouplingUMesh* dimMesh = MEDCouplingUMesh::New();
- dimMesh->setCoords( coords );
- dimMesh->setMeshDimension( dim );
- dimMesh->allocateCells( nbOfCells );
+ MEDCouplingUMesh* dimMesh = MEDCouplingUMesh::New();
+ dimMesh->setCoords( coords );
+ dimMesh->setMeshDimension( dim );
+ dimMesh->allocateCells( nbOfCells );
- int prevNbCells = 0;
- dimCells.init( dim );
- while ( const std::set<Cell > * cells = dimCells.nextType() )
- {
- // fill connectivity array to take into account order of elements in the sauv file
- const int nbCellNodes = cells->begin()->_nodes.size();
- std::vector< TID > connectivity( cells->size() * nbCellNodes );
- int * nodalConnOfCell;
- for ( elemIt = cells->begin(), elemEnd = cells->end(); elemIt != elemEnd; ++elemIt )
- {
- const Cell& cell = *elemIt;
- const int index = cell._number - 1 - prevNbCells;
- nodalConnOfCell = &connectivity[ index * nbCellNodes ];
- if ( cell._reverse )
- for ( int i = nbCellNodes-1; i >= 0; --i )
- *nodalConnOfCell++ = cell._nodes[i]->_number - 1;
- else
- for ( int i = 0; i < nbCellNodes; ++i )
- *nodalConnOfCell++ = cell._nodes[i]->_number - 1;
- }
- prevNbCells += cells->size();
+ int prevNbCells = 0;
+ dimCells.init( dim );
+ while ( const std::set<Cell > * cells = dimCells.nextType() )
+ {
+ // fill connectivity array to take into account order of elements in the sauv file
+ const int nbCellNodes = cells->begin()->_nodes.size();
+ std::vector< TID > connectivity( cells->size() * nbCellNodes );
+ int * nodalConnOfCell;
+ for ( elemIt = cells->begin(), elemEnd = cells->end(); elemIt != elemEnd; ++elemIt )
+ {
+ const Cell& cell = *elemIt;
+ const int index = cell._number - 1 - prevNbCells;
+ nodalConnOfCell = &connectivity[ index * nbCellNodes ];
+ if ( cell._reverse )
+ for ( int i = nbCellNodes-1; i >= 0; --i )
+ *nodalConnOfCell++ = cell._nodes[i]->_number - 1;
+ else
+ for ( int i = 0; i < nbCellNodes; ++i )
+ *nodalConnOfCell++ = cell._nodes[i]->_number - 1;
+ }
+ prevNbCells += cells->size();
- // fill dimMesh
- TCellType cellType = dimCells.type();
- nodalConnOfCell = &connectivity[0];
- for ( size_t i = 0; i < cells->size(); ++i, nodalConnOfCell += nbCellNodes )
- dimMesh->insertNextCell( cellType, nbCellNodes, nodalConnOfCell );
- }
- dimMesh->finishInsertingCells();
- mesh->setMeshAtLevel( dim - meshDim, dimMesh );
- dimMesh->decrRef();
- }
+ // fill dimMesh
+ TCellType cellType = dimCells.type();
+ nodalConnOfCell = &connectivity[0];
+ for ( size_t i = 0; i < cells->size(); ++i, nodalConnOfCell += nbCellNodes )
+ dimMesh->insertNextCell( cellType, nbCellNodes, nodalConnOfCell );
+ }
+ dimMesh->finishInsertingCells();
+ mesh->setMeshAtLevel( dim - meshDim, dimMesh );
+ dimMesh->decrRef();
+ }
}
//================================================================================
*/
//================================================================================
-void IntermediateMED::setGroups( ParaMEDMEM::MEDFileUMesh* mesh )
+void IntermediateMED::setGroups( MEDCoupling::MEDFileUMesh* mesh )
{
bool isMeshNameSet = false;
const int meshDim = mesh->getMeshDimension();
const int meshDimRelToMaxExt = ( dim == 0 ? 1 : dim - meshDim );
std::vector<const DataArrayInt *> medGroups;
- std::vector<MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > refGroups;
+ std::vector<MCAuto<DataArrayInt> > refGroups;
for ( size_t i = 0; i < _groups.size(); ++i )
{
Group& grp = _groups[i];
if ( !grp._refNames[ iRef ].empty() &&
uniqueNames.insert( grp._refNames[ iRef ]).second ) // for name uniqueness (23155)
{
- refGroups.push_back( grp._medGroup->deepCpy() );
+ refGroups.push_back( grp._medGroup->deepCopy() );
refGroups.back()->setName( grp._refNames[ iRef ].c_str() );
medGroups.push_back( refGroups.back() );
}
*/
//================================================================================
-ParaMEDMEM::MEDFileFields * IntermediateMED::makeMEDFileFields(ParaMEDMEM::MEDFileUMesh* mesh)
+MEDCoupling::MEDFileFields * IntermediateMED::makeMEDFileFields(MEDCoupling::MEDFileUMesh* mesh)
{
if ( _nodeFields.empty() && _cellFields.empty() ) return 0;
//================================================================================
void IntermediateMED::setFields( SauvUtilities::DoubleField* fld,
- ParaMEDMEM::MEDFileFields* medFields,
- ParaMEDMEM::MEDFileUMesh* mesh,
+ MEDCoupling::MEDFileFields* medFields,
+ MEDCoupling::MEDFileUMesh* mesh,
const TID castemID,
std::set< std::string >& usedFieldNames)
{
//================================================================================
void IntermediateMED::setTS( SauvUtilities::DoubleField* fld,
- ParaMEDMEM::DataArrayDouble* values,
- ParaMEDMEM::MEDFileFields* medFields,
- ParaMEDMEM::MEDFileUMesh* mesh,
+ MEDCoupling::DataArrayDouble* values,
+ MEDCoupling::MEDFileFields* medFields,
+ MEDCoupling::MEDFileUMesh* mesh,
const int iSub)
{
// treat a field support
// set the mesh
if ( onAll )
{
- MEDCouplingAutoRefCountObjectPtr
+ MCAuto
< MEDCouplingUMesh > dimMesh = mesh->getMeshAtLevel( dimRel );
timeStamp->setMesh( dimMesh );
}
- else if ( timeStamp->getTypeOfField() == ParaMEDMEM::ON_NODES )
+ else if ( timeStamp->getTypeOfField() == MEDCoupling::ON_NODES )
{
DataArrayDouble * coo = mesh->getCoords();
- MEDCouplingAutoRefCountObjectPtr
+ MCAuto
<DataArrayDouble> subCoo = coo->selectByTupleId(support->_medGroup->begin(),
support->_medGroup->end());
- MEDCouplingAutoRefCountObjectPtr< MEDCouplingUMesh > nodeSubMesh =
+ MCAuto< MEDCouplingUMesh > nodeSubMesh =
MEDCouplingUMesh::Build0DMeshFromCoords( subCoo );
timeStamp->setMesh( nodeSubMesh );
}
else
{
- MEDCouplingAutoRefCountObjectPtr
+ MCAuto
< MEDCouplingUMesh > dimMesh = mesh->getMeshAtLevel( dimRel );
- MEDCouplingAutoRefCountObjectPtr
+ MCAuto
<MEDCouplingMesh> subMesh = dimMesh->buildPart(support->_medGroup->begin(),
support->_medGroup->end());
timeStamp->setMesh( subMesh);
timeStamp->setArray( values );
values->decrRef();
// set gauss points
- if ( timeStamp->getTypeOfField() == ParaMEDMEM::ON_GAUSS_PT )
+ if ( timeStamp->getTypeOfField() == MEDCoupling::ON_GAUSS_PT )
{
TGaussDef gaussDef( fld->_sub[iSub]._support->_cellType,
fld->_sub[iSub].nbGauss() );
timeStamp->setOrder( nbTS );
// add the time-stamp
- timeStamp->checkCoherency();
+ timeStamp->checkConsistencyLight();
if ( onAll )
fld->_curMedField->appendFieldNoProfileSBT( timeStamp );
else
std::vector< _Sub_data >::const_iterator sub_data = _sub.begin();
const _Sub_data& first_sub_data = *sub_data;
for ( ++sub_data ; sub_data != _sub.end(); ++sub_data )
- {
- if ( first_sub_data._comp_names != sub_data->_comp_names )
- return false; // diff names of components
+ {
+ if ( first_sub_data._comp_names != sub_data->_comp_names )
+ return false; // diff names of components
- if ( first_sub_data._nb_gauss != sub_data->_nb_gauss &&
- first_sub_data._support->_cellType == sub_data->_support->_cellType)
- return false; // diff nb of gauss points on same cell type
- }
+ if ( first_sub_data._nb_gauss != sub_data->_nb_gauss &&
+ first_sub_data._support->_cellType == sub_data->_support->_cellType)
+ return false; // diff nb of gauss points on same cell type
+ }
return true;
}
*/
//================================================================================
-ParaMEDMEM::TypeOfField DoubleField::getMedType( const int iSub ) const
+MEDCoupling::TypeOfField DoubleField::getMedType( const int iSub ) const
{
using namespace INTERP_KERNEL;
*/
//================================================================================
-ParaMEDMEM::TypeOfTimeDiscretization DoubleField::getMedTimeDisc() const
+MEDCoupling::TypeOfTimeDiscretization DoubleField::getMedTimeDisc() const
{
return ONE_TIME;
// NO_TIME = 4,