ABLATE Source Documentation  0.12.33
ablate::particles::accessors::Data< DataType > Struct Template Reference

#include <pointData.hpp>

Public Member Functions

 Data ()=default
 
 Data (DataType *values, PetscInt numberComponents, PetscInt dataSizeIn=0, PetscInt offset=0)
 
 Data (DataType *values, const ablate::particles::Field &field)
 
template<class IndexType >
DataType * operator[] (IndexType particle) const
 Inline function to compute the memory address at this particle.
 
template<class IndexType >
DataType & operator() (IndexType particle)
 
template<class IndexType , class DimType >
DataType & operator() (IndexType particle, DimType dim)
 
template<class DestinationDataType , class IndexType >
void CopyFrom (DestinationDataType *source, IndexType p) const
 
template<class DestinationDataType , class IndexType >
void AddFrom (DestinationDataType *source, IndexType p) const
 
template<class DestinationDataType , class IndexType >
void CopyAll (DestinationDataType *destination, IndexType np) const
 

Public Attributes

DataType * values = nullptr
 the array for the solution values
 
PetscInt numberComponents = 0
 The number of the components.
 
PetscInt dataSize = 0
 The size of the component for this data.
 
PetscInt offset = 0
 The offset in the local array, 0 for aux, computed for sol.
 

Detailed Description

template<class DataType>
struct ablate::particles::accessors::Data< DataType >

Computes the memory location for particle field data

Constructor & Destructor Documentation

◆ Data() [1/3]

template<class DataType >
ablate::particles::accessors::Data< DataType >::Data ( )
default

empty default constructor

◆ Data() [2/3]

template<class DataType >
ablate::particles::accessors::Data< DataType >::Data ( DataType *  values,
PetscInt  numberComponents,
PetscInt  dataSizeIn = 0,
PetscInt  offset = 0 
)
inline

The default constructor

Parameters
values
numberComponents
dataSizeIn
offset

◆ Data() [3/3]

template<class DataType >
ablate::particles::accessors::Data< DataType >::Data ( DataType *  values,
const ablate::particles::Field field 
)
inline

Takes the input values from the particle field

Parameters
values
numberComponents
dataSizeIn
offset

Member Function Documentation

◆ AddFrom()

template<class DataType >
template<class DestinationDataType , class IndexType >
void ablate::particles::accessors::Data< DataType >::AddFrom ( DestinationDataType *  source,
IndexType  p 
) const
inline

Adds all of the dimensions of this field to specified destination

Template Parameters
IndexType
Parameters
source
npthe number of particles to copy

◆ CopyAll()

template<class DataType >
template<class DestinationDataType , class IndexType >
void ablate::particles::accessors::Data< DataType >::CopyAll ( DestinationDataType *  destination,
IndexType  np 
) const
inline

Copy the values in this pointData to destination

Template Parameters
IndexType
Parameters
destination
npthe number of particles to copy

◆ CopyFrom()

template<class DataType >
template<class DestinationDataType , class IndexType >
void ablate::particles::accessors::Data< DataType >::CopyFrom ( DestinationDataType *  source,
IndexType  p 
) const
inline

Copy all of the dimensions of this field to specified destination

Template Parameters
IndexType
Parameters
source
npthe number of particles to copy

◆ operator()() [1/2]

template<class DataType >
template<class IndexType >
DataType& ablate::particles::accessors::Data< DataType >::operator() ( IndexType  particle)
inline

Return the value at this particle

Template Parameters
IndexType
Parameters
particle
Returns

◆ operator()() [2/2]

template<class DataType >
template<class IndexType , class DimType >
DataType& ablate::particles::accessors::Data< DataType >::operator() ( IndexType  particle,
DimType  dim 
)
inline

Return the value at this particle

Template Parameters
IndexType
Parameters
particle
Returns

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