TURTLE
Loading...
Searching...
No Matches
Public Types | Public Member Functions
abstract_particle_set Class Referenceabstract

Brings together particle information with interpolation functionality. More...

#include <abstract_particle_set.hpp>

Inheritance diagram for abstract_particle_set:
Inheritance graph
[legend]

Public Types

using partsize_t = long long int
 
using particle_rnumber = double
 

Public Member Functions

virtual ~abstract_particle_set () noexcept(false)
 
virtual particle_rnumbergetParticleState () const =0
 Get pointer to particle state.
 
virtual partsize_tgetParticleIndices () const =0
 Get pointer to particle indices.
 
virtual partsize_tgetParticleLabels () const =0
 Get pointer to particle labels.
 
virtual int setParticleLabels (partsize_t *)=0
 Copy particle labels from given pointer.
 
virtual int setParticleState (particle_rnumber *)=0
 Copy particle state from given pointer.
 
virtual int getParticleState (particle_rnumber *)=0
 Copy particle state to given pointer.
 
virtual std::unique_ptr< particle_rnumber[]> extractFromParticleState (const int firstComponent, const int lastComponent) const =0
 
virtual partsize_t getLocalNumberOfParticles () const =0
 
virtual partsize_t getTotalNumberOfParticles () const =0
 
virtual partsize_tgetParticlesPerPartition () const =0
 
virtual int getStateSize () const =0
 
virtual std::vector< hsize_t > getParticleFileLayout ()=0
 
virtual particle_rnumber getSpatialLowLimitZ () const =0
 
virtual particle_rnumber getSpatialUpLimitZ () const =0
 
virtual int init (abstract_particles_input< partsize_t, particle_rnumber > &particles_input)=0
 
virtual int operator= (abstract_particle_set *src)=0
 
virtual p2p_distr_mpi< partsize_t, particle_rnumber > * getP2PComputer ()=0
 
template<class func_type >
int LOOP (func_type expression)
 
template<class func_type >
int LOOP_state (func_type expression)
 
int copy_state_tofrom (particle_rnumber *dst, const particle_rnumber *src)
 
int copy_state_tofrom (std::unique_ptr< particle_rnumber[]> &dst, const std::unique_ptr< particle_rnumber[]> &src)
 
virtual int redistribute (std::vector< std::unique_ptr< particle_rnumber[]> > &additional_data)=0
 
virtual int sample (const field< float, FFTW, ONE > &field_to_sample, particle_rnumber *result)=0
 
virtual int sample (const field< float, FFTW, THREE > &field_to_sample, particle_rnumber *result)=0
 
virtual int sample (const field< float, FFTW, THREExTHREE > &field_to_sample, particle_rnumber *result)=0
 
virtual int sample (const field< double, FFTW, ONE > &field_to_sample, particle_rnumber *result)=0
 
virtual int sample (const field< double, FFTW, THREE > &field_to_sample, particle_rnumber *result)=0
 
virtual int sample (const field< double, FFTW, THREExTHREE > &field_to_sample, particle_rnumber *result)=0
 
template<int state_size, class p2p_kernel_class >
int applyP2PKernel (p2p_kernel_class &p2p_kernel, std::vector< std::unique_ptr< particle_rnumber[]> > &additional_data)
 
int writeParticleLabels (const std::string file_name, const std::string species_name, const std::string field_name, const int iteration)
 
template<int state_size>
int writeParticleStates (const std::string file_name, const std::string species_name, const std::string field_name, const int iteration)
 
template<typename field_rnumber , field_backend be, field_components fc>
int writeSample (field< field_rnumber, be, fc > *field_to_sample, particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > *particle_sample_writer, const std::string species_name, const std::string field_name, const int iteration)
 
template<typename field_rnumber , field_backend be, field_components fc>
int writeSample (field< field_rnumber, be, fc > *field_to_sample, const std::string file_name, const std::string species_name, const std::string field_name, const int iteration)
 
