diff --git a/apps/cpu/FallingSphere/FallingSphere.cpp b/apps/cpu/FallingSphere/FallingSphere.cpp index 88b5373c9892498a848ff34791a12be09b6ea001..54ab56cfad753655e8aa77e6f7e6d50453f2b389 100644 --- a/apps/cpu/FallingSphere/FallingSphere.cpp +++ b/apps/cpu/FallingSphere/FallingSphere.cpp @@ -13,7 +13,7 @@ using namespace std; int main(int argc, char *argv[]) { - SPtr<Communicator> comm = MPICommunicator::getInstance(); + std::shared_ptr<vf::mpi::Communicator> comm = vf::mpi::MPICommunicator::getInstance(); int myid = comm->getProcessID(); diff --git a/apps/cpu/LiggghtsApp/LiggghtsApp.cpp b/apps/cpu/LiggghtsApp/LiggghtsApp.cpp index 6eb27d6dcd7b0b9c9d6d4e4b8d6c5bbcf65d3c47..36c0d880ac63e0fb2ea23266d581746c853cf6d1 100644 --- a/apps/cpu/LiggghtsApp/LiggghtsApp.cpp +++ b/apps/cpu/LiggghtsApp/LiggghtsApp.cpp @@ -19,7 +19,7 @@ using namespace std; int main(int argc, char *argv[]) { - SPtr<Communicator> comm = MPICommunicator::getInstance(); + std::shared_ptr<vf::mpi::Communicator> comm = vf::mpi::MPICommunicator::getInstance(); int myid = comm->getProcessID(); diff --git a/apps/cpu/Nozzle/nozzle.cpp b/apps/cpu/Nozzle/nozzle.cpp index ea3616be7fab654c8e1bcc5fbe82807f7efcd9ae..c8026ec139fafadc54bf6618992b765699b63177 100644 --- a/apps/cpu/Nozzle/nozzle.cpp +++ b/apps/cpu/Nozzle/nozzle.cpp @@ -13,7 +13,7 @@ using namespace std; int main(int argc, char *argv[]) { - SPtr<Communicator> comm = MPICommunicator::getInstance(); + std::shared_ptr<vf::mpi::Communicator> comm = vf::mpi::MPICommunicator::getInstance(); int myid = comm->getProcessID(); diff --git a/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.cpp b/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.cpp index e6588e766bad41db4e18c63323cbe996582e78cb..db29726c93878d82304af14f1f737655409d0d11 100644 --- a/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.cpp +++ b/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.cpp @@ -1,6 +1,6 @@ #include "LiggghtsCouplingCoProcessor.h" #include "GbSphere3D.h" -#include "MPICommunicator.h" +#include "mpi/MPICommunicator.h" #include "CoProcessor.h" #include "LiggghtsCouplingWrapper.h" #include "Grid3D.h" @@ -13,7 +13,9 @@ #include "fix_lb_coupling_onetoone.h" LiggghtsCouplingCoProcessor::LiggghtsCouplingCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, - SPtr<Communicator> comm, LiggghtsCouplingWrapper &wrapper, int demSteps, SPtr<LBMUnitConverter> units) + SPtr<vf::mpi::Communicator> comm, + LiggghtsCouplingWrapper &wrapper, int demSteps, + SPtr<LBMUnitConverter> units) : CoProcessor(grid, s), comm(comm), wrapper(wrapper), demSteps(demSteps), units(units) { diff --git a/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.h b/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.h index dcaa6e16c0a46a69d64998285119e86077500b6b..4788e892a53e14a192e99c4d01a594b674198636 100644 --- a/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.h +++ b/src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.h @@ -46,7 +46,7 @@ class CoProcessor; -class Communicator; +namespace vf::mpi {class Communicator;} class LiggghtsCouplingWrapper; class Grid3D; class Block3D; @@ -61,7 +61,7 @@ struct ParticleData { class LiggghtsCouplingCoProcessor : public CoProcessor { public: - LiggghtsCouplingCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, SPtr<Communicator> comm, + LiggghtsCouplingCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, SPtr<vf::mpi::Communicator> comm, LiggghtsCouplingWrapper &wrapper, int demSteps, SPtr<LBMUnitConverter> units); virtual ~LiggghtsCouplingCoProcessor(); @@ -88,7 +88,7 @@ protected: void addTorque(int const partId, int const coord, double const value, double *torque); private: - SPtr<Communicator> comm; + SPtr<vf::mpi::Communicator> comm; LiggghtsCouplingWrapper &wrapper; SPtr<LBMUnitConverter> units; int demSteps; diff --git a/src/cpu/VirtualFluidsCore/CMakeLists.txt b/src/cpu/VirtualFluidsCore/CMakeLists.txt index 5abe76be9ed986d773785a544eb1e29b9954944d..f9f97ed58dc67d3b6f0614d1af83953340438d87 100644 --- a/src/cpu/VirtualFluidsCore/CMakeLists.txt +++ b/src/cpu/VirtualFluidsCore/CMakeLists.txt @@ -24,13 +24,11 @@ if(BUILD_USE_OPENMP) list(APPEND VF_LIBRARIES OpenMP::OpenMP_CXX) endif() -vf_add_library(BUILDTYPE static PUBLIC_LINK basics muparser ${VF_LIBRARIES} PRIVATE_LINK lbm mpi logger) - IF(${USE_LIGGGHTS}) list(APPEND VF_LIBRARIES optimized ${LIGGGHTS_RELEASE_LIBRARY} debug ${LIGGGHTS_DEBUG_LIBRARY}) ENDIF() -vf_add_library(BUILDTYPE static PUBLIC_LINK basics muparser MPI::MPI_CXX ${VF_LIBRARIES}) +vf_add_library(BUILDTYPE static PUBLIC_LINK basics muparser ${VF_LIBRARIES} PRIVATE_LINK lbm mpi logger) vf_get_library_name(library_name) diff --git a/src/cpu/VirtualFluidsCore/Utilities/MemoryUtil.h b/src/cpu/VirtualFluidsCore/Utilities/MemoryUtil.h index 3466d97302b10791996e700afd10120df535dbd4..4c9f30a902196f8fef5187442f45b94dc64de283 100644 --- a/src/cpu/VirtualFluidsCore/Utilities/MemoryUtil.h +++ b/src/cpu/VirtualFluidsCore/Utilities/MemoryUtil.h @@ -66,7 +66,6 @@ #include <string> #include <vector> #include "Grid3D.h" -#include "Communicator.h" ////////////////////////////////////////////////////////////////////////// // MemoryUtil