CPPUNIT_TEST_SUITE_REGISTRATION( MEDCoupling::MEDLoaderTest );
+#include "BasicMainTest.hxx"
for ( nmIt1 = nmIt2; nmIt1 != nodeMapping.end(); nmIt1 = nmIt2 )
{
// look for an "old" node mapped into several "new" nodes in different domains
- int const nbSameOld = 0;
+ int nbSameOld = 0;
while ( ++nmIt2 != nodeMapping.end() && nmIt2->first == nmIt1->first )
nbSameOld += ( nmIt2->second != nmIt1->second );
int MEDPARTITIONER::MeshCollection::getNbOfLocalMeshes() const
{
- int const nb=0;
+ int nb=0;
for (auto i : _mesh)
{
if (i) nb++;
mcIdType MEDPARTITIONER::MeshCollection::getNbOfLocalCells() const
{
- mcIdType const nb=0;
+ mcIdType nb=0;
for (auto i : _mesh)
{
if (i) nb=nb+i->getNumberOfCells();
mcIdType MEDPARTITIONER::MeshCollection::getNbOfLocalFaces() const
{
- mcIdType const nb=0;
+ mcIdType nb=0;
for (auto i : _face_mesh)
{
if (i) nb=nb+i->getNumberOfCells();
class ConnectZone;
class JointFinder;
- using DriverType = enum{MedAscii, MedXml, Undefined};
- using NodeMapping = std::multimap<std::pair<int, mcIdType>, std::pair<int, mcIdType>> ;
- using NodeList = std::vector<std::pair<int, int>>;
+ typedef enum{MedAscii, MedXml, Undefined} DriverType;
+ typedef std::multimap<std::pair<int,mcIdType>, std::pair<int,mcIdType> > NodeMapping ;
+ typedef std::vector<std::pair<int,int> > NodeList;
class MEDPARTITIONER_EXPORT MeshCollection
{
//
#include "MEDPARTITIONER_ParaDomainSelector.hxx"
+#include "MEDPARTITIONER_Graph.hxx"
#include "MCType.hxx"
#include "MEDCouplingMemArray.hxx"
#include "MEDCouplingPointSet.hxx"
SCOTCHGraph::~SCOTCHGraph()
= default;
-void SCOTCHGraph::partGraph(int ndomain, const std::string& /*options_string*/, ParaDomainSelector* /*sel*/)
+void SCOTCHGraph::partGraph(int ndomain, const std::string& options_string, ParaDomainSelector* /*sel*/)
{
if (MyGlobals::_Verbose>10)
std::cout << "proc " << MyGlobals::_Rank << " : SCOTCHGraph::partGraph" << std::endl;
input=targetName+".xml";
MEDPARTITIONER::ParaDomainSelector parallelizer(false);
- MEDPARTITIONER::MeshCollection const collection(input,parallelizer);
+ MEDPARTITIONER::MeshCollection collection(input,parallelizer);
CPPUNIT_ASSERT_EQUAL(3, collection.getMeshDimension());
std::vector<MEDCoupling::MEDCouplingUMesh*>cellMeshes=collection.getMesh();
CPPUNIT_ASSERT_EQUAL(5, (int) cellMeshes.size());
mcIdType nbcells=0;
- for (std::size_t i = 0; i < cellMeshes.size(); i++)
- nbcells+=cellMeshes[i]->getNumberOfCells();
+ for (auto & cellMeshe : cellMeshes)
+ nbcells+=cellMeshe->getNumberOfCells();
CPPUNIT_ASSERT_EQUAL(cellMesh->getNumberOfCells(), nbcells);
std::vector<MEDCoupling::MEDCouplingUMesh*>faceMeshes=collection.getFaceMesh();
CPPUNIT_ASSERT_EQUAL(5, (int) faceMeshes.size());
mcIdType nbfaces=0;
- for (std::size_t i=0; i < faceMeshes.size(); i++)
- nbfaces+=faceMeshes[i]->getNumberOfCells();
+ for (auto & faceMeshe : faceMeshes)
+ nbfaces+=faceMeshe->getNumberOfCells();
CPPUNIT_ASSERT_EQUAL(faceMesh->getNumberOfCells(), nbfaces);
//merge split meshes and test equality
if ( okFamIds.count( na2id->second ) || na2id->first[0] != 'J')
continue;
na2id2 = na2id;
- bool const groupOK = false;
+ bool groupOK = false;
while ( !groupOK && ++na2id2 != famName2id.end() )
groupOK = ( na2id2->first.find_first_not_of( na2id->first ) == std::string::npos );
CPPUNIT_TEST_SUITE_REGISTRATION( MEDPARTITIONERTest );
//generic Main program from KERNEL_SRC/src/Basics/Test
+#include "BasicMainTest.hxx"