return ret;
}
-DataArrayDouble *DataArrayDoubleCollection::retrieveFieldWithName(const std::string& name) const
+const DataArrayDouble *DataArrayDoubleCollection::getFieldWithName(const std::string& name) const
{
std::vector<std::string> vec;
for(std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> >::const_iterator it=_arrs.begin();it!=_arrs.end();it++)
if(obj)
{
if(obj->getName()==name)
- {
- DataArrayDouble *ret(const_cast<DataArrayDouble *>(obj));
- if(ret)
- ret->incrRef();
- return ret;
- }
+ return obj;
else
- {
- vec.push_back(obj->getName());
- }
+ vec.push_back(obj->getName());
}
}
- std::ostringstream oss; oss << "DataArrayDoubleCollection::retrieveFieldWithName : fieldName \"" << name << "\" does not exist in this ! Possibilities are :";
+ std::ostringstream oss; oss << "DataArrayDoubleCollection::getFieldWithName : fieldName \"" << name << "\" does not exist in this ! Possibilities are :";
std::copy(vec.begin(),vec.end(),std::ostream_iterator<std::string>(oss," "));
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
}
}
+void MEDCouplingGridCollection::fillIfInTheProgenyOf(const std::string& fieldName, const MEDCouplingCartesianAMRMeshGen *head, std::vector<const DataArrayDouble *>& recurseArrs) const
+{
+ for(std::vector< std::pair<const MEDCouplingCartesianAMRMeshGen *,MEDCouplingAutoRefCountObjectPtr<DataArrayDoubleCollection> > >::const_iterator it=_map_of_dadc.begin();it!=_map_of_dadc.end();it++)
+ {
+ const MEDCouplingCartesianAMRMeshGen *a((*it).first);
+ if(head==a || head->isObjectInTheProgeny(a))
+ {
+ const DataArrayDoubleCollection *gc((*it).second);
+ recurseArrs.push_back(gc->getFieldWithName(fieldName));
+ }
+ }
+}
+
MEDCouplingGridCollection::MEDCouplingGridCollection(const std::vector<const MEDCouplingCartesianAMRMeshGen *>& ms, const std::vector< std::pair<std::string,int> >& fieldNames):_map_of_dadc(ms.size())
{
std::size_t sz(ms.size());
/*!
* \sa retrieveFieldsOn
*/
-DataArrayDouble *MEDCouplingAMRAttribute::retrieveFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const
+const DataArrayDouble *MEDCouplingAMRAttribute::getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++)
+ {
+ int tmp(-1);
+ if((*it)->presenceOf(mesh,tmp))
+ {
+ const DataArrayDoubleCollection& ddc((*it)->retrieveFieldsAt(tmp));
+ return ddc.getFieldWithName(fieldName);
+ }
+ }
+ throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::retrieveFieldOn : the mesh specified is not in the progeny of this !");
+}
+
+/*!
+ * This method returns a field on an unstructured mesh the most refined as possible without overlap.
+ * Ghost part are not visible here.
+ *
+ * \return MEDCouplingFieldDouble * - a field on cells that the caller has to deal with (deallocate it).
+ */
+MEDCouplingFieldDouble *MEDCouplingAMRAttribute::buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostLev, MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const
+{
+ std::vector<const DataArrayDouble *> recurseArrs;
+ std::size_t lev(0);
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++,lev++)
+ {
+ int tmp(-1);
+ if((*it)->presenceOf(mesh,tmp))
+ {
+ const DataArrayDoubleCollection& ddc((*it)->retrieveFieldsAt(tmp));
+ recurseArrs.push_back(ddc.getFieldWithName(fieldName));
+ break;
+ }
+ }
+ lev++;
+ for(std::size_t i=lev;i<_levs.size();i++)
+ {
+ const MEDCouplingGridCollection *gc(_levs[i]);
+ gc->fillIfInTheProgenyOf(fieldName,mesh,recurseArrs);
+ }
+ return mesh->buildCellFieldOnRecurseWithoutOverlapWithoutGhost(ghostLev,recurseArrs);
+}
+
+/*!
+ * This method builds a newly created field on cell just lying on mesh \a mesh without its eventual refinement.
+ *
+ * \return MEDCouplingFieldDouble * - a field on cells that the caller has to deal with (deallocate it).
+ *
+ */
+MEDCouplingFieldDouble *MEDCouplingAMRAttribute::buildCellFieldOnWithGhost(int ghostLev, MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const
{
for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingGridCollection> >::const_iterator it=_levs.begin();it!=_levs.end();it++)
- {
- int tmp(-1);
- if((*it)->presenceOf(mesh,tmp))
- {
- const DataArrayDoubleCollection& ddc((*it)->retrieveFieldsAt(tmp));
- return ddc.retrieveFieldWithName(fieldName);
- }
- }
- throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::retrieveFieldOn : the mesh specified is not in the progeny of this !");
+ {
+ int tmp(-1);
+ if((*it)->presenceOf(mesh,tmp))
+ {
+ const DataArrayDoubleCollection& ddc((*it)->retrieveFieldsAt(tmp));
+ const DataArrayDouble *arr(ddc.getFieldWithName(fieldName));
+ }
+ }
+ throw INTERP_KERNEL::Exception("MEDCouplingAMRAttribute::buildCellFieldOnWithGhost : the mesh specified is not in the progeny of this !");
}
/*!
MEDCouplingAMRAttribute::MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames):MEDCouplingDataForGodFather(gf)
{
//gf non empty, checked by constructor
- int maxLev(gf->getMaxNumberOfLevelsRelativeToThis()+1);
- _levs.resize(maxLev+1);
+ int maxLev(gf->getMaxNumberOfLevelsRelativeToThis());
+ _levs.resize(maxLev);
for(int i=0;i<maxLev;i++)
{
std::vector<MEDCouplingCartesianAMRPatchGen *> patches(gf->retrieveGridsAt(i));
void dellocTuples();
void spillInfoOnComponents(const std::vector< std::vector<std::string> >& compNames);
std::vector<DataArrayDouble *> retrieveFields() const;
- DataArrayDouble *retrieveFieldWithName(const std::string& name) const;
+ const DataArrayDouble *getFieldWithName(const std::string& name) const;
static void SynchronizeFineToCoarse(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *fine, DataArrayDoubleCollection *coarse);
static void SynchronizeCoarseToFine(int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, int patchId, const DataArrayDoubleCollection *coarse, DataArrayDoubleCollection *fine);
static void SynchronizeFineEachOther(int patchId, int ghostLev, const MEDCouplingCartesianAMRMeshGen *fatherOfFineMesh, const std::vector<const MEDCouplingCartesianAMRMeshGen *>& children, const std::vector<DataArrayDoubleCollection *>& fieldsOnFine);
static void SynchronizeCoarseToFine(int ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine);
void synchronizeFineEachOther(int ghostLev) const;
static void SynchronizeCoarseToFineOnlyInGhostZone(int ghostLev, const MEDCouplingGridCollection *coarse, const MEDCouplingGridCollection *fine);
+ void fillIfInTheProgenyOf(const std::string& fieldName, const MEDCouplingCartesianAMRMeshGen *head, std::vector<const DataArrayDouble *>& recurseArrs) const;
private:
MEDCouplingGridCollection(const std::vector<const MEDCouplingCartesianAMRMeshGen *>& ms, const std::vector< std::pair<std::string,int> >& fieldNames);
std::size_t getHeapMemorySizeWithoutChildren() const;
private:
std::vector< std::pair<const MEDCouplingCartesianAMRMeshGen *,MEDCouplingAutoRefCountObjectPtr<DataArrayDoubleCollection> > > _map_of_dadc;
};
+
/// @endcond
class MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string, std::vector<std::string> > >& fieldNames);
MEDCOUPLING_EXPORT void spillInfoOnComponents(const std::vector< std::vector<std::string> >& compNames);
MEDCOUPLING_EXPORT std::vector<DataArrayDouble *> retrieveFieldsOn(MEDCouplingCartesianAMRMeshGen *mesh) const;
- MEDCOUPLING_EXPORT DataArrayDouble *retrieveFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
+ MEDCOUPLING_EXPORT const DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
+ MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostLev, MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
+ MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnWithGhost(int ghostLev, MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const;
//
MEDCOUPLING_EXPORT void synchronizeFineToCoarse(int ghostLev);
MEDCOUPLING_EXPORT void synchronizeCoarseToFine(int ghostLev);
// Author : Anthony Geay
#include "MEDCouplingCartesianAMRMesh.hxx"
+#include "MEDCouplingFieldDouble.hxx"
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCouplingIMesh.hxx"
#include "MEDCouplingUMesh.hxx"
throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::getPatchIdFromChildMesh : no such a mesh in my direct progeny !");
}
+std::vector< const MEDCouplingCartesianAMRPatch *> MEDCouplingCartesianAMRMeshGen::getPatches() const
+{
+ std::size_t sz(_patches.size());
+ std::vector< const MEDCouplingCartesianAMRPatch *> ret(sz);
+ for(std::size_t i=0;i<sz;i++)
+ ret[i]=_patches[i];
+ return ret;
+}
+
const MEDCouplingCartesianAMRPatch *MEDCouplingCartesianAMRMeshGen::getPatch(int patchId) const
{
checkPatchId(patchId);
return MEDCoupling1SGTUMesh::Merge1SGTUMeshes(patches);
}
+/*!
+ * This method works same as buildUnstructured except that arrays are given in input to build a field on cell in output.
+ * \return MEDCouplingFieldDouble * - a newly created instance the caller has reponsability to deal with.
+ * \sa buildUnstructured
+ */
+MEDCouplingFieldDouble *MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const
+{
+ if(recurseArrs.empty())
+ throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::buildCellFieldOnRecurseWithoutOverlapWithoutGhost : array is empty ! Should never happen !");
+ //
+ std::vector<bool> bs(_mesh->getNumberOfCells(),false);
+ std::vector<int> cgs(_mesh->getCellGridStructure());
+ std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> > msSafe(_patches.size()+1);
+ std::size_t ii(0);
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingCartesianAMRPatch> >::const_iterator it=_patches.begin();it!=_patches.end();it++,ii++)
+ {
+ MEDCouplingStructuredMesh::SwitchOnIdsFrom(cgs,(*it)->getBLTRRange(),bs);
+ std::vector<const DataArrayDouble *> tmpArrs(extractSubTreeFromGlobalFlatten((*it)->getMesh(),recurseArrs));
+ msSafe[ii+1]=(*it)->getMesh()->buildCellFieldOnRecurseWithoutOverlapWithoutGhost(ghostSz,tmpArrs);
+ }
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> eltsOff(DataArrayInt::BuildListOfSwitchedOff(bs));
+ //
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret(MEDCouplingFieldDouble::New(ON_CELLS));
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> arr2(extractGhostFrom(ghostSz,recurseArrs[0]));
+ arr2=arr2->selectByTupleIdSafe(eltsOff->begin(),eltsOff->end());
+ ret->setArray(arr2);
+ ret->setName(arr2->getName());
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> part(_mesh->buildUnstructured());
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> mesh(part->buildPartOfMySelf(eltsOff->begin(),eltsOff->end(),false));
+ ret->setMesh(mesh);
+ msSafe[0]=ret;
+ //
+ std::vector< const MEDCouplingFieldDouble * > ms(msSafe.size());
+ for(std::size_t i=0;i<msSafe.size();i++)
+ ms[i]=msSafe[i];
+ //
+ return MEDCouplingFieldDouble::MergeFields(ms);
+}
+
+/*!
+ * This method extracts from \arr arr the part inside \a arr by cutting the \a ghostSz external part.
+ * \arr is expected to be an array having a number of tuples equal to \c getImageMesh()->buildWithGhost(ghostSz).
+ */
+DataArrayDouble *MEDCouplingCartesianAMRMeshGen::extractGhostFrom(int ghostSz, const DataArrayDouble *arr) const
+{
+ std::vector<int> st(_mesh->getCellGridStructure());
+ std::vector< std::pair<int,int> > p(MEDCouplingStructuredMesh::GetCompactFrmtFromDimensions(st));
+ std::transform(st.begin(),st.end(),st.begin(),std::bind2nd(std::plus<int>(),2*ghostSz));
+ ApplyGhostOnCompactFrmt(p,ghostSz);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(MEDCouplingStructuredMesh::ExtractFieldOfDoubleFrom(st,arr,p));
+ return ret.retn();
+}
+
MEDCouplingCartesianAMRMeshGen::MEDCouplingCartesianAMRMeshGen(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop):_father(0)
{
}
/*!
- * This method is different than ApplyGhostOnCompactFrmt
+ * This method is different than ApplyGhostOnCompactFrmt. The \a partBeforeFact parameter is enlarger contrary to ApplyGhostOnCompactFrmt.
*
* \param [in,out] partBeforeFact - the part of a image mesh in compact format that will be put in ghost reference.
* \param [in] ghostSize - the ghost size of zone for all axis.
}
}
+/*!
+ * This method returns a sub set of \a all. The subset is defined by the \a head in the tree defined by \a this.
+ * Elements in \a all are expected to be sorted from god father to most refined structure.
+ */
+std::vector<const DataArrayDouble *> MEDCouplingCartesianAMRMeshGen::extractSubTreeFromGlobalFlatten(const MEDCouplingCartesianAMRMeshGen *head, const std::vector<const DataArrayDouble *>& all) const
+{
+ int maxLev(getMaxNumberOfLevelsRelativeToThis());
+ std::vector<const DataArrayDouble *> ret;
+ std::vector<const MEDCouplingCartesianAMRMeshGen *> meshes(1,this);
+ std::size_t kk(0);
+ for(int i=0;i<maxLev;i++)
+ {
+ std::vector<const MEDCouplingCartesianAMRMeshGen *> meshesTmp;
+ for(std::vector<const MEDCouplingCartesianAMRMeshGen *>::const_iterator it=meshes.begin();it!=meshes.end();it++)
+ {
+ if((*it)==head || head->isObjectInTheProgeny(*it))
+ ret.push_back(all[kk]);
+ kk++;
+ std::vector< const MEDCouplingCartesianAMRPatch *> ps((*it)->getPatches());
+ for(std::vector< const MEDCouplingCartesianAMRPatch *>::const_iterator it0=ps.begin();it0!=ps.end();it0++)
+ {
+ const MEDCouplingCartesianAMRMeshGen *mesh((*it0)->getMesh());
+ meshesTmp.push_back(mesh);
+ }
+ }
+ meshes=meshesTmp;
+ }
+ if(kk!=all.size())
+ throw INTERP_KERNEL::Exception("MEDCouplingCartesianAMRMeshGen::extractSubTreeFromGlobalFlatten : the size of input vector is not compatible with number of leaves in this !");
+ return ret;
+}
+
std::size_t MEDCouplingCartesianAMRMeshGen::getHeapMemorySizeWithoutChildren() const
{
return sizeof(MEDCouplingCartesianAMRMeshGen);
class DataArrayByte;
class DataArrayDouble;
class MEDCoupling1SGTUMesh;
+ class MEDCouplingFieldDouble;
class MEDCouplingCartesianAMRMesh;
class MEDCouplingCartesianAMRMeshGen;
MEDCOUPLING_EXPORT void removePatch(int patchId);
MEDCOUPLING_EXPORT int getNumberOfPatches() const;
MEDCOUPLING_EXPORT int getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const;
+ MEDCOUPLING_EXPORT std::vector< const MEDCouplingCartesianAMRPatch *> getPatches() const;
MEDCOUPLING_EXPORT const MEDCouplingCartesianAMRPatch *getPatch(int patchId) const;
MEDCOUPLING_EXPORT bool isPatchInNeighborhoodOf(int patchId1, int patchId2, int ghostLev) const;
MEDCOUPLING_EXPORT DataArrayDouble *createCellFieldOnPatch(int patchId, const DataArrayDouble *cellFieldOnThis) const;
MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildMeshFromPatchEnvelop() const;
MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *buildMeshOfDirectChildrenOnly() const;
+ MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostSz, const std::vector<const DataArrayDouble *>& recurseArrs) const;
+ MEDCOUPLING_EXPORT DataArrayDouble *extractGhostFrom(int ghostSz, const DataArrayDouble *arr) const;
protected:
MEDCouplingCartesianAMRMeshGen(const std::string& meshName, int spaceDim, const int *nodeStrctStart, const int *nodeStrctStop,
const double *originStart, const double *originStop, const double *dxyzStart, const double *dxyzStop);
static void ApplyFactorsOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, const std::vector<int>& factors);
static void ApplyGhostOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, int ghostSize);
static void ApplyAllGhostOnCompactFrmt(std::vector< std::pair<int,int> >& partBeforeFact, int ghostSize);
+ std::vector<const DataArrayDouble *> extractSubTreeFromGlobalFlatten(const MEDCouplingCartesianAMRMeshGen *head, const std::vector<const DataArrayDouble *>& all) const;
protected:
MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRPatchGen::getMesh;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRPatchGen::__getitem__;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRMeshGen::buildUnstructured;
+%newobject ParaMEDMEM::MEDCouplingCartesianAMRMeshGen::extractGhostFrom;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRMeshGen::buildMeshFromPatchEnvelop;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRMeshGen::buildMeshOfDirectChildrenOnly;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRMeshGen::getImageMesh;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRMesh::getDataConst;
%newobject ParaMEDMEM::MEDCouplingCartesianAMRMesh::getData;
%newobject ParaMEDMEM::MEDCouplingAMRAttribute::New;
-%newobject ParaMEDMEM::MEDCouplingAMRAttribute::retrieveFieldOn;
+%newobject ParaMEDMEM::MEDCouplingAMRAttribute::getFieldOn;
+%newobject ParaMEDMEM::MEDCouplingAMRAttribute::buildCellFieldOnRecurseWithoutOverlapWithoutGhost;
+%newobject ParaMEDMEM::MEDCouplingAMRAttribute::buildCellFieldOnWithGhost;
%newobject ParaMEDMEM::DenseMatrix::New;
%newobject ParaMEDMEM::DenseMatrix::deepCpy;
%newobject ParaMEDMEM::DenseMatrix::shallowCpy;
int getNumberOfPatches() const throw(INTERP_KERNEL::Exception);
int getPatchIdFromChildMesh(const MEDCouplingCartesianAMRMeshGen *mesh) const throw(INTERP_KERNEL::Exception);
MEDCouplingUMesh *buildUnstructured() const throw(INTERP_KERNEL::Exception);
+ DataArrayDouble *extractGhostFrom(int ghostSz, const DataArrayDouble *arr) const throw(INTERP_KERNEL::Exception);
MEDCoupling1SGTUMesh *buildMeshFromPatchEnvelop() const throw(INTERP_KERNEL::Exception);
MEDCoupling1SGTUMesh *buildMeshOfDirectChildrenOnly() const throw(INTERP_KERNEL::Exception);
void removeAllPatches() throw(INTERP_KERNEL::Exception);
self->addPatch(inp,factors);
}
+ PyObject *getPatches() const throw(INTERP_KERNEL::Exception)
+ {
+ std::vector< const MEDCouplingCartesianAMRPatch *> ps(self->getPatches());
+ int sz(ps.size());
+ PyObject *ret = PyList_New(sz);
+ for(int i=0;i<sz;i++)
+ {
+ MEDCouplingCartesianAMRPatch *elt(const_cast<MEDCouplingCartesianAMRPatch *>(ps[i]));
+ if(elt)
+ elt->incrRef();
+ PyList_SetItem(ret,i,convertCartesianAMRPatch(elt, SWIG_POINTER_OWN | 0 ));
+ }
+ return ret;
+ }
+
PyObject *retrieveGridsAt(int absoluteLev) const throw(INTERP_KERNEL::Exception)
{
std::vector<MEDCouplingCartesianAMRPatchGen *> ps(self->retrieveGridsAt(absoluteLev));
class MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
{
public:
- DataArrayDouble *retrieveFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(int ghostLev, MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *buildCellFieldOnWithGhost(int ghostLev, MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception);
bool changeGodFather(MEDCouplingCartesianAMRMesh *gf) throw(INTERP_KERNEL::Exception);
%extend
{
return ParaMEDMEM_MEDCouplingAMRAttribute_New(gf,fieldNames);
}
+ DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const throw(INTERP_KERNEL::Exception)
+ {
+ const DataArrayDouble *ret(self->getFieldOn(mesh,fieldName));
+ DataArrayDouble *ret2(const_cast<DataArrayDouble *>(ret));
+ if(ret2)
+ ret2->incrRef();
+ return ret2;
+ }
+
void spillInfoOnComponents(PyObject *compNames) throw(INTERP_KERNEL::Exception)
{
std::vector< std::vector<std::string> > compNamesCpp;