mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
correction in the macros to be compatible with OpenFOAM
This commit is contained in:
@ -37,7 +37,7 @@ bool pFlow::Insertion<ShapeType>::readInsertionDict
|
||||
|
||||
for(auto& name:regionDicNames)
|
||||
{
|
||||
Report(2)<<"reading insertion region "<< greenText(name)<<endReport;
|
||||
REPORT(2)<<"reading insertion region "<< greenText(name)<<endREPORT;
|
||||
regions_.push_backSafe(dict.subDict(name), shapes_);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ bool pFlow::Insertion<ShapeType>::writeInsertionDict
|
||||
|
||||
if( !this->isActive() ) return true;
|
||||
|
||||
forAll(i,regions_)
|
||||
ForAll(i,regions_)
|
||||
{
|
||||
auto& rgnDict = dict.subDictOrCreate(regions_[i].name());
|
||||
|
||||
@ -92,7 +92,7 @@ bool pFlow::Insertion<ShapeType>::insertParticles
|
||||
if(!isActive()) return true;
|
||||
|
||||
|
||||
forAll(i,regions_)
|
||||
ForAll(i,regions_)
|
||||
{
|
||||
bool insertionOccured = false;
|
||||
auto& rgn = regions_[i];
|
||||
@ -106,9 +106,9 @@ bool pFlow::Insertion<ShapeType>::insertParticles
|
||||
|
||||
if(insertionOccured)
|
||||
{
|
||||
Report(0)<<"\nParticle insertion from "<< greenText(rgn.name())<<endReport;
|
||||
Report(1)<< cyanText(pos.size()) << " new particles is being inserted at Time: "<<
|
||||
cyanText(currentTime) <<" s."<<endReport;
|
||||
REPORT(0)<<"\nParticle insertion from "<< greenText(rgn.name())<<endREPORT;
|
||||
REPORT(1)<< cyanText(pos.size()) << " new particles is being inserted at Time: "<<
|
||||
cyanText(currentTime) <<" s."<<endREPORT;
|
||||
|
||||
if(!particles_.insertParticles(pos, shapes, rgn.setFields()))
|
||||
{
|
||||
@ -117,8 +117,8 @@ bool pFlow::Insertion<ShapeType>::insertParticles
|
||||
" to particles. \n";
|
||||
return false;
|
||||
}
|
||||
Report(1)<<"Total number of particles inserted from this region is "<<
|
||||
cyanText(rgn.totalInserted())<<'\n'<<endReport;
|
||||
REPORT(1)<<"Total number of particles inserted from this region is "<<
|
||||
cyanText(rgn.totalInserted())<<'\n'<<endREPORT;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -130,8 +130,8 @@ bool pFlow::Insertion<ShapeType>::insertParticles
|
||||
{
|
||||
if(insertionOccured)
|
||||
{
|
||||
Warning<< "\n fewer number of particles are inserted from region "<< rgn.name() <<
|
||||
" than expected. You may stop the simulation to change settings."<<endWarning;
|
||||
yWARNING<< "\n fewer number of particles are inserted from region "<< rgn.name() <<
|
||||
" than expected. You may stop the simulation to change settings."<<endyWARNING;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
@ -28,7 +28,7 @@ bool pFlow::InsertionRegion<ShapeType>::checkForContact
|
||||
)
|
||||
{
|
||||
|
||||
forAll(i, pos)
|
||||
ForAll(i, pos)
|
||||
{
|
||||
if( length(pos[i]-p) < 0.5*(diams[i]+d) ) return true;
|
||||
}
|
||||
|
@ -33,11 +33,11 @@ bool pFlow::insertion::readInsertionDict
|
||||
active_ = dict.getVal<Logical>("active");
|
||||
|
||||
if(active_)
|
||||
Report(1)<< "Particle insertion mechanism is "<<
|
||||
yellowText("active")<<" in the simulation."<<endReport;
|
||||
REPORT(1)<< "Particle insertion mechanism is "<<
|
||||
yellowText("active")<<" in the simulation."<<endREPORT;
|
||||
else
|
||||
Report(1)<< "Particle insertion mechanism is "<<
|
||||
yellowText("not active")<<" in the simulation."<<endReport;
|
||||
REPORT(1)<< "Particle insertion mechanism is "<<
|
||||
yellowText("not active")<<" in the simulation."<<endREPORT;
|
||||
|
||||
|
||||
return true;
|
||||
|
@ -37,7 +37,7 @@ pFlow::shapeMixture::shapeMixture
|
||||
pFlow::word pFlow::shapeMixture::getNextShapeName()
|
||||
{
|
||||
|
||||
forAll(i, names_)
|
||||
ForAll(i, names_)
|
||||
{
|
||||
if(current_[i]< number_[i])
|
||||
{
|
||||
@ -116,7 +116,7 @@ bool pFlow::shapeMixture::read(const dictionary& dict)
|
||||
}
|
||||
|
||||
current_.clear();
|
||||
forAll(i, numberInserted_)
|
||||
ForAll(i, numberInserted_)
|
||||
{
|
||||
current_.push_back(numberInserted_[i]%number_[i]);
|
||||
}
|
||||
@ -130,7 +130,7 @@ bool pFlow::shapeMixture::write
|
||||
) const
|
||||
{
|
||||
|
||||
forAll(i, names_)
|
||||
ForAll(i, names_)
|
||||
{
|
||||
if(!dict.add(names_[i],number_[i]))
|
||||
{
|
||||
|
@ -84,13 +84,13 @@ bool pFlow::sphereParticles::beforeIteration()
|
||||
|
||||
intPredictTimer_.start();
|
||||
|
||||
//Info<<"before dyn predict"<<endInfo;
|
||||
//INFO<<"before dyn predict"<<endINFO;
|
||||
dynPointStruct_.predict(this->dt(), accelertion_);
|
||||
//Info<<"after dyn predict"<<endInfo;
|
||||
//INFO<<"after dyn predict"<<endINFO;
|
||||
|
||||
//Info<<"before revel predict"<<endInfo;
|
||||
//INFO<<"before revel predict"<<endINFO;
|
||||
rVelIntegration_().predict(this->dt(),rVelocity_, rAcceleration_);
|
||||
//Info<<"after rvel predict"<<endInfo;
|
||||
//INFO<<"after rvel predict"<<endINFO;
|
||||
|
||||
intPredictTimer_.end();
|
||||
|
||||
@ -102,7 +102,7 @@ bool pFlow::sphereParticles::iterate()
|
||||
{
|
||||
|
||||
accelerationTimer_.start();
|
||||
//Info<<"before accelerationTimer_ "<<endInfo;
|
||||
//INFO<<"before accelerationTimer_ "<<endINFO;
|
||||
pFlow::sphereParticlesKernels::acceleration(
|
||||
control().g(),
|
||||
mass().deviceVectorAll(),
|
||||
@ -116,11 +116,11 @@ bool pFlow::sphereParticles::iterate()
|
||||
accelerationTimer_.end();
|
||||
|
||||
intCorrectTimer_.start();
|
||||
//Info<<"before correct dyn "<<endInfo;
|
||||
//INFO<<"before correct dyn "<<endINFO;
|
||||
dynPointStruct_.correct(this->dt(), accelertion_);
|
||||
//Info<<"after correct dyn "<<endInfo;
|
||||
//INFO<<"after correct dyn "<<endINFO;
|
||||
rVelIntegration_().correct(this->dt(), rVelocity_, rAcceleration_);
|
||||
//Info<<"after correct rvel "<<endInfo;
|
||||
//INFO<<"after correct rvel "<<endINFO;
|
||||
intCorrectTimer_.end();
|
||||
|
||||
return true;
|
||||
@ -158,7 +158,7 @@ bool pFlow::sphereParticles::insertSphereParticles(
|
||||
real d, m, I;
|
||||
int8 pId;
|
||||
|
||||
forAll(i, names )
|
||||
ForAll(i, names )
|
||||
{
|
||||
if (diameterMassInertiaPropId(names[i], d, m, I, pId))
|
||||
{
|
||||
@ -280,8 +280,8 @@ pFlow::sphereParticles::sphereParticles(
|
||||
|
||||
{
|
||||
|
||||
Report(1)<<"Creating integration method "<<greenText(this->integrationMethod())
|
||||
<< " for rotational velocity."<<endReport;
|
||||
REPORT(1)<<"Creating integration method "<<greenText(this->integrationMethod())
|
||||
<< " for rotational velocity."<<endREPORT;
|
||||
|
||||
rVelIntegration_ =
|
||||
integration::create(
|
||||
@ -315,7 +315,7 @@ pFlow::sphereParticles::sphereParticles(
|
||||
rvel.push_back( hrVel[index(i)]);
|
||||
}
|
||||
|
||||
Report(2)<< "Initializing the required vectors for rotational velocity integratoin\n "<<endReport;
|
||||
REPORT(2)<< "Initializing the required vectors for rotational velocity integratoin\n "<<endREPORT;
|
||||
rVelIntegration_->setInitialVals(indexHD, rvel);
|
||||
|
||||
}
|
||||
@ -400,9 +400,9 @@ bool pFlow::sphereParticles::insertParticles
|
||||
|
||||
auto activeR = this->activeRange();
|
||||
|
||||
Report(1)<< "Active range is "<<yellowText("["<<activeR.first<<", "<<activeR.second<<")")<<
|
||||
REPORT(1)<< "Active range is "<<yellowText("["<<activeR.first<<", "<<activeR.second<<")")<<
|
||||
" and number of active points is "<< cyanText(this->numActive())<<
|
||||
" and pointStructure capacity is "<<cyanText(this->capacity())<<endReport;
|
||||
" and pointStructure capacity is "<<cyanText(this->capacity())<<endREPORT;
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -56,8 +56,8 @@ pFlow::dynamicPointStructure::dynamicPointStructure
|
||||
|
||||
this->subscribe(pStruct());
|
||||
|
||||
Report(1)<< "Creating integration method "<<
|
||||
greenText(integrationMethod_)<<" for dynamicPointStructure."<<endReport;
|
||||
REPORT(1)<< "Creating integration method "<<
|
||||
greenText(integrationMethod_)<<" for dynamicPointStructure."<<endREPORT;
|
||||
|
||||
integrationPos_ = integration::create(
|
||||
"pStructPosition",
|
||||
@ -110,10 +110,10 @@ pFlow::dynamicPointStructure::dynamicPointStructure
|
||||
//output<< "pos "<< pos<<endl;
|
||||
//output<< "vel "<< vel<<endl;
|
||||
|
||||
Report(2)<< "Initializing the required vectors for position integratoin "<<endReport;
|
||||
REPORT(2)<< "Initializing the required vectors for position integratoin "<<endREPORT;
|
||||
integrationPos_->setInitialVals(indexHD, pos);
|
||||
|
||||
Report(2)<< "Initializing the required vectors for velocity integratoin\n "<<endReport;
|
||||
REPORT(2)<< "Initializing the required vectors for velocity integratoin\n "<<endREPORT;
|
||||
integrationVel_->setInitialVals(indexHD, vel);
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
nextId_ = 0;
|
||||
id.modifyOnHost();
|
||||
|
||||
forAll(i,id)
|
||||
ForAll(i,id)
|
||||
{
|
||||
if(id.isActive(i))
|
||||
{
|
||||
|
Reference in New Issue
Block a user