int writeStateChunk (const int i0, const int contiguous_state_chunk, particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > *particle_sample_writer, const std::string species_name, const std::string field_name, const int iteration)
 
int writeStateTriplet (const int i0, particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > *particle_sample_writer, const std::string species_name, const std::string field_name, const int iteration)
 
int writeStateComponent (const int i0, particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > *particle_sample_writer, const std::string species_name, const std::string field_name, const int iteration)
 

Detailed Description

Brings together particle information with interpolation functionality.

This is an abstract class that defines the functionality required by the particle solver code. We define methods for:

Member Typedef Documentation

◆ particle_rnumber

◆ partsize_t

using abstract_particle_set::partsize_t = long long int

Constructor & Destructor Documentation

◆ ~abstract_particle_set()

virtual abstract_particle_set::~abstract_particle_set ( )
inlinevirtual

Member Function Documentation

◆ applyP2PKernel()

template<int state_size, class p2p_kernel_class >
int abstract_particle_set::applyP2PKernel ( p2p_kernel_class & p2p_kernel,
std::vector< std::unique_ptr< particle_rnumber[]> > & additional_data )
inline

◆ copy_state_tofrom() [1/2]

int abstract_particle_set::copy_state_tofrom ( particle_rnumber * dst,
const particle_rnumber * src )
inline

◆ copy_state_tofrom() [2/2]

int abstract_particle_set::copy_state_tofrom ( std::unique_ptr< particle_rnumber[]> & dst,
const std::unique_ptr< particle_rnumber[]> & src )
inline

◆ extractFromParticleState()

virtual std::unique_ptr< particle_rnumber[]> abstract_particle_set::extractFromParticleState ( const int firstComponent,
const int lastComponent ) const
pure virtual

◆ getLocalNumberOfParticles()

virtual partsize_t abstract_particle_set::getLocalNumberOfParticles ( ) const
pure virtual

◆ getP2PComputer()

virtual p2p_distr_mpi< partsize_t, particle_rnumber > * abstract_particle_set::getP2PComputer ( )
pure virtual

◆ getParticleFileLayout()

virtual std::vector< hsize_t > abstract_particle_set::getParticleFileLayout ( )
pure virtual

◆ getParticleIndices()

virtual partsize_t * abstract_particle_set::getParticleIndices ( ) const
pure virtual

Get pointer to particle indices.

Implemented in particle_set< state_size, neighbours, smoothness >.

◆ getParticleLabels()

virtual partsize_t * abstract_particle_set::getParticleLabels ( ) const
pure virtual

Get pointer to particle labels.

Implemented in particle_set< state_size, neighbours, smoothness >.

◆ getParticlesPerPartition()

virtual partsize_t * abstract_particle_set::getParticlesPerPartition ( ) const
pure virtual

◆ getParticleState() [1/2]

virtual particle_rnumber * abstract_particle_set::getParticleState ( ) const
pure virtual

Get pointer to particle state.

Implemented in particle_set< state_size, neighbours, smoothness >.

◆ getParticleState() [2/2]

virtual int abstract_particle_set::getParticleState ( particle_rnumber * )
pure virtual

Copy particle state to given pointer.

Implemented in particle_set< state_size, neighbours, smoothness >.

◆ getSpatialLowLimitZ()

virtual particle_rnumber abstract_particle_set::getSpatialLowLimitZ ( ) const
pure virtual

◆ getSpatialUpLimitZ()

virtual particle_rnumber abstract_particle_set::getSpatialUpLimitZ ( ) const
pure virtual

◆ getStateSize()

virtual int abstract_particle_set::getStateSize ( ) const
pure virtual

◆ getTotalNumberOfParticles()

virtual partsize_t abstract_particle_set::getTotalNumberOfParticles ( ) const
pure virtual

◆ init()

virtual int abstract_particle_set::init ( abstract_particles_input< partsize_t, particle_rnumber > & particles_input)
pure virtual

