Merge branch 'develop' into MPIdev after first commit after code loss

This commit is contained in:
HRN
2024-09-21 13:39:17 +03:30
18 changed files with 719 additions and 12 deletions

View File

@ -0,0 +1,64 @@
#include "boundarySphereParticles.hpp"
#include "boundaryBase.hpp"
#include "sphereParticles.hpp"
pFlow::boundarySphereParticles::boundarySphereParticles(
const boundaryBase &boundary,
sphereParticles &prtcls
)
:
generalBoundary(boundary, prtcls.pStruct(), "", ""),
particles_(prtcls)
{
}
pFlow::sphereParticles &pFlow::boundarySphereParticles::Particles()
{
return particles_;
}
const pFlow::sphereParticles &pFlow::boundarySphereParticles::Particles() const
{
return particles_;
}
pFlow::uniquePtr<pFlow::boundarySphereParticles> pFlow::boundarySphereParticles::create(
const boundaryBase &boundary,
sphereParticles &prtcls
)
{
word bType = angleBracketsNames2(
"boundarySphereParticles",
pFlowProcessors().localRunTypeName(),
boundary.type());
word altBType{"boundarySphereParticles<none>"};
if( boundaryBasevCtorSelector_.search(bType) )
{
pOutput.space(4)<<"Creating boundary "<< Green_Text(bType)<<
" for "<<boundary.name()<<endl;
return boundaryBasevCtorSelector_[bType](boundary, prtcls);
}
else if(boundaryBasevCtorSelector_.search(altBType))
{
pOutput.space(4)<<"Creating boundary "<< Green_Text(altBType)<<
" for "<<boundary.name()<<endl;
return boundaryBasevCtorSelector_[altBType](boundary, prtcls);
}
else
{
printKeys(
fatalError << "Ctor Selector "<< bType<<
" and "<< altBType << " do not exist. \n"
<<"Avaiable ones are: \n",
boundaryBasevCtorSelector_
);
fatalExit;
}
return nullptr;
}

View File

@ -0,0 +1,80 @@
#ifndef __boundarySphereParticles_hpp__
#define __boundarySphereParticles_hpp__
#include "generalBoundary.hpp"
#include "virtualConstructor.hpp"
#include "timeInfo.hpp"
namespace pFlow
{
class sphereParticles;
class boundarySphereParticles
: public generalBoundary
{
private:
sphereParticles& particles_;
public:
/// type info
TypeInfo("boundarySphereParticles<none>");
boundarySphereParticles(
const boundaryBase &boundary,
sphereParticles& prtcls
);
create_vCtor(
boundarySphereParticles,
boundaryBase,
(
const boundaryBase &boundary,
sphereParticles& prtcls
),
(boundary, prtcls)
);
add_vCtor(
boundarySphereParticles,
boundarySphereParticles,
boundaryBase
);
sphereParticles& Particles();
const sphereParticles& Particles()const;
bool hearChanges(
real t,
real dt,
uint32 iter,
const message &msg,
const anyList &varList) override
{
return true;
}
virtual
bool acceleration(const timeInfo& ti, const realx3& g)
{
return true;
}
static
uniquePtr<boundarySphereParticles> create(
const boundaryBase &boundary,
sphereParticles& prtcls);
};
}
#endif

View File

@ -0,0 +1,19 @@
#include "boundarySphereParticlesList.hpp"
pFlow::boundarySphereParticlesList::boundarySphereParticlesList(
const boundaryList &bndrs,
sphereParticles &prtcls
)
:
ListPtr(bndrs.size()),
boundaries_(bndrs)
{
for(auto i=0; i<boundaries_.size(); i++)
{
this->set
(
i,
boundarySphereParticles::create(boundaries_[i], prtcls)
);
}
}

View File

@ -0,0 +1,36 @@
#ifndef __boundarySphereParticlesList_hpp__
#define __boundarySphereParticlesList_hpp__
#include "ListPtr.hpp"
#include "boundaryList.hpp"
#include "boundarySphereParticles.hpp"
namespace pFlow
{
class boundarySphereParticlesList
:
public ListPtr<boundarySphereParticles>
{
private:
const boundaryList& boundaries_;
public:
boundarySphereParticlesList(
const boundaryList& bndrs,
sphereParticles& prtcls
);
~boundarySphereParticlesList()=default;
};
}
#endif