mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
Some debugging (initialization of arrays etc.).
This commit is contained in:
@ -97,6 +97,8 @@ cfdemCloud::cfdemCloud
|
||||
radii_(NULL),
|
||||
voidfractions_(NULL),
|
||||
cellIDs_(NULL),
|
||||
particleDensities_(NULL),
|
||||
particleTypes_(NULL),
|
||||
particleWeights_(NULL),
|
||||
particleVolumes_(NULL),
|
||||
particleV_(NULL),
|
||||
@ -743,8 +745,10 @@ bool cfdemCloud::reAllocArrays()
|
||||
dataExchangeM().allocateArray(particleWeights_,0.,voidFractionM().maxCellsPerParticle());
|
||||
dataExchangeM().allocateArray(particleVolumes_,0.,voidFractionM().maxCellsPerParticle());
|
||||
dataExchangeM().allocateArray(particleV_,0.,1);
|
||||
Info << "\nnow allocating particle densities array.\n" << endl;
|
||||
if(getParticleDensities_) dataExchangeM().allocateArray(particleDensities_,0.,1);
|
||||
if(getParticleTypes_) dataExchangeM().allocateArray(particleTypes_,0.,1);
|
||||
Info << "\nnow allocating particle types array.\n" << endl;
|
||||
if(getParticleTypes_) dataExchangeM().allocateArray(particleTypes_,0,1);
|
||||
arraysReallocated_ = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -335,8 +335,10 @@ public:
|
||||
virtual inline int maxType() {return -1;}
|
||||
virtual inline bool multipleTypesDMax() {return false;}
|
||||
virtual inline bool multipleTypesDMin() {return false;}
|
||||
inline bool getParticleDensities() const;
|
||||
virtual inline double ** particleDensity() const;
|
||||
virtual inline double particleDensity(label index) const;
|
||||
inline bool getParticleTypes() const;
|
||||
virtual inline int ** particleTypes() const;
|
||||
virtual inline label particleType(label index) const;
|
||||
|
||||
|
||||
@ -216,6 +216,11 @@ inline double cfdemCloud::d32(bool recalc)
|
||||
return d32_;
|
||||
}
|
||||
|
||||
inline bool cfdemCloud::getParticleDensities() const
|
||||
{
|
||||
return getParticleDensities_;
|
||||
}
|
||||
|
||||
inline double ** cfdemCloud::particleDensity() const
|
||||
{
|
||||
if(!getParticleDensities_) return NULL;
|
||||
@ -234,6 +239,11 @@ inline double cfdemCloud::particleDensity(label index) const
|
||||
}
|
||||
}
|
||||
|
||||
inline bool cfdemCloud::getParticleTypes() const
|
||||
{
|
||||
return getParticleTypes_;
|
||||
}
|
||||
|
||||
inline int ** cfdemCloud::particleTypes() const
|
||||
{
|
||||
if(!getParticleTypes_) return NULL;
|
||||
|
||||
@ -187,6 +187,11 @@ void ZehnerSchluenderThermCond::calcPartKsField() const
|
||||
{
|
||||
if (typeKs_.size() <= 1) return;
|
||||
|
||||
if (!particleCloud_.getParticleTypes())
|
||||
{
|
||||
FatalError << "ZehnerSchluenderThermCond needs data for more than one type, but types are not communicated." << abort(FatalError);
|
||||
}
|
||||
|
||||
allocateMyArrays();
|
||||
label cellI=0;
|
||||
label partType = 0;
|
||||
|
||||
Reference in New Issue
Block a user