mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-12 16:26:23 +00:00
correction in the macros to be compatible with OpenFOAM
This commit is contained in:
@ -73,8 +73,8 @@ int main( int argc, char* argv[] )
|
||||
|
||||
if(setOnly && positionOnly)
|
||||
{
|
||||
Err<<
|
||||
"Options --positionParticles-only and --setFields-only cannot be used simeltanuously. \n"<<endErr;
|
||||
ERR<<
|
||||
"Options --positionParticles-only and --setFields-only cannot be used simeltanuously. \n"<<endERR;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ int main( int argc, char* argv[] )
|
||||
{
|
||||
|
||||
// position particles based on the dict content
|
||||
Report(0)<< "Positioning points . . . \n"<<endReport;
|
||||
REPORT(0)<< "Positioning points . . . \n"<<endREPORT;
|
||||
auto pointPosition = positionParticles::create(cpDict.subDict("positionParticles"));
|
||||
|
||||
fileSystem pStructPath = Control.time().path()+pointStructureFile__;
|
||||
@ -124,15 +124,15 @@ int main( int argc, char* argv[] )
|
||||
|
||||
auto& pSruct = pStructObj().getObject<pointStructure>();
|
||||
|
||||
Report(1)<< "Created pStruct with "<< pSruct.size() << " points and capacity "<<
|
||||
pSruct.capacity()<<" . . ."<< endReport;
|
||||
REPORT(1)<< "Created pStruct with "<< pSruct.size() << " points and capacity "<<
|
||||
pSruct.capacity()<<" . . ."<< endREPORT;
|
||||
|
||||
Report(1)<< "Writing pStruct to " << pStructObj().path() << endReport<<endl<<endl;
|
||||
REPORT(1)<< "Writing pStruct to " << pStructObj().path() << endREPORT<<endl<<endl;
|
||||
|
||||
if( !pStructObj().write())
|
||||
{
|
||||
fatalErrorInFunction<<
|
||||
"Error in writing to file. \n ";
|
||||
"ERRor in writing to file. \n ";
|
||||
return 1;
|
||||
}
|
||||
}else
|
||||
@ -164,7 +164,7 @@ int main( int argc, char* argv[] )
|
||||
{
|
||||
if( !sfEntry.setPointFieldDefaultValueNewAll(Control.time(), pStruct, true))
|
||||
{
|
||||
Err<< "\n error occured in setting default value fields.\n"<<endErr;
|
||||
ERR<< "\n error occured in setting default value fields.\n"<<endERR;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -177,13 +177,13 @@ int main( int argc, char* argv[] )
|
||||
|
||||
for(auto name: selNames)
|
||||
{
|
||||
Report(1)<< "Applying selector " << greenText(name) <<endReport;
|
||||
REPORT(1)<< "Applying selector " << greenText(name) <<endREPORT;
|
||||
|
||||
if(
|
||||
!applySelector(Control, pStruct, selectorsDict.subDict(name))
|
||||
)
|
||||
{
|
||||
Err<<"\n error occured in setting selector. \n"<<endErr;
|
||||
ERR<<"\n error occured in setting selector. \n"<<endERR;
|
||||
return 1;
|
||||
}
|
||||
output<<endl;
|
||||
@ -191,7 +191,7 @@ int main( int argc, char* argv[] )
|
||||
}
|
||||
|
||||
Control.time().write(true);
|
||||
Report(0)<< greenText("\nFinished successfully.\n")<<endReport;
|
||||
REPORT(0)<< greenText("\nFinished successfully.\n")<<endREPORT;
|
||||
|
||||
|
||||
// this should be palced in each main
|
||||
|
@ -54,7 +54,7 @@ pFlow::realx3Vector pFlow::positionParticles::sortByMortonCode(realx3Vector& pos
|
||||
ind++});
|
||||
}
|
||||
|
||||
Info<<"Performing morton sorting."<<endInfo;
|
||||
INFORMATION<<"Performing morton sorting."<<endINFO;
|
||||
std::sort(
|
||||
indMor.begin(),
|
||||
indMor.end(),
|
||||
|
@ -74,9 +74,9 @@ bool pFlow::positionRandom::positionOnePass(int32 pass, int32 startNum)
|
||||
|
||||
ContainerType pairs(3*startNum);
|
||||
|
||||
Report(1)<< "Positioning "<<
|
||||
REPORT(1)<< "Positioning "<<
|
||||
greenText("(Pass #"<< pass+1<<")")<<
|
||||
": started with "<< startNum <<" points."<<endReport;
|
||||
": started with "<< startNum <<" points."<<endREPORT;
|
||||
|
||||
fillPoints(startNum, positionHD, flagHD);
|
||||
|
||||
@ -86,13 +86,13 @@ bool pFlow::positionRandom::positionOnePass(int32 pass, int32 startNum)
|
||||
int32 numCollisions = findCollisions(pairs, flagHD);
|
||||
|
||||
|
||||
Report(2)<< "Positioned " << cyanText(startNum - numCollisions) <<
|
||||
" without collision \n"<<endReport;
|
||||
REPORT(2)<< "Positioned " << cyanText(startNum - numCollisions) <<
|
||||
" without collision \n"<<endREPORT;
|
||||
|
||||
if(startNum-numCollisions >= numPoints_ )
|
||||
{
|
||||
|
||||
Report(1)<<"Selected "<< cyanText(numPoints_)<< " for the final field.\n"<<endReport;
|
||||
REPORT(1)<<"Selected "<< cyanText(numPoints_)<< " for the final field.\n"<<endREPORT;
|
||||
|
||||
positionHD.syncViews();
|
||||
position_.clear();
|
||||
|
Reference in New Issue
Block a user