ParticleSystemData3.h
Go to the documentation of this file.
Abstract base class for any serializable class.
Definition: Serialization.h:20
double GetRadius() const
Returns the radius of the particles.
std::shared_ptr< PointNeighborSearcher3 > PointNeighborSearcher3Ptr
Shared pointer for the PointNeighborSearcher3 type.
Definition: PointNeighborSearcher3.h:79
const std::vector< std::vector< size_t > > & GetNeighborLists() const
Returns neighbor lists.
void SetNeighborSearcher(const PointNeighborSearcher3Ptr &newNeighborSearcher)
Sets neighbor searcher.
size_t AddScalarData(double initialVal=0.0)
Adds a scalar data layer and returns its index.
ConstArrayAccessor1< double > ScalarDataAt(size_t idx) const
Returns custom scalar data layer at given index (immutable).
ConstArrayAccessor1< Vector3D > GetVelocities() const
Returns the velocity array (immutable).
void BuildNeighborSearcher(double maxSearchRadius)
Builds neighbor searcher with given search radius.
size_t AddVectorData(const Vector3D &initialVal=Vector3D())
Adds a vector data layer and returns its index.
std::shared_ptr< ParticleSystemData3 > ParticleSystemData3Ptr
Shared pointer type of ParticleSystemData3.
Definition: ParticleSystemData3.h:250
const PointNeighborSearcher3Ptr & GetNeighborSearcher() const
Returns neighbor searcher.
void DeserializeParticleSystemData(const fbs::ParticleSystemData3 *fbsParticleSystemData)
size_t GetNumberOfParticles() const
Returns the number of particles.
virtual void SetMass(double newMass)
Sets the mass of the particles.
ConstArrayAccessor1< Vector3D > GetForces() const
Returns the force array (immutable).
ConstArrayAccessor1< Vector3D > VectorDataAt(size_t idx) const
Returns custom vector data layer at given index (immutable).
1-D read-only array accessor class.
Definition: ArrayAccessor1.h:185
ParticleSystemData3 & operator=(const ParticleSystemData3 &other)
Copies from other particle system data.
void Serialize(std::vector< uint8_t > *buffer) const override
Serializes this particle system data to the buffer.
virtual void SetRadius(double newRadius)
Sets the radius of the particles.
Definition: pybind11Utils.h:24
ConstArrayAccessor1< Vector3D > GetPositions() const
Returns the position array (immutable).
void AddParticle(const Vector3D &newPosition, const Vector3D &newVelocity=Vector3D(), const Vector3D &newForce=Vector3D())
Adds a particle to the data structure.
void Set(const ParticleSystemData3 &other)
Copies from other particle system data.
void Deserialize(const std::vector< uint8_t > &buffer) override
Deserializes this particle system data from the buffer.
void SerializeParticleSystemData(flatbuffers::FlatBufferBuilder *builder, flatbuffers::Offset< fbs::ParticleSystemData3 > *fbsParticleSystemData) const
void Resize(size_t newNumberOfParticles)
Resizes the number of particles of the container.
void BuildNeighborLists(double maxSearchRadius)
Builds neighbor lists with given search radius.
void AddParticles(const ConstArrayAccessor1< Vector3D > &newPositions, const ConstArrayAccessor1< Vector3D > &newVelocities=ConstArrayAccessor1< Vector3D >(), const ConstArrayAccessor1< Vector3D > &newForces=ConstArrayAccessor1< Vector3D >())
Adds particles to the data structure.