Some comments on this code:
* The physical property to be preserved by this interpolation is
- specified using the keyword :tt:`ConservativeVolumic`
+ specified using the keyword :tt:`IntensiveMaximum`
* The parameter :tt:`P0P0` given at the preparation step of the
remapper specifies that the interpolation is done from CELLS (P0) to
CELLS (P0).
Some comments on this code:
* The physical property to be preserved by this interpolation is
- specified using the keyword :tt:`ConservativeVolumic`
+ specified using the keyword :tt:`IntensiveMaximum`
* The parameter :tt:`P0P0` given at the preparation step of the
remapper specifies that the interpolation is done from CELLS (P0) to
CELLS (P0).
field=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME)
field.setMesh(m3D)
field.setArray(a)
-field.checkCoherency()
+field.checkConsistencyLight()
field.setName("f")
# Save the field (and associated mesh)
# _T1A
L=0.
arr = field.getArray()
-ids = arr.getIdsInRange(L,1e300)
+ids = arr.findIdsInRange(L,1e300)
m3DSub = field.getMesh()[ids]
skin = m3DSub.computeSkin()
MEDLoader.WriteUMesh("partition_skin.med",skin,True);
# SALOME V650 requires a more complicated syntax.
m2D,desc,descI,revDesc,revDescI=m3DSub.buildDescendingConnectivity()
numberOf3DVolSharing=revDescI.deltaShiftIndex()
-ids2D=numberOf3DVolSharing.getIdsEqual(1)
+ids2D=numberOf3DVolSharing.findIdsEqual(1)
skin_V650=m2D[ids2D]
# We can check if the two skins are identical
print "Are two meshes equal between V660 and V650 ?",skin.isEqual(skin_V650,1e-12)
m=MEDFileMesh.New(fn)
m=m.getMeshAtLevel(0)
m.writeVTK(outs[i])
- mns[i]=m.deepCpy()
+ mns[i]=m.deepCopy()
if splitview:
m.translate([scal*elt for elt in trs[i]])
f=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME)
da=DataArrayDouble.New()
da.alloc(m.getNumberOfCells(),1)
da.fillWithValue(i)
- dds[i]=da.deepCpy()
+ dds[i]=da.deepCopy()
f.setArray(da)
fs[i]=f
i+=1
m=MEDFileMesh.New(fn)
m=m.getMeshAtLevel(0)
m.writeVTK(outs[i])
- mns[i]=m.deepCpy()
+ mns[i]=m.deepCopy()
if splitview:
m.translate([scal*elt for elt in trs[i]])
f=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME)
da=DataArrayDouble.New()
da.alloc(m.getNumberOfCells(),1)
da.fillWithValue(i)
- dds[i]=da.deepCpy()
+ dds[i]=da.deepCopy()
f.setArray(da)
fs[i]=f
i+=1
equation = "319.*cos(((x)*(x)*3+(y-0.52)*(y-0.52)+(z-0.1)*(z-0.1))*7)"
fsource=msource.fillFromAnalytic(ON_CELLS,1,equation)
fsource.setName("Temperature")
-fsource.setNature(ConservativeVolumic)
+fsource.setNature(IntensiveMaximum)
# Read the target mesh
mtarget = MEDLoader.ReadUMeshFromFile("meshtarget.med","meshtarget",0)
# _T1A
from MEDLoader import MEDLoader, ON_CELLS
-from MEDCouplingRemapper import MEDCouplingRemapper, ConservativeVolumic
+from MEDCouplingRemapper import MEDCouplingRemapper, IntensiveMaximum
# Read the source mesh and the source field
it,dt = (-1,-1)
fsource = MEDLoader.ReadField(ON_CELLS,"fieldsource.med","meshsource",0,
"Temperature",it,dt)
fsource.setMesh(msource)
-fsource.setNature(ConservativeVolumic)
+fsource.setNature(IntensiveMaximum)
# Read the target mesh
mtarget = MEDLoader.ReadUMeshFromFile("meshtarget.med","meshtarget",0)
ms=MEDFileMesh.New("MeshSource.med") ; ms=ms.getMeshAtLevel(0)
mt=MEDFileMesh.New("MeshTarget.med") ; mt=mt.getMeshAtLevel(0)
fs=ms.fillFromAnalytic(ON_CELLS,1,"319.*cos(((x)*(x)*3+(y-0.52)*(y-0.52)+(z-0.1)*(z-0.1))*7)")
-fs.setNature(ConservativeVolumic)
+fs.setNature(IntensiveMaximum)
fs.setName("Temperature")
MEDCouplingFieldDouble.WriteVTK("MeshSource.vtu",[fs])
-mt2=mt.deepCpy()
+mt2=mt.deepCopy()
mt2.translate([0.4,0.,0.])
mt2.writeVTK("MeshTarget.vtu")
#
if (nature == "NoNature") {
return NoNature;
}
- else if (nature == "ConservativeVolumic") {
- return ConservativeVolumic;
+ else if (nature == "IntensiveMaximum") {
+ return IntensiveMaximum;
}
- else if (nature == "Integral") {
- return Integral;
+ else if (nature == "ExtensiveMaximum") {
+ return ExtensiveMaximum;
}
- else if (nature == "IntegralGlobConstraint") {
- return IntegralGlobConstraint;
+ else if (nature == "ExtensiveConservation") {
+ return ExtensiveConservation;
}
- else if (nature == "RevIntegral") {
- return RevIntegral;
+ else if (nature == "IntensiveConservation") {
+ return IntensiveConservation;
}
std::string message("Error when trying to interpolate field: ");
pushInternal(obj, disp);
PyGILState_Release(_gil_state);
-}
\ No newline at end of file
+}
this->ui.comboBoxMethod->addItems(methods);
QStringList natures;
- natures << "NoNature" << "ConservativeVolumic" << "Integral" << "IntegralGlobConstraint" << "RevIntegral";
+ natures << "NoNature" << "IntensiveMaximum" << "ExtensiveMaximum" << "ExtensiveConservation" << "IntensiveConservation";
this->ui.comboBoxNature->addItems(natures);
connect(this->ui.btnSelectMesh, SIGNAL(clicked()), this, SLOT(OnSelectMesh()));
MEDCalculatorDBField *MEDCalculatorDBField::operator+(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)+(*par2);
}
MEDCalculatorDBField *MEDCalculatorDBField::operator-(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)-(*par2);
}
MEDCalculatorDBField *MEDCalculatorDBField::operator*(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)*(*par2);
}
MEDCalculatorDBField *MEDCalculatorDBField::operator/(double val) const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
+ MCAuto<MEDCalculatorDBFieldCst> par2=new MEDCalculatorDBFieldCst(val);
return (*this)/(*par2);
}
{
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
- std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> > fs2(ids.size());
+ std::vector< MCAuto<MEDCouplingFieldDouble> > fs2(ids.size());
int ii=0;
for(std::vector<int>::const_iterator iter=ids.begin();iter!=ids.end();iter++)
fs2[ii++]=_time_steps[*iter]->getFieldWithoutQuestion(_c_labels.size(),_c);
std::vector<MEDCouplingFieldDouble *> fs(fs2.size());
std::copy(fs2.begin(),fs2.end(),fs.begin());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldOverTime> fot=MEDCouplingFieldOverTime::New(fs);
+ MCAuto<MEDCouplingFieldOverTime> fot=MEDCouplingFieldOverTime::New(fs);
//
int argc=0;
CORBA::ORB_var orb=CORBA::ORB_init(argc,0);
int sz=steps.size();
for(int i=0;i<sz;i++)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> elt(new MEDCalculatorDBSliceField(steps[i].getTimeStep(),steps[i].getOrder()));
+ MCAuto<MEDCalculatorDBSliceField> elt(new MEDCalculatorDBSliceField(steps[i].getTimeStep(),steps[i].getOrder()));
_time_steps.push_back(elt);
}
}
const MEDCalculatorDBFieldReal& MEDCalculatorDBFieldReal::operator=(const MEDCalculatorDBFieldReal& other) throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
+ checkConsistencyLight(other);
std::vector<int> ids=_t.getIds(_time_steps.size());
std::vector<int> ids2=other._t.getIds(other._time_steps.size());
unsigned int sz=ids.size();
const MEDCalculatorDBFieldReal& MEDCalculatorDBFieldReal::operator=(double val) throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> other=buildCstFieldFromThis(val);
+ MCAuto<MEDCalculatorDBFieldReal> other=buildCstFieldFromThis(val);
return (*this)=*other;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=add(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::add(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
bool ret=isEqualSameType(*othercr,precM,precF);
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=substract(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::substract(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=multiply(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::multiply(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
+ MCAuto<MEDCalculatorDBFieldReal> othercr=buildCstFieldFromThis(otherc->getValue());
MEDCalculatorDBField *ret=divide(*othercr);
return ret;
}
MEDCalculatorDBField *MEDCalculatorDBFieldReal::divide(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
DataArrayInt *cellCor,*nodeCor;
MEDCalculatorDBField *MEDCalculatorDBFieldReal::dot(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
MEDCalculatorDBField *MEDCalculatorDBFieldReal::crossProduct(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
- checkCoherency(other);
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ checkConsistencyLight(other);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
other.fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
MEDCalculatorDBField *MEDCalculatorDBFieldReal::doublyContractedProduct() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::determinant() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenValues() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenVectors() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::inverse() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::trace() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::deviator() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBField *MEDCalculatorDBFieldReal::magnitude() const throw(INTERP_KERNEL::Exception)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
fetchData();
std::vector<int> ids=_t.getIds(_time_steps.size());
unsigned int sz=ids.size();
MEDCalculatorDBFieldReal *MEDCalculatorDBFieldReal::buildCstFieldFromThis(double val) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
+ MCAuto<MEDCalculatorDBFieldReal> ret=new MEDCalculatorDBFieldReal(_type);
ret->_p=_p;
ret->_c_labels.resize(_c.getSize(_c_labels.size()));
std::vector<int> stps=_t.getIds(_time_steps.size());
return ret;
}
-void MEDCalculatorDBFieldReal::checkCoherency(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
+void MEDCalculatorDBFieldReal::checkConsistencyLight(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception)
{
if(_type!=other._type)
throw INTERP_KERNEL::Exception("Types of field mismatch !");
std::vector<int> idsInGlobalToFetch;
for(int i=0;i<sz;i++)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> elt=_time_steps[ids[i]];
+ MCAuto<MEDCalculatorDBSliceField> elt=_time_steps[ids[i]];
if(!elt->isFetched())
{
int dt,it;
sz=fs.size();
for(int i=0;i<sz;i++)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> elt=_time_steps[idsInGlobalToFetch[i]];
+ MCAuto<MEDCalculatorDBSliceField> elt=_time_steps[idsInGlobalToFetch[i]];
elt->setField(fs[i]);
}
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val+otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)+other;
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val-otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)-other;
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val*otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)*other;
return ret;
}
const MEDCalculatorDBFieldCst *otherc=dynamic_cast<const MEDCalculatorDBFieldCst *>(other2);
if(otherc)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
+ MCAuto<MEDCalculatorDBFieldCst> ret=new MEDCalculatorDBFieldCst(*this);
ret->_val=_val/otherc->_val;
ret->incrRef();
return ret;
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
MEDCalculatorDBField *ret=(*thisr)/other;
return ret;
}
const MEDCalculatorDBFieldReal *otherr=dynamic_cast<const MEDCalculatorDBFieldReal *>(other2);
if(otherr)
{
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
+ MCAuto<MEDCalculatorDBFieldReal> thisr=otherr->buildCstFieldFromThis(_val);
bool ret=thisr->isEqual(other,precM,precF);
return ret;
}
#include "MEDCalculatorDBRangeSelection.hxx"
#include "MEDCouplingRefCountObject.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
#include "InterpKernelException.hxx"
bool isEqual(const MEDCalculatorDBField& other, double precM, double precF) const;
bool isEqualSameType(const MEDCalculatorDBFieldReal& other, double precM, double precF) const;
MEDCalculatorDBFieldReal *buildCstFieldFromThis(double val) const;
- void checkCoherency(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception);
+ void checkConsistencyLight(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception);
void fetchData() const throw(INTERP_KERNEL::Exception);
TypeOfField getType() const { return _type; }
int getNumberOfSteps() const;
MEDCalculatorDBRangeSelection _p;
std::vector<std::string> _c_labels;
MEDCalculatorDBRangeSelection _c;
- std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBSliceField> > _time_steps;
+ std::vector< MCAuto<MEDCalculatorDBSliceField> > _time_steps;
};
class MEDCALCULATOR_EXPORT MEDCalculatorDBFieldCst : public MEDCalculatorDBField
#include "MEDLoader.hxx"
#include "MEDCouplingFieldDouble.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
using namespace MEDCoupling;
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=other->_field->keepSelectedComponents(oIds);
_field->setSelectedComponents(f1,tIds);
}
throw INTERP_KERNEL::Exception("Slice::add : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)+(*f2);
return new MEDCalculatorDBSliceField(f3);
throw INTERP_KERNEL::Exception("Slice::substract : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)-(*f2);
return new MEDCalculatorDBSliceField(f3);
throw INTERP_KERNEL::Exception("Slice::multiply : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)*(*f2);
return new MEDCalculatorDBSliceField(f3);
throw INTERP_KERNEL::Exception("Slice::divide : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=(*f1)/(*f2);
return new MEDCalculatorDBSliceField(f3);
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=f1->dot(*f2);
return new MEDCalculatorDBSliceField(f3);
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
MEDCouplingFieldDouble *f3=f1->crossProduct(*f2);
return new MEDCalculatorDBSliceField(f3);
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::doublyContractedProduct(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->doublyContractedProduct();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::determinant(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->determinant();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenValues(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->eigenValues();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenVectors(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->eigenVectors();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::inverse(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->inverse();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::trace(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->trace();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::deviator(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->deviator();
return new MEDCalculatorDBSliceField(f2);
}
MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::magnitude(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
MEDCouplingFieldDouble *f2=f1->magnitude();
return new MEDCalculatorDBSliceField(f2);
}
void MEDCalculatorDBSliceField::applyFunc(const char *func, int sizeCThis, const MEDCalculatorDBRangeSelection& thisC)
{
std::vector<int> tIds=thisC.getIds(sizeCThis);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
f1->applyFunc(func);
_field->setSelectedComponents(f1,tIds);
}
throw INTERP_KERNEL::Exception("Slice::isEqual : not implemented yet node/cell permutation !");
std::vector<int> tIds=thisC.getIds(sizeCThis);
std::vector<int> oIds=otherC.getIds(sizeCOther);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
+ MCAuto<MEDCouplingFieldDouble> f1=_field->keepSelectedComponents(tIds);
+ MCAuto<MEDCouplingFieldDouble> f2=other->_field->keepSelectedComponents(oIds);
f2->setMesh(f1->getMesh());
return f1->isEqualWithoutConsideringStr(f2,0,prec);
}
PyObject *obj2=PyTuple_GetItem(obj,2);
convertPyObjToRS2(obj2,cr,"for 3rd tuple element for components of field");
}
- MEDCouplingAutoRefCountObjectPtr<MEDCalculatorDBFieldReal> ret=self->operator()(tr,pr,cr);
+ MCAuto<MEDCalculatorDBFieldReal> ret=self->operator()(tr,pr,cr);
if(PyInt_Check(val))
{
(*ret)=double(PyInt_AS_LONG(val));
return _MEDCalculator.MEDCouplingIMesh____new___(cls,args)
def MEDCouplingExtrudedMeshnew(cls,*args):
import _MEDCalculator
- return _MEDCalculator.MEDCouplingExtrudedMesh____new___(cls,args)
+ return _MEDCalculator.MEDCouplingMappedExtrudedMesh____new___(cls,args)
%}
%pythoncode %{
da->setInfoOnComponent(0,"aaa [a]"); da->setInfoOnComponent(1,"bbb [b]"); da->setInfoOnComponent(2,"ccc [c]");
da->setInfoOnComponent(3,"ddd [d]"); da->setInfoOnComponent(4,"eee [e]"); da->setInfoOnComponent(5,"fff [f]");
da->setInfoOnComponent(6,"ggg [g]");
- f->checkCoherency();
+ f->checkConsistencyLight();
for(int i=0;i<nbOfTimeSteps;i++)
{
double *pt=da->getPointer();
#include "MEDCouplingExtrudedMeshClient.hxx"
#include "MEDCouplingMeshClient.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingMemArray.hxx"
#include <vector>
using namespace MEDCoupling;
-MEDCouplingExtrudedMesh *MEDCouplingExtrudedMeshClient::New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr)
+MEDCouplingMappedExtrudedMesh *MEDCouplingExtrudedMeshClient::New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr)
{
- MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMesh::New();
+ MEDCouplingMappedExtrudedMesh *ret=MEDCouplingMappedExtrudedMesh::New();
MEDCouplingMeshClient::fillMeshFromCorbaData(ret,meshPtr);
return ret;
}
namespace MEDCoupling
{
- class MEDCouplingExtrudedMesh;
+ class MEDCouplingMappedExtrudedMesh;
class MEDCOUPLINGCLIENT_EXPORT MEDCouplingExtrudedMeshClient
{
public:
- static MEDCouplingExtrudedMesh *New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr mesh);
+ static MEDCouplingMappedExtrudedMesh *New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr mesh);
};
}
#include "MEDCoupling1SGTUMeshClient.hxx"
#include "MEDCoupling1DGTUMeshClient.hxx"
#include "MEDCouplingExtrudedMeshClient.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingCMeshClient.hxx"
#include "MEDCouplingCurveLinearMeshClient.hxx"
#include "MEDCouplingIMeshClient.hxx"
#include "MEDCouplingExtrudedMeshServant.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
using namespace MEDCoupling;
-MEDCouplingExtrudedMeshServant::MEDCouplingExtrudedMeshServant(const MEDCouplingExtrudedMesh *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh)
+MEDCouplingExtrudedMeshServant::MEDCouplingExtrudedMeshServant(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh)
{
}
namespace MEDCoupling
{
- class MEDCouplingExtrudedMesh;
+ class MEDCouplingMappedExtrudedMesh;
class MEDCOUPLINGCORBA_EXPORT MEDCouplingExtrudedMeshServant : MEDCouplingMeshServant, public virtual POA_SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface
{
public:
- typedef MEDCouplingExtrudedMesh CppType;
- MEDCouplingExtrudedMeshServant(const MEDCouplingExtrudedMesh *cppPointerOfMesh);
+ typedef MEDCouplingMappedExtrudedMesh CppType;
+ MEDCouplingExtrudedMeshServant(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh);
~MEDCouplingExtrudedMeshServant();
private:
- const MEDCouplingExtrudedMesh *getPointer() const { return (const MEDCouplingExtrudedMesh *)(_cpp_pointer); }
+ const MEDCouplingMappedExtrudedMesh *getPointer() const { return (const MEDCouplingMappedExtrudedMesh *)(_cpp_pointer); }
};
}
#include "MEDCouplingCMesh.hxx"
#include "MEDCouplingIMesh.hxx"
#include "MEDCouplingCurveLinearMesh.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCoupling1GTUMesh.hxx"
using namespace MEDCoupling;
SALOME_MED::MEDCouplingIMeshCorbaInterface_ptr ret=retServ->_this();//let this line even if it seems fool
return ret;
}
- const MEDCouplingExtrudedMesh *eMesh=dynamic_cast<const MEDCouplingExtrudedMesh *>(mesh);
+ const MEDCouplingMappedExtrudedMesh *eMesh=dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(mesh);
if(eMesh)
{
MEDCouplingExtrudedMeshServant *retServ=new MEDCouplingExtrudedMeshServant(eMesh);
// Author : Anthony Geay (CEA/DEN)
#include "MEDCouplingMeshFieldFactoryComponent.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingFieldDouble.hxx"
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMultiFields.hxx"
myCoords->setInfoOnComponent(2,"ZZZ [m]");
myCoords->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
return targetMesh;
}
{
MEDCoupling::MEDCouplingUMesh *meshM1D=MEDCoupling::MEDCouplingUMesh::New("wonderfull -1 D mesh",-1);
meshM1D->setDescription("buildM1DMesh");
- meshM1D->checkCoherency();
+ meshM1D->checkConsistencyLight();
return meshM1D;
}
- MEDCoupling::MEDCouplingExtrudedMesh *MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D)
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D)
{
m2D=build2DMesh();
m2D->changeSpaceDimension(3);
MEDCoupling::MEDCouplingUMesh *m1D=build1DMesh();
MEDCoupling::MEDCouplingUMesh *retu=m2D->buildExtrudedMesh(m1D,0);
m1D->decrRef();
- MEDCoupling::MEDCouplingExtrudedMesh *ret=MEDCoupling::MEDCouplingExtrudedMesh::New(retu,m2D,2);
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *ret=MEDCoupling::MEDCouplingMappedExtrudedMesh::New(retu,m2D,2);
ret->setName("ExtrudedTestForCorbaTest");
ret->setDescription("buildExtrudedMesh");
retu->decrRef();
a1->decrRef();
a2->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
int structure[2]={4,5};
targetMesh->setNodeGridStructure(structure,structure+2);
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
std::copy(conn,conn+16,a2->getPointer());
targetMesh->setNodalConnectivity(a2); a2->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
std::copy(conni,conni+5,a3->getPointer());
targetMesh->setNodalConnectivity(a2,a3); a2->decrRef(); a3->decrRef();
//
- targetMesh->checkCoherency();
+ targetMesh->checkConsistencyLight();
//
return targetMesh;
}
array->decrRef();
std::fill(tmp,tmp+mesh->getNumberOfCells()*6,7.);
mesh->decrRef();
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
array->decrRef();
std::fill(tmp,tmp+mesh->getNumberOfNodes()*5,7.1234);
mesh->decrRef();
- fieldOnNodes->checkCoherency();
+ fieldOnNodes->checkConsistencyLight();
return fieldOnNodes;
}
{
MEDCoupling::MEDCouplingUMesh *mesh=build3DMesh();
MEDCoupling::MEDCouplingFieldDouble *fieldOnCells=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::NO_TIME);
- fieldOnCells->setNature(MEDCoupling::ConservativeVolumic);
+ fieldOnCells->setNature(MEDCoupling::IntensiveMaximum);
fieldOnCells->setName("toto");
fieldOnCells->setDescription("my wonderful 3D field toto2");
fieldOnCells->setMesh(mesh);
array->decrRef();
std::fill(tmp,tmp+mesh->getNumberOfCells()*6,7.);
mesh->decrRef();
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
std::fill(tmp,tmp+mesh->getNumberOfCells()*3,7.);
mesh->decrRef();
fieldOnCells->setTime(6.7,1,4);
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
mesh->decrRef();
fieldOnCells->setStartTime(6.7,1,4);
fieldOnCells->setEndTime(7.2,2,8);
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
std::copy(arr2,arr2+20,tmp);
fieldOnCells->setStartTime(6.7,25,26);
fieldOnCells->setEndTime(17.2,125,126);
- fieldOnCells->checkCoherency();
+ fieldOnCells->checkConsistencyLight();
return fieldOnCells;
}
f->setTimeUnit("ms");
f->setDescription("mmmmmmmmmmmm");
array->decrRef();
- f->checkCoherency();
+ f->checkConsistencyLight();
return f;
}
f->setArray(array);
array->decrRef();
//
- f->checkCoherency();
+ f->checkConsistencyLight();
m->decrRef();
return f;
}
MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT()
{
MEDCoupling::MEDCouplingUMesh *m2D=0;
- MEDCoupling::MEDCouplingExtrudedMesh *ext=buildExtrudedMesh(m2D);
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *ext=buildExtrudedMesh(m2D);
//
MEDCoupling::MEDCouplingFieldDouble *f=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME);
f->setTime(6.8,11,8);
f->setArray(array);
array->decrRef();
//
- f->checkCoherency();
+ f->checkConsistencyLight();
//
m2D->decrRef();
ext->decrRef();
f->setArray(array);
array->decrRef();
//
- f->checkCoherency();
+ f->checkConsistencyLight();
//
return f;
}
{
MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldNodeScalarOn2DNT();
MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1);
- f2->setNature(MEDCoupling::ConservativeVolumic);
+ f2->setNature(MEDCoupling::IntensiveMaximum);
f1->decrRef();
return f2;
}
{
MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldGaussPt2DWT();
MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1);
- f2->setNature(MEDCoupling::Integral);
+ f2->setNature(MEDCoupling::ExtensiveMaximum);
f1->decrRef();
return f2;
}
{
MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldGaussPtNE2DWT();
MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1);
- f2->setNature(MEDCoupling::IntegralGlobConstraint);
+ f2->setNature(MEDCoupling::ExtensiveConservation);
f1->decrRef();
return f2;
}
std::vector<MEDCoupling::MEDCouplingFieldDouble *> fs(5);
fs[0]=f0; fs[1]=f1; fs[2]=f2; fs[3]=f3; fs[4]=f4;
MEDCoupling::MEDCouplingFieldOverTime *ret=MEDCoupling::MEDCouplingFieldOverTime::New(fs);
- ret->checkCoherency();
+ ret->checkConsistencyLight();
//
m1->decrRef();
m2->decrRef();
class MEDCouplingUMesh;
class MEDCouplingFieldDouble;
class MEDCouplingFieldTemplate;
- class MEDCouplingExtrudedMesh;
+ class MEDCouplingMappedExtrudedMesh;
class MEDCoupling1DGTUMesh;
class MEDCoupling1SGTUMesh;
class MEDCouplingCMesh;
static MEDCoupling::MEDCouplingUMesh *build3DSurfMesh();
static MEDCoupling::MEDCouplingUMesh *build0DMesh();
static MEDCoupling::MEDCouplingUMesh *buildM1DMesh();
- static MEDCoupling::MEDCouplingExtrudedMesh *buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D);
+ static MEDCoupling::MEDCouplingMappedExtrudedMesh *buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D);
static MEDCoupling::MEDCouplingCMesh *buildCMesh();
static MEDCoupling::MEDCouplingIMesh *buildIMesh();
static MEDCoupling::MEDCouplingCurveLinearMesh *buildCLMesh();
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCoupling1SGTUMeshClient.hxx"
#include "MEDCoupling1DGTUMeshClient.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingExtrudedMeshClient.hxx"
#include "MEDCouplingCMesh.hxx"
#include "MEDCouplingCMeshClient.hxx"
void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingExtruded()
{
SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr=_objC->getExtrudedMesh();
- MEDCoupling::MEDCouplingExtrudedMesh *meshFromDistant=MEDCoupling::MEDCouplingExtrudedMeshClient::New(meshPtr);
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *meshFromDistant=MEDCoupling::MEDCouplingExtrudedMeshClient::New(meshPtr);
meshPtr->UnRegister();
CORBA::release(meshPtr);
MEDCoupling::MEDCouplingUMesh *meshRef2;
- MEDCoupling::MEDCouplingExtrudedMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(meshRef2);
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(meshRef2);
CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12));
CPPUNIT_ASSERT(meshFromDistant->getMesh2D()->isEqual(meshRef2,1e-12));
meshRef2->decrRef();
#include "MEDCouplingFieldTemplate.hxx"
#include "MEDCouplingMultiFields.hxx"
#include "MEDCouplingFieldOverTime.hxx"
-#include "MEDCouplingExtrudedMesh.hxx"
+#include "MEDCouplingMappedExtrudedMesh.hxx"
#include "MEDCouplingCurveLinearMesh.hxx"
#include "MEDCoupling1GTUMesh.hxx"
#include "MEDCouplingUMesh.hxx"
SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getExtrudedMesh()
{
MEDCoupling::MEDCouplingUMesh *m2D;
- MEDCoupling::MEDCouplingExtrudedMesh *m1=MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(m2D);
+ MEDCoupling::MEDCouplingMappedExtrudedMesh *m1=MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(m2D);
m2D->decrRef();
MEDCoupling::MEDCouplingExtrudedMeshServant *m=new MEDCoupling::MEDCouplingExtrudedMeshServant(m1);
m1->decrRef();
public:
%extend
{
- static MEDCouplingExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
+ static MEDCouplingMappedExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception)
{
PyObject* pdict=PyDict_New();
PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins());
throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingExtrudedMeshInterface_ptr !");
Py_DECREF(pdict);
Py_DECREF(iorMesh);
- MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
+ MEDCouplingMappedExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC);
return ret;
}
}
return _MEDCouplingClient.MEDCouplingIMesh____new___(cls,args)
def MEDCouplingExtrudedMeshnew(cls,*args):
import _MEDCouplingClient
- return _MEDCouplingClient.MEDCouplingExtrudedMesh____new___(cls,args)
+ return _MEDCouplingClient.MEDCouplingMappedExtrudedMesh____new___(cls,args)
%}
%include "MEDCouplingFinalize.i"
return buildServantAndActivate<MEDCoupling1SGTUMeshServant>(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh))
return buildServantAndActivate<MEDCoupling1DGTUMeshServant>(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh));
- if(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh))
- return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh));
+ if(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh))
+ return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh))
return buildServantAndActivate<MEDCouplingCMeshServant>(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingIMesh *>(cppPointerOfMesh))
return buildServantAndActivate2<MEDCoupling1SGTUMeshServant>(dynamic_cast<const MEDCoupling1SGTUMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh))
return buildServantAndActivate2<MEDCoupling1DGTUMeshServant>(dynamic_cast<const MEDCoupling1DGTUMesh *>(cppPointerOfMesh));
- if(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh))
- return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingExtrudedMesh *>(cppPointerOfMesh));
+ if(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh))
+ return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(dynamic_cast<const MEDCouplingMappedExtrudedMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh))
return buildServantAndActivate2<MEDCouplingCMeshServant>(dynamic_cast<const MEDCouplingCMesh *>(cppPointerOfMesh));
if(dynamic_cast<const MEDCouplingIMesh *>(cppPointerOfMesh))
public:
%extend
{
- static PyObject *_this(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+ static PyObject *_this(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
{
return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
}
- static PyObject *_this2(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
+ static PyObject *_this2(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception)
{
return buildServantAndActivate2<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
}
return _MEDCouplingCorba.MEDCouplingIMesh____new___(cls,args)
def MEDCouplingExtrudedMeshnew(cls,*args):
import _MEDCouplingCorba
- return _MEDCouplingCorba.MEDCouplingExtrudedMesh____new___(cls,args)
+ return _MEDCouplingCorba.MEDCouplingMappedExtrudedMesh____new___(cls,args)
%}
%include "MEDCouplingFinalize.i"
myCoords.setInfoOnComponent(0,"X [m]");
myCoords.setInfoOnComponent(1,"YY [Pm]");
myCoords.setInfoOnComponent(2,"ZZZ [m]");
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
return targetMesh;
def buildM1DMesh(self):
meshM1D=MEDCouplingUMesh.New("wonderfull -1 D mesh",-1);
meshM1D.setDescription("buildM1DMesh");
- meshM1D.checkCoherency();
+ meshM1D.checkConsistencyLight();
return meshM1D;
def buildExtrudedMesh(self):
m2D.changeSpaceDimension(3);
m1D=self.build1DMesh();
retu=m2D.buildExtrudedMesh(m1D,0);
- ret=MEDCouplingExtrudedMesh.New(retu,m2D,2);
+ ret=MEDCouplingMappedExtrudedMesh.New(retu,m2D,2);
ret.setName("ExtrudedTestForCorbaTest");
ret.setDescription("buildExtrudedMesh");
return ret;
targetMesh.setCoordsAt(1,a2);
#
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
targetMesh.setCoords(a1);
targetMesh.setNodeGridStructure([4,5]);
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
a2=DataArrayInt([6,0,3,5,3,0,1,4,1,2,7,4,8,7,2,9],4*4,1)
targetMesh.setNodalConnectivity(a2)
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
a3=DataArrayInt([0,4,8,12,15],5,1)
targetMesh.setNodalConnectivity(a2,a3)
#
- targetMesh.checkCoherency();
+ targetMesh.checkConsistencyLight();
#
return targetMesh;
tmp=mesh.getNumberOfCells()*6*[7.]
array.setValues(tmp,mesh.getNumberOfCells(),6);
fieldOnCells.setArray(array)
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldNodeScalarOn2DNT(self):
tmp=mesh.getNumberOfNodes()*5*[7.1234]
array.setValues(tmp,mesh.getNumberOfNodes(),5);
fieldOnNodes.setArray(array);
- fieldOnNodes.checkCoherency();
+ fieldOnNodes.checkConsistencyLight();
return fieldOnNodes;
def buildFieldScalarOn3DNT(self):
mesh=self.build3DMesh();
fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME);
- fieldOnCells.setNature(ConservativeVolumic);
+ fieldOnCells.setNature(IntensiveMaximum);
fieldOnCells.setName("toto");
fieldOnCells.setDescription("my wonderful 3D field toto2");
fieldOnCells.setMesh(mesh);
tmp=mesh.getNumberOfCells()*6*[7.]
array.setValues(tmp,mesh.getNumberOfCells(),6);
fieldOnCells.setArray(array);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldScalarOn3DSurfWT(self):
array.setInfoOnComponents(["aaa","bbbb","ccccc"])
fieldOnCells.setArray(array);
fieldOnCells.setTime(6.7,1,4);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldScalarOn3DSurfCOTI(self):
fieldOnCells.setArray(array);
fieldOnCells.setStartTime(6.7,1,4);
fieldOnCells.setEndTime(7.2,2,8);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldScalarOn2DLT(self):
fieldOnCells.setEndArray(array)
fieldOnCells.setStartTime(6.7,25,26);
fieldOnCells.setEndTime(17.2,125,126);
- fieldOnCells.checkCoherency();
+ fieldOnCells.checkConsistencyLight();
return fieldOnCells;
def buildFieldGaussPt2DWT(self):
f.setName("MyFirstFieldOnGaussPoint");
f.setTimeUnit("ms");
f.setDescription("mmmmmmmmmmmm");
- f.checkCoherency();
+ f.checkConsistencyLight();
return f;
def buildFieldGaussPtNE2DWT(self):
array.setInfoOnComponent(1,"Density [kg/m^3]");
f.setArray(array);
#
- f.checkCoherency();
+ f.checkConsistencyLight();
return f;
def buildFieldVectorOnExtrudedWT(self):
array.setInfoOnComponent(1,"Density [kg/m^3]");
f.setArray(array);
#
- f.checkCoherency();
+ f.checkConsistencyLight();
return f
def buildFieldVectorOnCMeshWT(self):
array.setInfoOnComponent(1,"Density [kg/m^3]");
f.setArray(array);
#
- f.checkCoherency();
+ f.checkConsistencyLight();
return f
def buildFieldTemplateCellOn2D(self):
def buildFieldTemplateNodeOn2D(self):
f1=self.buildFieldNodeScalarOn2DNT();
f2=MEDCouplingFieldTemplate.New(f1);
- f2.setNature(ConservativeVolumic);
+ f2.setNature(IntensiveMaximum);
return f2
def buildFieldTemplateGaussPtOn2D(self):
f1=self.buildFieldGaussPt2DWT();
f2=MEDCouplingFieldTemplate.New(f1);
- f2.setNature(Integral);
+ f2.setNature(ExtensiveMaximum);
return f2
def buildFieldTemplateGaussNEOn2D(self):
f1=self.buildFieldGaussPtNE2DWT();
f2=MEDCouplingFieldTemplate.New(f1);
- f2.setNature(IntegralGlobConstraint);
+ f2.setNature(ExtensiveConservation);
return f2
def buildMultiFields1(self):
f4.setName("f4");
f4.setTime(2.7,25,26);
ret=MEDCouplingFieldOverTime.New([f0,f1,f2,f3,f4]);
- ret.checkCoherency();
+ ret.checkConsistencyLight();
return ret;
def buildFileNameForIOR(self):
myCoords=DataArrayDouble.New()
myCoords.setValues(coords,nbOfNodes,3);
mesh.setCoords(myCoords);
- mesh.checkCoherency();
+ mesh.checkConsistencyLight();
myFalseConn=DataArrayInt.New()
myFalseConn.setValues(tab4,6,4)
return mesh
nbOfCells=mesh.getNumberOfCells()
field=MEDCouplingFieldDouble.New(ON_CELLS)
field.setMesh(mesh)
- field.setNature(Integral)
+ field.setNature(ExtensiveMaximum)
myCoords=DataArrayDouble.New()
sampleTab=[]
for i in range(nbOfCells*9):