-// 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
MEDCouplingAutoRefCountObjectPtr<SauvReader> sr=SauvReader::New(sauvFile);
MEDCouplingAutoRefCountObjectPtr<MEDFileData> d2=sr->loadInMEDFileDS();
MEDFileUMesh* m2 = static_cast<MEDFileUMesh*>( d2->getMeshes()->getMeshAtPos(0) );
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> grp1 = m2->getGroup(0, "Group1");
- CPPUNIT_ASSERT_EQUAL(1,(int)grp1->getNumberOfCells());
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> grp2 = m2->getGroup(0, "Group2");
- CPPUNIT_ASSERT_EQUAL(1,(int)grp2->getNumberOfCells());
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> group1 = m2->getGroup(0, "Group1");
+ CPPUNIT_ASSERT_EQUAL(1,(int)group1->getNumberOfCells());
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> group2 = m2->getGroup(0, "Group2");
+ CPPUNIT_ASSERT_EQUAL(1,(int)group2->getNumberOfCells());
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> grptot = m2->getGroup(0, "Grouptot");
CPPUNIT_ASSERT_EQUAL(2,(int)grptot->getNumberOfCells());
}
// add a field on 2 faces to pointeMed
MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> ff1=MEDFileFieldMultiTS::New();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> f1=MEDCouplingFieldDouble::New(ON_GAUSS_NE,ONE_TIME);
+ f1->setMesh( pointeM1D );
f1->setName("Field on 2 faces");
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> d=DataArrayDouble::New();
d->alloc(3+4,2);
{
0,2
};
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingPointSet> pointeM1D_part=pointeM1D->buildPartOfMySelf(ids,ids+2,true);
- f1->setMesh( pointeM1D_part );
da->alloc(2,1);
std::copy(ids,ids+da->getNbOfElems(),da->getPointer());
da->setName("sup2");
}
// "Field on 2 faces"
MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTS> fieldOnFaces =
- dynamic_cast<MEDFileFieldMultiTS *>(d2->getFields()->getFieldWithName(f1->getName()));
+ dynamic_cast<MEDFileFieldMultiTS *>(d2->getFields()->getFieldWithName(f1->getName().c_str()));
io1 = fieldOnFaces->getIterations();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> fof =
fieldOnFaces->getFieldOnMeshAtLevel(f1->getTypeOfField(),io1[0].first,io1[0].second,um1);
std::string resourceFile = "";
if ( getenv("top_srcdir") ) {
- // we are in 'make check' step
+ // we are in 'make test' step
resourceFile = getenv("top_srcdir");
resourceFile += "/resources/";
}