diff --git a/src/lagrangian/cfdemParticle/Make/files b/src/lagrangian/cfdemParticle/Make/files index c322716f..1ff832db 100644 --- a/src/lagrangian/cfdemParticle/Make/files +++ b/src/lagrangian/cfdemParticle/Make/files @@ -17,6 +17,7 @@ smoothingModels = subModels/smoothingModel probeModels = subModels/probeModel $(cfdemCloud)/cfdemCloud.C +$(cfdemCloud)/cfdemCloudIO.C derived/cfdemCloudIB/cfdemCloudIB.C derived/cfdemCloudMS/cfdemCloudMS.C diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C index d0e5148c..48628d67 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C @@ -45,8 +45,11 @@ Description #include "smoothingModel.H" #include "liggghtsCommandModel.H" +namespace Foam +{ + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::cfdemCloud::cfdemCloud +cfdemCloud::cfdemCloud ( const fvMesh& mesh ) @@ -279,14 +282,14 @@ Foam::cfdemCloud::cfdemCloud } // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // -Foam::cfdemCloud::~cfdemCloud() +cfdemCloud::~cfdemCloud() { clockM().evalPar(); clockM().normHist(); destroyArrays(); } // * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * // -void Foam::cfdemCloud::getDEMdata() +void cfdemCloud::getDEMdata() { dataExchangeM().getData("radius","scalar-atom",radii_); dataExchangeM().getData("x","vector-atom",positions_); @@ -296,7 +299,7 @@ void Foam::cfdemCloud::getDEMdata() dataExchangeM().getData("dragAcc","vector-atom",fAcc_); // array is used twice - might be necessary to clean it first } -void Foam::cfdemCloud::giveDEMdata() +void cfdemCloud::giveDEMdata() { if(forceM(0).coupleForce()) { @@ -316,7 +319,7 @@ void Foam::cfdemCloud::giveDEMdata() // * * * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * * * * // -void Foam::cfdemCloud::setNumberOfParticles(int nP) +void cfdemCloud::setNumberOfParticles(int nP) { if(nP != numberOfParticles()) { @@ -325,12 +328,12 @@ void Foam::cfdemCloud::setNumberOfParticles(int nP) } } -void Foam::cfdemCloud::findCells() +void cfdemCloud::findCells() { locateM().findCell(NULL,positions_,cellIDs_,numberOfParticles()); } -void Foam::cfdemCloud::setForces() +void cfdemCloud::setForces() { resetArray(fluidVel_,numberOfParticles(),3); resetArray(impForces_,numberOfParticles(),3); @@ -340,7 +343,7 @@ void Foam::cfdemCloud::setForces() for (int i=0;i >* Foam::cfdemCloud::getVprobe() +std::vector< std::vector >* cfdemCloud::getVprobe() { return probeModel_->getVprobe(); } -std::vector< std::vector >* Foam::cfdemCloud::getSprobe() +std::vector< std::vector >* cfdemCloud::getSprobe() { return probeModel_->getSprobe(); } @@ -458,7 +461,7 @@ std::vector< std::vector >* Foam::cfdemCloud::getSprobe() // * * * write cfdemCloud internal data * * * // -bool Foam::cfdemCloud::evolve +bool cfdemCloud::evolve ( volScalarField& alpha, volVectorField& Us, @@ -597,7 +600,7 @@ bool Foam::cfdemCloud::evolve return doCouple; } -void Foam::cfdemCloud::destroyArrays() +void cfdemCloud::destroyArrays() { dataExchangeM().destroy(positions_,3); dataExchangeM().destroy(velocities_,3); @@ -615,7 +618,7 @@ void Foam::cfdemCloud::destroyArrays() dataExchangeM().destroy(particleV_,1); } -void Foam::cfdemCloud::allocArrays() +void cfdemCloud::allocArrays() { dataExchangeM().allocateArray(positions_,0.,3); dataExchangeM().allocateArray(velocities_,0.,3); @@ -633,7 +636,7 @@ void Foam::cfdemCloud::allocArrays() dataExchangeM().allocateArray(particleV_,0.,1); } -void Foam::cfdemCloud::allocArrays(int nP) +void cfdemCloud::allocArrays(int nP) { dataExchangeM().allocateArray(positions_,0.,3,nP); dataExchangeM().allocateArray(velocities_,0.,3,nP); @@ -649,7 +652,7 @@ void Foam::cfdemCloud::allocArrays(int nP) dataExchangeM().allocateArray(particleVolumes_,0.,voidFractionM().maxCellsPerParticle(),nP); } -bool Foam::cfdemCloud::reAllocArrays() +bool cfdemCloud::reAllocArrays() { if(numberOfParticlesChanged_ && !arraysReallocated_) { @@ -663,7 +666,7 @@ bool Foam::cfdemCloud::reAllocArrays() return false; } -bool Foam::cfdemCloud::reAllocArrays(int nP, bool forceRealloc) +bool cfdemCloud::reAllocArrays(int nP, bool forceRealloc) { if( (numberOfParticlesChanged_ && !arraysReallocated_) || forceRealloc) { @@ -746,8 +749,9 @@ void cfdemCloud::resetArray(double**& array,int length,int width,double resetVal } } } -// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * // -#include "cfdemCloudIO.C" +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam // ************************************************************************* // diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H index 918d0387..29558e29 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H @@ -177,7 +177,7 @@ inline double ** cfdemCloud::particleWeights() const return particleWeights_; } -inline label Foam::cfdemCloud::body(int index) +inline label cfdemCloud::body(int index) { return index; } diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudIO.C b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudIO.C index 7410cae9..51744a79 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudIO.C +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudIO.C @@ -32,6 +32,9 @@ Description #include "cfdemCloud.H" +namespace Foam +{ + // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // @@ -45,7 +48,7 @@ Description // * * * * * * * * * * * * * * * IO * * * * * * * * * * * * * // -void Foam::cfdemCloud::writeScalarFieldToTerminal(double**& array) +void cfdemCloud::writeScalarFieldToTerminal(double**& array) { // init double array for (int i=0; i