Salome HOME
projects
/
tools
/
medcoupling.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Compilation SALOME on Windows
[tools/medcoupling.git]
/
src
/
MEDCoupling
/
MEDCouplingExtrudedMesh.cxx
diff --git
a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
index 8f22b05f4b4217da09b2f9939bd5bd9ad6f07fd0..fd5879c2e71f51954034ed6195b6e8de3d9e94b9 100644
(file)
--- a/
src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
+++ b/
src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
@@
-45,7
+45,7
@@
using namespace ParaMEDMEM;
* because the mesh is aggregated and potentially modified by rotate or translate method.
* @param cell2DId Id of cell in mesh2D mesh where the computation of 1D mesh will be done.
*/
* because the mesh is aggregated and potentially modified by rotate or translate method.
* @param cell2DId Id of cell in mesh2D mesh where the computation of 1D mesh will be done.
*/
-MEDCouplingExtrudedMesh *MEDCouplingExtrudedMesh::New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId)
throw(INTERP_KERNEL::Exception)
+MEDCouplingExtrudedMesh *MEDCouplingExtrudedMesh::New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId)
{
return new MEDCouplingExtrudedMesh(mesh3D,mesh2D,cell2DId);
}
{
return new MEDCouplingExtrudedMesh(mesh3D,mesh2D,cell2DId);
}
@@
-64,23
+64,28
@@
MEDCouplingMeshType MEDCouplingExtrudedMesh::getType() const
return EXTRUDED;
}
return EXTRUDED;
}
-std::size_t MEDCouplingExtrudedMesh::getHeapMemorySize() const
+std::size_t MEDCouplingExtrudedMesh::getHeapMemorySize
WithoutChildren
() const
{
{
- std::size_t ret=0;
+ return MEDCouplingMesh::getHeapMemorySizeWithoutChildren();
+}
+
+std::vector<const BigMemoryObject *> MEDCouplingExtrudedMesh::getDirectChildren() const
+{
+ std::vector<const BigMemoryObject *> ret;
if(_mesh2D)
if(_mesh2D)
- ret
+=_mesh2D->getHeapMemorySize(
);
+ ret
.push_back(_mesh2D
);
if(_mesh1D)
if(_mesh1D)
- ret
+=_mesh1D->getHeapMemorySize(
);
+ ret
.push_back(_mesh1D
);
if(_mesh3D_ids)
if(_mesh3D_ids)
- ret
+=_mesh3D_ids->getHeapMemorySize(
);
- return
MEDCouplingMesh::getHeapMemorySize()+
ret;
+ ret
.push_back(_mesh3D_ids
);
+ return ret;
}
/*!
* This method copyies all tiny strings from other (name and components name).
* @throw if other and this have not same mesh type.
*/
}
/*!
* This method copyies all tiny strings from other (name and components name).
* @throw if other and this have not same mesh type.
*/
-void MEDCouplingExtrudedMesh::copyTinyStringsFrom(const MEDCouplingMesh *other)
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::copyTinyStringsFrom(const MEDCouplingMesh *other)
{
const MEDCouplingExtrudedMesh *otherC=dynamic_cast<const MEDCouplingExtrudedMesh *>(other);
if(!otherC)
{
const MEDCouplingExtrudedMesh *otherC=dynamic_cast<const MEDCouplingExtrudedMesh *>(other);
if(!otherC)
@@
-90,7
+95,7
@@
void MEDCouplingExtrudedMesh::copyTinyStringsFrom(const MEDCouplingMesh *other)
_mesh1D->copyTinyStringsFrom(otherC->_mesh1D);
}
_mesh1D->copyTinyStringsFrom(otherC->_mesh1D);
}
-MEDCouplingExtrudedMesh::MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId)
throw(INTERP_KERNEL::Exception)
+MEDCouplingExtrudedMesh::MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId)
try:_mesh2D(const_cast<MEDCouplingUMesh *>(mesh2D)),_mesh1D(MEDCouplingUMesh::New()),_mesh3D_ids(0),_cell_2D_id(cell2DId)
{
if(_mesh2D!=0)
try:_mesh2D(const_cast<MEDCouplingUMesh *>(mesh2D)),_mesh1D(MEDCouplingUMesh::New()),_mesh3D_ids(0),_cell_2D_id(cell2DId)
{
if(_mesh2D!=0)
@@
-165,7
+170,7
@@
MEDCouplingExtrudedMesh *MEDCouplingExtrudedMesh::clone(bool recDeepCpy) const
return new MEDCouplingExtrudedMesh(*this,recDeepCpy);
}
return new MEDCouplingExtrudedMesh(*this,recDeepCpy);
}
-bool MEDCouplingExtrudedMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const
throw(INTERP_KERNEL::Exception)
+bool MEDCouplingExtrudedMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const
{
if(!other)
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::isEqualIfNotWhy : input other pointer is null !");
{
if(!other)
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::isEqualIfNotWhy : input other pointer is null !");
@@
-252,7
+257,7
@@
std::set<INTERP_KERNEL::NormalizedCellType> MEDCouplingExtrudedMesh::getAllGeoTy
return ret;
}
return ret;
}
-DataArrayInt *MEDCouplingExtrudedMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCouplingExtrudedMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
INTERP_KERNEL::NormalizedCellType revExtTyp=cm.getReverseExtrudedType();
{
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
INTERP_KERNEL::NormalizedCellType revExtTyp=cm.getReverseExtrudedType();
@@
-275,7
+280,7
@@
DataArrayInt *MEDCouplingExtrudedMesh::giveCellsWithType(INTERP_KERNEL::Normaliz
return ret2.retn();
}
return ret2.retn();
}
-DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfNodesPerCell() const
throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfNodesPerCell() const
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret2D=_mesh2D->computeNbOfNodesPerCell();
int nbOfLevs=_mesh1D->getNumberOfCells();
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret2D=_mesh2D->computeNbOfNodesPerCell();
int nbOfLevs=_mesh1D->getNumberOfCells();
@@
-288,7
+293,7
@@
DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfNodesPerCell() const throw(INT
return ret3D->renumberR(_mesh3D_ids->begin());
}
return ret3D->renumberR(_mesh3D_ids->begin());
}
-DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfFacesPerCell() const
throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfFacesPerCell() const
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret2D=_mesh2D->computeNbOfNodesPerCell();
int nbOfLevs=_mesh1D->getNumberOfCells();
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret2D=_mesh2D->computeNbOfNodesPerCell();
int nbOfLevs=_mesh1D->getNumberOfCells();
@@
-301,6
+306,11
@@
DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfFacesPerCell() const throw(INT
return ret3D->renumberR(_mesh3D_ids->begin());
}
return ret3D->renumberR(_mesh3D_ids->begin());
}
+DataArrayInt *MEDCouplingExtrudedMesh::computeEffectiveNbOfNodesPerCell() const
+{
+ return computeNbOfNodesPerCell();
+}
+
int MEDCouplingExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
int ret=0;
int MEDCouplingExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
{
int ret=0;
@@
-329,7
+339,7
@@
void MEDCouplingExtrudedMesh::getNodeIdsOfCell(int cellId, std::vector<int>& con
conn.insert(conn.end(),tmp2.begin(),tmp2.end());
}
conn.insert(conn.end(),tmp2.begin(),tmp2.end());
}
-void MEDCouplingExtrudedMesh::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const
{
int nbOfNodes2D=_mesh2D->getNumberOfNodes();
int locId=nodeId%nbOfNodes2D;
{
int nbOfNodes2D=_mesh2D->getNumberOfNodes();
int locId=nodeId%nbOfNodes2D;
@@
-384,12
+394,12
@@
void MEDCouplingExtrudedMesh::checkCoherency() const throw (INTERP_KERNEL::Excep
{
}
{
}
-void MEDCouplingExtrudedMesh::checkCoherency1(double eps) const
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::checkCoherency1(double eps) const
{
checkCoherency();
}
{
checkCoherency();
}
-void MEDCouplingExtrudedMesh::checkCoherency2(double eps) const
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::checkCoherency2(double eps) const
{
checkCoherency1(eps);
}
{
checkCoherency1(eps);
}
@@
-428,7
+438,7
@@
void MEDCouplingExtrudedMesh::updateTime() const
}
}
}
}
-void MEDCouplingExtrudedMesh::renumberCells(const int *old2NewBg, bool check)
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::renumberCells(const int *old2NewBg, bool check)
{
throw INTERP_KERNEL::Exception("Functionnality of renumbering cells unavailable for ExtrudedMesh");
}
{
throw INTERP_KERNEL::Exception("Functionnality of renumbering cells unavailable for ExtrudedMesh");
}
@@
-442,7
+452,7
@@
MEDCouplingUMesh *MEDCouplingExtrudedMesh::build3DUnstructuredMesh() const
return ret;
}
return ret;
}
-MEDCouplingUMesh *MEDCouplingExtrudedMesh::buildUnstructured() const
throw(INTERP_KERNEL::Exception)
+MEDCouplingUMesh *MEDCouplingExtrudedMesh::buildUnstructured() const
{
return build3DUnstructuredMesh();
}
{
return build3DUnstructuredMesh();
}
@@
-502,7
+512,7
@@
MEDCouplingExtrudedMesh::~MEDCouplingExtrudedMesh()
_mesh3D_ids->decrRef();
}
_mesh3D_ids->decrRef();
}
-void MEDCouplingExtrudedMesh::computeExtrusion(const MEDCouplingUMesh *mesh3D)
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::computeExtrusion(const MEDCouplingUMesh *mesh3D)
{
const char errMsg1[]="2D mesh is empty unable to compute extrusion !";
const char errMsg2[]="Coords between 2D and 3D meshes are not the same ! Try MEDCouplingPointSet::tryToShareSameCoords method";
{
const char errMsg1[]="2D mesh is empty unable to compute extrusion !";
const char errMsg2[]="Coords between 2D and 3D meshes are not the same ! Try MEDCouplingPointSet::tryToShareSameCoords method";
@@
-685,17
+695,17
@@
void MEDCouplingExtrudedMesh::scale(const double *point, double factor)
_mesh1D->scale(point,factor);
}
_mesh1D->scale(point,factor);
}
-std::vector<int> MEDCouplingExtrudedMesh::getDistributionOfTypes() const
throw(INTERP_KERNEL::Exception)
+std::vector<int> MEDCouplingExtrudedMesh::getDistributionOfTypes() const
{
throw INTERP_KERNEL::Exception("Not implemented yet !");
}
{
throw INTERP_KERNEL::Exception("Not implemented yet !");
}
-DataArrayInt *MEDCouplingExtrudedMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCouplingExtrudedMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
{
throw INTERP_KERNEL::Exception("Not implemented yet !");
}
{
throw INTERP_KERNEL::Exception("Not implemented yet !");
}
-void MEDCouplingExtrudedMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const
{
throw INTERP_KERNEL::Exception("Not implemented yet !");
}
{
throw INTERP_KERNEL::Exception("Not implemented yet !");
}
@@
-712,7
+722,7
@@
MEDCouplingMesh *MEDCouplingExtrudedMesh::buildPartAndReduceNodes(const int *sta
return 0;
}
return 0;
}
-DataArrayInt *MEDCouplingExtrudedMesh::simplexize(int policy)
throw(INTERP_KERNEL::Exception)
+DataArrayInt *MEDCouplingExtrudedMesh::simplexize(int policy)
{
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::simplexize : unavailable for such a type of mesh : Extruded !");
}
{
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::simplexize : unavailable for such a type of mesh : Extruded !");
}
@@
-751,12
+761,12
@@
DataArrayDouble *MEDCouplingExtrudedMesh::getBarycenterAndOwner() const
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::getBarycenterAndOwner : not yet implemented !");
}
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::getBarycenterAndOwner : not yet implemented !");
}
-DataArrayDouble *MEDCouplingExtrudedMesh::computeIsoBarycenterOfNodesPerCell() const
throw(INTERP_KERNEL::Exception)
+DataArrayDouble *MEDCouplingExtrudedMesh::computeIsoBarycenterOfNodesPerCell() const
{
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::computeIsoBarycenterOfNodesPerCell: not yet implemented !");
}
{
throw INTERP_KERNEL::Exception("MEDCouplingExtrudedMesh::computeIsoBarycenterOfNodesPerCell: not yet implemented !");
}
-void MEDCouplingExtrudedMesh::computeExtrusionAlg(const MEDCouplingUMesh *mesh3D)
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::computeExtrusionAlg(const MEDCouplingUMesh *mesh3D)
{
_mesh3D_ids->alloc(mesh3D->getNumberOfCells(),1);
int nbOf1DLev=mesh3D->getNumberOfCells()/_mesh2D->getNumberOfCells();
{
_mesh3D_ids->alloc(mesh3D->getNumberOfCells(),1);
int nbOf1DLev=mesh3D->getNumberOfCells()/_mesh2D->getNumberOfCells();
@@
-927,18
+937,18
@@
void MEDCouplingExtrudedMesh::unserialization(const std::vector<double>& tinyInf
std::copy(a1Ptr,a1Ptr+szIds,_mesh3D_ids->getPointer());
}
std::copy(a1Ptr,a1Ptr+szIds,_mesh3D_ids->getPointer());
}
-void MEDCouplingExtrudedMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData
) const throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData
, DataArrayByte *byteData) const
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=buildUnstructured();
{
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=buildUnstructured();
- m->writeVTKLL(ofs,cellData,pointData);
+ m->writeVTKLL(ofs,cellData,pointData
,byteData
);
}
}
-void MEDCouplingExtrudedMesh::reprQuickOverview(std::ostream& stream) const
throw(INTERP_KERNEL::Exception)
+void MEDCouplingExtrudedMesh::reprQuickOverview(std::ostream& stream) const
{
stream << "MEDCouplingExtrudedMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
}
{
stream << "MEDCouplingExtrudedMesh C++ instance at " << this << ". Name : \"" << getName() << "\".";
}
-std::string MEDCouplingExtrudedMesh::getVTKDataSetType() const
throw(INTERP_KERNEL::Exception)
+std::string MEDCouplingExtrudedMesh::getVTKDataSetType() const
{
return _mesh2D->getVTKDataSetType();
}
{
return _mesh2D->getVTKDataSetType();
}