mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
develop branch update for changes in MPI branch for data transfer stage
mortong indexing is added (messaging is not complete)
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
#include "boundarySphereInteraction.hpp"
|
||||
/*------------------------------- phasicFlow ---------------------------------
|
||||
O C enter of
|
||||
O O E ngineering and
|
||||
@ -18,6 +19,20 @@ Licence:
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
template <typename cFM, typename gMM>
|
||||
void pFlow::boundarySphereInteraction<cFM, gMM>::allocatePPPairs()
|
||||
{
|
||||
ppPairs_.reset(nullptr);
|
||||
ppPairs_ = makeUnique<ContactListType>(1);
|
||||
}
|
||||
|
||||
template <typename cFM, typename gMM>
|
||||
void pFlow::boundarySphereInteraction<cFM, gMM>::allocatePWPairs()
|
||||
{
|
||||
pwPairs_.reset(nullptr);
|
||||
pwPairs_ = makeUnique<ContactListType>(1);
|
||||
}
|
||||
|
||||
|
||||
template <typename cFM, typename gMM>
|
||||
pFlow::boundarySphereInteraction<cFM, gMM>::boundarySphereInteraction(
|
||||
@ -28,8 +43,6 @@ pFlow::boundarySphereInteraction<cFM, gMM>::boundarySphereInteraction(
|
||||
geometryMotion_(geomMotion),
|
||||
sphParticles_(sphPrtcls)
|
||||
{
|
||||
ppPairs_ = makeUnique<ContactListType>(1);
|
||||
pwPairs_ = makeUnique<ContactListType>(1);
|
||||
}
|
||||
|
||||
template <typename cFM, typename gMM>
|
||||
|
@ -22,7 +22,7 @@ Licence:
|
||||
|
||||
#include "virtualConstructor.hpp"
|
||||
#include "generalBoundary.hpp"
|
||||
#include "unsortedContactList.hpp"
|
||||
#include "sortedContactList.hpp"
|
||||
#include "sphereParticles.hpp"
|
||||
|
||||
namespace pFlow
|
||||
@ -51,7 +51,7 @@ public:
|
||||
using IndexType = uint32;
|
||||
|
||||
using ContactListType =
|
||||
unsortedContactList<ModelStorage, DefaultExecutionSpace, IdType>;
|
||||
sortedContactList<ModelStorage, DefaultExecutionSpace, IdType>;
|
||||
|
||||
private:
|
||||
|
||||
@ -60,9 +60,15 @@ private:
|
||||
/// const reference to sphere particles
|
||||
const sphereParticles& sphParticles_;
|
||||
|
||||
uniquePtr<ContactListType> ppPairs_;
|
||||
uniquePtr<ContactListType> ppPairs_ = nullptr;
|
||||
|
||||
uniquePtr<ContactListType> pwPairs_;
|
||||
uniquePtr<ContactListType> pwPairs_ = nullptr;
|
||||
|
||||
protected:
|
||||
|
||||
void allocatePPPairs();
|
||||
|
||||
void allocatePWPairs();
|
||||
|
||||
public:
|
||||
|
||||
@ -124,15 +130,30 @@ public:
|
||||
return pwPairs_();
|
||||
}
|
||||
|
||||
bool ppPairsAllocated()const
|
||||
{
|
||||
if( ppPairs_)return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool pwPairsAllocated()const
|
||||
{
|
||||
if( pwPairs_)return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual
|
||||
bool sphereSphereInteraction(
|
||||
real dt,
|
||||
const ContactForceModel& cfModel)
|
||||
const ContactForceModel& cfModel,
|
||||
uint32 step)
|
||||
{
|
||||
// for default boundary, no thing to be done
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool hearChanges
|
||||
(
|
||||
real t,
|
||||
@ -149,11 +170,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void fill(const std::any& val)override
|
||||
{
|
||||
notImplementedFunction;
|
||||
}
|
||||
|
||||
static
|
||||
uniquePtr<BoundarySphereInteractionType> create(
|
||||
const boundaryBase& boundary,
|
||||
|
@ -30,7 +30,10 @@ pFlow::periodicBoundarySphereInteraction<cFM, gMM>::periodicBoundarySphereIntera
|
||||
{
|
||||
if(boundary.thisBoundaryIndex()%2==1)
|
||||
{
|
||||
masterInteraction_ = true;
|
||||
masterInteraction_ = true;
|
||||
this->allocatePPPairs();
|
||||
this->allocatePWPairs();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -42,10 +45,11 @@ template <typename cFM, typename gMM>
|
||||
bool pFlow::periodicBoundarySphereInteraction<cFM, gMM>::sphereSphereInteraction
|
||||
(
|
||||
real dt,
|
||||
const ContactForceModel &cfModel
|
||||
const ContactForceModel &cfModel,
|
||||
uint32 step
|
||||
)
|
||||
{
|
||||
if(!masterInteraction_) return true;
|
||||
if(!masterInteraction_) return false;
|
||||
|
||||
pFlow::periodicBoundarySIKernels::sphereSphereInteraction(
|
||||
dt,
|
||||
@ -61,5 +65,5 @@ bool pFlow::periodicBoundarySphereInteraction<cFM, gMM>::sphereSphereInteraction
|
||||
this->sphParticles().contactForce().deviceViewAll(),
|
||||
this->sphParticles().contactTorque().deviceViewAll());
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
@ -83,7 +83,8 @@ public:
|
||||
|
||||
bool sphereSphereInteraction(
|
||||
real dt,
|
||||
const ContactForceModel& cfModel)override;
|
||||
const ContactForceModel& cfModel,
|
||||
uint32 step)override;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user