From 940318c23947a53f9037b1349ae5f253ff6d497c Mon Sep 17 00:00:00 2001 From: hamidrezanorouzi Date: Sun, 12 Feb 2023 23:39:21 +0330 Subject: [PATCH] correction for fluid force transfer to DEMsystem --- DEMSystems/sphereDEMSystem/sphereDEMSystem.cpp | 5 +++-- src/Property/property.hpp | 2 ++ src/phasicFlow/containers/Vector/Vector.cpp | 1 - src/phasicFlow/containers/span/span.hpp | 18 ++++++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/DEMSystems/sphereDEMSystem/sphereDEMSystem.cpp b/DEMSystems/sphereDEMSystem/sphereDEMSystem.cpp index c230a9ce..04ca59fc 100644 --- a/DEMSystems/sphereDEMSystem/sphereDEMSystem.cpp +++ b/DEMSystems/sphereDEMSystem/sphereDEMSystem.cpp @@ -159,13 +159,14 @@ pFlow::span pFlow::sphereDEMSystem::parPosition() pFlow::span pFlow::sphereDEMSystem::parFluidForce() { - auto& hVec = particles_->fluidTorqueHostAll(); + auto& hVec = particles_->fluidForceHostAll(); + return span(hVec.data(), hVec.size()); } pFlow::span pFlow::sphereDEMSystem::parFluidTorque() { - auto& hVec = particles_->fluidForceHostAll(); + auto& hVec = particles_->fluidTorqueHostAll(); return span(hVec.data(), hVec.size()); } diff --git a/src/Property/property.hpp b/src/Property/property.hpp index f694b231..4dbd184e 100644 --- a/src/Property/property.hpp +++ b/src/Property/property.hpp @@ -24,6 +24,8 @@ Licence: #include "Vectors.hpp" #include "hashMap.hpp" +#include "fileSystem.hpp" +#include "iFstream.hpp" namespace pFlow { diff --git a/src/phasicFlow/containers/Vector/Vector.cpp b/src/phasicFlow/containers/Vector/Vector.cpp index f644fc25..f979f5f3 100644 --- a/src/phasicFlow/containers/Vector/Vector.cpp +++ b/src/phasicFlow/containers/Vector/Vector.cpp @@ -84,7 +84,6 @@ bool pFlow::Vector::readVector return true; } -#include "streams.hpp" template bool pFlow::Vector::writeVector diff --git a/src/phasicFlow/containers/span/span.hpp b/src/phasicFlow/containers/span/span.hpp index ec10297a..63c89190 100644 --- a/src/phasicFlow/containers/span/span.hpp +++ b/src/phasicFlow/containers/span/span.hpp @@ -22,6 +22,7 @@ Licence: #define __span_hpp__ #include "types.hpp" +#include "iOstream.hpp" namespace pFlow { @@ -156,6 +157,23 @@ public: }; +template +inline +iOstream& operator<<(iOstream& os, const span& s) +{ + os << token::BEGIN_LIST; + for(size_t i=0; i