return 0;
}
-std::vector<const BigMemoryObject *> MEDFileMeshL2::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileMeshL2::getDirectChildrenWithNull() const
{
return std::vector<const BigMemoryObject *>();
}
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
switch(type_maillage)
- {
+ {
case MED_UNSTRUCTURED_MESH:
meshType=UNSTRUCTURED;
break;
med_grid_type gt;
MEDmeshGridTypeRd(fid,mname.c_str(),>);
switch(gt)
- {
+ {
case MED_CARTESIAN_GRID:
meshType=CARTESIAN;
break;
break;
default:
throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getMeshIdFromName : unrecognized structured mesh type ! Supported are :\n - cartesian\n - curve linear\n");
- }
+ }
break;
}
default:
throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getMeshIdFromName : unrecognized mesh type !");
- }
+ }
med_int numdt,numit;
med_float dtt;
MEDmeshComputationStepInfo(fid,mname.c_str(),1,&numdt,&numit,&dtt);
INTERP_KERNEL::AutoPtr<char> axisunit=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
INTERP_KERNEL::AutoPtr<char> univTmp=MEDLoaderBase::buildEmptyString(MED_LNAME_SIZE);
if(MEDmeshInfo(fid,mId,nameTmp,&spaceDim,&Mdim,&type_maillage,_description.getPointer(),_dt_unit.getPointer(),
- &stype,&nstep,&axistype,axisname,axisunit)!=0)
+ &stype,&nstep,&axistype,axisname,axisunit)!=0)
throw INTERP_KERNEL::Exception("A problem has been detected when trying to get info on mesh !");
MEDmeshUniversalNameRd(fid,nameTmp,_univ_name.getPointer());
switch(type_maillage)
- {
+ {
case MED_UNSTRUCTURED_MESH:
meshType=UNSTRUCTURED;
break;
med_grid_type gt;
MEDmeshGridTypeRd(fid,mName.c_str(),>);
switch(gt)
- {
+ {
case MED_CARTESIAN_GRID:
meshType=CARTESIAN;
break;
break;
default:
throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getAxisInfoOnMesh : unrecognized structured mesh type ! Supported are :\n - cartesian\n - curve linear\n");
- }
+ }
break;
}
default:
throw INTERP_KERNEL::Exception("MEDFileUMeshL2::getMeshIdFromName : unrecognized mesh type !");
- }
+ }
//
std::vector<std::string> infosOnComp(naxis);
for(int i=0;i<naxis;i++)
med_data_type MEDFileCMeshL2::GetDataTypeCorrespondingToSpaceId(int id)
{
switch(id)
- {
+ {
case 0:
return MED_COORDINATE_AXIS1;
case 1:
return MED_COORDINATE_AXIS3;
default:
throw INTERP_KERNEL::Exception("Invalid meshdim detected in Cartesian Grid !");
- }
+ }
}
MEDFileCLMeshL2::MEDFileCLMeshL2()
_num_time=_st->_num->getTimeOfThis();
}
+std::vector<const BigMemoryObject *> MEDFileUMeshPermCompute::getDirectChildrenWithNull() const
+{
+ std::vector<const BigMemoryObject *> ret;
+ ret.push_back((const MEDCouplingUMesh *)_m);
+ return ret;
+}
+
+std::size_t MEDFileUMeshPermCompute::getHeapMemorySizeWithoutChildren() const
+{
+ return sizeof(MEDFileUMeshPermCompute);
+}
+
MEDFileUMeshSplitL1::MEDFileUMeshSplitL1(const MEDFileUMeshSplitL1& other):RefCountObject(other),_m_by_types(other._m_by_types),_fam(other._fam),_num(other._num),_names(other._names),_rev_num(other._rev_num),_m(this)
{
}
return 0;
}
-std::vector<const BigMemoryObject *> MEDFileUMeshSplitL1::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileUMeshSplitL1::getDirectChildrenWithNull() const
{
std::vector<const BigMemoryObject *> ret;
ret.push_back(&_m_by_types);
- if((const DataArrayInt*)_fam)
- ret.push_back((const DataArrayInt*)_fam);
- if((const DataArrayInt*)_num)
- ret.push_back((const DataArrayInt*)_num);
- if((const DataArrayInt*)_rev_num)
- ret.push_back((const DataArrayInt*)_rev_num);
- if((const DataArrayAsciiChar*)_names)
- ret.push_back((const DataArrayAsciiChar*)_names);
+ ret.push_back(&_m);
+ ret.push_back((const DataArrayInt*)_fam);
+ ret.push_back((const DataArrayInt*)_num);
+ ret.push_back((const DataArrayInt*)_rev_num);
+ ret.push_back((const DataArrayAsciiChar*)_names);
return ret;
}
* This method ignores _m and _m_by_types.
*/
void MEDFileUMeshSplitL1::setGroupsFromScratch(const std::vector<const MEDCouplingUMesh *>& ms, std::map<std::string,int>& familyIds,
- std::map<std::string, std::vector<std::string> >& groups) throw(INTERP_KERNEL::Exception)
+ std::map<std::string, std::vector<std::string> >& groups)
{
std::vector< DataArrayInt * > corr;
_m=MEDCouplingUMesh::FuseUMeshesOnSameCoords(ms,0,corr);
return ret;
}
-std::vector<const BigMemoryObject *> MEDFileUMeshAggregateCompute::getDirectChildren() const
+std::vector<const BigMemoryObject *> MEDFileUMeshAggregateCompute::getDirectChildrenWithNull() const
{
std::vector<const BigMemoryObject *> ret;
for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> >::const_iterator it=_m_parts.begin();it!=_m_parts.end();it++)
- {
- const MEDCoupling1GTUMesh *cur(*it);
- if(cur)
- ret.push_back(cur);
- }
- const MEDCouplingUMesh *m(_m);
- if(m)
- ret.push_back(m);
+ ret.push_back((const MEDCoupling1GTUMesh *)*it);
+ ret.push_back((const MEDCouplingUMesh *)_m);
return ret;
}
return ((const MEDCouplingUMesh *)_m)==0;
//else _mp_time>=_m_time)
return _m_parts.empty();
-
}
int MEDFileUMeshAggregateCompute::getMeshDimension() const