◆ LOOP()

template<class func_type >
int abstract_particle_set::LOOP ( func_type expression)
inline

◆ LOOP_state()

template<class func_type >
int abstract_particle_set::LOOP_state ( func_type expression)
inline

◆ operator=()

virtual int abstract_particle_set::operator= ( abstract_particle_set * src)
pure virtual

◆ redistribute()

virtual int abstract_particle_set::redistribute ( std::vector< std::unique_ptr< particle_rnumber[]> > & additional_data)
pure virtual

Reorganize particles within MPI domain.

Based on current particle locations, redistribute the full state data among the MPI processes. Optional: also redistribute a list of arrays of the same shape.

Implemented in particle_set< state_size, neighbours, smoothness >.

◆ sample() [1/6]

virtual int abstract_particle_set::sample ( const field< double, FFTW, ONE > & field_to_sample,
particle_rnumber * result )
pure virtual

◆ sample() [2/6]

virtual int abstract_particle_set::sample ( const field< double, FFTW, THREE > & field_to_sample,
particle_rnumber * result )
pure virtual

◆ sample() [3/6]

virtual int abstract_particle_set::sample ( const field< double, FFTW, THREExTHREE > & field_to_sample,
particle_rnumber * result )
pure virtual

◆ sample() [4/6]

virtual int abstract_particle_set::sample ( const field< float, FFTW, ONE > & field_to_sample,
particle_rnumber * result )
pure virtual

◆ sample() [5/6]

virtual int abstract_particle_set::sample ( const field< float, FFTW, THREE > & field_to_sample,
particle_rnumber * result )
pure virtual

◆ sample() [6/6]

virtual int abstract_particle_set::sample ( const field< float, FFTW, THREExTHREE > & field_to_sample,
particle_rnumber * result )
pure virtual

◆ setParticleLabels()

virtual int abstract_particle_set::setParticleLabels ( partsize_t * )
pure virtual

Copy particle labels from given pointer.

Implemented in particle_set< state_size, neighbours, smoothness >.

◆ setParticleState()

virtual int abstract_particle_set::setParticleState ( particle_rnumber * )
pure virtual

Copy particle state from given pointer.

Implemented in particle_set< state_size, neighbours, smoothness >.

◆ writeParticleLabels()

int abstract_particle_set::writeParticleLabels ( const std::string file_name,
const std::string species_name,
const std::string field_name,
const int iteration )
inline

◆ writeParticleStates()

template<int state_size>
int abstract_particle_set::writeParticleStates ( const std::string file_name,
const std::string species_name,
const std::string field_name,
const int iteration )
inline

◆ writeSample() [1/2]

template<typename field_rnumber , field_backend be, field_components fc>
int abstract_particle_set::writeSample ( field< field_rnumber, be, fc > * field_to_sample,
const std::string file_name,
const std::string species_name,
const std::string field_name,
const int iteration )
inline

◆ writeSample() [2/2]

template<typename field_rnumber , field_backend be, field_components fc>
int abstract_particle_set::writeSample ( field< field_rnumber, be, fc > * field_to_sample,
particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > * particle_sample_writer,
const std::string species_name,
const std::string field_name,
const int iteration )
inline

◆ writeStateChunk()

int abstract_particle_set::writeStateChunk ( const int i0,
const int contiguous_state_chunk,
particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > * particle_sample_writer,
const std::string species_name,
const std::string field_name,
const int iteration )
inline

◆ writeStateComponent()

int abstract_particle_set::writeStateComponent ( const int i0,
particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > * particle_sample_writer,
const std::string species_name,
const std::string field_name,
const int iteration )
inline

◆ writeStateTriplet()

int abstract_particle_set::writeStateTriplet ( const int i0,
particles_output_sampling_hdf5< partsize_t, particle_rnumber, particle_rnumber, 3 > * particle_sample_writer,
const std::string species_name,
const std::string field_name,
const int iteration )
inline

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