Canoe
Comprehensive Atmosphere N' Ocean Engine
ParticleBase Class Reference

#include <particles.hpp>

Inheritance diagram for ParticleBase:
[legend]

Public Member Functions

 ParticleBase (MeshBlock *pmb, std::string name)
 
virtual ~ParticleBase ()
 
void LinkMesh ()
 particle-mesh More...
 
void SetVelocitiesFromHydro (Hydro const *phydro, Coordinates const *pcoord)
 
size_t RestartDataSizeInBytes (Mesh const *pm) const override
 
void DumpRestartData (char *pdst) const override
 
size_t LoadRestartData (char *psrt) override
 
bool ShouldMeshOutput (std::string variable_name) const override
 
void LoadMeshOutputData (OutputType *pod, int *num_vars) const override
 
void TimeIntegrate (Real time, Real dt) override
 
void WeightedAverage (Real ave_wghts[]) override
 
void PackData (MeshBlock const *pmb) override
 Pack data to send buffer. More...
 
bool UnpackData (MeshBlock const *pmb) override
 Unpack data from receive buffer. More...
 
- Public Member Functions inherited from NamedGroup
 NamedGroup (std::string name)
 
virtual ~NamedGroup ()
 
std::string GetName () const
 
- Public Member Functions inherited from RestartGroup
virtual ~RestartGroup ()
 
- Public Member Functions inherited from MeshOutputGroup
virtual ~MeshOutputGroup ()
 
- Public Member Functions inherited from MultiStageIntegrator
virtual ~MultiStageIntegrator ()
 
IntegratorWeight const & GetStageWeights (int stage) const
 
void SetIntegrator (std::string name)
 
int GetNumStages () const
 
- Public Member Functions inherited from NeighborExchanger< ParticleBase >
 NeighborExchanger ()
 
void Transfer (MeshBlock const *pmb, int n=-1) override
 Send and receive data. More...
 
void ClearBuffer (MeshBlock const *pmb) override
 Clear buffer. More...
 
- Public Member Functions inherited from Exchanger< T >
 Exchanger ()
 
virtual ~Exchanger ()
 
void SetBoundaryStatus (int bid, BoundaryStatus status)
 Set the boundary status. More...
 
- Public Member Functions inherited from ExchangerBase
 ExchangerBase ()
 
virtual ~ExchangerBase ()
 

Public Attributes

ParticleContainer pc
 
ParticleContainer pc1
 
AthenaArray< Real > weight
 mesh data container More...
 
AthenaArray< Real > charge
 
- Public Attributes inherited from NeighborExchanger< ParticleBase >
BufferType recv_buffer_ [MessageTraits< ParticleBase >::num_buffers]
 
BufferType send_buffer_ [MessageTraits< ParticleBase >::num_buffers]
 

Protected Attributes

AthenaArray< ParticleData * > pd_in_cell_
 
bool linked_flag_
 linked flag More...
 
- Protected Attributes inherited from MultiStageIntegrator
IntegratorWeight stage_wghts_ [MAX_NSTAGE]
 
int nstages_
 
- Protected Attributes inherited from Exchanger< T >
enum BoundaryStatus status_flag_ [MessageTraits< T >::num_buffers]
 
BufferType send_buffer_ [MessageTraits< T >::num_buffers]
 
BufferType recv_buffer_ [MessageTraits< T >::num_buffers]
 

Private Attributes

MeshBlock const * pmy_block_
 pointer to parent MeshBlock More...
 

Additional Inherited Members

- Public Types inherited from NeighborExchanger< ParticleBase >
using Base = Exchanger< ParticleBase >
 
- Public Types inherited from Exchanger< T >
using DataType = typename MessageTraits< T >::DataType
 
using BufferType = std::vector< DataType >
 

Detailed Description

Definition at line 29 of file particles.hpp.

Constructor & Destructor Documentation

◆ ParticleBase()

ParticleBase::ParticleBase ( MeshBlock *  pmb,
std::string  name 
)

Definition at line 22 of file particles.cpp.

◆ ~ParticleBase()

ParticleBase::~ParticleBase ( )
virtual

Definition at line 34 of file particles.cpp.

Member Function Documentation

◆ LinkMesh()

void ParticleBase::LinkMesh ( )

particle-mesh

Definition at line 19 of file particle_to_mesh.cpp.

◆ SetVelocitiesFromHydro()

void ParticleBase::SetVelocitiesFromHydro ( Hydro const *  phydro,
Coordinates const *  pcoord 
)

Definition at line 17 of file nbody_inbound.cpp.

◆ RestartDataSizeInBytes()

size_t ParticleBase::RestartDataSizeInBytes ( Mesh const *  pm) const
overridevirtual

Implements RestartGroup.

Definition at line 19 of file particle_restart.cpp.

◆ DumpRestartData()

void ParticleBase::DumpRestartData ( char *  pdst) const
overridevirtual
Todo:
mark out invalid particles

Implements RestartGroup.

Definition at line 41 of file particle_restart.cpp.

◆ LoadRestartData()

size_t ParticleBase::LoadRestartData ( char *  psrt)
overridevirtual

Implements RestartGroup.

Definition at line 50 of file particle_restart.cpp.

◆ ShouldMeshOutput()

bool ParticleBase::ShouldMeshOutput ( std::string  variable_name) const
overridevirtual

Implements MeshOutputGroup.

Definition at line 10 of file particle_outputs.cpp.

◆ LoadMeshOutputData()

void ParticleBase::LoadMeshOutputData ( OutputType *  pod,
int *  num_vars 
) const
overridevirtual

Implements MeshOutputGroup.

Definition at line 14 of file particle_outputs.cpp.

◆ TimeIntegrate()

void ParticleBase::TimeIntegrate ( Real  time,
Real  dt 
)
overridevirtual

Implements MultiStageIntegrator.

Definition at line 14 of file particle_integrator.cpp.

◆ WeightedAverage()

void ParticleBase::WeightedAverage ( Real  ave_wghts[])
overridevirtual

Implements MultiStageIntegrator.

Definition at line 32 of file particle_integrator.cpp.

◆ PackData()

void ParticleBase::PackData ( MeshBlock const *  pmb)
overridevirtual

Pack data to send buffer.

Reimplemented from ExchangerBase.

Definition at line 89 of file particle_exchanger.cpp.

◆ UnpackData()

bool ParticleBase::UnpackData ( MeshBlock const *  pmb)
overridevirtual

Unpack data from receive buffer.

Reimplemented from ExchangerBase.

Definition at line 20 of file particle_exchanger.cpp.

Member Data Documentation

◆ pc

ParticleContainer ParticleBase::pc

public data particle data container. pc1 is reserved for multi-stage integration

Definition at line 39 of file particles.hpp.

◆ pc1

ParticleContainer ParticleBase::pc1

Definition at line 39 of file particles.hpp.

◆ weight

AthenaArray<Real> ParticleBase::weight

mesh data container

Definition at line 42 of file particles.hpp.

◆ charge

AthenaArray<Real> ParticleBase::charge

Definition at line 42 of file particles.hpp.

◆ pd_in_cell_

AthenaArray<ParticleData *> ParticleBase::pd_in_cell_
protected

protected data linked list of particles in cell

Definition at line 75 of file particles.hpp.

◆ linked_flag_

bool ParticleBase::linked_flag_
protected

linked flag

Definition at line 78 of file particles.hpp.

◆ pmy_block_

MeshBlock const* ParticleBase::pmy_block_
private

pointer to parent MeshBlock

Definition at line 82 of file particles.hpp.


The documentation for this class was generated from the following files: