geoMesh=umesh->buildUnstructured();
}
//
- MCAuto<DataArrayDouble> angleVrille(angleDeVrille->deepCopy());
+ MCConstAuto<DataArrayDouble> angleVrille;
if(!pfl.empty())
{
const DataArrayInt *pflArr(globs->getProfile(pfl));
geoMesh=geoMesh->buildPartOfMySelf(pflArr->begin(),pflArr->end(),true);
- angleVrille=angleVrille->selectByTupleIdSafe(pflArr->begin(),pflArr->end());
+ angleVrille=angleDeVrille->selectByTupleIdSafe(pflArr->begin(),pflArr->end());
}
+ else
+ angleVrille.takeRef(angleDeVrille);
//
MCAuto<MEDCouplingFieldDouble> fakeF(MEDCouplingFieldDouble::New(ON_GAUSS_PT));
fakeF->setMesh(geoMesh);
fakeF->setGaussLocalizationOnType(gt,loc.getRefCoords(),loc.getGaussCoords(),loc.getGaussWeights());
MCAuto<DataArrayDouble> ptsForLoc(fakeF->getLocalizationOfDiscr());
//
- MCAuto<DataArrayDouble> rot;
- {
- MCAuto<MEDCouplingFieldDouble> dir(geoMesh->buildDirectionVectorField());
- rot=dir->getArray()->fromCartToSpher();
- }
+ MCAuto<MEDCouplingFieldDouble> dir(geoMesh->buildDirectionVectorField());
+ MCAuto<DataArrayDouble> rot(dir->getArray()->fromCartToSpher());
int nbCells(geoMesh->getNumberOfCells()),nbCompo(ptsForLoc->getNumberOfComponents());
MCAuto<DataArrayDouble> secPts(section->getCoords()->changeNbOfComponents(nbCompo,0.));
int nbSecPts(secPts->getNumberOfTuples());
DataArrayDouble::Rotate3DAlg(CENTER,AX0,ang0,nbSecPts,p->begin(),p->getPointer());
AX1[0]=-sin(ang0); AX1[1]=cos(ang0);// rot Oy around OZ
double ang1(M_PI/2.-rot->getIJ(j,1));
- DataArrayDouble::Rotate3DAlg(CENTER,AX1,ang1,nbSecPts,p->begin(),p->getPointer());
+ DataArrayDouble::Rotate3DAlg(CENTER,AX1,-ang1,nbSecPts,p->begin(),p->getPointer());
+ DataArrayDouble::Rotate3DAlg(CENTER,dir->getArray()->begin()+j*3,angleVrille->getIJ(j,0),nbSecPts,p->begin(),p->getPointer());
for(int l=0;l<nbg;l++)
{
MCAuto<DataArrayDouble> p2(p->deepCopy());
%newobject MEDCoupling::MEDFileMeshes::__iter__;
%newobject MEDCoupling::MEDFileMeshSupports::New;
+%newobject MEDCoupling::MEDFileMeshSupports::getSupMeshWithName;
%newobject MEDCoupling::MEDFileStructureElements::New;
{
public:
static MEDFileMeshSupports *New(const std::string& fileName) throw(INTERP_KERNEL::Exception);
+ std::vector<std::string> getSupMeshNames() const throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ MEDFileUMesh *getSupMeshWithName(const std::string& name) const throw(INTERP_KERNEL::Exception)
+ {
+ const MEDFileUMesh *ret(self->getSupMeshWithName(name));
+ MEDFileUMesh *ret2(const_cast<MEDFileUMesh *>(ret));
+ if(ret2)
+ ret2->incrRef();
+ return ret2;
+ }
+ }
};
class MEDFileStructureElements : public RefCountObject, public MEDFileWritableStandAlone