static const double VAL2=-1111111111111.;
const char name1[]="AField";
const char name3[]="AMesh1";
- const char name2[]="AMesh2";
MEDCouplingFieldDouble *f1=buildVecFieldOnCells_1();
((MEDCouplingMesh *)f1->getMesh())->setName(name3);
f1->setName(name1);
f1->setTime(10.14,18,19);
tmp[0]=VAL2;
MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
- ((MEDCouplingMesh *)f1->getMesh())->setName(name2);
f1->setTime(10.55,28,29);
tmp[0]=3*VAL1;
- MEDLoader::WriteField(fileName,f1,false);
+ MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
f1->setTime(10.66,38,39);
tmp[0]=3*VAL2;
MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
f1->decrRef();
f1=buildVecFieldOnNodes_1();
f1->setName(name1);
- ((MEDCouplingMesh *)f1->getMesh())->setName(name2);
+ ((MEDCouplingMesh *)f1->getMesh())->setName(name3);
f1->setTime(110.,8,9);
MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
f1->setTime(110.,108,109);
MEDLoader::WriteFieldUsingAlreadyWrittenMesh(fileName,f1);
//
std::vector< std::pair<int,int> > it1=MEDLoader::GetCellFieldIterations(fileName,name3,name1);
- CPPUNIT_ASSERT_EQUAL(2,(int)it1.size());
+ CPPUNIT_ASSERT_EQUAL(5,(int)it1.size());
CPPUNIT_ASSERT_EQUAL(8,it1[0].first); CPPUNIT_ASSERT_EQUAL(9,it1[0].second);
CPPUNIT_ASSERT_EQUAL(18,it1[1].first); CPPUNIT_ASSERT_EQUAL(19,it1[1].second);
- std::vector< std::pair<int,int> > it2=MEDLoader::GetCellFieldIterations(fileName,name2,name1);
- CPPUNIT_ASSERT_EQUAL(3,(int)it2.size());
- CPPUNIT_ASSERT_EQUAL(28,it2[0].first); CPPUNIT_ASSERT_EQUAL(29,it2[0].second);
- CPPUNIT_ASSERT_EQUAL(38,it2[1].first); CPPUNIT_ASSERT_EQUAL(39,it2[1].second);
- CPPUNIT_ASSERT_EQUAL(48,it2[2].first); CPPUNIT_ASSERT_EQUAL(49,it2[2].second);
- std::vector< std::pair<int,int> > it3=MEDLoader::GetNodeFieldIterations(fileName,name2,name1);
+ CPPUNIT_ASSERT_EQUAL(28,it1[2].first); CPPUNIT_ASSERT_EQUAL(29,it1[2].second);
+ CPPUNIT_ASSERT_EQUAL(38,it1[3].first); CPPUNIT_ASSERT_EQUAL(39,it1[3].second);
+ CPPUNIT_ASSERT_EQUAL(48,it1[4].first); CPPUNIT_ASSERT_EQUAL(49,it1[4].second);
+ std::vector< std::pair<int,int> > it3=MEDLoader::GetNodeFieldIterations(fileName,name3,name1);
CPPUNIT_ASSERT_EQUAL(3,(int)it3.size());
CPPUNIT_ASSERT_EQUAL(8,it3[0].first); CPPUNIT_ASSERT_EQUAL(9,it3[0].second);
CPPUNIT_ASSERT_EQUAL(108,it3[1].first); CPPUNIT_ASSERT_EQUAL(109,it3[1].second);
CPPUNIT_ASSERT_EQUAL(208,it3[2].first); CPPUNIT_ASSERT_EQUAL(209,it3[2].second);
- std::vector< std::pair<int,int> > it4=MEDLoader::GetNodeFieldIterations(fileName,name3,name1);
- CPPUNIT_ASSERT(it4.empty());
//
f1->decrRef();
//
f1=MEDLoader::ReadFieldCell(fileName,name3,0,name1,18,19);
CPPUNIT_ASSERT_DOUBLES_EQUAL(VAL2,f1->getArray()->getConstPointer()[0],1e-13);
f1->decrRef();
- f1=MEDLoader::ReadFieldCell(fileName,name2,0,name1,28,29);
+ f1=MEDLoader::ReadFieldCell(fileName,name3,0,name1,28,29);
CPPUNIT_ASSERT_DOUBLES_EQUAL(3*VAL1,f1->getArray()->getConstPointer()[0],1e-13);
f1->decrRef();
- f1=MEDLoader::ReadFieldCell(fileName,name2,0,name1,38,39);
+ f1=MEDLoader::ReadFieldCell(fileName,name3,0,name1,38,39);
CPPUNIT_ASSERT_DOUBLES_EQUAL(3*VAL2,f1->getArray()->getConstPointer()[0],1e-13);
f1->decrRef();
- f1=MEDLoader::ReadFieldCell(fileName,name2,0,name1,48,49);
+ f1=MEDLoader::ReadFieldCell(fileName,name3,0,name1,48,49);
CPPUNIT_ASSERT_DOUBLES_EQUAL(4*VAL2,f1->getArray()->getConstPointer()[0],1e-13);
f1->decrRef();
//
- f1=MEDLoader::ReadFieldNode(fileName,name2,0,name1,8,9);
+ f1=MEDLoader::ReadFieldNode(fileName,name3,0,name1,8,9);
CPPUNIT_ASSERT_DOUBLES_EQUAL(71.,f1->getArray()->getConstPointer()[3],1e-13);
f1->decrRef();
- f1=MEDLoader::ReadFieldNode(fileName,name2,0,name1,108,109);
+ f1=MEDLoader::ReadFieldNode(fileName,name3,0,name1,108,109);
CPPUNIT_ASSERT_DOUBLES_EQUAL(VAL1,f1->getArray()->getConstPointer()[3],1e-13);
f1->decrRef();
- f1=MEDLoader::ReadFieldNode(fileName,name2,0,name1,208,209);
+ f1=MEDLoader::ReadFieldNode(fileName,name3,0,name1,208,209);
CPPUNIT_ASSERT_DOUBLES_EQUAL(VAL2,f1->getArray()->getConstPointer()[3],1e-13);
f1->decrRef();
}
CPPUNIT_TEST( testMesh3DRW );
CPPUNIT_TEST( testFieldRW1 );
CPPUNIT_TEST( testFieldRW2 );
- // CPPUNIT_TEST( testFieldRW3 );
- // CPPUNIT_TEST( testMultiMeshRW1 );
+ CPPUNIT_TEST( testFieldRW3 );
+ CPPUNIT_TEST( testMultiMeshRW1 );
CPPUNIT_TEST( testFieldProfilRW1 );
CPPUNIT_TEST( testFieldNodeProfilRW1 );
- // CPPUNIT_TEST( testFieldGaussRW1 );
- // CPPUNIT_TEST( testFieldGaussNERW1 );
+ CPPUNIT_TEST( testFieldGaussRW1 );
+ CPPUNIT_TEST( testFieldGaussNERW1 );
CPPUNIT_TEST( testLittleStrings1 );
- // CPPUNIT_TEST( testMesh3DSurfShuffleRW );
- // CPPUNIT_TEST( testFieldShuffleRW1 );
- // CPPUNIT_TEST( testMultiFieldShuffleRW1 );
- // CPPUNIT_TEST( testWriteUMeshesRW1 );
- // CPPUNIT_TEST( testMixCellAndNodesFieldRW1 );
+ CPPUNIT_TEST( testMesh3DSurfShuffleRW );
+ CPPUNIT_TEST( testFieldShuffleRW1 );
+ CPPUNIT_TEST( testMultiFieldShuffleRW1 );
+ CPPUNIT_TEST( testWriteUMeshesRW1 );
+ CPPUNIT_TEST( testMixCellAndNodesFieldRW1 );
CPPUNIT_TEST_SUITE_END();
public:
void testMesh1DRW();