if (MyGlobals::_Is0verbose)
std::cout << "treating fields" << std::endl;
castAllFields(initialCollection,"cellFieldDouble");
+ if (_i_non_empty_mesh<0)
+ {
+ for (int i=0; i<_mesh.size(); i++)
+ {
+ if (_mesh[i])
+ {
+ _i_non_empty_mesh=i; //first existing one local
+ break;
+ }
+ }
+ }
+
}
/*!
delete _driver;
if (_topology!=0 && _owns_topology)
delete _topology;
-#ifdef HAVE_MPI2
+#ifdef HAVE_MPI2
delete _joint_finder;
#endif
}
return _i_non_empty_mesh < 0 ? -1 : _mesh[_i_non_empty_mesh]->getMeshDimension();
}
+int MEDPARTITIONER::MeshCollection::getNbOfLocalMeshes() const
+{
+ int nb=0;
+ for (int i=0; i<_mesh.size(); i++)
+ {
+ if (_mesh[i]) nb++;
+ }
+ return nb;
+}
+
+int MEDPARTITIONER::MeshCollection::getNbOfLocalCells() const
+{
+ int nb=0;
+ for (int i=0; i<_mesh.size(); i++)
+ {
+ if (_mesh[i]) nb=nb+_mesh[i]->getNumberOfCells();
+ }
+ return nb;
+}
+
+int MEDPARTITIONER::MeshCollection::getNbOfLocalFaces() const
+{
+ int nb=0;
+ for (int i=0; i<_face_mesh.size(); i++)
+ {
+ if (_face_mesh[i]) nb=nb+_face_mesh[i]->getNumberOfCells();
+ }
+ return nb;
+}
+
std::vector<ParaMEDMEM::MEDCouplingUMesh*>& MEDPARTITIONER::MeshCollection::getMesh()
{
return _mesh;
MEDPARTITIONER_ConnectZone.cxx \
MEDPARTITIONER_SkyLineArray.cxx
-libmedpartitioner_la_CPPFLAGS = $(MPI_INCLUDES) $(MED3_INCLUDES) $(HDF5_INCLUDES) \
- $(LIBXML_INCLUDES) -I$(srcdir)/../INTERP_KERNEL/Bases -I$(srcdir)/../MEDCoupling \
- -I$(srcdir)/../MEDLoader -I$(srcdir)/../INTERP_KERNEL
+libmedpartitioner_la_CPPFLAGS = \
+ $(MPI_INCLUDES) \
+ $(MED3_INCLUDES) \
+ $(HDF5_INCLUDES) \
+ $(LIBXML_INCLUDES) \
+ -I$(srcdir)/../INTERP_KERNEL/Bases \
+ -I$(srcdir)/../MEDCoupling \
+ -I$(srcdir)/../MEDLoader \
+ -I$(srcdir)/../INTERP_KERNEL
libmedpartitioner_la_LDFLAGS =
libmedpartitioner_la_LDFLAGS += $(SCOTCH_LIBS)
endif
-libmedpartitioner_la_LDFLAGS += $(MED3_LIBS_C_ONLY) $(HDF5_LIBS) $(STDLIB) $(LIBXML_LIBS) $(MPI_LIBS) \
- ../INTERP_KERNEL/libinterpkernel.la ../MEDCoupling/libmedcoupling.la ../MEDLoader/libmedloader.la
+libmedpartitioner_la_LDFLAGS += \
+ $(MED3_LIBS_C_ONLY) \
+ $(HDF5_LIBS) \
+ $(STDLIB) \
+ $(LIBXML_LIBS) \
+ $(MPI_LIBS) \
+ ../INTERP_KERNEL/libinterpkernel.la \
+ ../MEDCoupling/libmedcoupling.la \
+ ../MEDLoader/libmedloader.la
# Executables targets
if MPI_IS_OK
+
bin_PROGRAMS = medpartitioner_para
dist_medpartitioner_para_SOURCES = medpartitioner_para.cxx
- medpartitioner_para_CPPFLAGS = -I$(srcdir)/../INTERP_KERNEL/Bases -I$(srcdir)/../MEDCoupling \
- -I$(srcdir)/../MEDLoader -I$(srcdir)/../INTERP_KERNEL $(MPI_INCLUDES) $(PARMETIS_CPPFLAGS)
+ medpartitioner_para_CPPFLAGS = \
+ -I$(srcdir)/../INTERP_KERNEL/Bases \
+ -I$(srcdir)/../MEDCoupling \
+ -I$(srcdir)/../MEDLoader \
+ -I$(srcdir)/../INTERP_KERNEL \
+ $(MPI_INCLUDES) \
+ $(PARMETIS_CPPFLAGS)
+
medpartitioner_para_LDADD = libmedpartitioner.la
+
else !MPI_IS_OK
+
bin_PROGRAMS = medpartitioner
dist_medpartitioner_SOURCES = medpartitioner.cxx
- medpartitioner_CPPFLAGS = -I$(srcdir)/../INTERP_KERNEL/Bases -I$(srcdir)/../MEDCoupling \
- -I$(srcdir)/../MEDLoader -I$(srcdir)/../INTERP_KERNEL
+ medpartitioner_CPPFLAGS = \
+ -I$(srcdir)/../INTERP_KERNEL/Bases \
+ -I$(srcdir)/../MEDCoupling \
+ -I$(srcdir)/../MEDLoader \
+ -I$(srcdir)/../INTERP_KERNEL
if MED_ENABLE_METIS
medpartitioner_CPPFLAGS += $(METIS_CPPFLAGS)