mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
refactor up to particles.hpp
This commit is contained in:
@ -2,14 +2,14 @@
|
||||
set(SourceFiles
|
||||
dynamicPointStructure/dynamicPointStructure.cpp
|
||||
particles/particles.cpp
|
||||
particles/particleIdHandler.cpp
|
||||
SphereParticles/sphereShape/sphereShape.cpp
|
||||
SphereParticles/sphereParticles/sphereParticles.cpp
|
||||
Insertion/shapeMixture/shapeMixture.cpp
|
||||
Insertion/insertion/insertion.cpp
|
||||
Insertion/Insertion/Insertions.cpp
|
||||
Insertion/insertionRegion/insertionRegion.cpp
|
||||
Insertion/insertionRegion/timeFlowControl.cpp
|
||||
#particles/particleIdHandler.cpp
|
||||
#SphereParticles/sphereShape/sphereShape.cpp
|
||||
#SphereParticles/sphereParticles/sphereParticles.cpp
|
||||
#Insertion/shapeMixture/shapeMixture.cpp
|
||||
#Insertion/insertion/insertion.cpp
|
||||
#Insertion/Insertion/Insertions.cpp
|
||||
#Insertion/insertionRegion/insertionRegion.cpp
|
||||
#Insertion/insertionRegion/timeFlowControl.cpp
|
||||
)
|
||||
|
||||
set(link_libs Kokkos::kokkos phasicFlow Integration Property)
|
||||
|
@ -19,57 +19,40 @@ Licence:
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
#include "dynamicPointStructure.hpp"
|
||||
|
||||
#include "systemControl.hpp"
|
||||
|
||||
pFlow::dynamicPointStructure::dynamicPointStructure
|
||||
(
|
||||
Time& time,
|
||||
const word& integrationMethod
|
||||
systemControl& control
|
||||
)
|
||||
:
|
||||
time_(time),
|
||||
integrationMethod_(integrationMethod),
|
||||
pStruct_(
|
||||
time_.emplaceObject<pointStructure>(
|
||||
objectFile(
|
||||
pointStructureFile__,
|
||||
"",
|
||||
objectFile::READ_ALWAYS,
|
||||
objectFile::WRITE_ALWAYS
|
||||
)
|
||||
)
|
||||
),
|
||||
velocity_(
|
||||
time_.emplaceObject<realx3PointField_D>(
|
||||
objectFile(
|
||||
"velocity",
|
||||
"",
|
||||
objectFile::READ_ALWAYS,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
pStruct(),
|
||||
zero3
|
||||
)
|
||||
)
|
||||
|
||||
pointStructure(control),
|
||||
velocity_
|
||||
(
|
||||
objectFile(
|
||||
"velocity",
|
||||
"",
|
||||
objectFile::READ_ALWAYS,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
*this,
|
||||
zero3
|
||||
),
|
||||
integrationMethod_
|
||||
(
|
||||
control.settingsDict().getVal<word>("integrationMethod")
|
||||
)
|
||||
{
|
||||
|
||||
this->subscribe(pStruct());
|
||||
|
||||
REPORT(1)<< "Creating integration method "<<
|
||||
greenText(integrationMethod_)<<" for dynamicPointStructure."<<endREPORT;
|
||||
Green_Text(integrationMethod_)<<" for dynamicPointStructure."<<END_REPORT;
|
||||
|
||||
integrationPos_ = integration::create(
|
||||
integrationPos_ = integration::create
|
||||
(
|
||||
"pStructPosition",
|
||||
time_.integration(),
|
||||
pStruct(),
|
||||
integrationMethod_);
|
||||
|
||||
integrationVel_ = integration::create(
|
||||
"pStructVelocity",
|
||||
time_.integration(),
|
||||
pStruct(),
|
||||
integrationMethod_);
|
||||
*this,
|
||||
integrationMethod_,
|
||||
pointPosition()
|
||||
);
|
||||
|
||||
if( !integrationPos_ )
|
||||
{
|
||||
@ -77,6 +60,14 @@ pFlow::dynamicPointStructure::dynamicPointStructure
|
||||
" error in creating integration object for dynamicPointStructure (position). \n";
|
||||
fatalExit;
|
||||
}
|
||||
|
||||
integrationVel_ = integration::create
|
||||
(
|
||||
"pStructVelocity",
|
||||
*this,
|
||||
integrationMethod_,
|
||||
velocity_.field()
|
||||
);
|
||||
|
||||
if( !integrationVel_ )
|
||||
{
|
||||
@ -85,8 +76,10 @@ pFlow::dynamicPointStructure::dynamicPointStructure
|
||||
fatalExit;
|
||||
}
|
||||
|
||||
|
||||
WARNING << "Initialization of integrationPos_ and integrationVel_ should be doen!"<<END_WARNING;
|
||||
|
||||
if(!integrationPos_->needSetInitialVals()) return;
|
||||
/*if(!integrationPos_->needSetInitialVals()) return;
|
||||
|
||||
|
||||
|
||||
@ -107,14 +100,13 @@ pFlow::dynamicPointStructure::dynamicPointStructure
|
||||
vel.push_back( hVel[index(i)]);
|
||||
}
|
||||
|
||||
//output<< "pos "<< pos<<endl;
|
||||
//output<< "vel "<< vel<<endl;
|
||||
|
||||
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;
|
||||
integrationVel_->setInitialVals(indexHD, vel);
|
||||
integrationVel_->setInitialVals(indexHD, vel);*/
|
||||
|
||||
}
|
||||
|
||||
bool pFlow::dynamicPointStructure::predict
|
||||
@ -123,10 +115,10 @@ bool pFlow::dynamicPointStructure::predict
|
||||
realx3PointField_D& acceleration
|
||||
)
|
||||
{
|
||||
auto& pos = pStruct().pointPosition();
|
||||
//auto& pos = pStruct().pointPosition();
|
||||
|
||||
if(!integrationPos_().predict(dt, pos.VectorField(), velocity_.VectorField() ))return false;
|
||||
if(!integrationVel_().predict(dt, velocity_.VectorField(), acceleration.VectorField()))return false;
|
||||
//if(!integrationPos_().predict(dt, pos.VectorField(), velocity_.VectorField() ))return false;
|
||||
//if(!integrationVel_().predict(dt, velocity_.VectorField(), acceleration.VectorField()))return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -137,11 +129,11 @@ bool pFlow::dynamicPointStructure::correct
|
||||
realx3PointField_D& acceleration
|
||||
)
|
||||
{
|
||||
auto& pos = pStruct().pointPosition();
|
||||
//auto& pos = pStruct().pointPosition();
|
||||
|
||||
if(!integrationPos_().correct(dt, pos.VectorField(), velocity_.VectorField() ))return false;
|
||||
//if(!integrationPos_().correct(dt, pos.VectorField(), velocity_.VectorField() ))return false;
|
||||
|
||||
if(!integrationVel_().correct(dt, velocity_.VectorField(), acceleration.VectorField()))return false;
|
||||
//if(!integrationVel_().correct(dt, velocity_.VectorField(), acceleration.VectorField()))return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -178,7 +170,7 @@ pFlow::uniquePtr<pFlow::int32IndexContainer> pFlow::dynamicPointStructure::inser
|
||||
}*/
|
||||
|
||||
|
||||
bool pFlow::dynamicPointStructure::update(
|
||||
/*bool pFlow::dynamicPointStructure::update(
|
||||
const eventMessage& msg)
|
||||
{
|
||||
if( msg.isInsert())
|
||||
@ -215,4 +207,4 @@ bool pFlow::dynamicPointStructure::update(
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}*/
|
@ -30,98 +30,65 @@ Licence:
|
||||
namespace pFlow
|
||||
{
|
||||
|
||||
class systemControl;
|
||||
|
||||
class dynamicPointStructure
|
||||
:
|
||||
//public pointStructure
|
||||
public eventObserver
|
||||
public pointStructure
|
||||
{
|
||||
protected:
|
||||
private:
|
||||
|
||||
Time& time_;
|
||||
realx3PointField_D velocity_;
|
||||
|
||||
word integrationMethod_;
|
||||
uniquePtr<integration> integrationPos_ = nullptr;
|
||||
|
||||
pointStructure& pStruct_;
|
||||
uniquePtr<integration> integrationVel_ = nullptr;
|
||||
|
||||
realx3PointField_D& velocity_;
|
||||
|
||||
uniquePtr<integration> integrationPos_;
|
||||
|
||||
uniquePtr<integration> integrationVel_;
|
||||
/// @brief integration method for velocity and position
|
||||
word integrationMethod_;
|
||||
|
||||
public:
|
||||
|
||||
TypeInfo("dynamicPointStructure");
|
||||
|
||||
dynamicPointStructure(Time& time, const word& integrationMethod);
|
||||
|
||||
dynamicPointStructure(const dynamicPointStructure& ps) = default;
|
||||
dynamicPointStructure(systemControl& control);
|
||||
|
||||
dynamicPointStructure(const dynamicPointStructure& ps) = delete;
|
||||
|
||||
// - no move construct
|
||||
// - no move construct
|
||||
dynamicPointStructure(dynamicPointStructure&&) = delete;
|
||||
|
||||
// - copy assignment
|
||||
//
|
||||
// should be changed, may causs undefined behavior
|
||||
//////////////////////////////////////////////////////////////
|
||||
dynamicPointStructure& operator=(const dynamicPointStructure&) = default;
|
||||
///
|
||||
dynamicPointStructure& operator=(const dynamicPointStructure&) = delete;
|
||||
|
||||
// - no move assignment
|
||||
dynamicPointStructure& operator=(dynamicPointStructure&&) = delete;
|
||||
|
||||
// - destructor
|
||||
virtual ~dynamicPointStructure() = default;
|
||||
~dynamicPointStructure() override = default;
|
||||
|
||||
|
||||
inline pointStructure& pStruct()
|
||||
{
|
||||
return pStruct_;
|
||||
}
|
||||
|
||||
inline const pointStructure& pStruct() const
|
||||
{
|
||||
return pStruct_;
|
||||
}
|
||||
|
||||
inline const realx3PointField_D& velocity()const
|
||||
inline
|
||||
const realx3PointField_D& velocity()const
|
||||
{
|
||||
return velocity_;
|
||||
}
|
||||
|
||||
inline auto velocityHostAll()
|
||||
inline
|
||||
realx3PointField_D& velocity()
|
||||
{
|
||||
return velocity_;
|
||||
}
|
||||
|
||||
/*inline auto velocityHostAll()
|
||||
{
|
||||
return velocity_.hostVectorAll();
|
||||
}
|
||||
|
||||
inline auto pointPositionHostAll()
|
||||
{
|
||||
return pStruct_.pointPositionHostAll();
|
||||
}
|
||||
|
||||
auto markDeleteOutOfBox(const box& domain)
|
||||
{
|
||||
return pStruct_.markDeleteOutOfBox(domain);
|
||||
}
|
||||
}*/
|
||||
|
||||
bool predict(real dt, realx3PointField_D& acceleration);
|
||||
|
||||
bool correct(real dt, realx3PointField_D& acceleration);
|
||||
|
||||
|
||||
// - update data structure by inserting/setting new points
|
||||
// Notifies all the fields in the registered list of data structure
|
||||
// and exclude the fields that re in the exclusionList
|
||||
// retrun nullptr if it fails
|
||||
/*FUNCTION_H
|
||||
virtual uniquePtr<int32IndexContainer> insertPoints(
|
||||
const realx3Vector& pos,
|
||||
const List<eventObserver*>& exclusionList={nullptr}
|
||||
)override;*/
|
||||
|
||||
bool update(const eventMessage& msg) override;
|
||||
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -24,135 +24,107 @@ Licence:
|
||||
|
||||
pFlow::particles::particles
|
||||
(
|
||||
systemControl& control,
|
||||
const word& integrationMethod
|
||||
systemControl& control
|
||||
)
|
||||
:
|
||||
demParticles(control),
|
||||
time_(control.time()),
|
||||
integrationMethod_(integrationMethod),
|
||||
/*dynPointStruct_(
|
||||
time_.emplaceObject<dynamicPointStructure>(
|
||||
objectFile(
|
||||
pointStructureFile__,
|
||||
"",
|
||||
objectFile::READ_ALWAYS,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
control.time(),
|
||||
integrationMethod
|
||||
)
|
||||
),*/
|
||||
dynPointStruct_(
|
||||
control.time(),
|
||||
integrationMethod),
|
||||
shapeName_(
|
||||
control.time().emplaceObject<wordPointField>(
|
||||
objectFile(
|
||||
"shapeName",
|
||||
"",
|
||||
objectFile::READ_ALWAYS,
|
||||
objectFile::WRITE_ALWAYS,
|
||||
false
|
||||
),
|
||||
pStruct(),
|
||||
word("NO_NAME_SHAPE")
|
||||
)
|
||||
observer(),
|
||||
demComponent("particles", control),
|
||||
dynPointStruct_(control),
|
||||
id_
|
||||
(
|
||||
objectFile
|
||||
(
|
||||
"id",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
id_(
|
||||
control.time().emplaceObject<int32PointField_HD>(
|
||||
objectFile(
|
||||
"id",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
pStruct(),
|
||||
static_cast<int32>(-1)
|
||||
)
|
||||
dynPointStruct_,
|
||||
static_cast<uint32>(-1)
|
||||
),
|
||||
propertyId_
|
||||
(
|
||||
objectFile
|
||||
(
|
||||
"propertyId",
|
||||
"",
|
||||
objectFile::READ_NEVER,
|
||||
objectFile::WRITE_NEVER
|
||||
),
|
||||
propertyId_(
|
||||
control.time().emplaceObject<int8PointField_D>(
|
||||
objectFile(
|
||||
"propertyId",
|
||||
"",
|
||||
objectFile::READ_NEVER,
|
||||
objectFile::WRITE_NEVER
|
||||
),
|
||||
pStruct(),
|
||||
static_cast<int8>(0)
|
||||
)
|
||||
dynPointStruct_,
|
||||
static_cast<int8>(0)
|
||||
),
|
||||
diameter_
|
||||
(
|
||||
objectFile
|
||||
(
|
||||
"diameter",
|
||||
"",
|
||||
objectFile::READ_NEVER,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
diameter_(
|
||||
control.time().emplaceObject<realPointField_D>(
|
||||
objectFile(
|
||||
"diameter",
|
||||
"",
|
||||
objectFile::READ_NEVER,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
pStruct(),
|
||||
static_cast<real>(0.00000000001)
|
||||
)
|
||||
dynPointStruct_,
|
||||
0.00000000001
|
||||
),
|
||||
mass_
|
||||
(
|
||||
objectFile
|
||||
(
|
||||
"mass",
|
||||
"",
|
||||
objectFile::READ_NEVER,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
mass_(
|
||||
control.time().emplaceObject<realPointField_D>(
|
||||
objectFile(
|
||||
"mass",
|
||||
"",
|
||||
objectFile::READ_NEVER,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
pStruct(),
|
||||
static_cast<real>(0.0000000001)
|
||||
)
|
||||
dynPointStruct_,
|
||||
0.0000000001
|
||||
),
|
||||
accelertion_
|
||||
(
|
||||
objectFile
|
||||
(
|
||||
"accelertion",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
dynPointStruct_,
|
||||
zero3
|
||||
),
|
||||
contactForce_
|
||||
(
|
||||
objectFile
|
||||
(
|
||||
"contactForce",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
accelertion_(
|
||||
control.time().emplaceObject<realx3PointField_D>(
|
||||
objectFile(
|
||||
"accelertion",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
pStruct(),
|
||||
zero3
|
||||
)
|
||||
dynPointStruct_,
|
||||
zero3
|
||||
),
|
||||
contactTorque_
|
||||
(
|
||||
|
||||
objectFile
|
||||
(
|
||||
"contactTorque",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
contactForce_(
|
||||
control.time().emplaceObject<realx3PointField_D>(
|
||||
objectFile(
|
||||
"contactForce",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
pStruct(),
|
||||
zero3
|
||||
)
|
||||
),
|
||||
contactTorque_(
|
||||
control.time().emplaceObject<realx3PointField_D>(
|
||||
objectFile(
|
||||
"contactTorque",
|
||||
"",
|
||||
objectFile::READ_IF_PRESENT,
|
||||
objectFile::WRITE_ALWAYS
|
||||
),
|
||||
pStruct(),
|
||||
zero3
|
||||
)
|
||||
),
|
||||
idHandler_(id_)
|
||||
dynPointStruct_,
|
||||
zero3
|
||||
)
|
||||
{
|
||||
|
||||
this->subscribe(pStruct());
|
||||
WARNING<<"Subscribe particles"<<END_WARNING;
|
||||
//this->subscribe(pStruct());
|
||||
|
||||
}
|
||||
|
||||
bool pFlow::particles::beforeIteration()
|
||||
{
|
||||
auto domain = this->control().domain();
|
||||
/*auto domain = this->control().domain();
|
||||
|
||||
auto numMarked = dynPointStruct_.markDeleteOutOfBox(domain);
|
||||
|
||||
@ -174,12 +146,12 @@ bool pFlow::particles::beforeIteration()
|
||||
}
|
||||
|
||||
this->zeroForce();
|
||||
this->zeroTorque();
|
||||
this->zeroTorque();*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
pFlow::uniquePtr<pFlow::List<pFlow::eventObserver*>>
|
||||
/*pFlow::uniquePtr<pFlow::List<pFlow::eventObserver*>>
|
||||
pFlow::particles::getFieldObjectList()const
|
||||
{
|
||||
auto objListPtr = makeUnique<pFlow::List<pFlow::eventObserver*>>();
|
||||
@ -199,4 +171,4 @@ pFlow::particles::getFieldObjectList()const
|
||||
static_cast<eventObserver*>(&shapeName_) );
|
||||
|
||||
return objListPtr;
|
||||
}
|
||||
}*/
|
||||
|
@ -23,66 +23,75 @@ Licence:
|
||||
#define __particles_hpp__
|
||||
|
||||
#include "dynamicPointStructure.hpp"
|
||||
#include "particleIdHandler.hpp"
|
||||
#include "demParticles.hpp"
|
||||
#include "demComponent.hpp"
|
||||
|
||||
namespace pFlow
|
||||
{
|
||||
|
||||
class setFieldList;
|
||||
|
||||
class particles
|
||||
:
|
||||
public eventObserver,
|
||||
public demParticles
|
||||
public observer,
|
||||
public demComponent
|
||||
{
|
||||
protected:
|
||||
private:
|
||||
|
||||
// owner repository
|
||||
Time& time_;
|
||||
|
||||
const word integrationMethod_;
|
||||
|
||||
// dynamic point structure for particles
|
||||
/// dynamic point structure for particles center mass
|
||||
dynamicPointStructure dynPointStruct_;
|
||||
|
||||
// - name of shapes - this is managed by particles
|
||||
wordPointField& shapeName_;
|
||||
//wordPointField& shapeName_;
|
||||
|
||||
// id of particles on host
|
||||
int32PointField_HD& id_;
|
||||
int32PointField_D id_;
|
||||
|
||||
// property id on device
|
||||
int8PointField_D& propertyId_;
|
||||
int8PointField_D propertyId_;
|
||||
|
||||
// diameter / boundig sphere size of particles on device
|
||||
realPointField_D& diameter_;
|
||||
realPointField_D diameter_;
|
||||
|
||||
// mass on device
|
||||
realPointField_D& mass_;
|
||||
// mass of particles field
|
||||
realPointField_D mass_;
|
||||
|
||||
// - acceleration on device
|
||||
realx3PointField_D& accelertion_;
|
||||
realx3PointField_D accelertion_;
|
||||
|
||||
/// contact force field
|
||||
realx3PointField_D contactForce_;
|
||||
|
||||
realx3PointField_D& contactForce_;
|
||||
|
||||
|
||||
realx3PointField_D& contactTorque_;
|
||||
/// contact torque field
|
||||
realx3PointField_D contactTorque_;
|
||||
|
||||
|
||||
// - object handling particle id
|
||||
particleIdHandler idHandler_;
|
||||
|
||||
virtual uniquePtr<List<eventObserver*>> getFieldObjectList()const;
|
||||
|
||||
|
||||
void zeroForce()
|
||||
{
|
||||
contactForce_.fill(zero3);
|
||||
WARNING<<"fill contactTorque"<<END_WARNING;
|
||||
//contactForce_.fill(zero3);
|
||||
}
|
||||
|
||||
void zeroTorque()
|
||||
{
|
||||
contactTorque_.fill(zero3);
|
||||
WARNING<<"fill contactTorque"<<END_WARNING;
|
||||
//contactTorque_.fill(zero3);
|
||||
}
|
||||
protected:
|
||||
|
||||
inline auto& dynPointStruct()
|
||||
{
|
||||
return dynPointStruct_;
|
||||
}
|
||||
|
||||
inline auto& pointPosition()
|
||||
{
|
||||
return dynPointStruct_.pointPosition();
|
||||
}
|
||||
|
||||
inline
|
||||
auto& velocity()
|
||||
{
|
||||
return dynPointStruct_.velocity();
|
||||
}
|
||||
|
||||
public:
|
||||
@ -90,166 +99,132 @@ public:
|
||||
// type info
|
||||
TypeInfo("particles");
|
||||
|
||||
particles(systemControl& control, const word& integrationMethod);
|
||||
explicit particles(systemControl& control);
|
||||
|
||||
inline const auto& time()const {
|
||||
return time_;
|
||||
}
|
||||
|
||||
inline auto& time() {
|
||||
return time_;
|
||||
}
|
||||
|
||||
inline auto integrationMethod()const
|
||||
{
|
||||
return integrationMethod_;
|
||||
}
|
||||
|
||||
inline const auto& dynPointStruct()const
|
||||
{
|
||||
return dynPointStruct_;
|
||||
}
|
||||
|
||||
inline auto& dynPointStruct()
|
||||
{
|
||||
return dynPointStruct_;
|
||||
}
|
||||
|
||||
inline const auto& pStruct()const{
|
||||
return dynPointStruct_.pStruct();
|
||||
}
|
||||
|
||||
inline auto& pStruct(){
|
||||
return dynPointStruct_.pStruct();
|
||||
}
|
||||
}
|
||||
|
||||
inline auto size()const{
|
||||
return pStruct().size();
|
||||
return dynPointStruct_.size();
|
||||
}
|
||||
|
||||
inline auto capacity() const{
|
||||
return pStruct().capacity();
|
||||
}
|
||||
|
||||
inline auto activePointsMaskD()const{
|
||||
return pStruct().activePointsMaskD();
|
||||
}
|
||||
|
||||
inline auto numActive()const
|
||||
{
|
||||
return pStruct().numActive();
|
||||
return dynPointStruct_.capacity();
|
||||
}
|
||||
|
||||
inline bool allActive()const{
|
||||
return pStruct().allActive();
|
||||
}
|
||||
|
||||
inline auto activeRange()const{
|
||||
return pStruct().activeRange();
|
||||
}
|
||||
|
||||
inline auto activePointsMaskH()const{
|
||||
return pStruct().activePointsMaskH();
|
||||
}
|
||||
|
||||
inline const auto& pointPosition()const{
|
||||
return pStruct().pointPosition();
|
||||
}
|
||||
|
||||
inline const auto& position()const
|
||||
inline auto numActive()const
|
||||
{
|
||||
return pStruct().pointPosition();
|
||||
return dynPointStruct_.numActive();
|
||||
}
|
||||
|
||||
inline bool isAllActive()const
|
||||
{
|
||||
return dynPointStruct_.isAllActive();
|
||||
}
|
||||
|
||||
inline const auto& pointVelocity()const{
|
||||
return dynPointStruct().velocity();
|
||||
inline
|
||||
const auto& pointPosition()const
|
||||
{
|
||||
return dynPointStruct_.pointPosition();
|
||||
}
|
||||
|
||||
inline const auto& velocity()const{
|
||||
return dynPointStruct().velocity();
|
||||
inline
|
||||
const auto& velocity()const
|
||||
{
|
||||
return dynPointStruct_.velocity();
|
||||
}
|
||||
|
||||
inline const auto& id()const{
|
||||
return id_;
|
||||
}
|
||||
|
||||
inline auto& id(){
|
||||
return id_;
|
||||
}
|
||||
|
||||
inline const auto& diameter()const{
|
||||
inline
|
||||
const auto& diameter()const
|
||||
{
|
||||
return diameter_;
|
||||
}
|
||||
|
||||
inline auto& diameter(){
|
||||
inline
|
||||
auto& diameter()
|
||||
{
|
||||
return diameter_;
|
||||
}
|
||||
|
||||
inline const auto& mass()const{
|
||||
inline
|
||||
const auto& mass()const
|
||||
{
|
||||
return mass_;
|
||||
}
|
||||
|
||||
inline auto& mass() {
|
||||
inline auto& mass()
|
||||
{
|
||||
return mass_;
|
||||
}
|
||||
|
||||
inline const auto& accelertion()const{
|
||||
return accelertion_;
|
||||
}
|
||||
|
||||
inline auto& accelertion(){
|
||||
inline
|
||||
const auto& accelertion()const
|
||||
{
|
||||
return accelertion_;
|
||||
}
|
||||
|
||||
inline
|
||||
realx3PointField_D& contactForce()
|
||||
auto& accelertion()
|
||||
{
|
||||
return accelertion_;
|
||||
}
|
||||
|
||||
inline
|
||||
auto& contactForce()
|
||||
{
|
||||
return contactForce_;
|
||||
}
|
||||
|
||||
inline
|
||||
const realx3PointField_D& contactForce() const
|
||||
const auto& contactForce() const
|
||||
{
|
||||
return contactForce_;
|
||||
}
|
||||
|
||||
inline
|
||||
realx3PointField_D& contactTorque()
|
||||
auto& contactTorque()
|
||||
{
|
||||
return contactTorque_;
|
||||
}
|
||||
|
||||
inline
|
||||
const realx3PointField_D& contactTorque() const
|
||||
const auto& contactTorque() const
|
||||
{
|
||||
return contactTorque_;
|
||||
}
|
||||
|
||||
inline const auto& propertyId()const{
|
||||
inline
|
||||
const auto& propertyId()const
|
||||
{
|
||||
return propertyId_;
|
||||
}
|
||||
|
||||
inline auto& propertyId(){
|
||||
inline
|
||||
auto& propertyId()
|
||||
{
|
||||
return propertyId_;
|
||||
}
|
||||
|
||||
inline const auto& shapeName()const{
|
||||
/*inline const auto& shapeName()const{
|
||||
return shapeName_;
|
||||
}
|
||||
}*/
|
||||
|
||||
inline auto& shapName(){
|
||||
/*inline auto& shapName(){
|
||||
return shapeName_;
|
||||
}
|
||||
}*/
|
||||
|
||||
bool beforeIteration() override;
|
||||
|
||||
virtual
|
||||
/*virtual
|
||||
bool insertParticles
|
||||
(
|
||||
const realx3Vector& position,
|
||||
const wordVector& shapes,
|
||||
const setFieldList& setField
|
||||
) = 0;
|
||||
) = 0;*/
|
||||
|
||||
|
||||
|
||||
@ -259,8 +234,8 @@ public:
|
||||
virtual
|
||||
const realx3PointField_D& rAcceleration() const = 0;
|
||||
|
||||
virtual
|
||||
const realVector_D& boundingSphere()const = 0;
|
||||
/*virtual
|
||||
const realVector_D& boundingSphere()const = 0;*/
|
||||
|
||||
virtual
|
||||
word shapeTypeName()const = 0;
|
||||
|
Reference in New Issue
Block a user