From 493d69a6f5730f25e8e2f478313868481d7bb24c Mon Sep 17 00:00:00 2001 From: Kutscher <kutscher@irmb.tu-bs.de> Date: Fri, 14 Oct 2022 15:02:10 +0200 Subject: [PATCH] fixe conflicts after merge of branch 'LIGGGHTS_coupling' into develop --- apps/cpu/FallingSphere/FallingSphere.cpp | 2 +- apps/cpu/LiggghtsApp/LiggghtsApp.cpp | 2 +- apps/cpu/Nozzle/nozzle.cpp | 2 +- src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.cpp | 6 ++++-- src/cpu/LiggghtsCoupling/LiggghtsCouplingCoProcessor.h | 6 +++--- src/cpu/VirtualFluidsCore/CMakeLists.txt | 4 +--- src/cpu/VirtualFluidsCore/Utilities/MemoryUtil.h | 1 - 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/apps/cpu/FallingSphere/FallingSphere.cpp b/apps/cpu/FallingSphere/FallingSphere.cpp index 88b5373c9..54ab56cfa 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 6eb27d6dc..36c0d880a 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 ea3616be7..c8026ec13 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 e6588e766..db29726c9 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 dcaa6e16c..4788e892a 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 5abe76be9..f9f97ed58 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 3466d9730..4c9f30a90 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 -- GitLab