-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
int MEDPARTITIONER::MyGlobals::_Randomize=0;
int MEDPARTITIONER::MyGlobals::_Atomize=0;
int MEDPARTITIONER::MyGlobals::_Creates_Boundary_Faces=0;
+int MEDPARTITIONER::MyGlobals::_Create_Joints=0;
std::vector<std::string> MEDPARTITIONER::MyGlobals::_File_Names;
std::vector<std::string> MEDPARTITIONER::MyGlobals::_Mesh_Names;
std::vector<std::string> MEDPARTITIONER::MyGlobals::_Field_Descriptions;
IT=StrToInt(ExtractFromDescription(description,"IT="));
}
-ParaMEDMEM::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v)
+MEDCoupling::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v)
{
- ParaMEDMEM::DataArrayInt* p=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
p->alloc(v.size(),1);
std::copy(v.begin(),v.end(),p->getPointer());
return p;
}
-ParaMEDMEM::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v,const int nbComponents)
+MEDCoupling::DataArrayInt *MEDPARTITIONER::CreateDataArrayIntFromVector(const std::vector<int>& v,const int nbComponents)
{
- ParaMEDMEM::DataArrayInt* p=ParaMEDMEM::DataArrayInt::New();
+ MEDCoupling::DataArrayInt* p=MEDCoupling::DataArrayInt::New();
if (v.size()%nbComponents!=0)
throw INTERP_KERNEL::Exception("Problem size modulo nbComponents != 0");
p->alloc(v.size()/nbComponents,nbComponents);
return p;
}
-ParaMEDMEM::DataArrayDouble* MEDPARTITIONER::CreateDataArrayDoubleFromVector(const std::vector<double>& v)
+MEDCoupling::DataArrayDouble* MEDPARTITIONER::CreateDataArrayDoubleFromVector(const std::vector<double>& v)
{
- ParaMEDMEM::DataArrayDouble* p=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble* p=MEDCoupling::DataArrayDouble::New();
p->alloc(v.size(),1);
std::copy(v.begin(),v.end(),p->getPointer());
return p;
/*!
*/
-std::vector<std::string> MEDPARTITIONER::BrowseFieldDouble(const ParaMEDMEM::MEDCouplingFieldDouble* fd)
+std::vector<std::string> MEDPARTITIONER::BrowseFieldDouble(const MEDCoupling::MEDCouplingFieldDouble* fd)
{
std::vector<std::string> res;
if (fd->getArray())
std::vector<std::string> MEDPARTITIONER::BrowseAllFields(const std::string& myfile)
{
std::vector<std::string> res;
- std::vector<std::string> meshNames=MEDLoader::GetMeshNames(myfile);
+ std::vector<std::string> meshNames=MEDCoupling::GetMeshNames(myfile);
for (std::size_t i=0; i<meshNames.size(); i++)
{
std::vector<std::string> fieldNames=
- MEDLoader::GetAllFieldNamesOnMesh(myfile,meshNames[i]);
+ MEDCoupling::GetAllFieldNamesOnMesh(myfile,meshNames[i]);
for (std::size_t j = 0; j < fieldNames.size(); j++)
{
- std::vector< ParaMEDMEM::TypeOfField > typeFields=
- MEDLoader::GetTypesOfField(myfile, meshNames[i], fieldNames[j]);
+ std::vector< MEDCoupling::TypeOfField > typeFields=
+ MEDCoupling::GetTypesOfField(myfile, meshNames[i], fieldNames[j]);
for (std::size_t k = 0; k < typeFields.size(); k++)
{
std::vector< std::pair< int, int > > its=
- MEDLoader::GetFieldIterations(typeFields[k], myfile, meshNames[i], fieldNames[j]);
+ GetFieldIterations(typeFields[k], myfile, meshNames[i], fieldNames[j]);
if (MyGlobals::_Is0verbose>100)
std::cout<< "fieldName " << fieldNames[j] << " typeField " << typeFields[k] << " its.size() " << its.size() << std::endl;
for (std::size_t m = 0; m < its.size(); m++)
resi.push_back("fileName="); resi.back()+=fileName;
resi.push_back("meshName="); resi.back()+=curMeshName;
resi.push_back("fieldName="); resi.back()+=curFieldName;
- resi.push_back("typeField="); resi.back()+=IntToStr((int)ParaMEDMEM::ON_NODES);
+ resi.push_back("typeField="); resi.back()+=IntToStr((int)MEDCoupling::ON_NODES);
resi.push_back("typeData="); resi.back()+=IntToStr((int)typcha); //6 for double?
resi.push_back("nbComponent="); resi.back()+=IntToStr((int)ncomp);
resi.push_back("DT="); resi.back()+=IntToStr((int)numdt);
nbOfVal << " profilName '" << pflname << "' profileSize " << profilesize << " nbPtGauss " << nbi << std::endl;
int typeField=-1; //unknown
if (enttype==MED_CELL)
- typeField=ParaMEDMEM::ON_CELLS;
+ typeField=MEDCoupling::ON_CELLS;
if (enttype==MED_NODE_ELEMENT)
- typeField=ParaMEDMEM::ON_GAUSS_NE;
+ typeField=MEDCoupling::ON_GAUSS_NE;
//if (enttype==??) typeField=ON_GAUSS_PT;
std::vector<std::string> resi;
resi.push_back("idomain="); resi.back()+=IntToStr(idomain);
/*!
* create empty MEDCouplingUMesh* dim 3
*/
-ParaMEDMEM::MEDCouplingUMesh* MEDPARTITIONER::CreateEmptyMEDCouplingUMesh()
+MEDCoupling::MEDCouplingUMesh* MEDPARTITIONER::CreateEmptyMEDCouplingUMesh()
{
- ParaMEDMEM::MEDCouplingUMesh* umesh=ParaMEDMEM::MEDCouplingUMesh::New();
+ MEDCoupling::MEDCouplingUMesh* umesh=MEDCoupling::MEDCouplingUMesh::New();
umesh->setMeshDimension(3);
umesh->allocateCells(0);
umesh->finishInsertingCells();
- ParaMEDMEM::DataArrayDouble *myCoords=ParaMEDMEM::DataArrayDouble::New();
+ MEDCoupling::DataArrayDouble *myCoords=MEDCoupling::DataArrayDouble::New();
myCoords->alloc(0,3);
umesh->setCoords(myCoords);
umesh->setName("EMPTY");