Compare commits
16 Commits
8466e02d81
...
774afd5f37
Author | SHA1 | Date |
---|---|---|
|
774afd5f37 | |
|
191801b344 | |
|
545de300ae | |
|
9b3c4f83b9 | |
|
b315d12357 | |
|
7e7184f1c5 | |
|
9f489d07cc | |
|
3f1fa4ae90 | |
|
f0f185983c | |
|
cb6d567dab | |
|
3aff0f1fc6 | |
|
59fbaa91ab | |
|
f84484881c | |
|
1540321a31 | |
|
f4f5f29e3c | |
|
d909301f32 |
|
@ -74,7 +74,7 @@ pFlow::initialize_pFlowProcessors();
|
|||
|
||||
do
|
||||
{
|
||||
|
||||
//Ping;
|
||||
if(! sphInsertion.insertParticles(
|
||||
Control.time().currentIter(),
|
||||
Control.time().currentTime(),
|
||||
|
@ -90,21 +90,25 @@ pFlow::initialize_pFlowProcessors();
|
|||
|
||||
// set force to zero, predict, particle deletion and etc.
|
||||
sphParticles.beforeIteration();
|
||||
|
||||
//Ping;
|
||||
sphInteraction.beforeIteration();
|
||||
|
||||
sphInteraction.iterate();
|
||||
|
||||
surfGeometry.iterate();
|
||||
|
||||
//Ping;
|
||||
sphParticles.iterate();
|
||||
|
||||
//Ping;
|
||||
sphInteraction.afterIteration();
|
||||
|
||||
//Ping;
|
||||
surfGeometry.afterIteration();
|
||||
|
||||
//Ping;
|
||||
sphParticles.afterIteration();
|
||||
|
||||
//Ping;
|
||||
|
||||
}while(Control++);
|
||||
|
||||
|
|
|
@ -35,10 +35,14 @@ pFlow::globalDamping::globalDamping(const systemControl& control)
|
|||
performDamping_ = !equal(dampingFactor_, static_cast<real>(1.0));
|
||||
|
||||
if( performDamping_ )
|
||||
{
|
||||
REPORT(2)<<"Global damping "<<Yellow_Text("is active")<<
|
||||
" and damping factor is "<<dampingFactor_<<END_REPORT;
|
||||
}
|
||||
else
|
||||
{
|
||||
REPORT(2)<<"Global damping "<<Yellow_Text("is not active")<<"."<<END_REPORT;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ Licence:
|
|||
|
||||
#include "pFlowMacros.hpp"
|
||||
#include "error.hpp"
|
||||
#include "iOstream.hpp"
|
||||
|
||||
// just for preventing the use of std namespace and adding some minor functionalities
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ in <b>settings/particlesDict</b> file
|
|||
positionParticles
|
||||
{
|
||||
method ordered; // other options: random or empty
|
||||
|
||||
orderedInfo
|
||||
{
|
||||
diameter 0.005; // minimum space between centers of particles
|
||||
|
@ -100,6 +99,7 @@ setFields
|
|||
end 30000; // end index of points
|
||||
stride 3; // stride for selector
|
||||
}
|
||||
|
||||
fieldValue // fields that the selector is applied to
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -55,15 +55,20 @@ surfaces
|
|||
belt
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
|
||||
file belt.stl; // file name in stl folder
|
||||
|
||||
material wallMat; // material name of this wall
|
||||
|
||||
motion conveyorBelt1; // motion component name
|
||||
}
|
||||
|
||||
box
|
||||
{
|
||||
type stlWall; // type of the wall
|
||||
|
||||
file box.stl; // file name in stl folder
|
||||
|
||||
material wallMat; // material name of this wall
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ pFlow::empty::empty(
|
|||
positionParticles(control, dict),
|
||||
position_
|
||||
(
|
||||
"empty",maxNumberOfParticles(), 0, RESERVE()
|
||||
"empty",1, 0, RESERVE()
|
||||
)
|
||||
{
|
||||
}
|
|
@ -146,7 +146,7 @@ pFlow::positionOrdered::positionOrdered
|
|||
position_
|
||||
(
|
||||
"positionOrdered",
|
||||
max(maxNumberOfParticles(), numPoints_),
|
||||
numPoints_,
|
||||
numPoints_,
|
||||
RESERVE()
|
||||
)
|
||||
|
|
|
@ -32,45 +32,10 @@ pFlow::realx3Vector pFlow::positionParticles::sortByMortonCode(
|
|||
uint64 index;
|
||||
};
|
||||
|
||||
/*realx3 minP = min(position);
|
||||
realx3 maxP = max(position);
|
||||
real cellsize = maxDiameter();
|
||||
cells<uint64> allCells( box(minP, maxP), cellsize);
|
||||
|
||||
Vector<indexMorton> indMor(position.size(),RESERVE());
|
||||
|
||||
indMor.clear();
|
||||
|
||||
uint64 ind=0;
|
||||
for(const auto& p:position)
|
||||
{
|
||||
auto cellInd = allCells.pointIndex(p);
|
||||
indMor.push_back(
|
||||
{ xyzToMortonCode64(cellInd.x(), cellInd.y(), cellInd.z()),
|
||||
ind++});
|
||||
}
|
||||
|
||||
INFORMATION<<"Performing morton sorting."<<END_INFO;
|
||||
std::sort(
|
||||
indMor.begin(),
|
||||
indMor.end(),
|
||||
[]( const indexMorton &lhs, const indexMorton &rhs){
|
||||
return lhs.morton < rhs.morton; } );
|
||||
|
||||
realx3Vector sortedPos(position.capacity(), RESERVE());
|
||||
sortedPos.clear();
|
||||
|
||||
|
||||
for(auto& ind:indMor)
|
||||
{
|
||||
sortedPos.push_back( position[ind.index] );
|
||||
}*/
|
||||
|
||||
WARNING<<"Morton sorting is inactive!"<<END_WARNING;
|
||||
return position;
|
||||
}
|
||||
|
||||
|
||||
pFlow::positionParticles::positionParticles
|
||||
(
|
||||
systemControl& control,
|
||||
|
@ -78,12 +43,8 @@ pFlow::positionParticles::positionParticles
|
|||
)
|
||||
:
|
||||
regionType_(dict.getValOrSet<word>("regionType", "domain")),
|
||||
maxNumberOfParticles_(dict.getValOrSet(
|
||||
"maxNumberOfParticles",
|
||||
static_cast<uint32>(10000))),
|
||||
mortonSorting_(dict.getValOrSet("mortonSorting", Logical("Yes")))
|
||||
{
|
||||
|
||||
if( regionType_ != "domain" )
|
||||
{
|
||||
pRegion_ = peakableRegion::create(
|
||||
|
@ -92,7 +53,7 @@ pFlow::positionParticles::positionParticles
|
|||
}
|
||||
else
|
||||
{
|
||||
fileDictionary domainDict
|
||||
fileDictionary domainDictionary
|
||||
(
|
||||
objectFile
|
||||
{
|
||||
|
@ -103,12 +64,10 @@ pFlow::positionParticles::positionParticles
|
|||
},
|
||||
&control.settings()
|
||||
);
|
||||
pRegion_ = peakableRegion::create(regionType_,domainDict.subDict("globalBox"));
|
||||
pRegion_ = peakableRegion::create("box", domainDictionary.subDict("globalBox"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
pFlow::realx3Vector pFlow::positionParticles::getFinalPosition()
|
||||
{
|
||||
if(mortonSorting_)
|
||||
|
@ -130,10 +89,8 @@ pFlow::uniquePtr<pFlow::positionParticles>
|
|||
const dictionary & dict
|
||||
)
|
||||
{
|
||||
|
||||
word method = dict.getVal<word>("method");
|
||||
|
||||
|
||||
if( dictionaryvCtorSelector_.search(method) )
|
||||
{
|
||||
return dictionaryvCtorSelector_[method] (control, dict);
|
||||
|
|
|
@ -40,12 +40,8 @@ private:
|
|||
|
||||
word regionType_;
|
||||
|
||||
uint32 maxNumberOfParticles_ = 10000;
|
||||
|
||||
Logical mortonSorting_;
|
||||
|
||||
|
||||
|
||||
realx3Vector sortByMortonCode(const realx3Vector& position)const;
|
||||
|
||||
protected:
|
||||
|
@ -83,12 +79,6 @@ public:
|
|||
return mortonSorting_();
|
||||
}
|
||||
|
||||
inline
|
||||
auto maxNumberOfParticles()const
|
||||
{
|
||||
return maxNumberOfParticles_;
|
||||
}
|
||||
|
||||
virtual uint32 numPoints()const = 0;
|
||||
|
||||
virtual uint32 size()const = 0;
|
||||
|
|
|
@ -122,14 +122,14 @@ pFlow::positionRandom::positionRandom
|
|||
position_
|
||||
(
|
||||
"position",
|
||||
maxNumberOfParticles(),
|
||||
1,
|
||||
0,
|
||||
RESERVE()
|
||||
),
|
||||
diameters_
|
||||
(
|
||||
"diameters",
|
||||
maxNumberOfParticles(),
|
||||
1,
|
||||
0,
|
||||
RESERVE()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue