return std::accumulate(tmp,tmp+spaceDim,0);
}
-void MEDCouplingCMesh::getPosFromId(int nodeId, int spaceDim, const int *split, int *res)
+void MEDCouplingCMesh::GetPosFromId(int nodeId, int spaceDim, const int *split, int *res)
{
int work=nodeId;
for(int i=spaceDim-1;i>=0;i--)
getSplitNodeValues(tmp);
const DataArrayDouble *tabs[3]={getCoordsAt(0),getCoordsAt(1),getCoordsAt(2)};
int tmp2[3];
- getPosFromId(nodeId,spaceDim,tmp,tmp2);
+ GetPosFromId(nodeId,spaceDim,tmp,tmp2);
for(int j=0;j<spaceDim;j++)
if(tabs[j])
coo.push_back(tabs[j]->getConstPointer()[tmp2[j]]);
for(int icell=0;icell<nbelem;icell++)
{
int tmp2[3];
- getPosFromId(icell,dim,tmp,tmp2);
+ GetPosFromId(icell,dim,tmp,tmp2);
area_vol[icell]=1.;
for(int i=0;i<dim;i++)
area_vol[icell]*=thisArr[i][tmp2[i]+1]-thisArr[i][tmp2[i]];
int tmp2[3];
for(int i=0;i<nbNodes;i++)
{
- getPosFromId(i,spaceDim,tmp,tmp2);
+ GetPosFromId(i,spaceDim,tmp,tmp2);
for(int j=0;j<spaceDim;j++)
pt[i*spaceDim+j]=tabsPtr[j][tmp2[j]];
}
int tmp2[3];
for(int i=0;i<nbCells;i++)
{
- getPosFromId(i,spaceDim,tmp,tmp2);
+ GetPosFromId(i,spaceDim,tmp,tmp2);
for(int j=0;j<spaceDim;j++)
pt[i*spaceDim+j]=tabsPtr[j][tmp2[j]];
}
int getMeshDimension() const;
int getCellIdFromPos(int i, int j, int k) const;
int getNodeIdFromPos(int i, int j, int k) const;
- static void getPosFromId(int nodeId, int spaceDim, const int *split, int *res);
+ static void GetPosFromId(int nodeId, int spaceDim, const int *split, int *res);
INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const;
int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const;
void getNodeIdsOfCell(int cellId, std::vector<int>& conn) const;
std::transform(zoneToUpdate,zoneToUpdate+3,zoneToUpdate,std::bind2nd(std::multiplies<double>(),(double)(1./nodalConnec.size())));
}
-int MEDCouplingExtrudedMesh::findCorrespCellByNodalConn(const std::vector<int>& nodalConnec, const int *revNodalPtr, const int *revNodalIndxPtr) throw(INTERP_KERNEL::Exception)
+int MEDCouplingExtrudedMesh::FindCorrespCellByNodalConn(const std::vector<int>& nodalConnec, const int *revNodalPtr, const int *revNodalIndxPtr) throw(INTERP_KERNEL::Exception)
{
std::vector<int>::const_iterator iter=nodalConnec.begin();
std::set<int> s1(revNodalPtr+revNodalIndxPtr[*iter],revNodalPtr+revNodalIndxPtr[*iter+1]);
* @param v is the output normalized vector of the common direction of 'm1' and 'm2'
* @throw in case that m1 and m2 are not compatible each other.
*/
-void MEDCouplingExtrudedMesh::project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
+void MEDCouplingExtrudedMesh::Project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v) throw(INTERP_KERNEL::Exception)
{
if(m1->getSpaceDimension()!=3 || m1->getSpaceDimension()!=3)
- throw INTERP_KERNEL::Exception("Input meshes are expected to have a spaceDim==3 for projec1D !");
+ throw INTERP_KERNEL::Exception("Input meshes are expected to have a spaceDim==3 for Projec1D !");
m1r=m1->clone(true);
m2r=m2->clone(true);
m1r->changeSpaceDimension(1);
std::vector<int> nodalConnec(nodal2D+nodal2DIndx[i]+1,nodal2D+nodal2DIndx[i+1]);
try
{
- idInSubMesh=findCorrespCellByNodalConn(nodalConnec,revNodal2DPtr,revNodalIndx2DPtr);
+ idInSubMesh=FindCorrespCellByNodalConn(nodalConnec,revNodal2DPtr,revNodalIndx2DPtr);
}
catch(INTERP_KERNEL::Exception& e)
{
MEDCouplingFieldDouble *getMeasureFieldOnNode(bool) const;
MEDCouplingFieldDouble *buildOrthogonalField() const;
int getCellContainingPoint(const double *pos, double eps) const;
- static int findCorrespCellByNodalConn(const std::vector<int>& nodalConnec,
+ static int FindCorrespCellByNodalConn(const std::vector<int>& nodalConnec,
const int *revNodalPtr, const int *revNodalIndxPtr) throw(INTERP_KERNEL::Exception);
- static void project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
+ static void Project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps,
MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v) throw(INTERP_KERNEL::Exception);
void rotate(const double *center, const double *vector, double angle);
void translate(const double *vector);
_time_discr->sortPerTuple(asc);
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::mergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areCompatibleForMerge(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply mergeFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply MergeFields on them !");
const MEDCouplingMesh *m1=f1->getMesh();
const MEDCouplingMesh *m2=f2->getMesh();
MEDCouplingMesh *m=m1->mergeMyselfWith(m2);
return ret;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::mergeFields(const std::vector<const MEDCouplingFieldDouble *>& a) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const std::vector<const MEDCouplingFieldDouble *>& a) throw(INTERP_KERNEL::Exception)
{
if(a.size()<=1)
- throw INTERP_KERNEL::Exception("FieldDouble::mergeFields : size of array must be > 1 !");
+ throw INTERP_KERNEL::Exception("FieldDouble::MergeFields : size of array must be > 1 !");
std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> > ms(a.size());
std::vector< const MEDCouplingUMesh *> ms2(a.size());
std::vector< const MEDCouplingTimeDiscretization *> tds(a.size());
const MEDCouplingFieldDouble *ref=(*it++);
for(;it!=a.end();it++)
if(!ref->areCompatibleForMerge(*it))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply mergeFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply MergeFields on them !");
for(int i=0;i<(int)a.size();i++)
{
if(!a[i]->getMesh())
- throw INTERP_KERNEL::Exception("mergeFields : A field as no underlying mesh !");
+ throw INTERP_KERNEL::Exception("MergeFields : A field as no underlying mesh !");
ms[i]=a[i]->getMesh()->buildUnstructured();
ms2[i]=ms[i];
tds[i]=a[i]->_time_discr;
}
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=MEDCouplingUMesh::mergeUMeshes(ms2);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=MEDCouplingUMesh::MergeUMeshes(ms2);
MEDCouplingTimeDiscretization *td=tds[0]->aggregate(tds);
td->copyTinyAttrFrom(*(a[0]->_time_discr));
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(a[0]->getNature(),td,a[0]->_type->clone());
return ret;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::meldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areCompatibleForMeld(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply meldFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply MeldFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->meld(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return ret;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::dotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areStrictlyCompatible(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply dotFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply DotFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->dot(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return ret;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::crossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areStrictlyCompatible(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply crossProductFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply CrossProductFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->crossProduct(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return ret;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::maxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areStrictlyCompatible(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply maxFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply MaxFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->max(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return ret;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::minFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areStrictlyCompatible(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply minFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply MinFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->min(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return ret;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::addFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areStrictlyCompatible(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply addFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply AddFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->add(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return *this;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::substractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areStrictlyCompatible(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply substractFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply SubstractFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->substract(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return *this;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::multiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areCompatibleForMul(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply multiplyFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply MultiplyFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->multiply(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
return *this;
}
-MEDCouplingFieldDouble *MEDCouplingFieldDouble::divideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
+MEDCouplingFieldDouble *MEDCouplingFieldDouble::DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception)
{
if(!f1->areCompatibleForDiv(f2))
- throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply divideFields on them !");
+ throw INTERP_KERNEL::Exception("Fields are not compatible ; unable to apply DivideFields on them !");
MEDCouplingTimeDiscretization *td=f1->_time_discr->divide(f2->_time_discr);
td->copyTinyAttrFrom(*f1->_time_discr);
MEDCouplingFieldDouble *ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
MEDCouplingFieldDouble *keepSelectedComponents(const std::vector<int>& compoIds) const throw(INTERP_KERNEL::Exception);
void setSelectedComponents(const MEDCouplingFieldDouble *f, const std::vector<int>& compoIds) throw(INTERP_KERNEL::Exception);
void sortPerTuple(bool asc) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *mergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *mergeFields(const std::vector<const MEDCouplingFieldDouble *>& a) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *meldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *dotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return dotFields(this,&other); }
- static MEDCouplingFieldDouble *crossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return crossProductFields(this,&other); }
- static MEDCouplingFieldDouble *maxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return maxFields(this,&other); }
- static MEDCouplingFieldDouble *minFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return minFields(this,&other); }
- MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return addFields(this,&other); }
+ static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *MergeFields(const std::vector<const MEDCouplingFieldDouble *>& a) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return DotFields(this,&other); }
+ static MEDCouplingFieldDouble *CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return CrossProductFields(this,&other); }
+ static MEDCouplingFieldDouble *MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return MaxFields(this,&other); }
+ static MEDCouplingFieldDouble *MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return MinFields(this,&other); }
+ MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return AddFields(this,&other); }
const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *addFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- MEDCouplingFieldDouble *operator-(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return substractFields(this,&other); }
+ static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *operator-(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return SubstractFields(this,&other); }
const MEDCouplingFieldDouble &operator-=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *substractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- MEDCouplingFieldDouble *operator*(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return multiplyFields(this,&other); }
+ static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *operator*(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return MultiplyFields(this,&other); }
const MEDCouplingFieldDouble &operator*=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *multiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- MEDCouplingFieldDouble *operator/(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return divideFields(this,&other); }
+ static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ MEDCouplingFieldDouble *operator/(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception) { return DivideFields(this,&other); }
const MEDCouplingFieldDouble &operator/=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *divideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
private:
MEDCouplingFieldDouble(TypeOfField type, TypeOfTimeDiscretization td);
MEDCouplingFieldDouble(const MEDCouplingFieldDouble& other, bool deepCpy);
nc[nbOfCompo*i+compoIds[j]]=*ac;
}
-void DataArrayDouble::setArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet)
+void DataArrayDouble::SetArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet)
{
if(newArray!=arrayToSet)
{
return ret;
}
-DataArrayDouble *DataArrayDouble::aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> tmp(2);
tmp[0]=a1; tmp[1]=a2;
- return aggregate(tmp);
+ return Aggregate(tmp);
}
-DataArrayDouble *DataArrayDouble::aggregate(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Aggregate(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception)
{
if(a.empty())
- throw INTERP_KERNEL::Exception("DataArrayDouble::aggregate : input list must be NON EMPTY !");
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Aggregate : input list must be NON EMPTY !");
std::vector<const DataArrayDouble *>::const_iterator it=a.begin();
int nbOfComp=(*it)->getNumberOfComponents();
int nbt=(*it++)->getNumberOfTuples();
for(int i=1;it!=a.end();it++,i++)
{
if((*it)->getNumberOfComponents()!=nbOfComp)
- throw INTERP_KERNEL::Exception("DataArrayDouble::aggregate : Nb of components mismatch for array aggregation !");
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Aggregate : Nb of components mismatch for array aggregation !");
nbt+=(*it)->getNumberOfTuples();
}
DataArrayDouble *ret=DataArrayDouble::New();
return ret;
}
-DataArrayDouble *DataArrayDouble::meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> arr(2);
arr[0]=a1; arr[1]=a2;
- return meld(arr);
+ return Meld(arr);
}
-DataArrayDouble *DataArrayDouble::meld(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Meld(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception)
{
if(a.empty())
- throw INTERP_KERNEL::Exception("DataArrayDouble::meld : array must be NON empty !");
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Meld : array must be NON empty !");
std::vector<const DataArrayDouble *>::const_iterator it;
for(it=a.begin();it!=a.end();it++)
(*it)->checkAllocated();
for(int i=1;it!=a.end();it++,i++)
{
if(nbOfTuples!=(*it)->getNumberOfTuples())
- throw INTERP_KERNEL::Exception("DataArrayDouble::meld : mismatch of number of tuples !");
+ throw INTERP_KERNEL::Exception("DataArrayDouble::Meld : mismatch of number of tuples !");
nbc[i]=(*it)->getNumberOfComponents();
pts[i]=(*it)->getConstPointer();
}
return ret;
}
-DataArrayDouble *DataArrayDouble::dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
a1->checkAllocated();
a2->checkAllocated();
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
- throw INTERP_KERNEL::Exception("Nb of components mismatch for array dot !");
+ throw INTERP_KERNEL::Exception("Nb of components mismatch for array Dot !");
int nbOfTuple=a1->getNumberOfTuples();
if(nbOfTuple!=a2->getNumberOfTuples())
- throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array dot !");
+ throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array Dot !");
DataArrayDouble *ret=DataArrayDouble::New();
ret->alloc(nbOfTuple,1);
double *retPtr=ret->getPointer();
return ret;
}
-DataArrayDouble *DataArrayDouble::crossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::CrossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
return ret;
}
-DataArrayDouble *DataArrayDouble::max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
- throw INTERP_KERNEL::Exception("Nb of components mismatch for array max !");
+ throw INTERP_KERNEL::Exception("Nb of components mismatch for array Max !");
int nbOfTuple=a1->getNumberOfTuples();
if(nbOfTuple!=a2->getNumberOfTuples())
- throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array max !");
+ throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array Max !");
DataArrayDouble *ret=DataArrayDouble::New();
ret->alloc(nbOfTuple,nbOfComp);
double *retPtr=ret->getPointer();
return ret;
}
-DataArrayDouble *DataArrayDouble::min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
return ret;
}
-DataArrayDouble *DataArrayDouble::add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
declareAsNew();
}
-DataArrayDouble *DataArrayDouble::substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
- throw INTERP_KERNEL::Exception("Nb of components mismatch for array substract !");
+ throw INTERP_KERNEL::Exception("Nb of components mismatch for array Substract !");
int nbOfTuple=a1->getNumberOfTuples();
if(nbOfTuple!=a2->getNumberOfTuples())
- throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array substract !");
+ throw INTERP_KERNEL::Exception("Nb of tuples mismatch for array Substract !");
DataArrayDouble *ret=DataArrayDouble::New();
ret->alloc(nbOfTuple,nbOfComp);
std::transform(a1->getConstPointer(),a1->getConstPointer()+nbOfTuple*nbOfComp,a2->getConstPointer(),ret->getPointer(),std::minus<double>());
declareAsNew();
}
-DataArrayDouble *DataArrayDouble::multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
declareAsNew();
}
-DataArrayDouble *DataArrayDouble::divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *DataArrayDouble::Divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception)
{
int nbOfTuple=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
nc[nbOfCompo*i+compoIds[j]]=*ac;
}
-void DataArrayInt::setArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet)
+void DataArrayInt::SetArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet)
{
if(newArray!=arrayToSet)
{
return ret;
}
-DataArrayInt *DataArrayInt::aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
+DataArrayInt *DataArrayInt::Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2)
{
int nbOfComp=a1->getNumberOfComponents();
if(nbOfComp!=a2->getNumberOfComponents())
- throw INTERP_KERNEL::Exception("Nb of components mismatch for array aggregation !");
+ throw INTERP_KERNEL::Exception("Nb of components mismatch for array Aggregation !");
int nbOfTuple1=a1->getNumberOfTuples();
int nbOfTuple2=a2->getNumberOfTuples();
DataArrayInt *ret=DataArrayInt::New();
return *loc;
}
-DataArrayInt *DataArrayInt::meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
+DataArrayInt *DataArrayInt::Meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> arr(2);
arr[0]=a1; arr[1]=a2;
- return meld(arr);
+ return Meld(arr);
}
-DataArrayInt *DataArrayInt::meld(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception)
+DataArrayInt *DataArrayInt::Meld(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception)
{
if(a.empty())
- throw INTERP_KERNEL::Exception("DataArrayInt::meld : array must be NON empty !");
+ throw INTERP_KERNEL::Exception("DataArrayInt::Meld : array must be NON empty !");
std::vector<const DataArrayInt *>::const_iterator it;
for(it=a.begin();it!=a.end();it++)
(*it)->checkAllocated();
* @param newNb specifies size of whole set. Must be at least equal to max eltid in 'groups'.
* @return an array of size newNb specifying fid of each item.
*/
-DataArrayInt *DataArrayInt::makePartition(const std::vector<DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups)
+DataArrayInt *DataArrayInt::MakePartition(const std::vector<DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups)
{
DataArrayInt *ret=DataArrayInt::New();
ret->alloc(newNb,1);
MEDCOUPLING_EXPORT void setIJ(int tupleId, int compoId, double newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; declareAsNew(); }
MEDCOUPLING_EXPORT void setIJSilent(int tupleId, int compoId, double newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; }
MEDCOUPLING_EXPORT double *getPointer() const { return _mem.getPointer(); }
- MEDCOUPLING_EXPORT static void setArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet);
+ MEDCOUPLING_EXPORT static void SetArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet);
MEDCOUPLING_EXPORT const double *getConstPointer() const { return _mem.getConstPointer(); }
MEDCOUPLING_EXPORT void useArray(const double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo);
MEDCOUPLING_EXPORT void writeOnPlace(int id, double element0, const double *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); }
MEDCOUPLING_EXPORT void applyFuncFast32(const char *func) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void applyFuncFast64(const char *func) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT DataArrayInt *getIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *aggregate(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *meld(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *crossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Aggregate(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Meld(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Meld(const std::vector<const DataArrayDouble *>& a) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Dot(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *CrossProduct(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Max(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Min(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Add(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void addEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Substract(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void substractEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Multiply(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void multiplyEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayDouble *divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayDouble *Divide(const DataArrayDouble *a1, const DataArrayDouble *a2) throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT void divideEqual(const DataArrayDouble *other) throw(INTERP_KERNEL::Exception);
//! nothing to do here because this class does not aggregate any TimeLabel instance.
MEDCOUPLING_EXPORT void updateTime() { }
MEDCOUPLING_EXPORT void setIJ(int tupleId, int compoId, int newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; declareAsNew(); }
MEDCOUPLING_EXPORT void setIJSilent(int tupleId, int compoId, int newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; }
MEDCOUPLING_EXPORT int *getPointer() const { return _mem.getPointer(); }
- MEDCOUPLING_EXPORT static void setArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet);
+ MEDCOUPLING_EXPORT static void SetArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet);
MEDCOUPLING_EXPORT const int *getConstPointer() const { return _mem.getConstPointer(); }
MEDCOUPLING_EXPORT DataArrayInt *getIdsEqual(int val) const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT DataArrayInt *getIdsEqualList(const std::vector<int>& vals) const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT int getMaxValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT int getMinValue(int& tupleId) const throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayInt *aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2);
- MEDCOUPLING_EXPORT static DataArrayInt *meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayInt *meld(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static DataArrayInt *makePartition(const std::vector<DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups);
+ MEDCOUPLING_EXPORT static DataArrayInt *Aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2);
+ MEDCOUPLING_EXPORT static DataArrayInt *Meld(const DataArrayInt *a1, const DataArrayInt *a2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayInt *Meld(const std::vector<const DataArrayInt *>& a) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static DataArrayInt *MakePartition(const std::vector<DataArrayInt *>& groups, int newNb, std::vector< std::vector<int> >& fidsOfGroups);
MEDCOUPLING_EXPORT DataArrayInt *buildComplement(int nbOfElement) const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT DataArrayInt *buildSubstraction(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
MEDCOUPLING_EXPORT DataArrayInt *buildUnion(const DataArrayInt *other) const throw(INTERP_KERNEL::Exception);
* retruns a newly created mesh with counter=1
* that is the union of mesh1 and mesh2 if possible. The cells of mesh2 will appear after cells of 'mesh1'. Idem for nodes.
*/
-MEDCouplingMesh *MEDCouplingMesh::mergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2)
+MEDCouplingMesh *MEDCouplingMesh::MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2)
{
return mesh1->mergeMyselfWith(mesh2);
}
virtual MEDCouplingUMesh *buildUnstructured() const throw(INTERP_KERNEL::Exception) = 0;
virtual DataArrayInt *simplexize(int policy) throw(INTERP_KERNEL::Exception) = 0;
virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const;
- static MEDCouplingMesh *mergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
+ static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2);
//serialisation-unserialization
virtual void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const = 0;
virtual void resizeForUnserialization(const std::vector<int>& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector<std::string>& littleStrings) const = 0;
/*!
* merge _coords arrays of m1 and m2 and returns the union. The returned instance is newly created with ref count == 1.
*/
-DataArrayDouble *MEDCouplingPointSet::mergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *MEDCouplingPointSet::MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception)
{
int spaceDim=m1->getSpaceDimension();
if(spaceDim!=m2->getSpaceDimension())
- throw INTERP_KERNEL::Exception("Mismatch in SpaceDim during call of mergeNodesArray !");
- return DataArrayDouble::aggregate(m1->getCoords(),m2->getCoords());
+ throw INTERP_KERNEL::Exception("Mismatch in SpaceDim during call of MergeNodesArray !");
+ return DataArrayDouble::Aggregate(m1->getCoords(),m2->getCoords());
}
-DataArrayDouble *MEDCouplingPointSet::mergeNodesArray(const std::vector<const MEDCouplingPointSet *>& ms) throw(INTERP_KERNEL::Exception)
+DataArrayDouble *MEDCouplingPointSet::MergeNodesArray(const std::vector<const MEDCouplingPointSet *>& ms) throw(INTERP_KERNEL::Exception)
{
if(ms.empty())
- throw INTERP_KERNEL::Exception("MEDCouplingPointSet::mergeNodesArray : input array must be NON EMPTY !");
+ throw INTERP_KERNEL::Exception("MEDCouplingPointSet::MergeNodesArray : input array must be NON EMPTY !");
std::vector<const MEDCouplingPointSet *>::const_iterator it=ms.begin();
std::vector<const DataArrayDouble *> coo(ms.size());
int spaceDim=(*it)->getSpaceDimension();
if((*it)->getSpaceDimension()==spaceDim)
coo[i]=tmp;
else
- throw INTERP_KERNEL::Exception("Mismatch in SpaceDim during call of mergeNodesArray !");
+ throw INTERP_KERNEL::Exception("Mismatch in SpaceDim during call of MergeNodesArray !");
}
else
- throw INTERP_KERNEL::Exception("Empty coords detected during call of mergeNodesArray !");
+ throw INTERP_KERNEL::Exception("Empty coords detected during call of MergeNodesArray !");
}
- return DataArrayDouble::aggregate(coo);
+ return DataArrayDouble::Aggregate(coo);
}
/*!
* Factory to build new instance of instanciable subclasses of MEDCouplingPointSet.
* This method is used during unserialization process.
*/
-MEDCouplingPointSet *MEDCouplingPointSet::buildInstanceFromMeshType(MEDCouplingMeshType type)
+MEDCouplingPointSet *MEDCouplingPointSet::BuildInstanceFromMeshType(MEDCouplingMeshType type)
{
switch(type)
{
{
double *coords=_coords->getPointer();
int nbNodes=getNumberOfNodes();
- rotate3DAlg(center,vect,angle,nbNodes,coords);
+ Rotate3DAlg(center,vect,angle,nbNodes,coords);
}
/*!
* Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in 'coords'
* around an axe ('center','vect') and with angle 'angle'.
*/
-void MEDCouplingPointSet::rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, double *coords)
+void MEDCouplingPointSet::Rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, double *coords)
{
double sina=sin(angle);
double cosa=cos(angle);
{
double *coords=_coords->getPointer();
int nbNodes=getNumberOfNodes();
- rotate2DAlg(center,angle,nbNodes,coords);
+ Rotate2DAlg(center,angle,nbNodes,coords);
}
/*!
* Low static method that operates 3D rotation of 'nbNodes' 3D nodes whose coordinates are arranged in 'coords'
* around the center point 'center' and with angle 'angle'.
*/
-void MEDCouplingPointSet::rotate2DAlg(const double *center, double angle, int nbNodes, double *coords)
+void MEDCouplingPointSet::Rotate2DAlg(const double *center, double angle, int nbNodes, double *coords)
{
double cosa=cos(angle);
double sina=sin(angle);
void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception) = 0;
void findNodesOnPlane(const double *pt, const double *vec, double eps, std::vector<int>& nodes) const throw(INTERP_KERNEL::Exception);
- static DataArrayDouble *mergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception);
- static DataArrayDouble *mergeNodesArray(const std::vector<const MEDCouplingPointSet *>& ms) throw(INTERP_KERNEL::Exception);
- static MEDCouplingPointSet *buildInstanceFromMeshType(MEDCouplingMeshType type);
- static void rotate2DAlg(const double *center, double angle, int nbNodes, double *coords);
- static void rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, double *coords);
+ static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception);
+ static DataArrayDouble *MergeNodesArray(const std::vector<const MEDCouplingPointSet *>& ms) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type);
+ static void Rotate2DAlg(const double *center, double angle, int nbNodes, double *coords);
+ static void Rotate3DAlg(const double *center, const double *vect, double angle, int nbNodes, double *coords);
MEDCouplingMesh *buildPart(const int *start, const int *end) const;
MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const;
virtual MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const = 0;
int nbCols2D=interpolation2D.interpolateMeshes(source_mesh_wrapper,target_mesh_wrapper,matrix2D,method);
MEDCouplingUMesh *s1D,*t1D;
double v[3];
- MEDCouplingExtrudedMesh::project1DMeshes(src_mesh->getMesh1D(),target_mesh->getMesh1D(),getPrecision(),s1D,t1D,v);
+ MEDCouplingExtrudedMesh::Project1DMeshes(src_mesh->getMesh1D(),target_mesh->getMesh1D(),getPrecision(),s1D,t1D,v);
MEDCouplingNormalizedUnstructuredMesh<1,1> s1DWrapper(s1D);
MEDCouplingNormalizedUnstructuredMesh<1,1> t1DWrapper(t1D);
std::vector<std::map<int,double> > matrix1D;
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::aggregation on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::aggregate(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
throw INTERP_KERNEL::Exception("NoTimeLabel::aggregate on mismatched time discretization !");
a[i]=itC->getArray();
}
- DataArrayDouble *arr=DataArrayDouble::aggregate(a);
+ DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::meld on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::meld(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Meld(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setTimeTolerance(getTimeTolerance());
ret->setArray(arr,0);
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::dot on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::dot(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Dot(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::crossProduct(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::max(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Max(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::min(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Min(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::add on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::add(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Add(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::substract on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::substract(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Substract(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("NoTimeLabel::multiply on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::multiply(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Multiply(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingNoTimeLabel *otherC=dynamic_cast<const MEDCouplingNoTimeLabel *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("divide on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::divide(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Divide(getArray(),other->getArray());
MEDCouplingNoTimeLabel *ret=new MEDCouplingNoTimeLabel;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::aggregation on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::aggregate(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
throw INTERP_KERNEL::Exception("WithTimeStep::aggregate on mismatched time discretization !");
a[i]=itC->getArray();
}
- DataArrayDouble *arr=DataArrayDouble::aggregate(a);
+ DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::meld on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::meld(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Meld(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::dot on mismatched time discretization !");
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
- DataArrayDouble *arr=DataArrayDouble::dot(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Dot(getArray(),other->getArray());
ret->setArray(arr,0);
arr->decrRef();
return ret;
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::crossProduct(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::max(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Max(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::min on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::min(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Min(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::add on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::add(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Add(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::substract on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::substract(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Substract(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::multiply on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::multiply(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Multiply(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingWithTimeStep *otherC=dynamic_cast<const MEDCouplingWithTimeStep *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("WithTimeStep::divide on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::divide(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Divide(getArray(),other->getArray());
MEDCouplingWithTimeStep *ret=new MEDCouplingWithTimeStep;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::aggregation on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::aggregate(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Aggregate(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::aggregate on mismatched time discretization !");
a[i]=itC->getArray();
}
- DataArrayDouble *arr=DataArrayDouble::aggregate(a);
+ DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::meld on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::meld(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Meld(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setTimeTolerance(getTimeTolerance());
ret->setArray(arr,0);
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::dot on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::dot(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Dot(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::crossProduct(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::CrossProduct(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::max on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::max(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Max(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::min on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::min(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Min(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::add on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::add(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Add(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("ConstOnTimeInterval::substract on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::substract(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Substract(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("multiply on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::multiply(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Multiply(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast<const MEDCouplingConstOnTimeInterval *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("divide on mismatched time discretization !");
- DataArrayDouble *arr=DataArrayDouble::divide(getArray(),other->getArray());
+ DataArrayDouble *arr=DataArrayDouble::Divide(getArray(),other->getArray());
MEDCouplingConstOnTimeInterval *ret=new MEDCouplingConstOnTimeInterval;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::aggregation on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::aggregate(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::aggregate(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Aggregate(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Aggregate(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
a[i]=itC->getArray();
b[i]=itC->getEndArray();
}
- DataArrayDouble *arr=DataArrayDouble::aggregate(a);
- DataArrayDouble *arr2=DataArrayDouble::aggregate(b);
+ DataArrayDouble *arr=DataArrayDouble::Aggregate(a);
+ DataArrayDouble *arr2=DataArrayDouble::Aggregate(b);
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr,0);
arr->decrRef();
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::meld on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::meld(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::meld(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Meld(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Meld(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setTimeTolerance(getTimeTolerance());
ret->setArray(arr1,0);
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::dot on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::dot(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::dot(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Dot(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Dot(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::crossProduct on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::crossProduct(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::crossProduct(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::CrossProduct(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::CrossProduct(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::max on mismatched time discretization !");
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
- DataArrayDouble *arr1=DataArrayDouble::max(getArray(),other->getArray());
+ DataArrayDouble *arr1=DataArrayDouble::Max(getArray(),other->getArray());
ret->setArray(arr1,0);
arr1->decrRef();
- DataArrayDouble *arr2=DataArrayDouble::max(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr2=DataArrayDouble::Max(getEndArray(),other->getEndArray());
ret->setEndArray(arr2,0);
arr2->decrRef();
return ret;
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::min on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::min(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::min(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Min(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Min(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::add on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::add(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::add(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Add(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Add(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::substract on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::substract(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::substract(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Substract(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Substract(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::multiply on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::multiply(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::multiply(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Multiply(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Multiply(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
const MEDCouplingLinearTime *otherC=dynamic_cast<const MEDCouplingLinearTime *>(other);
if(!otherC)
throw INTERP_KERNEL::Exception("LinearTime::divide on mismatched time discretization !");
- DataArrayDouble *arr1=DataArrayDouble::divide(getArray(),other->getArray());
- DataArrayDouble *arr2=DataArrayDouble::divide(getEndArray(),other->getEndArray());
+ DataArrayDouble *arr1=DataArrayDouble::Divide(getArray(),other->getArray());
+ DataArrayDouble *arr2=DataArrayDouble::Divide(getEndArray(),other->getEndArray());
MEDCouplingLinearTime *ret=new MEDCouplingLinearTime;
ret->setArray(arr1,0);
arr1->decrRef();
MEDCouplingMesh::checkFastEquivalWith(other,prec);
if(_types!=otherC->_types)
throw INTERP_KERNEL::Exception("checkDeepEquivalWith : Types are not equal !");
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=mergeUMeshes(this,otherC);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=MergeUMeshes(this,otherC);
bool areNodesMerged;
int newNbOfNodes;
int oldNbOfNodes=getNumberOfNodes();
std::vector<MEDCouplingUMesh *> ms(2);
ms[0]=const_cast<MEDCouplingUMesh *>(this);
ms[1]=const_cast<MEDCouplingUMesh *>(otherC);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=mergeUMeshesOnSameCoords(ms);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=MergeUMeshesOnSameCoords(ms);
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da=m->zipConnectivityTraducer(cellCompPol);
int maxId=*std::max_element(da->getConstPointer(),da->getConstPointer()+getNumberOfCells());
const int *pt=std::find_if(da->getConstPointer()+getNumberOfCells(),da->getConstPointer()+da->getNbOfElems(),std::bind2nd(std::greater<int>(),maxId));
*/
bool MEDCouplingUMesh::areCellsIncludedIn(const MEDCouplingUMesh *other, int compType, DataArrayInt *& arr) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mesh=mergeUMeshesOnSameCoords(this,other);
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> mesh=MergeUMeshesOnSameCoords(this,other);
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> o2n=mesh->zipConnectivityTraducer(compType);
int nbOfCells=getNumberOfCells();
arr=o2n->substr(nbOfCells);
/*!
* This method tries to use 'other' coords and use it for 'this'. If no exception was thrown after the call of this method :
- * this->_coords==other->_coords. If not a exception is thrown this remains unchanged.
+ * this->_coords==other->_coords. If an exception is thrown 'this' remains unchanged.
+ * Contrary to MEDCouplingUMesh::tryToShareSameCoords method this method makes a deeper analyze of coordinates (and so more expensive) than simple equality.
+ * Two nodes one in 'this' and other in 'other' are considered equal if the distance between the two is lower than epsilon.
*/
void MEDCouplingUMesh::tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception)
{
if(!_coords)
throw INTERP_KERNEL::Exception("tryToShareSameCoordsPermute : No coords specified in this whereas there is any in other !");
int otherNbOfNodes=other.getNumberOfNodes();
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> newCoords=mergeNodesArray(&other,this);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> newCoords=MergeNodesArray(&other,this);
_coords->incrRef();
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> oldCoords=_coords;
setCoords(newCoords);
*/
void MEDCouplingUMesh::setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes)
{
- DataArrayInt::setArrayIn(conn,_nodal_connec);
- DataArrayInt::setArrayIn(connIndex,_nodal_connec_index);
+ DataArrayInt::SetArrayIn(conn,_nodal_connec);
+ DataArrayInt::SetArrayIn(connIndex,_nodal_connec_index);
if(isComputingTypes)
computeTypes();
declareAsNew();
INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
if(!polyOnly || type==INTERP_KERNEL::NORM_POLYGON)
{
- if(!isPolygonWellOriented(vec,conn+connI[i]+1,conn+connI[i+1],coordsPtr))
+ if(!IsPolygonWellOriented(vec,conn+connI[i]+1,conn+connI[i+1],coordsPtr))
cells.push_back(i);
}
}
{
INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
if(!polyOnly || type==INTERP_KERNEL::NORM_POLYGON)
- if(!isPolygonWellOriented(vec,conn+connI[i]+1,conn+connI[i+1],coordsPtr))
+ if(!IsPolygonWellOriented(vec,conn+connI[i]+1,conn+connI[i+1],coordsPtr))
{
isModified=true;
std::vector<int> tmp(connI[i+1]-connI[i]-2);
INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
if(type==INTERP_KERNEL::NORM_POLYHED)
{
- if(!isPolyhedronWellOriented(conn+connI[i]+1,conn+connI[i+1],coordsPtr))
+ if(!IsPolyhedronWellOriented(conn+connI[i]+1,conn+connI[i+1],coordsPtr))
cells.push_back(i);
}
}
{
INTERP_KERNEL::NormalizedCellType type=(INTERP_KERNEL::NormalizedCellType)conn[connI[i]];
if(type==INTERP_KERNEL::NORM_POLYHED)
- if(!isPolyhedronWellOriented(conn+connI[i]+1,conn+connI[i+1],coordsPtr))
+ if(!IsPolyhedronWellOriented(conn+connI[i]+1,conn+connI[i+1],coordsPtr))
{
- tryToCorrectPolyhedronOrientation(conn+connI[i]+1,conn+connI[i+1],coordsPtr);
+ TryToCorrectPolyhedronOrientation(conn+connI[i]+1,conn+connI[i+1],coordsPtr);
isModified=true;
}
}
if(other->getType()!=UNSTRUCTURED)
throw INTERP_KERNEL::Exception("Merge of umesh only available with umesh each other !");
const MEDCouplingUMesh *otherC=static_cast<const MEDCouplingUMesh *>(other);
- return mergeUMeshes(this,otherC);
+ return MergeUMeshes(this,otherC);
}
/*!
* Returns a newly created mesh (with ref count ==1) that contains merge of 'mesh1' and 'other'.
* The coords of 'mesh2' are added at the end of coords of 'mesh1'.
*/
-MEDCouplingUMesh *MEDCouplingUMesh::mergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception)
+MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception)
{
std::vector<const MEDCouplingUMesh *> tmp(2);
tmp[0]=const_cast<MEDCouplingUMesh *>(mesh1); tmp[1]=const_cast<MEDCouplingUMesh *>(mesh2);
- return mergeUMeshes(tmp);
+ return MergeUMeshes(tmp);
}
-MEDCouplingUMesh *MEDCouplingUMesh::mergeUMeshes(std::vector<const MEDCouplingUMesh *>& a) throw(INTERP_KERNEL::Exception)
+MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshes(std::vector<const MEDCouplingUMesh *>& a) throw(INTERP_KERNEL::Exception)
{
if(a.empty())
- throw INTERP_KERNEL::Exception("MEDCouplingUMesh::mergeUMeshes : input array must be NON EMPTY !");
+ throw INTERP_KERNEL::Exception("MEDCouplingUMesh::MergeUMeshes : input array must be NON EMPTY !");
std::vector<const MEDCouplingUMesh *>::const_iterator it=a.begin();
int meshDim=(*it)->getMeshDimension();
int nbOfCells=(*it)->getNumberOfCells();
for(;it!=a.end();it++)
{
if(meshDim!=(*it)->getMeshDimension())
- throw INTERP_KERNEL::Exception("Mesh dimensions mismatches, mergeMeshes impossible !");
+ throw INTERP_KERNEL::Exception("Mesh dimensions mismatches, MergeUMeshes impossible !");
nbOfCells+=(*it)->getNumberOfCells();
meshLgth+=(*it)->getMeshLength();
}
std::vector<const MEDCouplingPointSet *> aps(a.size());
std::copy(a.begin(),a.end(),aps.begin());
- DataArrayDouble *pts=mergeNodesArray(aps);
+ DataArrayDouble *pts=MergeNodesArray(aps);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New("merge",meshDim);
ret->setCoords(pts);
pts->decrRef();
}
/*!
- * Idem mergeUMeshes except that 'meshes' are expected to lyie on the same coords and 'meshes' have the same meshdim.
+ * Idem MergeUMeshes except that 'meshes' are expected to lyie on the same coords and 'meshes' have the same meshdim.
* 'meshes' must be a non empty vector.
*/
-MEDCouplingUMesh *MEDCouplingUMesh::mergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception)
+MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception)
{
std::vector<MEDCouplingUMesh *> tmp(2);
tmp[0]=const_cast<MEDCouplingUMesh *>(mesh1); tmp[1]=const_cast<MEDCouplingUMesh *>(mesh2);
- return mergeUMeshesOnSameCoords(tmp);
+ return MergeUMeshesOnSameCoords(tmp);
}
/*!
- * Idem mergeUMeshes except that 'meshes' are expected to lyie on the same coords and 'meshes' have the same meshdim.
+ * Idem MergeUMeshes except that 'meshes' are expected to lyie on the same coords and 'meshes' have the same meshdim.
* 'meshes' must be a non empty vector.
*/
-MEDCouplingUMesh *MEDCouplingUMesh::mergeUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes)
+MEDCouplingUMesh *MEDCouplingUMesh::MergeUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes)
{
if(meshes.empty())
throw INTERP_KERNEL::Exception("meshes input parameter is expected to be non empty.");
* @return The mesh lying on the same coordinates than those in meshes. All cells in 'meshes' are in returned mesh with
* @exception if meshes is a empty vector or meshes are not lying on same coordinates or meshes not have the same dimension.
*/
-MEDCouplingUMesh *MEDCouplingUMesh::fuseUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayInt *>& corr)
+MEDCouplingUMesh *MEDCouplingUMesh::FuseUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayInt *>& corr)
{
- //All checks are delegated to mergeUMeshesOnSameCoords
- MEDCouplingUMesh *ret=mergeUMeshesOnSameCoords(meshes);
+ //All checks are delegated to MergeUMeshesOnSameCoords
+ MEDCouplingUMesh *ret=MergeUMeshesOnSameCoords(meshes);
DataArrayInt *o2n=ret->zipConnectivityTraducer(compType);
corr.resize(meshes.size());
int nbOfMeshes=meshes.size();
/*!
* This static operates only for coords in 3D. The polygon is specfied by its connectivity nodes in [begin,end).
*/
-bool MEDCouplingUMesh::isPolygonWellOriented(const double *vec, const int *begin, const int *end, const double *coords)
+bool MEDCouplingUMesh::IsPolygonWellOriented(const double *vec, const int *begin, const int *end, const double *coords)
{
double v[3]={0.,0.,0.};
int sz=std::distance(begin,end);
/*!
* The polyhedron is specfied by its connectivity nodes in [begin,end).
*/
-bool MEDCouplingUMesh::isPolyhedronWellOriented(const int *begin, const int *end, const double *coords)
+bool MEDCouplingUMesh::IsPolyhedronWellOriented(const int *begin, const int *end, const double *coords)
{
std::vector<std::pair<int,int> > edges;
int nbOfFaces=std::count(begin,end,-1)+1;
* This method tries to obtain a well oriented polyhedron.
* If the algorithm fails, an exception will be thrown.
*/
-void MEDCouplingUMesh::tryToCorrectPolyhedronOrientation(int *begin, int *end, const double *coords) throw(INTERP_KERNEL::Exception)
+void MEDCouplingUMesh::TryToCorrectPolyhedronOrientation(int *begin, int *end, const double *coords) throw(INTERP_KERNEL::Exception)
{
std::vector<std::pair<int,int> > edges;
int nbOfFaces=std::count(begin,end,-1)+1;
//
MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const;
MEDCOUPLING_EXPORT DataArrayDouble *getBarycenterAndOwner() const;
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *mergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *mergeUMeshes(std::vector<const MEDCouplingUMesh *>& a) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *mergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *mergeUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes);
- MEDCOUPLING_EXPORT static MEDCouplingUMesh *fuseUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayInt *>& corr);
- MEDCOUPLING_EXPORT static bool isPolygonWellOriented(const double *vec, const int *begin, const int *end, const double *coords);
- MEDCOUPLING_EXPORT static bool isPolyhedronWellOriented(const int *begin, const int *end, const double *coords);
- MEDCOUPLING_EXPORT static void tryToCorrectPolyhedronOrientation(int *begin, int *end, const double *coords) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshes(std::vector<const MEDCouplingUMesh *>& a) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
+ MEDCOUPLING_EXPORT static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes);
+ MEDCOUPLING_EXPORT static MEDCouplingUMesh *FuseUMeshesOnSameCoords(const std::vector<MEDCouplingUMesh *>& meshes, int compType, std::vector<DataArrayInt *>& corr);
+ MEDCOUPLING_EXPORT static bool IsPolygonWellOriented(const double *vec, const int *begin, const int *end, const double *coords);
+ MEDCOUPLING_EXPORT static bool IsPolyhedronWellOriented(const int *begin, const int *end, const double *coords);
+ MEDCOUPLING_EXPORT static void TryToCorrectPolyhedronOrientation(int *begin, int *end, const double *coords) throw(INTERP_KERNEL::Exception);
private:
MEDCouplingUMesh();
MEDCouplingUMesh(const MEDCouplingUMesh& other, bool deepCpy);
void MEDCouplingUMeshDesc::setConnectivity(DataArrayInt *descConn, DataArrayInt *descConnIndex, DataArrayInt *nodalFaceConn, DataArrayInt *nodalFaceConnIndx)
{
- DataArrayInt::setArrayIn(descConn,_desc_connec);
- DataArrayInt::setArrayIn(descConnIndex,_desc_connec_index);
- DataArrayInt::setArrayIn(nodalFaceConn,_nodal_connec_face);
- DataArrayInt::setArrayIn(nodalFaceConnIndx,_nodal_connec_face_index);
+ DataArrayInt::SetArrayIn(descConn,_desc_connec);
+ DataArrayInt::SetArrayIn(descConnIndex,_desc_connec_index);
+ DataArrayInt::SetArrayIn(nodalFaceConn,_nodal_connec_face);
+ DataArrayInt::SetArrayIn(nodalFaceConnIndx,_nodal_connec_face_index);
computeTypes();
}
CPPUNIT_ASSERT(m3);
m2->decrRef();
MEDCouplingUMesh *m4=build2DSourceMesh_1();
- MEDCouplingUMesh *m5=MEDCouplingUMesh::mergeUMeshes(m1,m3);
+ MEDCouplingUMesh *m5=MEDCouplingUMesh::MergeUMeshes(m1,m3);
m1->decrRef();
m3->decrRef();
- MEDCouplingUMesh *m6=MEDCouplingUMesh::mergeUMeshes(m5,m4);
+ MEDCouplingUMesh *m6=MEDCouplingUMesh::MergeUMeshes(m5,m4);
m4->decrRef();
m5->decrRef();
//
m3->tryToShareSameCoords(*m2,1e-12);
std::vector<MEDCouplingUMesh *> meshes;
meshes.push_back(m1); meshes.push_back(m2); meshes.push_back(m3);
- MEDCouplingUMesh *m4=MEDCouplingUMesh::mergeUMeshesOnSameCoords(meshes);
+ MEDCouplingUMesh *m4=MEDCouplingUMesh::MergeUMeshesOnSameCoords(meshes);
m4->checkCoherency();
CPPUNIT_ASSERT(m4->getCoords()==m1->getCoords());
CPPUNIT_ASSERT_EQUAL(15,m4->getNumberOfCells());
m2->translate(vec);
MEDCouplingFieldDouble *f1=m1->getMeasureField(true);
MEDCouplingFieldDouble *f2=m2->getMeasureField(true);
- MEDCouplingFieldDouble *f3=MEDCouplingFieldDouble::mergeFields(f1,f2);
+ MEDCouplingFieldDouble *f3=MEDCouplingFieldDouble::MergeFields(f1,f2);
f3->checkCoherency();
MEDCouplingUMesh *m4=build2DTargetMeshMerged_1();
CPPUNIT_ASSERT(f3->getMesh()->isEqual(m4,1.e-12));
MEDCouplingUMesh *m1=build3DSurfTargetMesh_1();
std::vector<MEDCouplingUMesh *> v=m1->splitByType();
CPPUNIT_ASSERT_EQUAL(3,(int)v.size());
- MEDCouplingUMesh *m2=MEDCouplingUMesh::mergeUMeshesOnSameCoords(v);
+ MEDCouplingUMesh *m2=MEDCouplingUMesh::MergeUMeshesOnSameCoords(v);
m2->setName(m1->getName());
CPPUNIT_ASSERT(m1->isEqual(m2,1.e-12));
for(std::vector<MEDCouplingUMesh *>::const_iterator iter=v.begin();iter!=v.end();iter++)
m2->decrRef();
//
std::vector<DataArrayInt *> corr;
- MEDCouplingUMesh *m7=MEDCouplingUMesh::fuseUMeshesOnSameCoords(meshes,0,corr);
+ MEDCouplingUMesh *m7=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,0,corr);
CPPUNIT_ASSERT_EQUAL(4,m7->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(3,(int)corr.size());
const int expectedVals1[3]={3,3,2};
CPPUNIT_ASSERT_EQUAL(expectedVals2[i][j],vals[j]);
}
std::vector< std::vector<int> > fidsOfGroups;
- DataArrayInt *arr2=DataArrayInt::makePartition(corr,m7->getNumberOfCells(),fidsOfGroups);
+ DataArrayInt *arr2=DataArrayInt::MakePartition(corr,m7->getNumberOfCells(),fidsOfGroups);
const int fidExp[4]={5,1,3,4};
const int fidsGrp[3][3]={{1,3,5},{3,4,5},{4,5,23344}};
CPPUNIT_ASSERT_EQUAL(3,(int)fidsOfGroups.size());
meshes.push_back(m3);
meshes.push_back(m4);
std::vector<DataArrayInt *> corr;
- MEDCouplingUMesh *m5=MEDCouplingUMesh::fuseUMeshesOnSameCoords(meshes,0,corr);
+ MEDCouplingUMesh *m5=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,0,corr);
CPPUNIT_ASSERT_EQUAL(18,m5->getNumberOfCells());
std::vector<DataArrayInt *>::iterator it=corr.begin();
const int exp1[4]={18,5,5,4};
CPPUNIT_ASSERT(std::equal(t2.begin(),t2.end(),expectedValues2));
//2D with no help of bounding box.
double center[2]={0.2,0.2};
- MEDCouplingPointSet::rotate2DAlg(center,0.78539816339744830962,6,pos);
+ MEDCouplingPointSet::Rotate2DAlg(center,0.78539816339744830962,6,pos);
targetMesh->rotate(center,0,0.78539816339744830962);
t1.clear(); t2.clear();
targetMesh->getCellsContainingPoints(pos,6,1e-12,t1,t2);
CPPUNIT_ASSERT(m3);
m2->decrRef();
MEDCouplingUMesh *m4=build2DSourceMesh_1();
- MEDCouplingUMesh *m5=MEDCouplingUMesh::mergeUMeshes(m1,m3);
+ MEDCouplingUMesh *m5=MEDCouplingUMesh::MergeUMeshes(m1,m3);
m1->decrRef();
m3->decrRef();
- MEDCouplingUMesh *m6=MEDCouplingUMesh::mergeUMeshes(m5,m4);
+ MEDCouplingUMesh *m6=MEDCouplingUMesh::MergeUMeshes(m5,m4);
m4->decrRef();
m5->decrRef();
//
tmp->alloc(3,2);
const double vals[6]={0.2,0.2,0.1,0.2,0.2,0.2};
std::copy(vals,vals+6,tmp->getPointer());
- DataArrayDouble *tmp2=DataArrayDouble::aggregate(coords,tmp);
+ DataArrayDouble *tmp2=DataArrayDouble::Aggregate(coords,tmp);
tmp->decrRef();
mesh->setCoords(tmp2);
tmp2->decrRef();
for(int i=0;i<35;i++)
CPPUNIT_ASSERT_EQUAL((int)expected1[i],dai1->getIJ(0,i));
// test of static method DataArrayDouble::meld
- DataArrayDouble *da4=DataArrayDouble::meld(da1C,da3);
+ DataArrayDouble *da4=DataArrayDouble::Meld(da1C,da3);
CPPUNIT_ASSERT_EQUAL(5,da4->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(7,da4->getNumberOfTuples());
CPPUNIT_ASSERT(da4->getInfoOnComponent(0)=="c0da1");
// test of static method DataArrayInt::meld
dai1->decrRef();
dai1=da1C->convertToIntArr();
- DataArrayInt *dai4=DataArrayInt::meld(dai1,dai3);
+ DataArrayInt *dai4=DataArrayInt::Meld(dai1,dai3);
CPPUNIT_ASSERT_EQUAL(5,dai4->getNumberOfComponents());
CPPUNIT_ASSERT_EQUAL(7,dai4->getNumberOfTuples());
CPPUNIT_ASSERT(dai4->getInfoOnComponent(0)=="c0da1");
f2->getArray()->setInfoOnComponent(1,"ccc");
f2->checkCoherency();
//
- MEDCouplingFieldDouble *f3=MEDCouplingFieldDouble::meldFields(f2,f1);
+ MEDCouplingFieldDouble *f3=MEDCouplingFieldDouble::MeldFields(f2,f1);
f3->checkCoherency();
CPPUNIT_ASSERT_EQUAL(5,f3->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,f3->getNumberOfComponents());
//
MEDCouplingFieldDouble *f4=f2->buildNewTimeReprFromThis(NO_TIME,false);
MEDCouplingFieldDouble *f5=f1->buildNewTimeReprFromThis(NO_TIME,false);
- MEDCouplingFieldDouble *f6=MEDCouplingFieldDouble::meldFields(f4,f5);
+ MEDCouplingFieldDouble *f6=MEDCouplingFieldDouble::MeldFields(f4,f5);
f6->checkCoherency();
CPPUNIT_ASSERT_EQUAL(5,f6->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(3,f6->getNumberOfComponents());
std::vector<const MEDCouplingUMesh *> tmp(2);
tmp[0]=m1;
tmp[1]=m2;
- MEDCouplingUMesh *m3=MEDCouplingUMesh::mergeUMeshes(tmp);
+ MEDCouplingUMesh *m3=MEDCouplingUMesh::MergeUMeshes(tmp);
bool b;
int newNbOfNodes;
DataArrayInt *da=m3->mergeNodes2(0.01,b,newNbOfNodes);
//
std::vector<const MEDCouplingFieldDouble *> tmp(3);
tmp[0]=f1; tmp[1]=f2; tmp[2]=f3;
- MEDCouplingFieldDouble *f4=MEDCouplingFieldDouble::mergeFields(tmp);
+ MEDCouplingFieldDouble *f4=MEDCouplingFieldDouble::MergeFields(tmp);
CPPUNIT_ASSERT_EQUAL(15,f4->getMesh()->getNumberOfCells());
const double expected1[30]={2.,2.,2.,2.,2.,2.,2.,2.,2.,2., 5.,5.,5.,5.,5.,5.,5.,5.,5.,5., 7.,7.,7.,7.,7.,7.,7.,7.,7.,7.};
for(int i=0;i<30;i++)
%newobject ParaMEDMEM::MEDCouplingFieldDouble::New;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::getArray;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::getEndArray;
-%newobject ParaMEDMEM::MEDCouplingFieldDouble::mergeFields;
-%newobject ParaMEDMEM::MEDCouplingFieldDouble::meldFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::MergeFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::MeldFields;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::doublyContractedProduct;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::determinant;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::eigenValues;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::magnitude;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::maxPerTuple;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::keepSelectedComponents;
-%newobject ParaMEDMEM::MEDCouplingFieldDouble::dotFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::DotFields;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::dot;
-%newobject ParaMEDMEM::MEDCouplingFieldDouble::crossProductFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::CrossProductFields;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::crossProduct;
-%newobject ParaMEDMEM::MEDCouplingFieldDouble::maxFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::MaxFields;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::max;
-%newobject ParaMEDMEM::MEDCouplingFieldDouble::minFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::MinFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::AddFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::SubstractFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::MultiplyFields;
+%newobject ParaMEDMEM::MEDCouplingFieldDouble::DivideFields;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::min;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::getIdsInRange;
%newobject ParaMEDMEM::MEDCouplingFieldDouble::buildSubPart;
%newobject ParaMEDMEM::DataArrayInt::invertArrayN2O2O2N;
%newobject ParaMEDMEM::DataArrayInt::getIdsEqual;
%newobject ParaMEDMEM::DataArrayInt::getIdsEqualList;
-%newobject ParaMEDMEM::DataArrayInt::aggregate;
-%newobject ParaMEDMEM::DataArrayInt::meld;
+%newobject ParaMEDMEM::DataArrayInt::Aggregate;
+%newobject ParaMEDMEM::DataArrayInt::Meld;
%newobject ParaMEDMEM::DataArrayInt::fromNoInterlace;
%newobject ParaMEDMEM::DataArrayInt::toNoInterlace;
%newobject ParaMEDMEM::DataArrayInt::buildComplement;
%newobject ParaMEDMEM::DataArrayDouble::convertToIntArr;
%newobject ParaMEDMEM::DataArrayDouble::deepCpy;
%newobject ParaMEDMEM::DataArrayDouble::performCpy;
-%newobject ParaMEDMEM::DataArrayDouble::aggregate;
-%newobject ParaMEDMEM::DataArrayDouble::meld;
-%newobject ParaMEDMEM::DataArrayDouble::dot;
-%newobject ParaMEDMEM::DataArrayDouble::crossProduct;
-%newobject ParaMEDMEM::DataArrayDouble::add;
-%newobject ParaMEDMEM::DataArrayDouble::substract;
-%newobject ParaMEDMEM::DataArrayDouble::multiply;
-%newobject ParaMEDMEM::DataArrayDouble::divide;
+%newobject ParaMEDMEM::DataArrayDouble::Aggregate;
+%newobject ParaMEDMEM::DataArrayDouble::Meld;
+%newobject ParaMEDMEM::DataArrayDouble::Dot;
+%newobject ParaMEDMEM::DataArrayDouble::CrossProduct;
+%newobject ParaMEDMEM::DataArrayDouble::Add;
+%newobject ParaMEDMEM::DataArrayDouble::Substract;
+%newobject ParaMEDMEM::DataArrayDouble::Multiply;
+%newobject ParaMEDMEM::DataArrayDouble::Divide;
%newobject ParaMEDMEM::DataArrayDouble::substr;
%newobject ParaMEDMEM::DataArrayDouble::changeNbOfComponents;
%newobject ParaMEDMEM::DataArrayDouble::keepSelectedComponents;
%newobject ParaMEDMEM::MEDCouplingMesh::getMeasureField;
%newobject ParaMEDMEM::MEDCouplingMesh::simplexize;
%newobject ParaMEDMEM::MEDCouplingMesh::buildUnstructured;
+%newobject ParaMEDMEM::MEDCouplingMesh::MergeMeshes;
%newobject ParaMEDMEM::MEDCouplingPointSet::zipCoordsTraducer;
%newobject ParaMEDMEM::MEDCouplingPointSet::buildBoundaryMesh;
-%newobject ParaMEDMEM::MEDCouplingPointSet::mergeNodesArray;
-%newobject ParaMEDMEM::MEDCouplingPointSet::buildInstanceFromMeshType;
+%newobject ParaMEDMEM::MEDCouplingPointSet::MergeNodesArray;
+%newobject ParaMEDMEM::MEDCouplingPointSet::BuildInstanceFromMeshType;
%newobject ParaMEDMEM::MEDCouplingUMesh::New;
%newobject ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivity;
%newobject ParaMEDMEM::MEDCouplingUMesh::getNodalConnectivityIndex;
%newobject ParaMEDMEM::MEDCouplingUMesh::zipConnectivityTraducer;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildDescendingConnectivity;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildExtrudedMesh;
-%newobject ParaMEDMEM::MEDCouplingUMesh::mergeUMeshes;
-%newobject ParaMEDMEM::MEDCouplingUMesh::mergeUMeshesOnSameCoords;
+%newobject ParaMEDMEM::MEDCouplingUMesh::MergeUMeshes;
+%newobject ParaMEDMEM::MEDCouplingUMesh::MergeUMeshesOnSameCoords;
%newobject ParaMEDMEM::MEDCouplingUMesh::buildNewNumberingFromCommNodesFrmt;
%newobject ParaMEDMEM::MEDCouplingUMesh::rearrange2ConsecutiveCellTypes;
%newobject ParaMEDMEM::MEDCouplingUMesh::convertCellArrayPerGeoType;
virtual MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const throw(INTERP_KERNEL::Exception) = 0;
virtual bool areCompatibleForMerge(const MEDCouplingMesh *other) const throw(INTERP_KERNEL::Exception);
virtual DataArrayInt *simplexize(int policy) throw(INTERP_KERNEL::Exception);
- static MEDCouplingMesh *mergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingMesh *MergeMeshes(const MEDCouplingMesh *mesh1, const MEDCouplingMesh *mesh2) throw(INTERP_KERNEL::Exception);
%extend
{
std::string __str__() const
void changeSpaceDimension(int newSpaceDim, double dftVal=0.) throw(INTERP_KERNEL::Exception);
void tryToShareSameCoords(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception);
virtual void tryToShareSameCoordsPermute(const MEDCouplingPointSet& other, double epsilon) throw(INTERP_KERNEL::Exception) = 0;
- static DataArrayDouble *mergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception);
- static MEDCouplingPointSet *buildInstanceFromMeshType(MEDCouplingMeshType type) throw(INTERP_KERNEL::Exception);
+ static DataArrayDouble *MergeNodesArray(const MEDCouplingPointSet *m1, const MEDCouplingPointSet *m2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingPointSet *BuildInstanceFromMeshType(MEDCouplingMeshType type) throw(INTERP_KERNEL::Exception);
virtual MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const throw(INTERP_KERNEL::Exception) = 0;
virtual bool isEmptyMesh(const std::vector<int>& tinyInfo) const throw(INTERP_KERNEL::Exception) = 0;
//! size of returned tinyInfo must be always the same.
return convertIntArrToPyList2(elems);
}
- static void rotate2DAlg(PyObject *center, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
+ static void Rotate2DAlg(PyObject *center, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
{
int sz;
double *c=convertPyToNewDblArr2(center,&sz);
double *coo=convertPyToNewDblArr2(coords,&sz);
- ParaMEDMEM::MEDCouplingPointSet::rotate2DAlg(c,angle,nbNodes,coo);
+ ParaMEDMEM::MEDCouplingPointSet::Rotate2DAlg(c,angle,nbNodes,coo);
for(int i=0;i<sz;i++)
PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
delete [] coo;
delete [] c;
}
- static void rotate3DAlg(PyObject *center, PyObject *vect, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
+ static void Rotate3DAlg(PyObject *center, PyObject *vect, double angle, int nbNodes, PyObject *coords) throw(INTERP_KERNEL::Exception)
{
int sz,sz2;
double *c=convertPyToNewDblArr2(center,&sz);
double *coo=convertPyToNewDblArr2(coords,&sz);
double *v=convertPyToNewDblArr2(vect,&sz2);
- ParaMEDMEM::MEDCouplingPointSet::rotate3DAlg(c,v,angle,nbNodes,coo);
+ ParaMEDMEM::MEDCouplingPointSet::Rotate3DAlg(c,v,angle,nbNodes,coo);
for(int i=0;i<sz;i++)
PyList_SetItem(coords,i,PyFloat_FromDouble(coo[i]));
delete [] coo;
MEDCouplingFieldDouble *getAspectRatioField() const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *getWarpField() const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *getSkewField() const throw(INTERP_KERNEL::Exception);
- static MEDCouplingUMesh *mergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
- static MEDCouplingUMesh *mergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingUMesh *MergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingUMesh *MergeUMeshesOnSameCoords(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2) throw(INTERP_KERNEL::Exception);
%extend {
std::string __str__() const
{
return convertIntArrToPyList2(elts);
}
- static PyObject *mergeUMeshesOnSameCoords(PyObject *ms) throw(INTERP_KERNEL::Exception)
+ static PyObject *MergeUMeshesOnSameCoords(PyObject *ms) throw(INTERP_KERNEL::Exception)
{
std::vector<ParaMEDMEM::MEDCouplingUMesh *> meshes;
if(PyList_Check(ms))
}
else
{
- PyErr_SetString(PyExc_TypeError,"mergeUMeshesOnSameCoords : not a list as first parameter");
+ PyErr_SetString(PyExc_TypeError,"MergeUMeshesOnSameCoords : not a list as first parameter");
PyErr_Print();
return 0;
}
- MEDCouplingUMesh *ret=MEDCouplingUMesh::mergeUMeshesOnSameCoords(meshes);
+ MEDCouplingUMesh *ret=MEDCouplingUMesh::MergeUMeshesOnSameCoords(meshes);
return convertMesh(ret, SWIG_POINTER_OWN | 0 );
}
- static PyObject *fuseUMeshesOnSameCoords(PyObject *ms, int compType) throw(INTERP_KERNEL::Exception)
+ static PyObject *FuseUMeshesOnSameCoords(PyObject *ms, int compType) throw(INTERP_KERNEL::Exception)
{
int sz;
std::vector<MEDCouplingUMesh *> meshes;
convertPyObjToVecUMeshes(ms,meshes);
std::vector<DataArrayInt *> corr;
- MEDCouplingUMesh *um=MEDCouplingUMesh::fuseUMeshesOnSameCoords(meshes,compType,corr);
+ MEDCouplingUMesh *um=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,compType,corr);
sz=corr.size();
PyObject *ret1=PyList_New(sz);
for(int i=0;i<sz;i++)
return convertDblArrToPyListOfTuple(vals,3,2);
}
- static MEDCouplingUMesh *mergeUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
+ static MEDCouplingUMesh *MergeUMeshes(PyObject *li) throw(INTERP_KERNEL::Exception)
{
std::vector<const ParaMEDMEM::MEDCouplingUMesh *> tmp;
convertPyObjToVecUMeshesCst(li,tmp);
- return MEDCouplingUMesh::mergeUMeshes(tmp);
+ return MEDCouplingUMesh::MergeUMeshes(tmp);
}
PyObject *areCellsIncludedIn(const MEDCouplingUMesh *other, int compType) const throw(INTERP_KERNEL::Exception)
return convertDblArrToPyList(tmp,sz);
}
- static DataArrayDouble *aggregate(PyObject *li) throw(INTERP_KERNEL::Exception)
+ static DataArrayDouble *Aggregate(PyObject *li) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> tmp;
convertPyObjToVecDataArrayDblCst(li,tmp);
- return DataArrayDouble::aggregate(tmp);
+ return DataArrayDouble::Aggregate(tmp);
}
- static DataArrayDouble *meld(PyObject *li) throw(INTERP_KERNEL::Exception)
+ static DataArrayDouble *Meld(PyObject *li) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayDouble *> tmp;
convertPyObjToVecDataArrayDblCst(li,tmp);
- return DataArrayDouble::meld(tmp);
+ return DataArrayDouble::Meld(tmp);
}
};
return convertIntArrToPyListOfTuple(vals,nbOfComp,nbOfTuples);
}
- static PyObject *makePartition(PyObject *gps, int newNb) throw(INTERP_KERNEL::Exception)
+ static PyObject *MakePartition(PyObject *gps, int newNb) throw(INTERP_KERNEL::Exception)
{
std::vector<DataArrayInt *> groups;
std::vector< std::vector<int> > fidsOfGroups;
convertPyObjToVecDataArrayInt(gps,groups);
- ParaMEDMEM::DataArrayInt *ret0=ParaMEDMEM::DataArrayInt::makePartition(groups,newNb,fidsOfGroups);
+ ParaMEDMEM::DataArrayInt *ret0=ParaMEDMEM::DataArrayInt::MakePartition(groups,newNb,fidsOfGroups);
PyObject *ret = PyList_New(2);
PyList_SetItem(ret,0,SWIG_NewPointerObj(SWIG_as_voidptr(ret0),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
int sz=fidsOfGroups.size();
return convertIntArrToPyList(tmp,sz);
}
- static DataArrayInt *meld(PyObject *li) throw(INTERP_KERNEL::Exception)
+ static DataArrayInt *Meld(PyObject *li) throw(INTERP_KERNEL::Exception)
{
std::vector<const DataArrayInt *> tmp;
convertPyObjToVecDataArrayIntCst(li,tmp);
- return DataArrayInt::meld(tmp);
+ return DataArrayInt::Meld(tmp);
}
PyObject *getMaxValue() const throw(INTERP_KERNEL::Exception)
double normL2(int compId) const throw(INTERP_KERNEL::Exception);
DataArrayInt *getIdsInRange(double vmin, double vmax) const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *buildSubPart(const DataArrayInt *part) const throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *mergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *meldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *dotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *MergeFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *MeldFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *DotFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *dot(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *crossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *CrossProductFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *crossProduct(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *maxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *MaxFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *max(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
- static MEDCouplingFieldDouble *minFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *MinFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *AddFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *SubstractFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *MultiplyFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
+ static MEDCouplingFieldDouble *DivideFields(const MEDCouplingFieldDouble *f1, const MEDCouplingFieldDouble *f2) throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *min(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
MEDCouplingFieldDouble *operator+(const MEDCouplingFieldDouble& other) const throw(INTERP_KERNEL::Exception);
const MEDCouplingFieldDouble &operator+=(const MEDCouplingFieldDouble& other) throw(INTERP_KERNEL::Exception);
self->setSelectedComponents(f,tmp);
}
- static MEDCouplingFieldDouble *mergeFields(PyObject *li) throw(INTERP_KERNEL::Exception)
+ static MEDCouplingFieldDouble *MergeFields(PyObject *li) throw(INTERP_KERNEL::Exception)
{
std::vector<const MEDCouplingFieldDouble *> tmp;
convertPyObjToVecFieldDblCst(li,tmp);
- return MEDCouplingFieldDouble::mergeFields(tmp);
+ return MEDCouplingFieldDouble::MergeFields(tmp);
}
}
};
m3=m2.buildPartOfMySelf(cells1,True);
self.assertTrue(isinstance(m3,MEDCouplingUMesh))
m4=MEDCouplingDataForTest.build2DSourceMesh_1();
- m5=MEDCouplingUMesh.mergeUMeshes(m1,m3);
- m6=MEDCouplingUMesh.mergeUMeshes(m5,m4);
+ m5=MEDCouplingUMesh.MergeUMeshes(m1,m3);
+ m6=MEDCouplingUMesh.MergeUMeshes(m5,m4);
#
self.assertEqual(10,m6.getNumberOfCells());
self.assertEqual(22,m6.getNumberOfNodes());
m3=MEDCouplingDataForTest.build2DTargetMesh_1();
m3.tryToShareSameCoords(m2,1e-12);
meshes=[m1,m2,m3]
- m4=MEDCouplingUMesh.mergeUMeshesOnSameCoords(meshes);
+ m4=MEDCouplingUMesh.MergeUMeshesOnSameCoords(meshes);
m4.checkCoherency();
self.assertEqual(15,m4.getNumberOfCells());
cells1=[0,1,2,3,4]
m2.translate(vec);
f1=m1.getMeasureField(True);
f2=m2.getMeasureField(True);
- f3=MEDCouplingFieldDouble.mergeFields(f1,f2);
+ f3=MEDCouplingFieldDouble.MergeFields(f1,f2);
f3.checkCoherency();
m4=MEDCouplingDataForTest.build2DTargetMeshMerged_1();
self.assertTrue(f3.getMesh().isEqual(m4,1.e-12));
m1=MEDCouplingDataForTest.build3DSurfTargetMesh_1();
v=m1.splitByType();
self.assertEqual(3,len(v));
- m2=MEDCouplingUMesh.mergeUMeshesOnSameCoords(v);
+ m2=MEDCouplingUMesh.MergeUMeshesOnSameCoords(v);
m2.setName(m1.getName());
self.assertTrue(m1.isEqual(m2,1.e-12));
pass
self.assertTrue(isinstance(m5,MEDCouplingUMesh))
meshes=[m3,m4,m5]
#
- m7,corr=MEDCouplingUMesh.fuseUMeshesOnSameCoords(meshes,0);
+ m7,corr=MEDCouplingUMesh.FuseUMeshesOnSameCoords(meshes,0);
self.assertEqual(4,m7.getNumberOfCells());
self.assertEqual(3,len(corr));
expectedVals1=[3,3,2]
vals=arr.getValues();
self.assertEqual(expectedVals2[i],list(vals));
pass
- arr2,fidsOfGroups=DataArrayInt.makePartition(corr,m7.getNumberOfCells());
+ arr2,fidsOfGroups=DataArrayInt.MakePartition(corr,m7.getNumberOfCells());
fidExp=[5,1,3,4]
fidsGrp=[[1,3,5],[3,4,5],[4,5]]
self.assertEqual(3,len(fidsOfGroups));
part2=[5,6,4,7]
m4=m1.buildPartOfMySelf(part2,True);
meshes=[m1,m3,m3,m4]
- m5,corr=MEDCouplingUMesh.fuseUMeshesOnSameCoords(meshes,0);
+ m5,corr=MEDCouplingUMesh.FuseUMeshesOnSameCoords(meshes,0);
self.assertEqual(18,m5.getNumberOfCells());
exp2=[
[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],
self.assertEqual(list(t2),expectedValues2);
#2D with no help of bounding box.
center=[0.2,0.2]
- MEDCouplingPointSet.rotate2DAlg(center,0.78539816339744830962,6,pos);
+ MEDCouplingPointSet.Rotate2DAlg(center,0.78539816339744830962,6,pos);
targetMesh.rotate(center,[],0.78539816339744830962);
t1=None
t2=None
m3_1=m2.buildPartOfMySelf(cells1,True);
m3=m3_1;
m4=MEDCouplingDataForTest.build2DSourceMesh_1();
- m5=MEDCouplingUMesh.mergeUMeshes(m1,m3);
- m6=MEDCouplingUMesh.mergeUMeshes(m5,m4);
+ m5=MEDCouplingUMesh.MergeUMeshes(m1,m3);
+ m6=MEDCouplingUMesh.MergeUMeshes(m5,m4);
#
self.assertEqual(10,m6.getNumberOfCells());
self.assertEqual(22,m6.getNumberOfNodes());
tmp=DataArrayDouble.New();
vals=[0.2,0.2,0.1,0.2,0.2,0.2]
tmp.setValues(vals,3,2);
- tmp2=DataArrayDouble.aggregate(coords,tmp);
+ tmp2=DataArrayDouble.Aggregate(coords,tmp);
mesh.setCoords(tmp2);
pts=[0.2,0.2,0.1,0.3,-0.3,0.7]
c=mesh.getNodeIdsNearPoint(pts,1e-7);
self.assertEqual(int(expected1[i]),dai1.getIJ(0,i));
pass
# test of static method DataArrayDouble::meld
- da4=DataArrayDouble.meld(da1C,da3);
- tmp=DataArrayDouble.meld([da1C,da3]);
+ da4=DataArrayDouble.Meld(da1C,da3);
+ tmp=DataArrayDouble.Meld([da1C,da3]);
self.assertTrue(da4.isEqual(tmp,1e-10))
self.assertEqual(5,da4.getNumberOfComponents());
self.assertEqual(7,da4.getNumberOfTuples());
pass
# test of static method DataArrayInt::meld
dai1=da1C.convertToIntArr();
- dai4=DataArrayInt.meld(dai1,dai3);
- tmp=DataArrayInt.meld([dai1,dai3]);
+ dai4=DataArrayInt.Meld(dai1,dai3);
+ tmp=DataArrayInt.Meld([dai1,dai3]);
self.assertTrue(dai4.isEqual(tmp))
self.assertEqual(5,dai4.getNumberOfComponents());
self.assertEqual(7,dai4.getNumberOfTuples());
f2.getArray().setInfoOnComponent(1,"ccc");
f2.checkCoherency();
#
- f3=MEDCouplingFieldDouble.meldFields(f2,f1);
+ f3=MEDCouplingFieldDouble.MeldFields(f2,f1);
f3.checkCoherency();
self.assertEqual(5,f3.getNumberOfTuples());
self.assertEqual(3,f3.getNumberOfComponents());
#
f4=f2.buildNewTimeReprFromThis(NO_TIME,False);
f5=f1.buildNewTimeReprFromThis(NO_TIME,False);
- f6=MEDCouplingFieldDouble.meldFields(f4,f5);
+ f6=MEDCouplingFieldDouble.MeldFields(f4,f5);
f6.checkCoherency();
self.assertEqual(5,f6.getNumberOfTuples());
self.assertEqual(3,f6.getNumberOfComponents());
vec=[0.002,0.]
m2.translate(vec);
#
- m3=MEDCouplingUMesh.mergeUMeshes([m1,m2]);
+ m3=MEDCouplingUMesh.MergeUMeshes([m1,m2]);
da,b,newNbOfNodes=m3.mergeNodes2(0.01);
self.assertEqual(9,m3.getNumberOfNodes());
expected1=[-0.299,-0.3, 0.201,-0.3, 0.701,-0.3, -0.299,0.2, 0.201,0.2, 0.701,0.2, -0.299,0.7, 0.201,0.7, 0.701,0.7]
arr.fillWithValue(7.);
f3.setArray(arr);
#
- f4=MEDCouplingFieldDouble.mergeFields([f1,f2,f3]);
+ f4=MEDCouplingFieldDouble.MergeFields([f1,f2,f3]);
self.assertEqual(15,f4.getMesh().getNumberOfCells());
expected1=[2.,2.,2.,2.,2.,2.,2.,2.,2.,2., 5.,5.,5.,5.,5.,5.,5.,5.,5.,5., 7.,7.,7.,7.,7.,7.,7.,7.,7.,7.]
for i in xrange(30):
if(grps.empty())
return ;
std::set<std::string> grpsName;
- for(std::vector<DataArrayInt *>::const_iterator it=grps.begin();it!=grps.end();it++)
- grpsName.insert((*it)->getName());
+ std::vector<std::string> grpsName2(grps.size());
+ int i=0;
+ for(std::vector<DataArrayInt *>::const_iterator it=grps.begin();it!=grps.end();it++,i++)
+ {
+ grpsName.insert((*it)->getName());
+ grpsName2[i]=(*it)->getName();
+ }
if(grpsName.size()!=grps.size())
throw INTERP_KERNEL::Exception("MEDFileUMesh::setGroupsAtLevel : groups name must be different each other !");
if(grpsName.find(std::string(""))!=grpsName.end())
throw INTERP_KERNEL::Exception("MEDFileUMesh::setGroupsAtLevel : groups name must be different empty string !");
- /* int sz=getSizeAtLevel(meshDimRelToMaxExt);
+ int sz=getSizeAtLevel(meshDimRelToMaxExt);
if(!renum)
{
-
- }*/
+ std::vector< std::vector<int> > fidsOfGroups;
+ DataArrayInt *fam=DataArrayInt::MakePartition(grps,sz,fidsOfGroups);
+ }
}
void MEDFileUMesh::eraseGroupsAtLevel(int meshDimRelToMaxExt) throw(INTERP_KERNEL::Exception)
std::set_union(ids.begin(),ids.end(),allFamsIds.begin(),allFamsIds.end(),std::inserter(res,res.begin()));
allFamsIds=res;
}
+ std::set<std::string> famNamesToKill;
+ for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
+ {
+ if(allFamsIds.find((*it).second)!=allFamsIds.end())
+ famNamesToKill.insert((*it).first);
+ }
+ for(std::set<std::string>::const_iterator it=famNamesToKill.begin();it!=famNamesToKill.end();it++)
+ _families.erase(*it);
+ std::vector<std::string> grpNamesToKill;
+ for(std::map<std::string, std::vector<std::string> >::iterator it=_groups.begin();it!=_groups.end();it++)
+ {
+ std::vector<std::string> tmp;
+ for(std::vector<std::string>::const_iterator it2=(*it).second.begin();it2!=(*it).second.end();it2++)
+ {
+ if(famNamesToKill.find(*it2)==famNamesToKill.end())
+ tmp.push_back(*it2);
+ }
+ if(!tmp.empty())
+ (*it).second=tmp;
+ else
+ tmp.push_back((*it).first);
+ }
+ for(std::vector<std::string>::const_iterator it=grpNamesToKill.begin();it!=grpNamesToKill.end();it++)
+ _groups.erase(*it);
}
void MEDFileUMesh::setFamilyField(DataArrayInt *arr, const std::vector< std::vector< int > > &userfids, const std::vector<std::string>& grpNames) throw(INTERP_KERNEL::Exception)
tmp->setConnectivity(const_cast<DataArrayInt *>(v[i]->getNodal()),const_cast<DataArrayInt *>(v[i]->getNodalIndex()));
ms[i]=tmp;
}
- _m_by_types=MEDCouplingUMesh::mergeUMeshesOnSameCoords(ms);
+ _m_by_types=MEDCouplingUMesh::MergeUMeshesOnSameCoords(ms);
_m_by_types->setName(mName);
if(l2.isFamDefinedOnLev(id))
{
{
int sz=ms.size();
std::vector< DataArrayInt * > corr;
- _m=MEDCouplingUMesh::fuseUMeshesOnSameCoords(ms,0,corr);
+ _m=MEDCouplingUMesh::FuseUMeshesOnSameCoords(ms,0,corr);
std::vector< std::vector<int> > fidsOfGroups;
- _fam=DataArrayInt::makePartition(corr,_m->getNumberOfCells(),fidsOfGroups);
+ _fam=DataArrayInt::MakePartition(corr,_m->getNumberOfCells(),fidsOfGroups);
int nbOfCells=_m->getNumberOfCells();
std::map<int,std::string> newfams;
std::map<int,int> famIdTrad;
if(meshNameCpp=="")
throw INTERP_KERNEL::Exception("writeUMeshesPartitionDirectly : Invalid meshName : Must be different from \"\" !");
std::vector< DataArrayInt * > corr;
- MEDCouplingUMesh *m=ParaMEDMEM::MEDCouplingUMesh::fuseUMeshesOnSameCoords(meshes,0,corr);
+ MEDCouplingUMesh *m=ParaMEDMEM::MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,0,corr);
m->setName(meshName);
std::vector< std::vector<int> > fidsOfGroups;
- DataArrayInt *arr2=DataArrayInt::makePartition(corr,m->getNumberOfCells(),fidsOfGroups);
+ DataArrayInt *arr2=DataArrayInt::MakePartition(corr,m->getNumberOfCells(),fidsOfGroups);
for(std::vector< DataArrayInt * >::iterator it=corr.begin();it!=corr.end();it++)
(*it)->decrRef();
bool isRenumbering;
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
MEDCouplingUMesh *m=MEDLoader::ReadUMeshFromFile(fileName,f->getMesh()->getName(),f2);
- MEDCouplingUMesh *m2=MEDCouplingUMesh::mergeUMeshes(m,(MEDCouplingUMesh *)f->getMesh());
+ MEDCouplingUMesh *m2=MEDCouplingUMesh::MergeUMeshes(m,(MEDCouplingUMesh *)f->getMesh());
bool areNodesMerged;
int newNbOfNodes;
DataArrayInt *da=m2->mergeNodes(MEDLoader::_EPS_FOR_NODE_COMP,areNodesMerged,newNbOfNodes);
//serialization of local mesh to send data to distant proc.
local_mesh->serialize(v1Local,v2Local);
//Building the right instance of copy of distant mesh.
- MEDCouplingPointSet *distant_mesh_tmp=MEDCouplingPointSet::buildInstanceFromMeshType((MEDCouplingMeshType)tinyInfoDistant[0]);
+ MEDCouplingPointSet *distant_mesh_tmp=MEDCouplingPointSet::BuildInstanceFromMeshType((MEDCouplingMeshType)tinyInfoDistant[0]);
std::vector<std::string> unusedTinyDistantSts;
distant_mesh_tmp->resizeForUnserialization(tinyInfoDistant,v1Distant,v2Distant,unusedTinyDistantSts);
int nbLocalElems=0;