-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 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
MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
- parafieldP0->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
if(rank==0)
{
valueP0[0]=7.; valueP0[1]=8.;
}
MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafieldP0->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
}
// test 1
MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
- parafieldP0->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
if(rank==0)
{
valueP0[0]=7.; valueP0[1]=8.;
}
MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafieldP0->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
}
// test 1
MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
ostringstream meshname ;
meshname<< "Mesh_2_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh=ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
if(srcM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
}
else
parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_3_"<<rank-nproc_source+1;
- mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh = ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
// MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
if(targetM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
}
else
parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
ostringstream filename;
filename<<"./sourcesquareb_"<<source_group->myRank()+1;
aRemover.Register(filename.str().c_str());
- //MEDLoader::WriteField("./sourcesquareb",parafield->getField());
+ //WriteField("./sourcesquareb",parafield->getField());
dec.recvData();
cout <<"writing"<<endl;
ParaMEDLoader::WriteParaMesh("./sourcesquare",paramesh);
if (source_group->myRank()==0)
aRemover.Register("./sourcesquare");
- //MEDLoader::WriteField("./sourcesquare",parafield->getField());
+ //WriteField("./sourcesquare",parafield->getField());
filename<<"./sourcesquare_"<<source_group->myRank()+1;
dec.recvData();
ParaMEDLoader::WriteParaMesh("./targetsquareb",paramesh);
- //MEDLoader::WriteField("./targetsquareb",parafield->getField());
+ //WriteField("./targetsquareb",parafield->getField());
if (target_group->myRank()==0)
aRemover.Register("./targetsquareb");
ostringstream filename;
aRemover.Register(filename.str().c_str());
dec.sendData();
ParaMEDLoader::WriteParaMesh("./targetsquare",paramesh);
- //MEDLoader::WriteField("./targetsquare",parafield->getField());
+ //WriteField("./targetsquare",parafield->getField());
if (target_group->myRank()==0)
aRemover.Register("./targetsquareb");
ostringstream meshname ;
meshname<< "Mesh_2_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh=ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
MEDCoupling::ComponentTopology comptopo;
if(srcM=="P0")
{
array->alloc(mcfield->getNumberOfTuples(),1);
mcfield->setArray(array);
array->decrRef();
- mcfield->setNature(ConservativeVolumic);
+ mcfield->setNature(IntensiveMaximum);
}
else
{
string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_3_"<<rank-nproc_source+1;
- mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh = ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
MEDCoupling::ComponentTopology comptopo;
if(targetM=="P0")
{
array->alloc(mcfield->getNumberOfTuples(),1);
mcfield->setArray(array);
array->decrRef();
- mcfield->setNature(ConservativeVolumic);
+ mcfield->setNature(IntensiveMaximum);
}
else
{
ostringstream meshname ;
meshname<< "Mesh_3_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh=ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
if(srcM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
}
else
parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
std::string fName = INTERP_TEST::getResourceFile(strstream.str());
ostringstream meshname ;
meshname<< "Mesh_6";
- mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh = ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
// MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
if(targetM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
}
else
parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
ostringstream filename;
filename<<"./sourcesquareb_"<<source_group->myRank()+1;
aRemover.Register(filename.str().c_str());
- //MEDLoader::WriteField("./sourcesquareb",parafield->getField());
+ //WriteField("./sourcesquareb",parafield->getField());
dec.recvData();
cout <<"writing"<<endl;
ParaMEDLoader::WriteParaMesh("./sourcesquare",paramesh);
if (source_group->myRank()==0)
aRemover.Register("./sourcesquare");
- //MEDLoader::WriteField("./sourcesquare",parafield->getField());
+ //WriteField("./sourcesquare",parafield->getField());
filename<<"./sourcesquare_"<<source_group->myRank()+1;
dec.recvData();
ParaMEDLoader::WriteParaMesh("./targetsquareb",paramesh);
- //MEDLoader::WriteField("./targetsquareb",parafield->getField());
+ //WriteField("./targetsquareb",parafield->getField());
if (target_group->myRank()==0)
aRemover.Register("./targetsquareb");
ostringstream filename;
aRemover.Register(filename.str().c_str());
dec.sendData();
ParaMEDLoader::WriteParaMesh("./targetsquare",paramesh);
- //MEDLoader::WriteField("./targetsquare",parafield->getField());
+ //WriteField("./targetsquare",parafield->getField());
if (target_group->myRank()==0)
aRemover.Register("./targetsquareb");
}
//test 1 - Conservative volumic
MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
if (source_group->containsMyRank())
{
dec.setMethod("P0");
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13);
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
}
- //test 2 - Integral
+ //test 2 - ExtensiveMaximum
MEDCoupling::InterpKernelDEC dec2(*source_group,*target_group);
- parafield->getField()->setNature(Integral);
+ parafield->getField()->setNature(ExtensiveMaximum);
if (source_group->containsMyRank())
{
dec2.setMethod("P0");
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13);
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
}
- //test 3 - Integral with global constraint
+ //test 3 - ExtensiveMaximum with global constraint
MEDCoupling::InterpKernelDEC dec3(*source_group,*target_group);
- parafield->getField()->setNature(IntegralGlobConstraint);
+ parafield->getField()->setNature(ExtensiveConservation);
if (source_group->containsMyRank())
{
dec3.setMethod("P0");
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13);
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
}
- //test 4 - RevIntegral
+ //test 4 - IntensiveConservation
MEDCoupling::InterpKernelDEC dec4(*source_group,*target_group);
- parafield->getField()->setNature(RevIntegral);
+ parafield->getField()->setNature(IntensiveConservation);
if (source_group->containsMyRank())
{
dec4.setMethod("P0");
}
//test 5 - Conservative volumic reversed
MEDCoupling::InterpKernelDEC dec5(*source_group,*target_group);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
if (source_group->containsMyRank())
{
dec5.setMethod("P0");
res[1]=toSet[1];
dec5.sendData();
}
- //test 6 - Integral reversed
+ //test 6 - ExtensiveMaximum reversed
MEDCoupling::InterpKernelDEC dec6(*source_group,*target_group);
- parafield->getField()->setNature(Integral);
+ parafield->getField()->setNature(ExtensiveMaximum);
if (source_group->containsMyRank())
{
dec6.setMethod("P0");
res[1]=toSet[1];
dec6.sendData();
}
- //test 7 - Integral with global constraint reversed
+ //test 7 - ExtensiveMaximum with global constraint reversed
MEDCoupling::InterpKernelDEC dec7(*source_group,*target_group);
- parafield->getField()->setNature(IntegralGlobConstraint);
+ parafield->getField()->setNature(ExtensiveConservation);
if (source_group->containsMyRank())
{
dec7.setMethod("P0");
res[1]=toSet[1];
dec7.sendData();
}
- //test 8 - Integral with RevIntegral reversed
+ //test 8 - ExtensiveMaximum with IntensiveConservation reversed
MEDCoupling::InterpKernelDEC dec8(*source_group,*target_group);
- parafield->getField()->setNature(RevIntegral);
+ parafield->getField()->setNature(IntensiveConservation);
if (source_group->containsMyRank())
{
dec8.setMethod("P0");
parafieldP1 = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
double *valueP1=parafieldP1->getField()->getArray()->getPointer();
- parafieldP0->getField()->setNature(ConservativeVolumic);
- parafieldP1->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
+ parafieldP1->getField()->setNature(IntensiveMaximum);
if(rank==0)
{
valueP0[0]=31.;
MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
parafieldP1 = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
- parafieldP0->getField()->setNature(ConservativeVolumic);
- parafieldP1->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
+ parafieldP1->getField()->setNature(IntensiveMaximum);
}
// test 1 - P0 P1
MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
double *vals=parafield->getField()->getArray()->getPointer();
if(rank==0)
{ vals[0]=7.; vals[1]=8.; }
MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*target_group,"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
}
MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
if(source_group->containsMyRank())
}
MEDCoupling::InterpKernelDEC dec2(*source_group,*target_group);
dec2.setMethod("P0");
- parafield->getField()->setNature(IntegralGlobConstraint);
+ parafield->getField()->setNature(ExtensiveConservation);
if(source_group->containsMyRank())
{
double *vals=parafield->getField()->getArray()->getPointer();
//
MEDCoupling::InterpKernelDEC dec3(*source_group,*target_group);
dec3.setMethod("P0");
- parafield->getField()->setNature(Integral);
+ parafield->getField()->setNature(ExtensiveMaximum);
if(source_group->containsMyRank())
{
double *vals=parafield->getField()->getArray()->getPointer();
//
MEDCoupling::InterpKernelDEC dec4(*source_group,*target_group);
dec4.setMethod("P0");
- parafield->getField()->setNature(RevIntegral);
+ parafield->getField()->setNature(IntensiveConservation);
if(source_group->containsMyRank())
{
double *vals=parafield->getField()->getArray()->getPointer();
MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*source_group,"source mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
double *vals=parafield->getField()->getArray()->getPointer();
vals[0]=7.;
dec=new MEDCoupling::InterpKernelDEC(*source_group,*target_group);
MEDCoupling::ComponentTopology comptopo;
paramesh=new ParaMESH(mesh,*target_group,"target mesh");
parafield=new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);
dec=new MEDCoupling::InterpKernelDEC(*source_group,*target_group);
dec->attachLocalField(parafield);
dec->synchronize();
MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
double *valueP0=parafieldP0->getField()->getArray()->getPointer();
- parafieldP0->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
valueP0[0]=7.; valueP0[1]=8.;
}
else
}
MEDCoupling::ComponentTopology comptopo;
parafieldP0 = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafieldP0->getField()->setNature(ConservativeVolumic);
+ parafieldP0->getField()->setNature(IntensiveMaximum);
}
// test 1
MEDCoupling::InterpKernelDEC dec(*source_group,*target_group);
ostringstream meshname ;
meshname<< "Mesh_2_"<< rank+1;
- mesh=MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh=ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*source_group,"source mesh");
if(srcM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);//InvertIntegral);//ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);//InvertIntegral);//IntensiveMaximum);
}
else
parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);
ostringstream meshname ;
meshname<< "Mesh_3_"<<rank-nproc_source+1;
- mesh = MEDLoader::ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
+ mesh = ReadUMeshFromFile(fName.c_str(),meshname.str().c_str(),0);
paramesh=new ParaMESH (mesh,*target_group,"target mesh");
// MEDCoupling::ParaSUPPORT* parasupport=new UnstructuredParaSUPPORT(support,*target_group);
if(targetM=="P0")
{
parafield = new ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo);
- parafield->getField()->setNature(ConservativeVolumic);//InvertIntegral);//ConservativeVolumic);
+ parafield->getField()->setNature(IntensiveMaximum);//InvertIntegral);//IntensiveMaximum);
}
else
parafield = new ParaFIELD(ON_NODES,NO_TIME,paramesh, comptopo);