Doxygen API Reference#

See Original Doxygen output if preferred.

Sphinx API Reference#

class AtomicDataReader#

Base class that defines functions and variables needed to read in atomic data. You can return a 2D vector which contains all the data in get_data, or a 1D vector which contains only the information you are interested in, e.g. temperatures, rates via the function calls get_temps and get get_rates respectively.

Derived classes must override read() in order to populate m_data and set the *_idx member variables.

Subclassed by NESO::CSVAtomicDataReader

Public Functions

inline AtomicDataReader(std::string filepath)#
AtomicDataReader() = delete#
inline std::vector<std::vector<double>> get_data()#
inline std::vector<double> get_rates()#
inline std::vector<double> get_temps()#

Protected Functions

virtual void read() = 0#

Protected Attributes

int m_T_idx#
int m_rate_idx#
const std::string m_filepath#
std::vector<std::vector<double>> m_data#
template<typename T>
class BaryEvaluateBase : private NESO::GeomToExpansionBuilder#

Evaluate 2D expansions at particle locations using Bary Interpolation. Reimplements the algorithm in Nektar++.

Public Functions

BaryEvaluateBase(const BaryEvaluateBase &st) = delete#

Disable (implicit) copies.

BaryEvaluateBase &operator=(BaryEvaluateBase const &a) = delete#

Disable (implicit) copies.

inline BaryEvaluateBase(std::shared_ptr<T> field, ParticleMeshInterfaceSharedPtr mesh, CellIDTranslationSharedPtr cell_id_translation)#

Create instance to evaluate a passed field.

Parameters:
template<typename U, typename V>
inline void evaluate(ParticleGroupSharedPtr particle_group, Sym<U> sym, const int component, const V &global_physvals)#

Evaluate a Nektar++ field at particle locations using the provided quadrature point values and Bary Interpolation.

Parameters:
  • particle_group – ParticleGroup containing the particles.

  • sym – Symbol that corresponds to a ParticleDat in the ParticleGroup.

  • component – Component in the ParticleDat in which to place the output.

  • global_physvals – Field values at quadrature points to evaluate.

Public Members

int stride_base#

Stride between z and weight values in each dimension for all expansion types.

int stride_expansion_type#

Stride between expansion types for z and weight values.

BufferDeviceHost<double> dh_z#

The GetZ values for different expansion types.

BufferDeviceHost<double> dh_bw#

The GetBaryWeights for different expansion types.

Protected Functions

inline void assemble_data(const int offset, StdExpansion2DSharedPtr expansion)#

Helper function to assemble the data required on the device for an expansion type.

Protected Attributes

std::shared_ptr<T> field#
ParticleMeshInterfaceSharedPtr mesh#
CellIDTranslationSharedPtr cell_id_translation#
SYCLTargetSharedPtr sycl_target#
BufferDeviceHost<int> dh_phys_offsets#
BufferDeviceHost<int> dh_phys_num0#
BufferDeviceHost<int> dh_phys_num1#
BufferDeviceHost<NekDouble> dh_global_physvals#
template<typename SPECIALISATION>
struct BaseCoordinateMapping2D#

Abstract base class for converting betwen local coordinates and local collapsed coordinates in 2D.

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed(const T xi0, const T xi1, T *eta0, T *eta1)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

template<typename T>
inline void loc_collapsed_to_loc_coord(const T eta0, const T eta1, T *xi0, T *xi1)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

template<typename T>
inline void loc_coord_to_loc_collapsed(const T &xi, T &eta)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi[in] Local coordinate to map to collapsed coordinate. Must be a subscriptable type for indices 0,1.

  • eta[inout] Local collapsed coordinate. Must be a subscriptable type for indices 0,1.

template<typename T>
inline void loc_collapsed_to_loc_coord(const T &eta, T &xi)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta[in] Local collapsed coordinate to map to local coordinate. Must be a subscriptable type for indices 0,1.

  • xi[inout] Local coordinate. Must be a subscriptable type for indices 0,1.

template<typename SPECIALISATION>
struct BaseCoordinateMapping3D#

Abstract base class for converting betwen local coordinates and local collapsed coordinates in 3D.

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed(const T xi0, const T xi1, const T xi2, T *eta0, T *eta1, T *eta2)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[in] Local coordinate to map to collapsed coordinate. Component z.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

  • eta2[inout] Local collapsed coordinate. Component z.

template<typename T>
inline void loc_collapsed_to_loc_coord(const T eta0, const T eta1, const T eta2, T *xi0, T *xi1, T *xi2)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • eta2[in] Local collapsed coordinate. Component z.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[inout] Local coordinate to map to collapsed coordinate. Component z.

template<typename T>
inline void loc_coord_to_loc_collapsed(const T &xi, T &eta)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi[in] Local coordinate to map to collapsed coordinate. Must be a subscriptable type for indices 0,1,2.

  • eta[inout] Local collapsed coordinate. Must be a subscriptable type for indices 0,1,2.

template<typename T>
inline void loc_collapsed_to_loc_coord(const T &eta, T &xi)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta[in] Local collapsed coordinate to map to local coordinate. Must be a subscriptable type for indices 0,1,2.

  • xi[inout] Local coordinate. Must be a subscriptable type for indices 0,1,2.

template<typename SPECIALISATION>
struct Basis1D#

Abstract base class for 1D basis evaluation functions which are based on Jacobi polynomials.

Public Static Functions

static inline void evaluate(const int nummodes, const REAL z, const int k_stride_n, const REAL *k_coeffs_pnm10, const REAL *k_coeffs_pnm11, const REAL *k_coeffs_pnm2, REAL *output)#

Method called in sycl kernel to evaluate a set of basis functions at a point. Jacobi polynomials are evaluated using recusion relations:

For brevity the (alpha, beta) superscripts are dropped. i.e. P_n(z) = P_n^{alpha, beta}(z). P_n(z) = C_{n-1}^0 P_{n-1}(z) * z + C_{n-1}^1 P_{n-1}(z) + C_{n-2} * P_{n-2}(z) P_0(z) = 1 P_1(z) = 2 + 2 * (z - 1)

Parameters:
  • nummodes[in] Number of modes to compute, i.e. p modes evaluates at most an order p-1 polynomial.

  • z[in] Evaluation point to evaluate basis at.

  • k_stride_n[in] Stride between sets of coefficients for different alpha values in the coefficient arrays.

  • k_coeffs_pnm10[in] Coefficients for C_{n-1}^0 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm11[in] Coefficients for C_{n-1}^1 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm2[in] Coefficients for C_{n-2} for different alpha values stored row wise for each alpha.

  • Output[inout] array for evaluations.

template<typename T>
class BasisEvaluateBase : private NESO::GeomToExpansionBuilder#

Base class for derived classes that evaluate Nektar++ basis functions to evaluate and project onto fields.

Subclassed by NESO::FunctionEvaluateBasis< T >, NESO::FunctionProjectBasis< T >

Public Functions

BasisEvaluateBase(const BasisEvaluateBase &st) = delete#

Disable (implicit) copies.

BasisEvaluateBase &operator=(BasisEvaluateBase const &a) = delete#

Disable (implicit) copies.

inline BasisEvaluateBase(std::shared_ptr<T> field, ParticleMeshInterfaceSharedPtr mesh, CellIDTranslationSharedPtr cell_id_translation)#

Create new instance. Expected to be called by a derived class - not a user.

Parameters:
  • field – Example field this class will be used to evaluate basis functions for.

  • mesh – Interface between NESO-Particles and Nektar++ meshes.

  • cell_id_translation – Map between NESO-Particles cells and Nektar++ cells.

Protected Attributes

std::shared_ptr<T> field#
ParticleMeshInterfaceSharedPtr mesh#
CellIDTranslationSharedPtr cell_id_translation#
SYCLTargetSharedPtr sycl_target#
BufferDeviceHost<int> dh_nummodes#
std::map<ShapeType, int> map_shape_to_count#
std::map<ShapeType, std::vector<int>> map_shape_to_cells#
std::map<ShapeType, std::unique_ptr<BufferDeviceHost<int>>> map_shape_to_dh_cells#
BufferDeviceHost<int> dh_coeffs_offsets#
BufferDeviceHost<REAL> dh_global_coeffs#
BufferDeviceHost<REAL> dh_coeffs_pnm10#
BufferDeviceHost<REAL> dh_coeffs_pnm11#
BufferDeviceHost<REAL> dh_coeffs_pnm2#
int stride_n#
std::map<ShapeType, std::array<int, 3>> map_total_nummodes#
class CellIDTranslation#

Class to convert Nektar++ global ids of geometry objects to ids that can be used by NESO-Particles.

Public Functions

inline ~CellIDTranslation()#
inline CellIDTranslation(SYCLTargetSharedPtr sycl_target, ParticleDatSharedPtr<INT> cell_id_dat, ParticleMeshInterfaceSharedPtr particle_mesh_interface)#

Create a new geometry id mapper.

Parameters:
  • sycl_target – Compute device to use.

  • cell_id_dat – ParticleDat of cell ids.

  • particle_mesh_interface – Interface object between Nektar++ graph and NESO-Particles.

inline void execute()#

Loop over all particles and map cell ids from Nektar++ cell ids to NESO-Particle cells ids.

Public Members

SYCLTargetSharedPtr sycl_target#

The sycl target this map exists on.

std::vector<int> map_to_nektar#

Map from NESO-Particles ids to nektar++ global ids.

BufferDeviceHost<int> dh_map_to_geom_type#

Map from NESO-Particles ids to nektar++ Geom type where: 0 -> TriGeom 1 -> QuadGeom

Private Functions

template<typename T>
inline void construct_maps(std::map<int, std::shared_ptr<T>> &geoms)#

Private Members

ParticleDatSharedPtr<INT> cell_id_dat#
ParticleMeshInterfaceSharedPtr particle_mesh_interface#
BufferDeviceHost<int> id_map#
int shift#
class ClaimWeight#

Simple wrapper around an int and float to use for assembling cell claim weights.

Public Functions

inline ~ClaimWeight()#
inline ClaimWeight()#

Public Members

int weight#

The integer weight that will be used to make the claim.

double weightf#

A floating point weight for reference/testing.

class CoarseLookupMap#

A coarse lookup map is a Cartesian mesh overlay that is imposed over a collection of local and remote geometry objects. A map is built from each Cartesian cell to the geometry objects which have a non-zero intersection between their bounding box and the cell.

For each Cartesian cell, the set of geometry objects are candidate cells. If a lookup point is contained within the Nektar++ mesh then at least one of these candidate cells should contain the lookup point. Candidate cells are ordered by overlap volume with the Cartesian mesh cell.

Public Functions

template<typename T, typename U>
inline CoarseLookupMap(const int ndim, SYCLTargetSharedPtr sycl_target, std::map<int, std::shared_ptr<T>> geoms_local, std::vector<std::shared_ptr<U>> geoms_remote)#

Create new lookup map from Cartesian cells to Nektar++ geometry elements.

Parameters:
  • ndim – Number of dimensions (e.g. 2 or 3).

  • sycl_target – SYCLTarget to build lookup map on.

  • geoms_local – Map of local geometry objects, i.e. geometry objects that exist in the MeshGraph on this MPI rank.

  • geoms_remote – Vector of remote geometry objects which have been copied onto this MPI rank as halo objects.

Public Members

int map_stride#

The stride between lists of candidate cells for each Cartesian mesh cell.

std::unique_ptr<DeviceCartesianMesh> cartesian_mesh#

The Cartesian mesh over the owned and halo cells.

std::unique_ptr<BufferDeviceHost<int>> dh_map#

The map from cells in Cartesian mesh to candidate cells in the lookup arrays.

std::unique_ptr<BufferDeviceHost<int>> dh_map_sizes#

The number of candidate cells for each Cartesian mesh cell.

std::map<int, int> gid_to_lookup_id#

Map from Nektar++ global id to local id in the cartesian map.

Protected Functions

CoarseLookupMap(const CoarseLookupMap &st) = delete#

Disable (implicit) copies.

CoarseLookupMap &operator=(CoarseLookupMap const &a) = delete#

Disable (implicit) copies.

template<typename U>
inline void add_geom_to_map(std::map<int, std::list<std::pair<double, int>>> &geom_map, U &geom, const int gid)#

Protected Attributes

const int ndim#
SYCLTargetSharedPtr sycl_target#
class CoarseMappersBase#

Subclassed by NESO::MapParticles2DRegular, NESO::MapParticles3DRegular, NESO::Newton::MapParticlesNewton< NEWTON_TYPE >

Public Functions

inline CoarseMappersBase(SYCLTargetSharedPtr sycl_target)#

Protected Attributes

SYCLTargetSharedPtr sycl_target#

SYCLTarget on which to perform computations.

std::unique_ptr<CoarseLookupMap> coarse_lookup_map#

The coarse lookup map used to find geometry objects.

std::unique_ptr<BufferDeviceHost<int>> dh_cell_ids#

The nektar++ cell id for the cells indices pointed to from the map.

std::unique_ptr<BufferDeviceHost<int>> dh_mpi_ranks#

The MPI rank that owns the cell.

std::unique_ptr<BufferDeviceHost<int>> dh_type#

The type of the cell, e.g. a quad or a triangle.

std::unique_ptr<ErrorPropagate> ep#

Instance to throw kernel errors with.

class CSVAtomicDataReader : public NESO::AtomicDataReader#

Class used to read atomic data from a 2 column csv file, returning that data to the 2d vector m_data. m_data is used by functions get_data, get_temps and get_data derived from class AtomicDataReader the read in data to the user.

Public Functions

inline CSVAtomicDataReader(std::string filepath)#

Protected Functions

inline virtual void read() final#
class DeviceCartesianMesh#

Holds the metadata that describes a structured Cartesian mesh.

Public Functions

inline DeviceCartesianMesh(SYCLTargetSharedPtr sycl_target, const int ndim, const std::vector<double> origin, const std::vector<double> extents, const std::vector<int> cell_counts)#

Create new mesh on the passed SYCL device.

Parameters:
  • sycl_target[in] SYCLTarget to use.

  • ndim[in] Number of mesh dimensions.

  • origin[in] Origin of the mesh.

  • extents[in] Extent of the mesh in each dimension.

  • cell_counts[in] Number of mesh cells in each dimension.

inline int get_cell_in_dimension(const int dim, const double point)#

Return the cell which contains a point in the specified dimension.

Parameters:
  • dim[in] Dimension to find cell in.

  • point[in] Coordinate in the requested dimension.

Returns:

Containing cell in dimension.

template<typename T>
inline int get_linear_cell_index(const T &cell_tuple)#

Convert an index as a tuple to a linear index.

Parameters:

cell_tuple[in] Subscriptable host object with cell indices in each dimension.

Returns:

Linear cell index.

template<typename T>
inline void get_bounding_box(const T &cell_tuple, std::array<double, 6> &bounding_box)#

Get a Nektar++ format bounding box for a cell.

Parameters:
  • cell_tuple[in] Subscriptable cell index tuple.

  • bounding_box[out] Bounding box.

inline int get_cell_count()#

Get the number of cells in the mesh.

Public Members

SYCLTargetSharedPtr sycl_target#

SYCL target this mesh exists on.

const int ndim#

Number of mesh dimensions.

std::shared_ptr<BufferDeviceHost<double>> dh_origin#

The origin of the mesh.

std::shared_ptr<BufferDeviceHost<double>> dh_extents#

The extents of the mesh.

std::shared_ptr<BufferDeviceHost<int>> dh_cell_counts#

The number of cells in each dimension.

std::shared_ptr<BufferDeviceHost<double>> dh_cell_widths#

The width of the cells in each dimension.

std::shared_ptr<BufferDeviceHost<double>> dh_inverse_cell_widths#

The inverse of the cells in each dimension.

Protected Functions

DeviceCartesianMesh(const DeviceCartesianMesh &st) = delete#

Disable (implicit) copies.

DeviceCartesianMesh &operator=(DeviceCartesianMesh const &a) = delete#

Disable (implicit) copies.

class Diagnostics#

Public Functions

void store_time(const double t)#
void compute_total_energy(sycl::queue &Q, Mesh &mesh, Plasma &plasma)#
void compute_field_energy(sycl::queue &Q, Mesh &mesh)#
void compute_particle_energy(sycl::queue &Q, Plasma &plasma)#

Public Members

std::vector<double> time#
std::vector<double> total_energy#
std::vector<double> particle_energy#
std::vector<double> field_energy#
struct Evaluate#

The purpose of these methods is to precompute as much of the Bary interpolation algorithm for each coordinate dimension as possible (where the cost is O(p)) to minimise the computational work in the O(p^2) double loop.

Public Static Functions

static inline void preprocess_weights(const int stride_base, const int num_phys, const REAL coord, const REAL *const z_values, const REAL *const bw_values, int *exact_index, REAL *div_values)#

For quadrature point r_i with weight bw_i compute bw_i / (r - r_i).

Parameters:
  • stride_base[in] Length of output vector used for temporary storage, i.e. the maximum number of quadrature points across all elements plus any padding.

  • num_phys – The number of quadrature points for the element and dimension for which this computation is performed.

  • coord[in] The evauation point in the dimension of interest.

  • z_values[in] A length num_phys array containing the quadrature points.

  • z_values[in] A length num_phys array containing the quadrature weights.

  • exact_index[inout] If the input coordinate lie exactly on a quadrature point then this pointer will be set to the index of that quadrature point. Otherwise this memory is untouched.

  • div_values[inout] Array of length stride_base which will be populated with the bw_i/(r - r_i) values. Entries in the range num_phys to stride_base-1 will be zeroed.

static inline REAL preprocess_denominator(const int num_phys, const REAL *const div_space)#

In each dimension of the Bary interpolation the sum of the weights over distances can be precomputed.

Parameters:
  • num_phys – Number of quadrature points.

  • div_space – Values to sum.

Returns:

Sum of the first num_phys values of div_space.

static inline REAL compute_dir_0(const int num_phys, const REAL *const physvals, const REAL *const div_space, const int exact_i, const REAL denom)#

Perform Bary interpolation in the first dimension. This function is intended to be called from a function that performs Bary interpolation over the second dimension and first dimension.

Parameters:
  • num_phys – Number of quadrature points.

  • physvals – Vector of length num_phys plus padding to multiple of the vector length which contains the quadrature point values. Padding should contain finite values.

  • exact_i – If exact_i is non-negative then exact_i then it is assumed that the evaluation point is exactly the quadrature point exact_i.

  • denom – Sum over Bary weights divided by differences, see preprocess_denominator.

Returns:

Contribution to Bary interpolation from a dimension 0 evaluation.

static inline REAL compute_dir_10(const int num_phys0, const int num_phys1, const REAL *const physvals, const REAL *const div_space0, const REAL *const div_space1, const int exact_i0, const int exact_i1)#

Computes Bary interpolation over two dimensions. The inner dimension is computed with calls to compute_dir_0.

Parameters:
  • num_phys0 – Number of quadrature points in dimension 0.

  • num_phys1 – Number of quadrature points in dimension 1.

  • physvals – Array of function values at quadrature points.

  • div_space0 – The output of preprocess_weights applied to dimension 0.

  • div_space1 – The output of preprocess_weights applied to dimension 1.

  • exact_i0 – Non-negative value indicates that the coordinate lies on quadrature point exact_i0 in dimension 0.

  • exact_i1 – Non-negative value indicates that the coordinate lies on quadrature point exact_i1 in dimension 1.

Returns:

Bary evaluation of a function at a coordinate.

class FFT#

Public Functions

inline FFT(sycl::queue &Q_in, int N_in)#
inline ~FFT()#
inline void forward(sycl::buffer<Complex, 1> &in_d, sycl::buffer<Complex, 1> &out_d)#
inline void backward(sycl::buffer<Complex, 1> &in_d, sycl::buffer<Complex, 1> &out_d)#
inline FFT(sycl::queue &Q_in, int N_in)
inline void forward(sycl::buffer<Complex, 1> &in_d, sycl::buffer<Complex, 1> &out_d)
inline void backward(sycl::buffer<Complex, 1> &in_d, sycl::buffer<Complex, 1> &out_d)

Public Members

sycl::queue &Q#
int N#
fftw_plan plan_forward#
fftw_plan plan_inverse#
std::vector<Complex> in#
std::vector<Complex> out#
sycl::buffer<size_t, 1> N_d#
oneapi::mkl::dft::descriptor<oneapi::mkl::dft::precision::DOUBLE, oneapi::mkl::dft::domain::COMPLEX> plan#

Private Functions

inline void generic_copy(sycl::buffer<Complex, 1> &out_b, sycl::buffer<Complex, 1> &in_b)#
inline void copy_to_buffer(sycl::buffer<Complex, 1> &out_b, std::vector<Complex> &in_vec)#
inline void copy_from_buffer(std::vector<Complex> &out_vec, sycl::buffer<Complex, 1> &in_b)#
template<typename onemkl_plan_type>
inline void make_plan(onemkl_plan_type &plan) const#

Private Members

mutable bool init_plan#
template<typename T>
class FieldEvaluate#

Class to evaluate a Nektar++ field at a set of particle locations. It is assumed that the reference coordinates for the particles have already been computed by NektarGraphLocalMapper.

Public Functions

inline ~FieldEvaluate()#
inline FieldEvaluate(std::shared_ptr<T> field, ParticleGroupSharedPtr particle_group, CellIDTranslationSharedPtr cell_id_translation, const bool derivative = false)#

Construct new evaluation object. FieldEvaluate allows a Nektar++ field (or the derivative) to be evaluated at particle locations.

Parameters:
  • field – Nektar++ field to evaluate at particle positions.

  • particle_group – ParticleGroup with positions mapped by NektarGraphLocalMapper.

  • cell_id_translationCellIDTranslation used to map between NESO cell ids and Nektar++ geometry object ids.

  • derivative – This evaluation object should evaluate the derivative of the field (default false).

template<typename U>
inline void evaluate(Sym<U> sym)#

Evaluate the field at the particle locations and place the result in the ParticleDat indexed by the passed symbol. This call assumes that the reference positions of particles have already been computed and stored in the NESO_REFERENCE_POSITIONS ParticleDat. This computation of reference positions is done as part of the cell binning process implemented in NektarGraphLocalMapper.

Parameters:

sym – ParticleDat in the ParticleGroup of this object in which to place the evaluations.

Private Members

std::shared_ptr<T> field#
ParticleGroupSharedPtr particle_group#
SYCLTargetSharedPtr sycl_target#
CellIDTranslationSharedPtr cell_id_translation#
const bool derivative#
std::shared_ptr<BaryEvaluateBase<T>> bary_evaluate_base#
std::shared_ptr<FunctionEvaluateBasis<T>> function_evaluate_basis#
template<typename T>
class FieldProject : private NESO::GeomToExpansionBuilder#

Class to project properties stored on ParticleDat objects onto a Nektar++ Field instance. Projection is achieved by considering each particle as a Dirac Delta at the particle location with a weight set by the particle property. A standard L2 Galerkin projection is performed to compute the DOFs which are then stored on the Nektar++ object.

Public Functions

inline ~FieldProject()#
inline FieldProject(std::shared_ptr<T> field, ParticleGroupSharedPtr particle_group, CellIDTranslationSharedPtr cell_id_translation)#

Construct a new instance to project particle data from the given ParticleGroup on the given Nektar++ field.

Parameters:
  • field – Nektar++ field to project particle data onto, e.g. a DisContField instance.

  • particle_group – ParticleGroup which is the source of particle data.

  • cell_id_translationCellIDTranslation instance (provides the map from particle cell indices to Nektar++ geometry ids).

inline FieldProject(std::vector<std::shared_ptr<T>> fields, ParticleGroupSharedPtr particle_group, CellIDTranslationSharedPtr cell_id_translation)#

Construct a new instance to project particle data from the given ParticleGroup on the given Nektar++ field.

Parameters:
  • fields – Nektar++ fields to project particle data onto, e.g. a DisContField instance.

  • particle_group – ParticleGroup which is the source of particle data.

  • cell_id_translationCellIDTranslation instance (provides the map from particle cell indices to Nektar++ geometry ids).

inline void testing_enable()#

Enable recording of computed values for testing.

inline void testing_get_rhs(double **rhs_host, double **rhs_device)#

Get the last computed rhs vectors for host and device.

Parameters:
  • rhs_host – (output) Pointer to last computed RHS values in field order on host.

  • rhs_device – (output) Pointer to last computed RHS values in field order on SYCL Device.

template<typename U>
inline void project_host(std::vector<Sym<U>> syms, std::vector<int> components)#

Project the particle data from the given ParticleDats onto the Nektar++ fields. It is assumed that the reference positions of particles have aleady been computed and are stored on the particles. This reference position computation is performed as part of the cell binning process implemented in NektarGraphLocalMapper.

Parameters:
  • syms – Vector of ParticleDats in the ParticleGroup to use as the particle weights.

  • components – Vector of components to index into the ParticleDats, i.e. if the ParticleDat has two components a 1 in this vector extracts the second component.

template<typename U>
inline void project(Sym<U> sym)#

Project the particle data from the given ParticleDat onto the Nektar++ field. It is assumed that the reference positions of particles have aleady been computed and are stored on the particles. This reference position computation is performed as part of the cell binning process implemented in NektarGraphLocalMapper.

Parameters:

sym – ParticleDat in the ParticleGroup to use as the particle weights.

template<typename U>
inline void project(std::vector<Sym<U>> syms, std::vector<int> components)#

Project the particle data from the given ParticleDats onto the Nektar++ fields. It is assumed that the reference positions of particles have aleady been computed and are stored on the particles. This reference position computation is performed as part of the cell binning process implemented in NektarGraphLocalMapper.

Parameters:
  • syms – Vector of ParticleDats in the ParticleGroup to use as the particle weights.

  • components – Vector of components to index into the ParticleDats, i.e. if the ParticleDat has two components a 1 in this vector extracts the second component.

template<typename U>
inline void project_host(Sym<U> sym)#

Project the particle data from the given ParticleDat onto the Nektar++ field. It is assumed that the reference positions of particles have aleady been computed and are stored on the particles. This reference position computation is performed as part of the cell binning process implemented in NektarGraphLocalMapper.

Parameters:

sym – ParticleDat in the ParticleGroup to use as the particle weights.

Private Members

std::vector<std::shared_ptr<T>> fields#
ParticleGroupSharedPtr particle_group#
SYCLTargetSharedPtr sycl_target#
CellIDTranslationSharedPtr cell_id_translation#
std::map<int, int> geom_to_exp#
std::shared_ptr<FunctionProjectBasis<T>> function_project_basis#
bool is_testing#
std::vector<double> testing_device_rhs#
std::vector<double> testing_host_rhs#
template<typename T>
class FunctionEvaluateBasis : public NESO::BasisEvaluateBase<T>#

Class to evaluate Nektar++ fields by evaluating basis functions.

Public Functions

FunctionEvaluateBasis(const FunctionEvaluateBasis &st) = delete#

Disable (implicit) copies.

FunctionEvaluateBasis &operator=(FunctionEvaluateBasis const &a) = delete#

Disable (implicit) copies.

inline FunctionEvaluateBasis(std::shared_ptr<T> field, ParticleMeshInterfaceSharedPtr mesh, CellIDTranslationSharedPtr cell_id_translation)#

Constructor to create instance to evaluate Nektar++ fields.

Parameters:
  • field – Example Nektar++ field of the same mesh and function space as the destination fields that this instance will be called with.

  • meshParticleMeshInterface constructed over same mesh as the function.

  • cell_id_translation – Map between NESO-Particles cells and Nektar++ cells.

template<typename U, typename V>
inline void evaluate(ParticleGroupSharedPtr particle_group, Sym<U> sym, const int component, V &global_coeffs)#

Evaluate nektar++ function at particle locations.

Parameters:
  • particle_group – Source container of particles.

  • sym – Symbol of ParticleDat within the ParticleGroup.

  • component – Determine which component of the ParticleDat is the output for function evaluations.

  • global_coeffs – source DOFs which are evaluated.

Protected Functions

template<typename EVALUATE_TYPE, typename COMPONENT_TYPE>
inline sycl::event evaluate_inner(ExpansionLooping::JacobiExpansionLoopingInterface<EVALUATE_TYPE> evaluation_type, ParticleGroupSharedPtr particle_group, Sym<COMPONENT_TYPE> sym, const int component)#

Templated evaluation function for CRTP.

template<typename T>
class FunctionProjectBasis : public NESO::BasisEvaluateBase<T>#

Class to project onto Nektar++ fields by evaluating basis functions.

Public Functions

FunctionProjectBasis(const FunctionProjectBasis &st) = delete#

Disable (implicit) copies.

FunctionProjectBasis &operator=(FunctionProjectBasis const &a) = delete#

Disable (implicit) copies.

inline FunctionProjectBasis(std::shared_ptr<T> field, ParticleMeshInterfaceSharedPtr mesh, CellIDTranslationSharedPtr cell_id_translation)#

Constructor to create instance to project onto Nektar++ fields.

Parameters:
  • field – Example Nektar++ field of the same mesh and function space as the destination fields that this instance will be called with.

  • meshParticleMeshInterface constructed over same mesh as the function.

  • cell_id_translation – Map between NESO-Particles cells and Nektar++ cells.

template<typename U, typename V>
inline void project(ParticleGroupSharedPtr particle_group, Sym<U> sym, const int component, V &global_coeffs)#

Project particle data onto a function.

Parameters:
  • particle_group – Source container of particles.

  • sym – Symbol of ParticleDat within the ParticleGroup.

  • component – Determine which component of the ParticleDat is projected.

  • global_coeffs[in, out] – RHS in the Ax=b L2 projection system.

Protected Functions

template<typename PROJECT_TYPE, typename COMPONENT_TYPE>
inline sycl::event project_inner(ExpansionLooping::JacobiExpansionLoopingInterface<PROJECT_TYPE> project_type, ParticleGroupSharedPtr particle_group, Sym<COMPONENT_TYPE> sym, const int component)#

Templated projection function for CRTP.

class GeometryContainer3D#

Struct to hold shared pointers to the different types of 3D geometry objects in terms of classification of shape and type, e.g. Regular, Deformed, linear, non-linear.

Public Functions

inline void push_back(std::pair<int, std::shared_ptr<Geometry3D>> geom)#

Push a geometry object onto the correct container.

Parameters:

geom – Geometry object to push onto correct container.

inline void push_back(std::shared_ptr<RemoteGeom3D> &geom)#

Push a geometry object onto the correct container.

Parameters:

geom – Geometry object to push onto correct container.

Public Members

GeometryTypes3D regular#

Elements with linear sides that are considered eRegular by Nektar++.

GeometryTypes3D deformed_linear#

Elements with linear sides that are considered eDeformed by Nektar++.

GeometryTypes3D deformed_non_linear#

Elements with non-linear sides that are considered eDeformed by Nektar++.

Protected Functions

inline GeometryTypes3D &classify(std::shared_ptr<Geometry3D> &geom)#
struct GeometryLocalRemote3D#

Struct to hold local and remote 3D geoms.

Public Functions

inline void push_back(std::pair<int, std::shared_ptr<Geometry3D>> geom)#

Push a geometry object onto the container depending on if the geometry object is local or remote.

Parameters:

geom – Geometry object.

inline void push_back(std::shared_ptr<RemoteGeom3D> geom)#

Push a geometry object onto the container depending on if the geometry object is local or remote.

Parameters:

geom – Geometry object.

inline std::size_t size()#

Returns number of remote and local geometry objects.

Public Members

std::map<int, std::shared_ptr<Geometry3D>> local#

Local geometry objects which are owned by this MPI rank.

std::vector<std::shared_ptr<RemoteGeom3D>> remote#

Remote geometry objects where a copy is stored on this MPI rank.

class GeometryTypes3D#

Struct to hold shared pointers to the different types of 3D geometry objects in terms of classification of shape.

Public Functions

inline void push_back(std::pair<int, std::shared_ptr<Geometry3D>> &geom)#

Push a geometry object onto the correct container.

Parameters:

geom – Geometry object to push onto correct container.

inline void push_back(std::shared_ptr<RemoteGeom3D> &geom)#

Push a geometry object onto the correct container.

Parameters:

geom – Geometry object to push onto correct container.

inline std::size_t size()#
Returns:

Number of elements across all types.

Public Members

GeometryLocalRemote3D tet#

Store of local and remote tetrahedrons.

GeometryLocalRemote3D pyr#

Store of local and remote pyramids.

GeometryLocalRemote3D prism#

Store of local and remote prism.

GeometryLocalRemote3D hex#

Store of local and remote hexahedrons.

Protected Functions

inline GeometryLocalRemote3D &classify(std::shared_ptr<Geometry3D> &geom)#
class GeomToExpansionBuilder#

Class to provide a common method that builds the map from geometry ids to expansion ids.

Subclassed by NESO::BaryEvaluateBase< T >, NESO::BasisEvaluateBase< T >, NESO::FieldProject< T >

Protected Static Functions

template<typename T>
static inline void build_geom_to_expansion_map(std::shared_ptr<T> field, std::map<int, int> &geom_to_exp)#

Build the map from geometry ids to expansion ids for the expansion. Nektar++ Expansions hold a reference to the geometry element they are defined over. This function assumes that map is injective and builds the inverse map from geometry id to expansion id.

Parameters:
  • field – Nektar++ Expansion, e.g. ContField or DisContField.

  • geom_to_exp – Output map to build.

struct Hexahedron : public NESO::ExpansionLooping::JacobiExpansionLoopingInterface<Hexahedron>#
#include <hexahedron.hpp>

Implements evaluation and projection for Hexahedron elements with eModified_A basis functions in each dimension.

Public Functions

inline void loc_coord_to_loc_collapsed_v(const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
inline void evaluate_basis_0_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_1_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_2_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void loop_evaluate_v(const int nummodes, const REAL *const dofs, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *output)#
inline void loop_project_v(const int nummodes, const REAL value, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *dofs)#
inline ShapeType get_shape_type_v()#
inline int get_ndim_v()#
struct Hexahedron : public NESO::GeometryInterface::BaseCoordinateMapping3D<Hexahedron>#

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed_v(const T xi0, const T xi1, const T xi2, T *eta0, T *eta1, T *eta2)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[in] Local coordinate to map to collapsed coordinate. Component z.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

  • eta2[inout] Local collapsed coordinate. Component z.

template<typename T>
inline void loc_collapsed_to_loc_coord_v(const T eta0, const T eta1, const T eta2, T *xi0, T *xi1, T *xi2)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • eta2[in] Local collapsed coordinate. Component z.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[inout] Local coordinate to map to collapsed coordinate. Component z.

class Interpolator#
#include <interpolator.hpp>

This class defines the interface through which derived classes gain access to x,y data which will be interpolated

Subclassed by NESO::LinearInterpolator1D

Public Functions

inline Interpolator(const std::vector<double> &x_data, const std::vector<double> &y_data, NP::SYCLTargetSharedPtr sycl_target)#

This constructor initialises the x,y data derived classes will use checking that that the size of both vectors is the same. It also initialises the target that the sycl kernel will use in the derived classes.

Parameters:
  • x_data[in] The x data values which the interpolator will have access to.

  • y_data[in] The y data values which the interpolator will have access to.

  • sycl_target[in] The target that the sycl kernels will make use of.

Interpolator() = delete#
virtual void interpolate(const std::vector<double> &x_input, std::vector<double> &y_output) = 0#

This function returns a value of y (y_output) given a value of x (x_input) given the (x,y) data provided by the interpolator class

Parameters:
  • x_input[in] x_input is reference to a vector of x values for which you would like the y value returned.

  • y_output[out] y_output is reference to a vector of y values which the interpolator calculated, based on x_input.

Protected Attributes

NP::SYCLTargetSharedPtr m_sycl_target#
const std::vector<double> &m_x_data#
const std::vector<double> &m_y_data#
std::vector<double> dydx#
class JacobiCoeffModBasis#

Pre-compute the coefficients required to compute series of Jacobi polynomials via recursion.

Public Functions

JacobiCoeffModBasis(const JacobiCoeffModBasis &st) = delete#

Disable (implicit) copies.

JacobiCoeffModBasis &operator=(JacobiCoeffModBasis const &a) = delete#

Disable (implicit) copies.

JacobiCoeffModBasis(const int max_n, const int max_alpha)#

Compute coefficients for computing Jacobi polynomial values via recursion relation. Coefficients are computed such that: P_^{alpha, 1}_{n} = (coeffs_pnm10) * P_^{alpha, 1}_{n-1} * z

  • (coeffs_pnm11) * P_^{alpha, 1}_{n-1}

  • (coeffs_pnm2) * P_^{alpha, 1}_{n-2}

Parameters:
  • max_n – Maximum polynomial order required.

  • max_alpha – Maximum alpha value required.

double host_evaluate(const int n, const int alpha, const double z)#

Compute P^{alpha,1}_n(z) using recursion.

Parameters:
  • n – Order of Jacobi polynomial

  • alpha – Alpha value.

  • z – Point to evaluate at.

Returns:

P^{alpha,1}_n(z).

Public Members

std::vector<REAL> coeffs_pnm10#

Coefficients such that P_^{alpha, 1}_{n} = (coeffs_pnm10) * P_^{alpha, 1}_{n-1} * z

  • (coeffs_pnm11) * P_^{alpha, 1}_{n-1}

  • (coeffs_pnm2) * P_^{alpha, 1}_{n-2}

Coefficients are stored in a matrix (row major) where each row gives the coefficients for a fixed alpha. i.e. the columns are the orders.

std::vector<REAL> coeffs_pnm11#
std::vector<REAL> coeffs_pnm2#
const int max_n#
const int max_alpha#
const int stride_n#
template<typename SPECIALISATION>
struct JacobiExpansionLoopingInterface#

Abstract base class for projection and evaluation implementations for each element type. Assumes that the derived classes all require evaluation of Jacobi polynomials (with beta=1). i.e. the methods will receive coefficients such that

P_^{alpha, 1}_{n} = (coeffs_pnm10) * P_^{alpha, 1}_{n-1} * z

  • (coeffs_pnm11) * P_^{alpha, 1}_{n-1}

  • (coeffs_pnm2) * P_^{alpha, 1}_{n-2}

See JacobiCoeffModBasis for further details relating to coefficient computation.

Public Functions

inline void loc_coord_to_loc_collapsed(const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#

Compute the collapsed coordinate for a given input local coordinate.

Parameters:
  • xi0[in] Local coordinate, x component.

  • xi1[in] Local coordinate, y component.

  • xi2[in] Local coordinate, z component.

  • eta0[out] Local collapsed coordinate, x component.

  • eta1[out] Local collapsed coordinate, y component.

  • eta2[out] Local collapsed coordinate, z component.

inline void evaluate_basis_0(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#

Evaluate the set of basis functions in the x direction of the reference element.

Parameters:
  • nummodes[in] Number of modes in the expansion.

  • z[in] Point to evaluate each of the basis functions at.

  • coeffs_stride[in] Integer stride required to index into Jacobi coefficients.

  • coeffs_pnm10[in] First set of coefficients for Jacobi recursion.

  • coeffs_pnm11[in] Second set of coefficients for Jacobi recursion.

  • coeffs_pnm2[in] Third set of coefficients for Jacobi recursion.

  • output[out] Output array with size at least the total number of modes for the expansion with nummodes.

inline void evaluate_basis_1(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#

Evaluate the set of basis functions in the y direction of the reference element.

Parameters:
  • nummodes[in] Number of modes in the expansion.

  • z[in] Point to evaluate each of the basis functions at.

  • coeffs_stride[in] Integer stride required to index into Jacobi coefficients.

  • coeffs_pnm10[in] First set of coefficients for Jacobi recursion.

  • coeffs_pnm11[in] Second set of coefficients for Jacobi recursion.

  • coeffs_pnm2[in] Third set of coefficients for Jacobi recursion.

  • output[out] Output array with size at least the total number of modes for the expansion with nummodes.

inline void evaluate_basis_2(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#

Evaluate the set of basis functions in the z direction of the reference element.

Parameters:
  • nummodes[in] Number of modes in the expansion.

  • z[in] Point to evaluate each of the basis functions at.

  • coeffs_stride[in] Integer stride required to index into Jacobi coefficients.

  • coeffs_pnm10[in] First set of coefficients for Jacobi recursion.

  • coeffs_pnm11[in] Second set of coefficients for Jacobi recursion.

  • coeffs_pnm2[in] Third set of coefficients for Jacobi recursion.

  • output[out] Output array with size at least the total number of modes for the expansion with nummodes.

inline void loop_evaluate(const int nummodes, const REAL *dofs, const REAL *local_space_0, const REAL *local_space_1, const REAL *local_space_2, REAL *output)#

Construct each mode of the expansion over the element using the expansions in each direction of the reference element. Multiply each of these modes with the corresponding degree of freedom (coefficient) and sum the result. Mathematically this method computes and returns

\[ \sum_{i} \phi_i(x) \alpha_i, \]

where \(\phi_i\) and \(\alpha_i\) are the \(i\)-th basis function and degree of freedom respectively.

Parameters:
  • nummodes[in] Number of modes in the expansion.

  • dofs[in] Pointer to degrees of freedom ( \(\alpha_i\)) to use when evaluating the expansion.

  • local_space_0[in] Output of evaluate_basis_0.

  • local_space_1[in] Output of evaluate_basis_1.

  • local_space_2[in] Output of evaluate_basis_2.

  • [output] – output Output space for the evaluation (pointer to a single REAL).

class LinearInterpolator1D : public NESO::Interpolator#

Class used to output a vector of y values, given some x values, based on provided x values for input

Public Functions

LinearInterpolator1D(const std::vector<double> &x_data, const std::vector<double> &y_data, SYCLTargetSharedPtr sycl_target)#

This constructor provides the class with the x_input values the interpolator will need. It creates a gradient vector based on the x,y data provided by the Interpolator class from which this class is derived. It then creates a sycl buffer for the x,y data and this gradient vector.

Parameters:
  • x_input[in] x_input is reference to a vector of x values for which you would like the y value returned.

  • y_output[out] y_output is reference to a vector of y values which the interpolator calculated based on x_input.

  • sycl_target[in] The target that the sycl kernels will make use of.

virtual void interpolate(const std::vector<double> &x_input, std::vector<double> &y_output)#

This function returns a value of y (y_output) given a value of x (x_input) given the (x,y) data provided by the interpolator class

Parameters:
  • x_input[in] x_input is reference to a vector of x values for which you would like the y value returned.

  • y_output[out] y_output is reference to a vector of y values which the interpolator calculated, based on x_input.

Protected Attributes

sycl::buffer<double, 1> buffer_x_data#
sycl::buffer<double, 1> buffer_y_data#
sycl::buffer<double, 1> buffer_dydx#
class LocalClaim#

Container to collect claim weights local to this rank before passing them to the mesh hierarchy. Local collection prevents excessive MPI RMA comms.

Public Functions

inline ~LocalClaim()#
inline LocalClaim()#
inline void claim(const int64_t index, const int weight, const double weightf)#

Claim a cell with passed weights.

Parameters:
  • index – Global linear index of cell in MeshHierarchy.

  • weight – Integer claim weight, this will be passed to the MeshHierarchy to claim the cell.

  • weightf – Floating point weight for reference/testing.

Public Members

std::map<int64_t, ClaimWeight> claim_weights#

Map from global cell indices of a MeshHierarchy to ClaimWeights.

std::set<int64_t> claim_cells#

Set of cells which claims were made for.

class MapParticles2D#

Class to map particles into Nektar++ cells.

Public Functions

MapParticles2D(SYCLTargetSharedPtr sycl_target, ParticleMeshInterfaceSharedPtr particle_mesh_interface, ParameterStoreSharedPtr config = std::make_shared<ParameterStore>())#

Constructor for mapping class.

Parameters:
  • sycl_target – SYCLTarget on which to perform mapping.

  • particle_mesh_interfaceParticleMeshInterface containing 2D Nektar++ cells.

  • configParameterStore instance to pass configuration options to lower-level mappers.

void map(ParticleGroup &particle_group, const int map_cell = -1)#

Called internally by NESO-Particles to map positions to Nektar++ triangles and quads.

Protected Functions

MapParticles2D(const MapParticles2D &st) = delete#

Disable (implicit) copies.

MapParticles2D &operator=(MapParticles2D const &a) = delete#

Disable (implicit) copies.

Protected Attributes

SYCLTargetSharedPtr sycl_target#
ParticleMeshInterfaceSharedPtr particle_mesh_interface#
std::unique_ptr<MapParticlesCommon> map_particles_common#
std::unique_ptr<MapParticles2DRegular> map_particles_2d_regular#
std::unique_ptr<Newton::MapParticlesNewton<Newton::MappingQuadLinear2D>> map_particles_newton_linear_quad#
int count_regular = 0#
int count_deformed = 0#
class MapParticles2DRegular : public NESO::CoarseMappersBase#

Class to map particles into regular (eRegular) triangles and quads.

Configurable with the following options in the passed ParameterStore:

  • MapParticles2DRegular/tol: Tolerance to apply when determining if a particle is within a geometry object (default 0.0).

Public Functions

MapParticles2DRegular(SYCLTargetSharedPtr sycl_target, ParticleMeshInterfaceSharedPtr particle_mesh_interface, ParameterStoreSharedPtr config = std::make_shared<ParameterStore>())#

Create new instance for all 2D geometry objects in ParticleMeshInterface.

Parameters:
  • sycl_target – SYCLTarget to use for computation.

  • particle_mesh_interfaceParticleMeshInterface containing graph.

  • configParameterStore instance to set allowable distance to mesh cell tolerance.

void map(ParticleGroup &particle_group, const int map_cell = -1)#

Called internally by NESO-Particles to map positions to Nektar++ triangles and quads.

Protected Functions

MapParticles2DRegular(const MapParticles2DRegular &st) = delete#

Disable (implicit) copies.

MapParticles2DRegular &operator=(MapParticles2DRegular const &a) = delete#

Disable (implicit) copies.

template<typename U>
inline void write_vertices_2d(U &geom, const int index, double *output)#

Protected Attributes

ParticleMeshInterfaceSharedPtr particle_mesh_interface#
int num_regular_geoms#
std::unique_ptr<BufferDeviceHost<double>> dh_vertices#

The 3 vertices required by mapping from physical space to reference space.

REAL tol#

Tolerance on the distance used to check if a particle is within a geometry object.

class MapParticles3D#

Class to map particles into Nektar++ cells.

Public Functions

MapParticles3D(SYCLTargetSharedPtr sycl_target, ParticleMeshInterfaceSharedPtr particle_mesh_interface, ParameterStoreSharedPtr config = std::make_shared<ParameterStore>())#

Constructor for mapping class.

Parameters:
  • sycl_target – SYCLTarget on which to perform mapping.

  • particle_mesh_interfaceParticleMeshInterface containing 3D Nektar++ cells.

  • configParameterStore configuration for lower level mapping classes.

void map(ParticleGroup &particle_group, const int map_cell = -1)#

Called internally by NESO-Particles to map positions to Nektar++ 3D geometry objects

Protected Functions

MapParticles3D(const MapParticles3D &st) = delete#

Disable (implicit) copies.

MapParticles3D &operator=(MapParticles3D const &a) = delete#

Disable (implicit) copies.

template<typename T>
inline void map_newton_internal(std::unique_ptr<T> &ptr, ParticleGroup &particle_group, const int map_cell)#

Protected Attributes

SYCLTargetSharedPtr sycl_target#
ParticleMeshInterfaceSharedPtr particle_mesh_interface#
std::unique_ptr<MapParticlesCommon> map_particles_common#
std::unique_ptr<MapParticlesHost> map_particles_host#
std::unique_ptr<MapParticles3DRegular> map_particles_3d_regular#
std::tuple<std::unique_ptr<Newton::MapParticlesNewton<Newton::MappingTetLinear3D>>, std::unique_ptr<Newton::MapParticlesNewton<Newton::MappingPrismLinear3D>>, std::unique_ptr<Newton::MapParticlesNewton<Newton::MappingHexLinear3D>>, std::unique_ptr<Newton::MapParticlesNewton<Newton::MappingPyrLinear3D>>> map_particles_3d_deformed_linear#
class MapParticles3DRegular : public NESO::CoarseMappersBase#

Class to map particles into regular (eRegular) triangles and quads.

Configurable with the following options in the passed ParameterStore:

  • MapParticles3DRegular/tol: Tolerance to apply when determining if a particle is within a geometry object (default 0.0).

Public Functions

MapParticles3DRegular(SYCLTargetSharedPtr sycl_target, ParticleMeshInterfaceSharedPtr particle_mesh_interface, ParameterStoreSharedPtr config = std::make_shared<ParameterStore>())#

Create new mapper object for all 3D regular geometry objects in a ParticleMeshInterface.

Parameters:
  • sycl_target – SYCLTarget to use for computation.

  • particle_mesh_interfaceParticleMeshInterface containing Nektar++ MeshGraph.

  • configParameterStore instance to set allowable distance to mesh cell tolerance.

void map(ParticleGroup &particle_group, const int map_cell = -1)#

Called internally by NESO-Particles to map positions to Nektar++ 3D Geometry objects.

Protected Functions

MapParticles3DRegular(const MapParticles3DRegular &st) = delete#

Disable (implicit) copies.

MapParticles3DRegular &operator=(MapParticles3DRegular const &a) = delete#

Disable (implicit) copies.

template<typename U>
inline void write_vertices_3d(U &geom, const int index, double *output)#

Protected Attributes

ParticleMeshInterfaceSharedPtr particle_mesh_interface#
REAL tol#

Tolerance to use to determine if a particle is within a geometry object.

int num_regular_geoms#
std::unique_ptr<BufferDeviceHost<double>> dh_vertices#

The 3 vertices required by mapping from physical space to reference space.

class MapParticlesCommon#

Helper class to determine if particles have been binned into cells. Particles map be binned into local cells at the intermediate step of the hybrid transfer and must be binned into cells at the end of hybrid transfer.

Public Functions

MapParticlesCommon(SYCLTargetSharedPtr sycl_target)#

Create new instance for given SYCLTarget.

Parameters:

sycl_target – SYCLTarget to use.

bool check_map(ParticleGroup &particle_group, const int map_cell = -1, const bool final_map = true)#

Returns true if there are particles that were not binned into cells.

Parameters:
  • particle_group – ParticleGroup to check particles in.

  • map_cell – Only check particles within a particular NESO::Particles cell.

  • final_map – Is this check the final or intermediate step of the hybrid move.

Protected Functions

MapParticlesCommon(const MapParticlesCommon &st) = delete#

Disable (implicit) copies.

MapParticlesCommon &operator=(MapParticlesCommon const &a) = delete#

Disable (implicit) copies.

Protected Attributes

SYCLTargetSharedPtr sycl_target#
std::unique_ptr<ErrorPropagate> ep#
class MapParticlesHost#

Class to map particles into Nektar++ cells on the CPU host. Should work for all 2D and 3D elements.

Configurable with the following options in the passed ParameterStore:

  • MapParticlesHost/tol: Tolerance to apply when determining if a particle is within a geometry object (default 0.0).

Public Functions

MapParticlesHost(SYCLTargetSharedPtr sycl_target, ParticleMeshInterfaceSharedPtr particle_mesh_interface, ParameterStoreSharedPtr config = std::make_shared<ParameterStore>())#

Constructor for mapping class.

Parameters:
  • sycl_target – SYCLTarget on which to perform mapping.

  • particle_mesh_interfaceParticleMeshInterface containing 2D Nektar++ cells.

  • configParameterStore instance to pass tolerance to Nektar++ ContainsPoint.

void map(ParticleGroup &particle_group, const int map_cell = -1)#

Called internally by NESO-Particles to map positions to Nektar++ triangles and quads.

Protected Functions

MapParticlesHost(const MapParticlesHost &st) = delete#

Disable (implicit) copies.

MapParticlesHost &operator=(MapParticlesHost const &a) = delete#

Disable (implicit) copies.

Protected Attributes

REAL tol#

Tolerance to pass to Nektar++ for mapping.

SYCLTargetSharedPtr sycl_target#
ParticleMeshInterfaceSharedPtr particle_mesh_interface#
template<typename NEWTON_TYPE>
class MapParticlesNewton : public NESO::CoarseMappersBase#

Implementation of a Newton method to compute the inverse of X(xi) where X is a map from the reference element coordinate system, with coordinate xi, to the global (physical space). This inverse map is applied to determine the owning Nektar++ cells for each particle.

This class uses static polymorphism with the abstract interface MappingNewtonIterationBase to be applicable to all element types. Hence an instance of this class is made with a collection of geometry instances which share the same functional form for their X map.

Configurable with the following options in the passed ParameterStore:

  • MapParticlesNewton/newton_tol: Exit tolerance on Newton iteration (default 1E-8).

  • MapParticlesNewton/newton_max_iteration: Maximum number of Newton iterations (default 51).

Public Functions

inline ~MapParticlesNewton()#
template<typename TYPE_LOCAL, typename TYPE_REMOTE>
inline MapParticlesNewton(MappingNewtonIterationBase<NEWTON_TYPE> newton_type, SYCLTargetSharedPtr sycl_target, std::map<int, std::shared_ptr<TYPE_LOCAL>> &geoms_local, std::vector<std::shared_ptr<TYPE_REMOTE>> &geoms_remote, ParameterStoreSharedPtr config = std::make_shared<ParameterStore>())#

Create new Newton implementation templated on a X(xi) map type and a geometry type.

Parameters:
  • newton_type – Sub-class of MappingNewtonIterationBase that defines the X(xi) map.

  • sycl_target – SYCLTarget That defines where to perform Newton iteration.

  • geoms_local – Map of local Nektar++ geometry objects to which newton_type is applicable.

  • geoms_remote – Vector of remote Nektar++ geometry objects to which newton_type is applicable.

  • configParameterStore instance to configure exit tolerance and iteration counts.

inline void map(ParticleGroup &particle_group, const int map_cell = -1)#

Called internally by NESO-Particles to map positions to Nektar++ Geometry objects via Newton iteration.

Protected Functions

MapParticlesNewton(const MapParticlesNewton &st) = delete#

Disable (implicit) copies.

MapParticlesNewton &operator=(MapParticlesNewton const &a) = delete#

Disable (implicit) copies.

template<typename U>
inline void write_data(U &geom, const int index)#

Protected Attributes

REAL newton_tol#

Exit tolerance for Newton iteration.

INT newton_max_iteration#

Maximum number of Newton iterations.

int num_geoms#

Number of geometry objects this instance may map to.

const int ndim#

Number of coordinate dimensions.

std::unique_ptr<BufferDeviceHost<char>> dh_data#

The data required to perform newton iterations for each geom on the device.

std::vector<char> h_data#

The data required to perform newton iterations for each geom on the host.

MappingNewtonIterationBase<NEWTON_TYPE> newton_type#

The Newton iteration class.

const std::size_t num_bytes_per_map_device#
const std::size_t num_bytes_per_map_host#
struct MappingHexLinear3D : public NESO::Newton::MappingNewtonIterationBase<MappingHexLinear3D>#

Public Functions

inline void write_data_v(GeometrySharedPtr geom, void *data_host, void *data_device)#
inline void free_data_v(void *data_host)#
inline std::size_t data_size_host_v()#
inline std::size_t data_size_device_v()#
inline void newton_step_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#
inline REAL newton_residual_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#
inline int get_ndim_v()#
inline void set_initial_iteration_v(const void *d_data, const REAL phys0, const REAL phys1, const REAL phys2, REAL *xi0, REAL *xi1, REAL *xi2)#
inline void loc_coord_to_loc_collapsed_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
template<typename SPECIALISATION>
struct MappingNewtonIterationBase#

Abstract base class for Newton iteration methods for binning particles into Nektar++ cells. Subclasses must be device copyable.

Public Functions

inline void write_data(GeometrySharedPtr geom, void *data_host, void *data_device)#

Specialisations should write to the pointer a struct that contains all the data which will be required to perform a Newton iteration on the SYCL device.

Parameters:
  • geom – A geometry object which particles may be binned into.

  • data_host – A host pointer to a buffer which will be kept on the host.

  • data_device – A host pointer to a buffer which will be copied to the compute device.

inline void free_data(void *data_host)#

Called at destruction to enable implementations to free additional memory which was allocated for variable length Newton iteration data (and pointed to in the data_device memory).

inline std::size_t data_size_host()#

The number of bytes required to store the data required to perform a Newton iteration on the device. i.e. the write_data call is free to write this number of bytes to the passed pointer on the host (and copied to device).

Returns:

Number of bytes required to be allocated.

inline std::size_t data_size_device()#

The number of bytes required to store the data required to perform a Newton iteration on the host. i.e. the write_data call is free to write this number of bytes to the passed pointer on the host.

Returns:

Number of bytes required to be allocated.

inline void newton_step(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#

Perform a Newton iteration such that

xi_{n+1} = xi_n - J^{-1}(xi_n) F(xi_n)

where

F(xi) = X(xi) - P

for target physical coordinates P. All data required to perform the iteration should be contained in the memory region (i.e. a struct) pointed to by d_data.

Parameters:
  • d_data[in] Pointer to data required to perform the Newton iteration.

  • xi0[in] Current iteration of xi coordinate, x component.

  • xi1[in] Current iteration of xi coordinate, y component.

  • xi2[in] Current iteration of xi coordinate, z component.

  • phys0[in] Target coordinate in physical space, x component.

  • phys1[in] Target coordinate in physical space, y component.

  • phys2[in] Target coordinate in physical space, z component.

  • f0[in] F(xi), x component.

  • f1[in] F(xi), y component.

  • f2[in] F(xi), z component.

  • xin0[inout] Output new iteration for local coordinate xi, x component.

  • xin1[inout] Output new iteration for local coordinate xi, y component.

  • xin2[inout] Output new iteration for local coordinate xi, z component.

inline REAL newton_residual(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#

Compute residual

||F(xi_n)||

where

F(xi) = X(xi) - P

for target physical coordinates P and sensible norm ||F||. All data required to compute the residual should be contained in the memory region (i.e. a struct) pointed to by d_data. Computes and returns F(xi) for the passed xi. Note F should always be of the form X - P, not P - X, such that the implementation of the residual can be reused as an implementation of X by passing P=0.

Parameters:
  • d_data[in] Pointer to data required to perform the Newton iteration.

  • xi0[in] Current iteration of xi coordinate, x component.

  • xi1[in] Current iteration of xi coordinate, y component.

  • xi2[in] Current iteration of xi coordinate, z component.

  • phys0[in] Target coordinate in physical space, x component.

  • phys1[in] Target coordinate in physical space, y component.

  • phys2[in] Target coordinate in physical space, z component.

  • f0[inout] F(xi), x component.

  • f1[inout] F(xi), y component.

  • f2[inout] F(xi), z component.

Returns:

Residual.

inline int get_ndim()#

Get the number of coordinate dimensions the iteration is performed in. i.e. how many position components should be read from the particle and reference coordinates written.

Returns:

Number of coordinate dimensions.

inline void set_initial_iteration(const void *d_data, const REAL phys0, const REAL phys1, const REAL phys2, REAL *xi0, REAL *xi1, REAL *xi2)#

Set the initial iteration prior to the newton iteration.

Parameters:
  • d_data[in] Pointer to data required to perform the Newton iteration.

  • phys0[in] Target coordinate in physical space, x component.

  • phys1[in] Target coordinate in physical space, y component.

  • phys2[in] Target coordinate in physical space, z component.

  • xi0[inout] Input x coordinate to reset.

  • xi1[inout] Input y coordinate to reset.

  • xi2[inout] Input z coordinate to reset.

inline void loc_coord_to_loc_collapsed(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#

Map local coordinate (xi) to local collapsed coordinate (eta).

Parameters:
  • d_data[in] Pointer to data required to perform the Newton iteration.

  • xi0[in] Local coordinate (xi) to be mapped to collapsed coordinate, x component.

  • xi1[in] Local coordinate (xi) to be mapped to collapsed coordinate, y component.

  • xi2[in] Local coordinate (xi) to be mapped to collapsed coordinate, z component.

  • eta0[inout] Local collapsed coordinate (eta), x component.

  • eta1[inout] Local collapsed coordinate (eta), y component.

  • eta2[inout] Local collapsed coordinate (eta), z component.

struct MappingPrismLinear3D : public NESO::Newton::MappingNewtonIterationBase<MappingPrismLinear3D>#

Public Functions

inline void write_data_v(GeometrySharedPtr geom, void *data_host, void *data_device)#
inline void free_data_v(void *data_host)#
inline std::size_t data_size_host_v()#
inline std::size_t data_size_device_v()#
inline void newton_step_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#
inline REAL newton_residual_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#
inline int get_ndim_v()#
inline void set_initial_iteration_v(const void *d_data, const REAL phys0, const REAL phys1, const REAL phys2, REAL *xi0, REAL *xi1, REAL *xi2)#
inline void loc_coord_to_loc_collapsed_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
struct MappingPyrLinear3D : public NESO::Newton::MappingNewtonIterationBase<MappingPyrLinear3D>#

Public Functions

inline void write_data_v(GeometrySharedPtr geom, void *data_host, void *data_device)#
inline void free_data_v(void *data_host)#
inline std::size_t data_size_host_v()#
inline std::size_t data_size_device_v()#
inline void newton_step_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#
inline REAL newton_residual_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#
inline int get_ndim_v()#
inline void set_initial_iteration_v(const void *d_data, const REAL phys0, const REAL phys1, const REAL phys2, REAL *xi0, REAL *xi1, REAL *xi2)#
inline void loc_coord_to_loc_collapsed_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
struct MappingQuadLinear2D : public NESO::Newton::MappingNewtonIterationBase<MappingQuadLinear2D>#

Public Functions

inline void write_data_v(GeometrySharedPtr geom, void *data_host, void *data_device)#
inline void free_data_v(void *data_host)#
inline std::size_t data_size_host_v()#
inline std::size_t data_size_device_v()#
inline void newton_step_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#
inline REAL newton_residual_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#
inline int get_ndim_v()#
inline void set_initial_iteration_v(const void *d_data, const REAL phys0, const REAL phys1, const REAL phys2, REAL *xi0, REAL *xi1, REAL *xi2)#
inline void loc_coord_to_loc_collapsed_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
struct MappingTetLinear3D : public NESO::Newton::MappingNewtonIterationBase<MappingTetLinear3D>#

Public Functions

inline void write_data_v(GeometrySharedPtr geom, void *data_host, void *data_device)#
inline void free_data_v(void *data_host)#
inline std::size_t data_size_host_v()#
inline std::size_t data_size_device_v()#
inline void newton_step_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#
inline REAL newton_residual_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#
inline int get_ndim_v()#
inline void set_initial_iteration_v(const void *d_data, const REAL phys0, const REAL phys1, const REAL phys2, REAL *xi0, REAL *xi1, REAL *xi2)#
inline void loc_coord_to_loc_collapsed_v(const void *d_data, const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
class Mesh#

Public Functions

Mesh(int nintervals = 10, double dt = 0.1, int nt = 1000)#
double evaluate_electric_field(const double x)#
inline double sycl_evaluate_electric_field(sycl::accessor<double> mesh_d, sycl::accessor<double> electric_field_d, double x)#
void deposit(Plasma &plasma)#
void sycl_deposit(sycl::queue &Q, Plasma &plasma)#
void solve_for_potential()#
void sycl_solve_for_electric_field_fft(sycl::queue &Q, FFT &fft)#
void get_electric_field()#
void get_E_staggered_from_E()#
void set_initial_field(sycl::queue &Q, Mesh &mesh, Plasma &plasma, FFT &fft)#
int get_left_index(const double x, const std::vector<double> mesh)#
inline int sycl_get_left_index(const double x, const sycl::accessor<double> mesh_d)#

Public Members

double t#
double dt#
int nt#
int nintervals#
int nmesh#
sycl::buffer<int, 1> nmesh_d#
double dx#
sycl::buffer<double, 1> dx_d#
double normalized_box_length#
std::vector<double> mesh#
sycl::buffer<double, 1> mesh_d#
std::vector<double> mesh_staggered#
std::vector<double> k#
std::vector<double> poisson_factor#
std::vector<Complex> poisson_E_factor#
sycl::buffer<Complex, 1> poisson_E_factor_d#
std::vector<double> charge_density#
sycl::buffer<double, 1> charge_density_d#
std::vector<double> electric_field#
sycl::buffer<double, 1> electric_field_d#
std::vector<double> electric_field_staggered#
std::vector<double> potential#
double *du#
double *d#
double *dl#
double *b#
class MeshHierarchyBoundingBoxIntersection#

Class to determine if a bounding box, e.g. from a Nektar++ element, intersects with a set of MeshHierarchy cells.

Public Functions

inline ~MeshHierarchyBoundingBoxIntersection()#
inline MeshHierarchyBoundingBoxIntersection(std::shared_ptr<MeshHierarchy> mesh_hierarchy, std::vector<INT> &owned_cells)#

Create container of bounding boxes on which intersection tests can be performed.

Parameters:
  • mesh_hierarchy – MeshHierarchy instance holding cells.

  • owned_cells – Vector of linear global cell indices in MeshHierarchy.

template<std::size_t ARRAY_LENGTH>
inline bool intersects(std::array<double, ARRAY_LENGTH> &query_bounding_box)#

Test if a bounding box intersects with any of the held bounding boxes.

Parameters:

query_bounding_box – Bounding box in Nektar++ format.

Public Members

const int ndim#
std::vector<std::array<double, 6>> bounding_boxes#
std::array<double, 6> bounding_box#
struct ModifiedA : public NESO::BasisJacobi::Basis1D<ModifiedA>#

Specialisation of Basis1D that calls the mod_A function that implements eModified_A.

Public Static Functions

static inline void evaluate(const int nummodes, const REAL z, const int k_stride_n, const REAL *k_coeffs_pnm10, const REAL *k_coeffs_pnm11, const REAL *k_coeffs_pnm2, REAL *output)#
struct ModifiedB : public NESO::BasisJacobi::Basis1D<ModifiedB>#

Specialisation of Basis1D that calls the mod_B function that implements eModified_B.

Public Static Functions

static inline void evaluate(const int nummodes, const REAL z, const int k_stride_n, const REAL *k_coeffs_pnm10, const REAL *k_coeffs_pnm11, const REAL *k_coeffs_pnm2, REAL *output)#
struct ModifiedC : public NESO::BasisJacobi::Basis1D<ModifiedC>#

Specialisation of Basis1D that calls the mod_B function that implements eModified_C.

Public Static Functions

static inline void evaluate(const int nummodes, const REAL z, const int k_stride_n, const REAL *k_coeffs_pnm10, const REAL *k_coeffs_pnm11, const REAL *k_coeffs_pnm2, REAL *output)#
struct ModifiedPyrC : public NESO::BasisJacobi::Basis1D<ModifiedPyrC>#

Specialisation of Basis1D that calls the mod_B function that implements eModifiedPyr_C.

Public Static Functions

static inline void evaluate(const int nummodes, const REAL z, const int k_stride_n, const REAL *k_coeffs_pnm10, const REAL *k_coeffs_pnm11, const REAL *k_coeffs_pnm2, REAL *output)#
class NektarCartesianPeriodic#

Periodic boundary conditions implementation designed to work with a CartesianHMesh.

Public Functions

inline ~NektarCartesianPeriodic()#
inline NektarCartesianPeriodic(SYCLTargetSharedPtr sycl_target, Nektar::SpatialDomains::MeshGraphSharedPtr graph, ParticleDatSharedPtr<REAL> position_dat)#

Construct instance to apply periodic boundary conditions to particles within the passed ParticleDat.

Parameters:
  • sycl_target – SYCLTargetSharedPtr to use as compute device.

  • graph – Nektar++ MeshGraph on which particles move.

  • position_dat – ParticleDat containing particle positions.

inline void execute()#

Apply periodic boundary conditions to the particle positions in the ParticleDat this instance was created with.

Public Members

double global_origin[3]#
double global_extent[3]#

Private Members

BufferDevice<double> d_origin#
BufferDevice<double> d_extents#
SYCLTargetSharedPtr sycl_target#
ParticleDatSharedPtr<REAL> position_dat#
const int ndim#
class NektarFieldIndexMap#
#include <utilities.hpp>

Utility class to convert Nektar field names to indices.

Public Functions

inline NektarFieldIndexMap(std::vector<std::string> field_names)#

Create map from field names to indices. It is assumed that the field index is the position in the input vector.

Parameters:

field_names – Vector of field names.

inline int get_idx(std::string field_name)#

Get the index of a field by name.

Parameters:

field_name – Name of field to get index for.

Returns:

Non-negative integer if field exists -1 otherwise.

inline int at(std::string field_name)#

Identical to get_idx except this method mirrors the std library behaviour and is fatal if the named field does not exist in the map.

Parameters:

field_name – Name of field to get index for.

Returns:

Non-negative integer if field exists.

Private Members

std::map<std::string, int> field_to_index#
class NektarGraphLocalMapper : public LocalMapper#

Class to map particle positions to Nektar++ geometry objects.

Public Functions

inline ~NektarGraphLocalMapper()#
void particle_group_callback(ParticleGroup &particle_group)#

Callback for ParticleGroup to execute for additional setup of the LocalMapper that may involve the ParticleGroup.

Parameters:

particle_group – ParticleGroup instance.

NektarGraphLocalMapper(SYCLTargetSharedPtr sycl_target, ParticleMeshInterfaceSharedPtr particle_mesh_interface, ParameterStoreSharedPtr config = std::make_shared<ParameterStore>())#

Construct a new mapper object.

Parameters:
  • sycl_target – SYCLTarget to use.

  • particle_mesh_interface – Interface between NESO-Particles and Nektar++ mesh.

  • tol – Tolerance to pass to Nektar++ to bin particles into cells.

  • configParameterStore instance to configure lower level particle to cell mappers.

void map(ParticleGroup &particle_group, const int map_cell = -1)#

Called internally by NESO-Particles to map positions to Nektar++ geometry objects.

Private Members

SYCLTargetSharedPtr sycl_target#
ParticleMeshInterfaceSharedPtr particle_mesh_interface#
std::unique_ptr<MapParticles2D> map_particles_2d#
std::unique_ptr<MapParticles3D> map_particles_3d#
class NESOCellsToNektarExp#
#include <utilities.hpp>

Helper class to map directly from NESO-Particles cells to Nektar++ expansions.

Public Functions

template<typename T>
inline NESOCellsToNektarExp(std::shared_ptr<T> exp_list, CellIDTranslationSharedPtr cell_id_translation)#

Create map for a given DisContField or ContField.

Parameters:
  • exp_list – DistContField or ContField (ExpList deriviative) containing expansions for each cell in the mesh.

  • cell_id_translationCellIDTranslation instance for the MeshGraph used by the expansion list.

inline LocalRegions::ExpansionSharedPtr get_exp(const int neso_cell)#

Get the expansion that corresponds to a input NESO::Particles cell.

Parameters:

neso_cell – NESO::Particles cell to get expansion for.

Returns:

Nektar++ expansion for requested cell.

inline int get_exp_id(const int neso_cell)#

Get the expansion id that corresponds to a input NESO::Particles cell.

Parameters:

neso_cell – NESO::Particles cell to get expansion for.

Returns:

Nektar++ expansion id for requested cell.

Protected Attributes

ExpListSharedPtr exp_list#
std::map<int, int> map#
class PackedGeom2D#

Public Functions

inline PackedGeom2D(std::vector<unsigned char> &buf)#
inline PackedGeom2D(unsigned char *buf_in, const int input_length = -1)#
template<typename T>
inline PackedGeom2D(int rank, int local_id, std::shared_ptr<T> &geom)#
inline int get_offset()#
inline int get_rank()#
inline int get_local_id()#
template<typename T>
inline std::shared_ptr<RemoteGeom2D<T>> unpack()#

Public Members

std::vector<unsigned char> buf#

Private Functions

template<typename T>
inline void push(T *data)#
template<typename T>
inline void pop(T *data)#
template<typename T>
inline void pack_general(T &geom)#
inline void unpack_general()#
template<typename T>
inline void pack(std::shared_ptr<T> &geom)#

Private Members

int rank#
int local_id#
int id#
int num_edges#
unsigned char *buf_in = nullptr#
int input_length = 0#
int offset = 0#
std::vector<SpatialDomains::SegGeomSharedPtr> edges#
std::vector<SpatialDomains::PointGeomSharedPtr> vertices#
class PackedGeoms2D#

Public Functions

inline PackedGeoms2D()#
template<typename T>
inline PackedGeoms2D(int rank, std::map<int, std::shared_ptr<T>> &geom_map)#
template<typename T>
inline PackedGeoms2D(std::vector<std::shared_ptr<RemoteGeom2D<T>>> &geoms)#
inline PackedGeoms2D(unsigned char *buf_in, int input_length)#
template<typename T>
inline void unpack(std::vector<std::shared_ptr<RemoteGeom2D<T>>> &geoms)#

Public Members

std::vector<unsigned char> buf#

Private Functions

inline int get_packed_count()#

Private Members

unsigned char *buf_in#
int input_length = 0#
int offset = 0#
class ParameterStore#

Class to store key,value pairs where keys are strings and values are either INT or REAL.

Public Functions

inline ParameterStore()#
template<typename T>
inline ParameterStore(std::map<std::string, T> map_input)#

Create store from a single dictonary.

Parameters:

map_input – std::map of entries.

template<typename T, typename U>
inline ParameterStore(std::map<std::string, T> map_0, std::map<std::string, U> map_1)#

Create store from two dictonaries.

Parameters:
  • map_0 – First std::map.

  • map_1 – Second std::map.

template<typename T>
inline void set(const std::string name, const T value)#

Store a REAL or INT value against a string key.

Parameters:
  • name – Key passed as string.

  • value – REAL or INT value to store against key.

inline bool contains(const std::string name)#

Test if key exists in store.

Parameters:

name – Key to test for.

Returns:

True if key exists in store.

template<typename T>
inline T get(const std::string name, const T value = 0)#

Retrieve a REAL or INT value stored against a given key. If the key is not found return the passed value as a default.

Parameters:
  • name – Key of value to retrieve from the store.

  • value – Default value to return if the key is not present in the store.

Protected Functions

template<typename T>
inline void add_internal(std::map<std::string, T> map_input)#

Protected Attributes

std::map<std::string, std::variant<INT, REAL>> store#
class ParticleInitialisationLine#

Helper class to initialise particles that line along a (discretised) straight line embedded in a Nektar++ mesh. The line is decomposed into N nodes which are possible creation locations for particles. These points are decomposed over the mesh such that the MPI rank that owns a point in space holds the point in this class. The reference positions and NESO-Particles cells are also precomputed and stored.

Public Functions

inline ParticleInitialisationLine(DomainSharedPtr domain, SYCLTargetSharedPtr sycl_target, std::vector<double> line_start, std::vector<double> line_end, const int npoints_total)#

Create N points along a line by specifying the start and end of the line and the number of possible points. These N points are evenly distributed over the line.

Parameters:
  • domain – A NESO-Particles domain instance. This domain must be created with a NESO ParticleMeshInterface mesh object.

  • sycl_target – SYCLTarget to use.

  • line_start – Starting point of the line. Number of components must be at least the spatial dimension of the passed domain.

  • line_end – End point of the line. Number of components must be at least the spatial dimension of the passed domain.

  • npoints_total – Number of possible locations where particles can be created along the line.

Public Members

const int npoints_total#

The number of possible particle locations along the line.

int npoints_local#

The number of points along the line owned by this MPI rank.

std::vector<std::vector<double>> point_phys_positions#

Physical location of points indexed by [dimension][point_index];.

std::vector<std::vector<double>> point_ref_positions#

Reference location of points indexed by [dimension][point_index];.

std::vector<int> point_neso_cells#

NESO cell index of points indexed by [point_index].

class ParticleMeshInterface : public HMesh#

Create a MeshHierarchy around a Nektar++ graph. Also handles exchange of Nektar++ geometry objects to cover the owned cells in the MeshHierarchy.

Public Functions

ParticleMeshInterface(const ParticleMeshInterface &st) = delete#

Disable (implicit) copies.

ParticleMeshInterface &operator=(ParticleMeshInterface const &a) = delete#

Disable (implicit) copies.

inline ~ParticleMeshInterface()#
inline ParticleMeshInterface(Nektar::SpatialDomains::MeshGraphSharedPtr graph, const int subdivision_order_offset = 0, MPI_Comm comm = MPI_COMM_WORLD)#

Create new ParticleMeshInterface.

Parameters:
  • graph – Nektar++ MeshGraph to use.

  • subdivision_order_offset – Offset to the computed subdivision order. An offset of 0 will match the order of elements in the MeshGraph.

  • comm – MPI Communicator to use.

inline MPI_Comm get_comm()#

Get the MPI communicator of the mesh.

Returns:

MPI communicator.

inline int get_ndim()#

Get the number of dimensions of the mesh.

Returns:

Number of mesh dimensions.

inline std::vector<int> &get_dims()#

Get the Mesh dimensions.

Returns:

Mesh dimensions.

inline int get_subdivision_order()#

Get the subdivision order of the mesh.

Returns:

Subdivision order.

inline int get_cell_count()#

Get the total number of cells in the mesh on this MPI rank, i.e. the number of Nektar++ elements on this MPI rank.

Returns:

Total number of mesh cells on this MPI rank.

inline double get_cell_width_coarse()#

Get the mesh width of the coarse cells in the MeshHierarchy.

Returns:

MeshHierarchy coarse cell width.

inline double get_cell_width_fine()#

Get the mesh width of the fine cells in the MeshHierarchy.

Returns:

MeshHierarchy fine cell width.

inline double get_inverse_cell_width_coarse()#

Get the inverse mesh width of the coarse cells in the MeshHierarchy.

Returns:

MeshHierarchy inverse coarse cell width.

inline double get_inverse_cell_width_fine()#

Get the inverse mesh width of the fine cells in the MeshHierarchy.

Returns:

MeshHierarchy inverse fine cell width.

inline int get_ncells_coarse()#

Get the global number of coarse cells.

Returns:

Global number of coarse cells.

inline int get_ncells_fine()#

Get the number of fine cells per coarse cell.

Returns:

Number of fine cells per coarse cell.

inline std::shared_ptr<MeshHierarchy> get_mesh_hierarchy()#

Get the MeshHierarchy instance placed over the mesh.

Returns:

MeshHierarchy placed over the mesh.

inline void free()#

Free the mesh and associated communicators.

inline std::vector<int> &get_local_communication_neighbours()#

Get a std::vector of MPI ranks which should be used to setup local communication patterns.

Returns:

std::vector of MPI ranks.

inline void get_point_in_subdomain(double *point)#

Get a point in the domain that should be in, or at least close to, the sub-domain on this MPI process. Useful for parallel initialisation.

Parameters:

point – Pointer to array of size equal to at least the number of mesh dimensions.

Public Members

Nektar::SpatialDomains::MeshGraphSharedPtr graph#

The Nektar++ graph on which the instance is based.

int ndim#

Number of dimensions (physical).

int subdivision_order#

Subdivision order of MeshHierarchy.

int subdivision_order_offset#

Subdivision order offset used to create MeshHierarchy.

MPI_Comm comm#

MPI Communicator used.

int comm_rank#

MPI rank on communicator.

int comm_size#

Size of MPI communicator.

std::shared_ptr<MeshHierarchy> mesh_hierarchy#

Underlying MeshHierarchy instance.

int cell_count#

Number of cells, i.e. Number of Nektar++ elements on this rank.

int ncells_coarse#

Number of coarse cells in MeshHierarchy.

int ncells_fine#

Number of fine cells per coarse cell in MeshHierarchy.

std::array<double, 6> bounding_box#

Bounding box for elements on this rank.

std::array<double, 6> global_bounding_box#

Global bounding box for all elements in graph.

std::array<double, 3> extents#

Local extents of local bounding box.

std::array<double, 3> global_extents#

Global extents of global bounding box.

std::vector<int> neighbour_ranks#

Vector of nearby ranks which local exchange patterns can be setup with.

std::vector<INT> owned_mh_cells#

Vector of MeshHierarchy cells which are owned by this rank.

std::vector<INT> unowned_mh_cells#

Vector of MeshHierarchy cells which were claimed but are not owned by this rank.

std::vector<std::shared_ptr<RemoteGeom2D<TriGeom>>> remote_triangles#

Vector of remote TriGeom objects which have been copied to this rank.

std::vector<std::shared_ptr<RemoteGeom2D<QuadGeom>>> remote_quads#

Vector of remote QuadGeom objects which have been copied to this rank.

std::vector<std::shared_ptr<RemoteGeom3D>> remote_geoms_3d#

Vector of remote 3D geometry objects which have been copied to this rank.

Private Functions

template<typename T>
inline int exchange_get_send_ranks(std::map<int, std::shared_ptr<T>> &element_map, MHGeomMap &mh_geom_map, std::map<int, std::map<int, std::shared_ptr<T>>> &rank_element_map, std::vector<int> &send_ranks)#

Get the MPI remote MPI ranks this rank expects to send geometry objects to.

inline MPI_Request exchange_init_send_counts()#

Reset the local data structures before call to exchange_finalise_send_counts.

inline int exchange_finalise_send_counts(MPI_Request &request_barrier, std::vector<int> &send_ranks)#

Exchange send counts of geometry objecys between MPI ranks.

inline void exchange_get_recv_ranks(const int num_send_ranks, std::vector<int> &send_ranks, std::vector<int> &send_sizes, const int num_recv_ranks, std::vector<int> &recv_ranks, std::vector<int> &recv_sizes)#

Get the ranks to recv from for exchange operations

template<typename T>
inline void exchange_packed_2d(const int num_send_ranks, std::map<int, std::map<int, std::shared_ptr<T>>> &rank_element_map, std::vector<int> &send_ranks, std::vector<std::shared_ptr<RemoteGeom2D<T>>> &output_container)#

Pack and exchange 2D geometry objects between MPI ranks.

template<typename T>
inline void exchange_geometry_2d(std::map<int, std::shared_ptr<T>> &element_map, MHGeomMap &mh_geom_map, std::vector<std::shared_ptr<RemoteGeom2D<T>>> &output_container)#

Determine 2D elements to send to remote ranks and exchange them to build 2D halos.

inline void compute_bounding_box(std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>> &geoms_2d, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry3D>> &geoms_3d)#

Find a global bounding box around the computational domain.

inline void create_mesh_hierarchy()#

Create a mesh hierarchy based on the bounding box and number of elements.

inline void claim_mesh_hierarchy_cells(LocalClaim &local_claim)#

Loop over cells that were claimed locally and claim them in the mesh hierarchy.

template<typename T>
inline void claim_cells(std::map<int, std::shared_ptr<T>> &geoms, LocalClaim &local_claim, MHGeomMap &mh_geom_map)#

For each Nektar++ element claim cells based on bounding box.

inline void get_unowned_cells(LocalClaim &local_claim)#

Find the cells which were claimed by this rank but are acutally owned by a remote rank

inline void create_halos_2d(TriGeomMap &triangles, QuadGeomMap &quads, MHGeomMap &mh_geom_map_tri, MHGeomMap &mh_geom_map_quad)#

Create halos on a 2D mesh.

template<typename T>
inline void exchange_2d_send_wrapper(std::map<int, std::map<int, std::shared_ptr<T>>> &rank_element_map, std::vector<std::shared_ptr<RemoteGeom2D<T>>> &output_container)#

Wrapper around exchange_packed_2d for building 3D halos.

inline void create_halos_3d(std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>> &geoms_2d, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry3D>> &geoms_3d, MHGeomMap &mh_geom_map)#

Create halos on a 3D mesh

inline void collect_neighbour_ranks()#

Construct the list of neighbour MPI ranks from the remote geometry objects.

Private Members

MPI_Win recv_win#
int *recv_win_data#
class Plasma#

Public Functions

Plasma(std::vector<Species> species_list)#
void push(sycl::queue &q, Mesh &mesh)#

Public Members

std::vector<Species> species#
std::vector<Species> kinetic_species#
std::vector<Species> adiabatic_species#
int nspec#
int n_kinetic_spec#
int n_adiabatic_spec#
struct Prism : public NESO::ExpansionLooping::JacobiExpansionLoopingInterface<Prism>#
#include <prism.hpp>

Implements evaluation and projection for Prism elements with eModified_A/B basis functions.

Public Functions

inline void loc_coord_to_loc_collapsed_v(const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
inline void evaluate_basis_0_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_1_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_2_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void loop_evaluate_v(const int nummodes, const REAL *const dofs, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *output)#
inline void loop_project_v(const int nummodes, const REAL value, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *dofs)#
inline ShapeType get_shape_type_v()#
inline int get_ndim_v()#
struct Prism : public NESO::GeometryInterface::BaseCoordinateMapping3D<Prism>#

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed_v(const T xi0, const T xi1, const T xi2, T *eta0, T *eta1, T *eta2)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[in] Local coordinate to map to collapsed coordinate. Component z.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

  • eta2[inout] Local collapsed coordinate. Component z.

template<typename T>
inline void loc_collapsed_to_loc_coord_v(const T eta0, const T eta1, const T eta2, T *xi0, T *xi1, T *xi2)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • eta2[in] Local collapsed coordinate. Component z.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[inout] Local coordinate to map to collapsed coordinate. Component z.

struct Pyramid : public NESO::ExpansionLooping::JacobiExpansionLoopingInterface<Pyramid>#
#include <pyramid.hpp>

Implements evaluation and projection for Pyramid elements with eModified_A/A/PyrC basis functions.

Public Functions

inline void loc_coord_to_loc_collapsed_v(const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
inline void evaluate_basis_0_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_1_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_2_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void loop_evaluate_v(const int nummodes, const REAL *const dofs, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *output)#
inline void loop_project_v(const int nummodes, const REAL value, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *dofs)#
inline ShapeType get_shape_type_v()#
inline int get_ndim_v()#
struct Pyramid : public NESO::GeometryInterface::BaseCoordinateMapping3D<Pyramid>#

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed_v(const T xi0, const T xi1, const T xi2, T *eta0, T *eta1, T *eta2)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[in] Local coordinate to map to collapsed coordinate. Component z.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

  • eta2[inout] Local collapsed coordinate. Component z.

template<typename T>
inline void loc_collapsed_to_loc_coord_v(const T eta0, const T eta1, const T eta2, T *xi0, T *xi1, T *xi2)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • eta2[in] Local collapsed coordinate. Component z.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[inout] Local coordinate to map to collapsed coordinate. Component z.

struct Quadrilateral : public NESO::ExpansionLooping::JacobiExpansionLoopingInterface<Quadrilateral>#
#include <quadrilateral.hpp>

Implements evaluation and projection for Quadrilateral elements with eModified_A basis functions in each dimension.

Public Functions

inline void loc_coord_to_loc_collapsed_v(const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
inline void evaluate_basis_0_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_1_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_2_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void loop_evaluate_v(const int nummodes, const REAL *const dofs, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *output)#
inline void loop_project_v(const int nummodes, const REAL value, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *dofs)#
inline ShapeType get_shape_type_v()#
inline int get_ndim_v()#
struct Quadrilateral : public NESO::GeometryInterface::BaseCoordinateMapping2D<Quadrilateral>#

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed_v(const T xi0, const T xi1, T *eta0, T *eta1)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

template<typename T>
inline void loc_collapsed_to_loc_coord_v(const T eta0, const T eta1, T *xi0, T *xi1)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

template<typename T>
class RemoteGeom2D#
#include <remote_geom_2d.hpp>

Description of a 2D geometry object that is owned by a remote rank.

Public Functions

inline RemoteGeom2D(int rank, int id, std::shared_ptr<T> geom)#

Constructor for remote geometry object.

Parameters:
  • rank – Remote rank that owns the object.

  • id – Remote id of this geometry object.

  • geom – Shared pointer to local copy of the geometry object.

inline std::array<NekDouble, 6> GetBoundingBox()#

Get the Nektar++ bounding box for the geometry object.

Returns:

Bounding box.

Public Members

int rank = -1#

The remote rank that owns the geometry object (i.e. holds it in its MeshGraph).

int id = -1#

The geometry id on the remote rank.

std::shared_ptr<T> geom#

A local copy of the geometry object.

class RemoteGeom3D#

Public Functions

template<typename T>
inline RemoteGeom3D(const int rank, const int id, std::shared_ptr<T> geom)#

Wrapper around remote 3D geometry object.

Parameters:
  • rank – Owning rank.

  • id – Geometry id on remote rank.

  • geom – Shared pointer to geometry object.

inline std::array<NekDouble, 6> GetBoundingBox()#

Get the Nektar++ bounding box for the geometry object.

Returns:

Bounding box.

Public Members

int rank = -1#

The remote rank that owns the geometry object (i.e. holds it in its MeshGraph).

int id = -1#

The geometry id on the remote rank.

std::shared_ptr<Nektar::SpatialDomains::Geometry3D> geom#

A local copy of the geometry object.

LibUtilities::ShapeType shape_type#

The underlying Nektar++ shape type.

class RunInfo#

Public Functions

RunInfo(sycl::queue &Q, const char *git_revision, const char *git_repo_state)#
void get_device_info(const sycl::queue &Q)#
void list_all_devices()#
void get_selected_device_info(const sycl::queue &Q)#
void report_run_info()#

Public Members

std::string device_name#
std::string device_vendor#
std::string device_type#
const char *git_revision#
const char *git_repo_state#
template<typename T>
class SimpleUniformPointSampler#

Simple class to globally sample from a set of points. N samples are made on each MPI rank and those within the bounds of the point set are kept.

Public Functions

inline SimpleUniformPointSampler(SYCLTargetSharedPtr sycl_target, std::shared_ptr<T> initialisation_points, unsigned int *seed = NULL)#

Create instance from a set of points.

Parameters:
  • sycl_target – SYCLTarget instance to use.

  • initialisation_points – Set of points, e.g. ParticleInitialisationLine instance.

  • seed – Pointer to global seed to use for sampling, default NULL.

template<typename U>
inline int get_samples(const int num_samples, U &output_container)#

Sample N local point indices (globally) and place the indices in the provided output container.

Parameters:
  • num_samples – Number of points to sample.

  • output_container – Output, push_back will be called on this instance to add point indices.

Returns:

Number of points sampled on this MPI rank.

Public Members

int rng_seed#

The seed used by the RNG used to sample points.

Protected Attributes

SYCLTargetSharedPtr sycl_target#
std::shared_ptr<T> initialisation_points#
std::mt19937 rng#
std::uniform_int_distribution<int> point_distribution#
int index_start#
int index_end#
template<typename SOLVER>
struct SolverCallback#

Base class which can be inherited from to create a callback for a solver class called NameOfSolver.

class Foo: public SolverCallback<NameOfSolver> {
   void call(NameOfSolver * state){
      // Do something with state
   }
}
Deriving from this class is not compulsory to create a callback.

Public Functions

virtual void call(SOLVER *state) = 0#

Call the callback function with the current state passed as a pointer. The callback may modify the solver (at the callers peril). Note the order in which callbacks are called is undefined.

Parameters:

state[inout] Pointer to solver instance.

template<typename SOLVER>
class SolverCallbackHandler#

Class to handle calling callbacks from within a solver. This class can be a member variable of a solver or inherited from by the solver. The class is templated on the solver type which defines the pointer type passed to the callback functions.

Public Functions

inline void register_pre_integrate(std::function<void(SOLVER*)> func)#

Register a function to be called before each time integration step. e.g.

SolverCallbackHandler<NameOfSolver> solver_callback_handler;
solver_callback_handler.register_pre_integrate(
   std::function<void(NameOfSolver *)>{
     [&](NameOfSolver *state) {
       // use state
      }
    }
  );
}

Parameters:

func[in] Function handle to add to callbacks.

template<typename T, typename U>
inline void register_pre_integrate(T func, U &inst)#

Register a class method to be called before each time integration step. e.g.

struct TestInterface {
  void call(NameOfSolver *state) {
    // use state
  }
};

TestInterface ti;
SolverCallbackHandler<NameOfSolver> solver_callback_handler;
solver_callback_handler.register_pre_integrate(&TestInterface::call,
                                               ti);

Parameters:
  • func[in] Function handle to add to callbacks in the form of &ClassName::method_name

  • inst[in] Instance of ClassName object on which to call method_name.

inline void register_pre_integrate(SolverCallback<SOLVER> &obj)#

Register a type derived of SolverCallback as a callback. e.g.

struct TestInterface : public SolverCallback<NameOfSolver> {
  void call(NameOfSolver *state) {
    // use state
  }
};

TestInterface ti;
SolverCallbackHandler<NameOfSolver> solver_callback_handler;
solver_callback_handler.register_pre_integrate(ti);

Parameters:

obj[in] Derived type to add as callback object.

inline void register_post_integrate(std::function<void(SOLVER*)> func)#

Register a function to be called after each time integration step. e.g.

SolverCallbackHandler<NameOfSolver> solver_callback_handler;
solver_callback_handler.register_post_integrate(
   std::function<void(NameOfSolver *)>{
     [&](NameOfSolver *state) {
       // use state
      }
    }
  );
}

Parameters:

func[in] Function handle to add to callbacks.

template<typename T, typename U>
inline void register_post_integrate(T func, U &inst)#

Register a class method to be called after each time integration step. e.g.

struct TestInterface {
  void call(NameOfSolver *state) {
    // use state
  }
};

TestInterface ti;
SolverCallbackHandler<NameOfSolver> solver_callback_handler;
solver_callback_handler.register_post_integrate(&TestInterface::call,
ti);

Parameters:
  • func[in] Function handle to add to callbacks in the form of &ClassName::method_name

  • inst[in] Instance of ClassName object on which to call method_name.

inline void register_post_integrate(SolverCallback<SOLVER> &obj)#

Register a type derived of SolverCallback as a callback. e.g.

struct TestInterface : public SolverCallback<NameOfSolver> {
  void call(NameOfSolver *state) {
    // use state
  }
};

TestInterface ti;
SolverCallbackHandler<NameOfSolver> solver_callback_handler;
solver_callback_handler.register_post_integrate(ti);

Parameters:

obj[in] Derived type to add as callback object.

inline void call_pre_integrate(SOLVER *state)#

Call all function handles which were registered as pre-integration callbacks.

Parameters:

state[inout] Solver state used to call each function handle.

inline void call_post_integrate(SOLVER *state)#

Call all function handles which were registered as post-integration callbacks.

Parameters:

state[inout] Solver state used to call each function handle.

Protected Functions

inline std::function<void(SOLVER*)> get_as_consistent_type(std::function<void(SOLVER*)> func)#

Helper function to convert an input function handle to a object which can be stored on the vector of function handles.

Parameters:

func[in] Function handle to process.

Returns:

standardised function handle.

template<typename T, typename U>
inline std::function<void(SOLVER*)> get_as_consistent_type(T func, U &inst)#

Helper function to convert an input function handle to a object which can be stored on the vector of function handles.

Parameters:
  • func[in] Class::method_name to call as function handle.

  • inst[in] object on which to call method.

Returns:

standardised function handle.

Protected Attributes

std::vector<std::function<void(SOLVER*)>> pre_integrate_funcs#

Functions to be typically called before an integration step.

std::vector<std::function<void(SOLVER*)>> post_integrate_funcs#

Functions to be typically called after an integration step.

class SolverRunner#
#include <solver_runner.hpp>

Class to abstract setting up sessions and drivers for Nektar++ solvers.

Public Functions

inline SolverRunner(int argc, char **argv)#

Create session, graph and driver from files.

Parameters:
  • argc – Number of arguments (like for main).

  • argv – Array of char* filenames (like for main).

inline void execute()#

Calls Execute on the underlying driver object to run the solver.

inline void finalise()#

Calls Finalise on the underlying session object.

Public Members

LibUtilities::SessionReaderSharedPtr session#

Nektar++ session object.

SpatialDomains::MeshGraphSharedPtr graph#

MeshGraph instance for solver.

SolverUtils::DriverSharedPtr driver#

The Driver created for the solver.

class Species#

Public Functions

Species(const Mesh &mesh, bool kinetic = true, double T = 1.0, double q = 1, double m = 1, int n = 10)#
void push(sycl::queue &q, Mesh *mesh)#
void set_array_dimensions()#
void set_initial_conditions(std::vector<double> &x, Velocity &v)#

Public Members

bool kinetic#
int n#
double T#
int q#
double m#
double vth#
std::vector<double> x#
sycl::buffer<double, 1> x_d#
Velocity v#
sycl::buffer<double, 1> vx_d#
sycl::buffer<double, 1> vy_d#
sycl::buffer<double, 1> vz_d#
double charge_density#
sycl::buffer<double, 1> charge_density_d#
std::vector<double> xnew#
std::vector<double> vnew#
std::vector<double> w#
sycl::buffer<double, 1> w_d#
double dx_coef#
double dv_coef#
sycl::buffer<double, 1> dx_coef_d#
sycl::buffer<double, 1> dv_coef_d#
struct Tetrahedron : public NESO::ExpansionLooping::JacobiExpansionLoopingInterface<Tetrahedron>#
#include <tetrahedron.hpp>

Implements evaluation and projection for Prism elements with eModified_A/B/C basis functions.

Public Functions

inline void loc_coord_to_loc_collapsed_v(const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
inline void evaluate_basis_0_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_1_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_2_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void loop_evaluate_v(const int nummodes, const REAL *const dofs, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *output)#
inline void loop_project_v(const int nummodes, const REAL value, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *dofs)#
inline ShapeType get_shape_type_v()#
inline int get_ndim_v()#
struct Tetrahedron : public NESO::GeometryInterface::BaseCoordinateMapping3D<Tetrahedron>#

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed_v(const T xi0, const T xi1, const T xi2, T *eta0, T *eta1, T *eta2)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[in] Local coordinate to map to collapsed coordinate. Component z.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

  • eta2[inout] Local collapsed coordinate. Component z.

template<typename T>
inline void loc_collapsed_to_loc_coord_v(const T eta0, const T eta1, const T eta2, T *xi0, T *xi1, T *xi2)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • eta2[in] Local collapsed coordinate. Component z.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

  • xi2[inout] Local coordinate to map to collapsed coordinate. Component z.

struct Triangle : public NESO::ExpansionLooping::JacobiExpansionLoopingInterface<Triangle>#
#include <triangle.hpp>

Implements evaluation and projection for Triangle elements with eModified_A/B basis functions.

Public Functions

inline void loc_coord_to_loc_collapsed_v(const REAL xi0, const REAL xi1, const REAL xi2, REAL *eta0, REAL *eta1, REAL *eta2)#
inline void evaluate_basis_0_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_1_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void evaluate_basis_2_v(const int nummodes, const REAL z, const int coeffs_stride, const REAL *coeffs_pnm10, const REAL *coeffs_pnm11, const REAL *coeffs_pnm2, REAL *output)#
inline void loop_evaluate_v(const int nummodes, const REAL *const dofs, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *output)#
inline void loop_project_v(const int nummodes, const REAL value, const REAL *const local_space_0, const REAL *const local_space_1, const REAL *const local_space_2, REAL *dofs)#
inline ShapeType get_shape_type_v()#
inline int get_ndim_v()#
struct Triangle : public NESO::GeometryInterface::BaseCoordinateMapping2D<Triangle>#

Public Functions

template<typename T>
inline void loc_coord_to_loc_collapsed_v(const T xi0, const T xi1, T *eta0, T *eta1)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • xi0[in] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Component y.

  • eta0[inout] Local collapsed coordinate. Component x.

  • eta1[inout] Local collapsed coordinate. Component y.

template<typename T>
inline void loc_collapsed_to_loc_coord_v(const T eta0, const T eta1, T *xi0, T *xi1)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • eta0[in] Local collapsed coordinate. Component x.

  • eta1[in] Local collapsed coordinate. Component y.

  • xi0[inout] Local coordinate to map to collapsed coordinate. Component x.

  • xi1[inout] Local coordinate to map to collapsed coordinate. Component y.

class Velocity#

Public Members

std::vector<double> x#
std::vector<double> y#
std::vector<double> z#
class VTKGeometryWriter#

Class to write Nektar++ geometry objects to a vtk file as a collection of vertices and edges for visualisation in paraview.

Public Functions

inline VTKGeometryWriter()#
template<typename T>
inline void push_back(std::shared_ptr<T> &geom)#

Push a geometry object onto the collection of objects to write to a vtk file.

Parameters:

geom[in] Shared pointer to Nektar++ geometry object.

inline void write(std::string filename)#

Write vtk file to disk with given filename. Filename should end with .vtk.

Parameters:

filename[in] – Input filename.

Protected Attributes

std::vector<std::shared_ptr<Geometry>> geoms#
template<typename NEWTON_TYPE>
class XMapNewton#
#include <x_map_newton.hpp>

Utility class to evaluate X maps and their inverse.

Public Functions

inline ~XMapNewton()#
template<typename TYPE_GEOM>
inline XMapNewton(SYCLTargetSharedPtr sycl_target, std::shared_ptr<TYPE_GEOM> geom)#

Create new instance from Newton implementation.

Parameters:
  • sycl_target – SYCLTarget to use for computation.

  • geom – Nektar++ geometry type that matches the Newton method implementation.

inline void x(const REAL xi0, const REAL xi1, const REAL xi2, REAL *phys0, REAL *phys1, REAL *phys2)#

For a reference position xi compute the global position X(xi).

Parameters:
  • xi0[in] Reference position, x component.

  • xi1[in] Reference position, y component.

  • xi2[in] Reference position, z component.

  • xi0[inout] Global position X(xi), x component.

  • xi1[inout] Global position X(xi), y component.

  • xi2[inout] Global position X(xi), z component.

inline bool x_inverse(const REAL phys0, const REAL phys1, const REAL phys2, REAL *xi0, REAL *xi1, REAL *xi2, const REAL tol = 1.0e-10)#

For a position X(xi) compute the reference position xi via Newton iteration.

Parameters:
  • xi0[in] Global position X(xi), x component.

  • xi1[in] Global position X(xi), y component.

  • xi2[in] Global position X(xi), z component.

  • xi0[inout] Reference position, x component.

  • xi1[inout] Reference position, y component.

  • xi2[inout] Reference position, z component.

  • tol[in] Optional exit tolerance for Newton iterations.

Returns:

True if inverse is found otherwise false.

Protected Functions

XMapNewton(const XMapNewton &st) = delete#

Disable (implicit) copies.

XMapNewton &operator=(XMapNewton const &a) = delete#

Disable (implicit) copies.

template<typename U>
inline void write_data(U &geom)#

Protected Attributes

MappingNewtonIterationBase<NEWTON_TYPE> newton_type#
SYCLTargetSharedPtr sycl_target#
const std::size_t num_bytes_per_map_device#
const std::size_t num_bytes_per_map_host#
std::unique_ptr<BufferDeviceHost<char>> dh_data#

The data required to perform newton iterations for each geom on the device.

std::unique_ptr<BufferDeviceHost<REAL>> dh_fdata#
std::vector<char> h_data#

The data required to perform newton iterations for each geom on the host.

namespace cl#
namespace Nektar#
namespace LibUtilities#
namespace LocalRegions#
namespace MultiRegions#
namespace SpatialDomains#
namespace StdRegions#
namespace NESO#

Typedefs

typedef std::shared_ptr<CellIDTranslation> CellIDTranslationSharedPtr#
typedef std::shared_ptr<ParameterStore> ParameterStoreSharedPtr#
typedef std::map<INT, std::deque<int>> MHGeomMap#
typedef std::shared_ptr<ParticleMeshInterface> ParticleMeshInterfaceSharedPtr#

Functions

inline double bounding_box_intersection(const int ndim, const std::array<double, 6> &a, const std::array<double, 6> &b)#

Compute the overlap between two Nektar++ format bounding boxes.

Parameters:
  • ndim[in] Actual number of dimensions (Nektar++ uses 6 element bounding boxes always).

  • a[in] First bounding box.

  • b[in] Second bounding box.

template<std::size_t ARRAY_LENGTH>
inline void reset_bounding_box(std::array<double, ARRAY_LENGTH> &bounding_box)#

Resets a Nektar++ compatible bounding box (Array length 6 typically) to a default that safely works with expand_bounding_box_array. Lower bounds are set to MAX_DOUBLE and Upper bounds are set to MIN_DOUBLE.

Parameters:

bounding_box[in] Bounding box to be initialised/reset.

template<std::size_t ARRAY_LENGTH>
inline void expand_bounding_box_array(std::array<double, ARRAY_LENGTH> &bounding_box_in, std::array<double, ARRAY_LENGTH> &bounding_box)#

Extend the bounds of a bounding box to include the passed bounding box. It is assumed that the bounds are stored in an array of size 2x(ndim) and the first ndim elements are the lower bounds and the remaining ndim elements are the upper bounds. Number of dimensions, ndim, is deduced from the array size.

Parameters:
  • bounding_box_in – Bounding box to use to extend the accumulation bounding box.

  • bounding_box – Bounding box to extend using element.

template<typename T, std::size_t ARRAY_LENGTH>
inline void expand_bounding_box(T element, std::array<double, ARRAY_LENGTH> &bounding_box)#

Extend the bounds of a bounding box to include the given element.

Parameters:
  • element – Nektar++ element that includes a GetBoundingBox method.

  • bounding_box – Bounding box to extend using element.

inline void get_bounding_box(std::shared_ptr<MeshHierarchy> mesh_hierarchy, const INT global_cell, std::array<double, 6> &bounding_box)#

Get the bounding box for a fine cell in the MeshHierarchy in the same format as Nektar++.

Parameters:
  • mesh_hierarchy – MeshHierarchy instance.

  • global_cell – Linear global cell index of cell.

  • bounding_box – Output array for bounding box.

inline bool interval_intersect(const double lhs_a, const double rhs_a, const double lhs_b, const double rhs_b)#

Determine if [lhs_a, rhs_a] and [lhs_b, rhs_b] intersect.

Parameters:
  • lhs_a – LHS of first interval.

  • rhs_a – RHS of first interval.

  • lhs_b – LHS of second interval.

  • rhs_b – RHS of second interval.

Returns:

true if intervals intersect otherwise false.

template<std::size_t ARRAY_LENGTH>
inline bool bounding_box_intersect(const int ndim, std::array<double, ARRAY_LENGTH> &bounding_box_a, std::array<double, ARRAY_LENGTH> &bounding_box_b)#

Determine if two bounding boxes intersect.

Parameters:
  • ndim – Number of dimensions.

  • bounding_box_a – First bounding box.

  • bounding_box_b – Second bounding box.

Returns:

true if intervals intersect otherwise false.

template<typename T>
inline void multiply_by_inverse_mass_matrix(std::shared_ptr<T> &field, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray)#

Generic function to solve a mass matrix system for use in projection Mx=b.

Parameters:
  • field – Nektar++ field class.

  • inarray – RHS of system, b.

  • outarray – solution vector, x.

template<>
inline void multiply_by_inverse_mass_matrix(std::shared_ptr<DisContField> &field, const Array<OneD, const NekDouble> &inarray, Array<OneD, NekDouble> &outarray)#

Function to solve a mass matrix system for use in projection Mx=b. Specialised verstion for DisContField.

Parameters:
  • field – Nektar++ field class.

  • inarray – RHS of system, b.

  • outarray – solution vector, x.

template<typename T>
std::vector<std::shared_ptr<RemoteGeom2D<T>>> get_all_remote_geoms_2d(MPI_Comm comm, std::map<int, std::shared_ptr<T>> &geom_map)#
void get_all_elements_2d(Nektar::SpatialDomains::MeshGraphSharedPtr &graph, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>> &geoms)#

Get all 2D geometry objects from a Nektar++ MeshGraph

Parameters:
  • graph[in] MeshGraph instance.

  • std::map[inout] of Nektar++ Geometry2D pointers.

Geometry2DSharedPtr get_element_2d(Nektar::SpatialDomains::MeshGraphSharedPtr &graph)#

Get a local 2D geometry object from a Nektar++ MeshGraph

Parameters:

graph – Nektar++ MeshGraph to return geometry object from.

Returns:

Local 2D geometry object.

template<typename T>
inline void combine_remote_geoms_2d(std::vector<std::shared_ptr<RemoteGeom2D<T>>> &remote_geoms, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>> &new_map)#

Add remote 2D objects to a map from geometry ids to shared pointers.

Parameters:
  • remote_geoms[in] Vector of remote geometry objects.

  • new_map[inout] Output element map (appended to).

template<typename T>
inline void combine_remote_geoms_2d(std::vector<std::shared_ptr<RemoteGeom2D<T>>> &remote_geoms, std::vector<std::shared_ptr<RemoteGeom2D<Geometry2D>>> &remote_geoms_2d)#

Add remote 2D objects (typed) to a vector of remote geometry objects (generic 2D type).

Parameters:
  • remote_geoms[in] Vector of remote geometry objects.

  • remote_geoms_2d[inout] Output vector of 2D geometry types.

void get_all_elements_3d(Nektar::SpatialDomains::MeshGraphSharedPtr &graph, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry3D>> &geoms)#

Get all 3D geometry objects from a Nektar++ MeshGraph

Parameters:
  • graph[in] MeshGraph instance.

  • std::map[inout] of Nektar++ Geometry3D pointers.

Geometry3DSharedPtr get_element_3d(Nektar::SpatialDomains::MeshGraphSharedPtr &graph)#

Get a local 3D geometry object from a Nektar++ MeshGraph

Parameters:

graph – Nektar++ MeshGraph to return geometry object from.

Returns:

Local 3D geometry object.

void assemble_geometry_container_3d(Nektar::SpatialDomains::MeshGraphSharedPtr &graph, std::vector<std::shared_ptr<RemoteGeom3D>> &remote_geoms_3d, GeometryContainer3D &output_container)#

Categorise geometry types by shape, local or remote and X-map type.

Parameters:
  • graph[in] Nektar MeshGraph of locally owned geometry objects.

  • remote_geoms_3d[in] Vector of remotely owned geometry objects.

  • output_container[inout] Geometry objects cataorised by type..

std::shared_ptr<RemoteGeom3D> reconstruct_geom_3d(int **base_ptr, std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>>> &rank_element_map_2d)#

Create 3D geometry objects from integer descriptions in the format: <owning rank>, <geometry id>, <faces as list of 2D geometry ids>

Parameters:
  • base_ptr[inout] Pointer to pointer of start of integer array. The array pointer is incremented as the integers are consumed to create 3D geometry objects.

  • rank_element_map[in] Map from MPI rank to a map from geometry id to 2D geom shared pointer.

void reconstruct_geoms_3d(std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>>> &rank_element_map_2d, std::vector<int> &packed_geoms, std::vector<std::shared_ptr<RemoteGeom3D>> &output_container)#

Reconstruct multiple 3D geometry objects from a vector of ints.

Parameters:
  • rank_element_map_2d[in] Map from MPI rank to element map (geom id to shared ptr) required to rebuild geoms.

  • packed_geoms[in] Int vector of 3D geometry objects described by 2D geometry ids.

  • output_container[inout] Output vector in which to place constructed 3D geometry objects.

void deconstruct_geoms_base_3d(const int rank, const int geometry_id, std::shared_ptr<Geometry3D> geom, std::vector<int> &deconstructed_geoms)#

Deconstruct a 3D geometry object into a series of integers that describe the owning rank and shape type.

Parameters:
  • rank[in] MPI rank that owns the 3D object.

  • geometry_id[in] Global id of geometry object.

  • geom[in] 3D geometry object.

  • deconstructed_geoms[inout] Output vector to push description onto.

void deconstruct_geoms_3d(const int rank, const int geometry_id, std::shared_ptr<Geometry3D> geom, std::vector<int> &deconstructed_geoms, std::set<int> &face_ids)#

Deconstruct a 3D geometry object into a series of integers that describe the owning rank, shape type and constituent faces.

Parameters:
  • rank[in] MPI rank that owns the 3D object.

  • geometry_id[in] Global id of geometry object.

  • geom[in] 3D geometry object.

  • deconstructed_geoms[inout] Output vector to push description onto.

  • face_ids[inout] Set of face ids to add faces to.

void deconstuct_per_rank_geoms_3d(const int original_rank, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>> &geoms_2d, std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry3D>>> &rank_element_map, const int num_send_ranks, std::vector<int> &send_ranks, std::vector<int> &send_sizes, std::map<int, std::vector<int>> &deconstructed_geoms, std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::TriGeom>>> &rank_triangle_map, std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::QuadGeom>>> &rank_quad_map)#

Deconstruct, i.e. serialise to integers, 3D Nektar++ geometry objects such that they can be sent over MPI. Geometry objects are packed into an output map for each remote MPI rank.

Parameters:
  • original_rank[in] MPI rank which owns the geometry objects in rank_element_map.

  • geoms_2d[in] Map from geometry id to 2D geometry objects required by the 3D geometry objects which are t o be packed.

  • rank_element_map[in] Map from remote MPI rank to map from geometry id to 3D geometry object to pack for the remote rank.

  • send_ranks[in] Vector of remote MPI ranks.

  • send_sizes[inout] Output vector of packed sizes per MPI rank.

  • deconstructed_geoms[inout] Map from remote MPI rank to vector of ints describing the packed 3D geoms in terms of the 2D geometry ids that build the faces of the 3D object.

  • rank_triangle_map[inout] Map from remote MPI rank to TriGeom ids and objects to pack and send.

  • rank_quad[inout] Map from remote MPI rank to QuadGeom ids and objects to pack and send.

void sendrecv_geoms_3d(MPI_Comm comm, std::map<int, std::vector<int>> &deconstructed_geoms, const int num_send_ranks, std::vector<int> &send_ranks, std::vector<int> &send_sizes, const int num_recv_ranks, std::vector<int> &recv_ranks, std::vector<int> &recv_sizes, std::vector<int> &packed_geoms)#

Exchange 3D geometry objects between MPI ranks. Must be called collectively on the communicator.

Parameters:
  • comm[in] MPI communicator.

  • deconstructed_geoms[in] Map from remote MPI rank to packed 3D geometry objects to send to that MPI rank.

  • send_ranks[in] Vector of MPI ranks to send 3D geometry objects to.

  • send_sizes[in] The number of ints to send to each remote MPI rank.

  • num_recv_ranks[in] Number of MPI ranks to receive 3D geometry objects from.

  • recv_rank[in] Vector of MPI ranks to receive 3D geometry objects from.

  • recv_sizes[in] Vector containing the number of ints expected to be received from each remote MPI rank.

  • packed_geoms[inout] Received 3D geometry objects in packed int form.

void halo_get_mesh_hierarchy_cells(const int width, ParticleMeshInterfaceSharedPtr particle_mesh_interface, std::set<INT> &remote_cells)#

For an input offset “width” find all the mesh hierarchy cells within width of this MPI rank. This MPI rank is defined as the mesh hierarchy cells this MPI owns and the mesh hierarchy cells this MPI overlaps with a geometry object.

Parameters:
  • width[in] Stencil width in each coordinate direction. Greater or equal to zero. A value of zero is useful to extend the halos over all mesh hierarchy cells touched by geometry objects this MPI rank owns.

  • particle_mesh_interface[in] ParticleMeshInterface to extend the halos of.

  • remote_cells[inout] Set of MeshHierarchy cells which are not owned by this MPI rank but are within “width” of mesh hierarchy cells which are owned by this MPI rank or cells which have non-zero overlap with the bounding box of geometry objects which are owned by this MPI rank.

int halo_get_map_rank_to_cells(ParticleMeshInterfaceSharedPtr particle_mesh_interface, std::set<INT> &remote_cells, std::map<int, std::vector<int64_t>> &rank_cells_map, std::vector<int> &recv_ranks)#

For a set of MeshHierarchy cells find the corresponding remote MPI ranks that own these cells. Ignore cells owned by this MPI rank. Build a map from remote MPI rank to MeshHierarchy cells owned by that remote rank.

Parameters:
  • particle_mesh_interface[in] ParticleMeshInterface to use.

  • remote_cells[in] Set of MeshHierarchy cells to find owing ranks for.

  • rank_cells_map[inout] Output map from MPI rank to owned MeshHierarchy cells.

  • recv_ranks[inout] Vector of remote ranks (equal to the keys of rank_cells_map).

Returns:

Number of remote MPI ranks in recv_ranks_vector.

int halo_get_num_send_ranks(MPI_Comm comm, std::vector<int> &recv_ranks)#

Get on each MPI rank the number of remote MPI ranks which hold this rank in a vector of remote ranks. For the halo extend use case this is used to determine how many remote ranks require geometry objects from this rank. This function must be called collectively on the MPI communicator.

Parameters:
  • comm[in] MPI communicator to use.

  • recv_ranks[in] Vector of remote MPI ranks this rank should receive geometry objects from.

Returns:

Number of remote MPI ranks to setup communication with.

void halo_get_send_cells(MPI_Comm comm, const int num_send_ranks, std::vector<int> &send_ranks, const int num_recv_ranks, std::vector<int> &recv_ranks, std::map<int, std::vector<int64_t>> &send_cells, std::map<int, std::vector<int64_t>> &rank_cells_map)#

Exchange which cells are required to be communicated between MPI ranks. In the halo exchange use case rank i requests a list of cells from rank j. Rank i is the “receiving” MPI rank as in the context of the halo exchange “send” and “recv” are relative to the direction of travel of the geometry objects. Must be called collectively on the MPI communicator.

Parameters:
  • comm[in] MPI communicator to use.

  • num_send_ranks[in] Number of remote MPI ranks this rank will send geometry objects to.

  • send_ranks[in] Vector of MPI ranks this MPI rank will send geometry objects to.

  • num_recv_ranks[in] Number of remote MPI ranks this MPI rank will receive geometry objects from.

  • recv_ranks[in] Vector of MPI ranks to receive geometry objects from.

  • send_cells[inout] Map from remote MPI rank to a vector of MeshHierarchy cells requested by the each remote rank. These are the cells this rank should pack and send to the send_ranks.

  • Map[in] from each receive rank to the vector of MeshHierarchy cells this rank will request from the remote MPI rank.

void halo_get_send_cells_set(std::vector<int> &send_ranks, std::map<int, std::vector<int64_t>> &send_cells, std::set<INT> &send_cells_set)#

Create the set of MeshHierarchy cells which have been requested by remote MPI ranks.

Parameters:
  • send_ranks[in] Vector of remote MPI ranks which have requested MeshHierarchy cells.

  • send_cells[in] Map from MPI ranks to requested MeshHierarchy cells.

  • send_cells_set[inout] Output set of MeshHierarchy cells which have been requested.

void halo_exchange_send_sizes(MPI_Comm comm, const int num_send_ranks, std::vector<int> &send_ranks, std::vector<int> &send_sizes, const int num_recv_ranks, std::vector<int> &recv_ranks, std::vector<int> &recv_sizes)#

Exchange between MPI ranks the number of elements that are to be exchanged such that buffers can be allocated. Must be called collectively on the communicator.

Parameters:
  • comm[in] MPI communicator.

  • num_send_ranks[in] Number of MPI ranks this rank will send geometry objects to.

  • send_ranks[in] Vector of MPI ranks to send geometry objects to.

  • recv_ranks[in] Vector of MPI ranks to receive geometry objects from.

  • Number[inout] of elements to expect to receive from each remote MPI rank.

template<typename T>
inline void halo_exchange_geoms_2d(MPI_Comm comm, const int num_send_ranks, std::vector<int> &send_ranks, const int num_recv_ranks, std::vector<int> &recv_ranks, std::map<int, std::vector<std::shared_ptr<RemoteGeom2D<T>>>> &rank_element_map, std::vector<std::shared_ptr<RemoteGeom2D<T>>> &output_container)#

Exchange 2D geometry objects (Quads and Triangles) between MPI ranks. Must be called collectively on the communicator.

Parameters:
  • comm[in] MPI communicator to use.

  • num_send_ranks[in] Number of remote MPI ranks to send objects to.

  • send_ranks[in] Vector of remote MPI objects to send objects to.

  • num_recv_ranks[in] Number of remote MPI ranks to receive objects from.

  • recv_ranks[in] Vector of ranks to receive objects from.

  • rank_element_map[in] Map from remote MPI rank to vector of geometry objects to send to the remote MPI rank.

  • output_container[inout] Container to push received geometry objects onto.

template<typename T, typename U>
inline void halo_rebuild_rank_element_map(std::map<int, std::map<int, std::shared_ptr<T>>> &rank_element_map, std::vector<std::shared_ptr<U>> &geoms)#

Extend a map from MPI rank to a map from geometry id to geometry shared pointer.

Parameters:
  • rank_element_map[inout] Map to extend.

  • geoms[in] Vector of geometry objects (RemoteGeom2D or RemoteGeom3D) to extend map with.

void halo_get_rank_to_geoms_2d(ParticleMeshInterfaceSharedPtr particle_mesh_interface, std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>>> &rank_geoms_2d_map_local)#

Build a map from MPI rank to 2D geometry objects that originate from that MPI rank using geometry objects in the graph on this rank and geometry objects in the halos on this rank.

Parameters:
  • particle_mesh_interface[in] ParticleMeshInterface to use as a source of geometry objects.

  • rank_geoms_2d_map_local[inout] Output map.

void halo_get_rank_to_geoms_3d(ParticleMeshInterfaceSharedPtr particle_mesh_interface, std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry3D>>> &rank_geoms_3d_map_local)#

Build a map from MPI rank to 3D geometry objects that originate from that MPI rank using geometry objects in the graph on this rank and geometry objects in the halos on this rank.

Parameters:
  • particle_mesh_interface[in] ParticleMeshInterface to use as a source of geometry objects.

  • rank_geoms_3d_map_local[inout] Output map.

template<typename T>
inline void halo_get_cells_to_geoms_map(ParticleMeshInterfaceSharedPtr particle_mesh_interface, std::map<int, std::map<int, std::shared_ptr<T>>> &rank_geoms_map_local, std::set<INT> &send_cells_set, std::map<INT, std::vector<std::pair<int, int>>> &cells_to_geoms)#

Build a map from MeshHierarchy cells to a vector of pairs storing the original MPI rank of a geometry object and the geometry id of the object.

Parameters:
  • particle_mesh_interface[in] ParticleMeshInterface to use as a source of geometry objects.

  • rank_geoms_map_local[in] Map from MPI rank to geometry objects that originate from that MPI rank.

  • send_cells_set[in] Set of MeshHierarchy cells to create the map for.

  • cells_to_geoms[inout] Map from MeshHierarchy cells listed in send_cells_set to original MPI ranks and geometry ids.

template<typename T>
inline void halo_unpack_2D_geoms(std::map<int, std::map<int, std::shared_ptr<Nektar::SpatialDomains::Geometry2D>>> &rank_geoms_2d_map_local, std::vector<std::shared_ptr<RemoteGeom2D<T>>> &tmp_remote_geoms, std::vector<std::shared_ptr<RemoteGeom2D<T>>> &output_container)#

Unpack 2D geometry objects into a container. Ignore geometry objects that originate from this MPI rank.

Parameters:
  • rank_geoms_2d_map_local[inout] Map from MPI ranks to originating MPI ranks and geometry ids. Will be extended with the new geometry objects.

  • tmp_remote_geoms[in] RemoteGeom2D instances which will be kept if new or discarded if already held.

  • output_container[inout] Container to push new RemoteGeom2D instances onto.

void extend_halos_fixed_offset(const int offset, ParticleMeshInterfaceSharedPtr particle_mesh_interface)#

Extend the halo regions of a ParticleMeshInterface. Consider all MeshHierarchy (MH) cells which are either owned by this MPI rank or were claimed by this MPI rank but ultimately are not owned by this rank. These two sets of MH cells are all cells where there is a non-empty intersection with the bounding box of a Nektar++ geometry object which is owned by this MPI rank.

For each MH cell in this set consider all MH cells which are within the passed offset but are not owned by this MPI rank “new MH cells”. For each new MH cell collect on this MPI rank all Nektar++ geometry objects where the bounding box of that object intersects a cell in the new MH cells list.

For all non-negative offsets this function call grows the size of the halo regions. With an offset of zero the halo regions are extended with the geometry objects that intersect the claimed but not owned MH cells. A negative offset does not error and does not modify the halo regions. This function must be called collectively on the MPI communicator stored in the ParticleMeshInterface.

Parameters:
  • offset[in] Integer offset to apply to MeshHierarchy cells in all coordinate directions.

  • particle_mesh_interface[inout] ParticleMeshInterface to extend the halos of.

template<typename T>
inline double get_local_coords_2d(std::shared_ptr<T> geom, const Array<OneD, const NekDouble> &coords, Array<OneD, NekDouble> &Lcoords)#

Map a global coordinate to a local coordinate in reference space (xi).

Parameters:
  • geom – 2D Geometry object to map.

  • coords – Global coordinates of point (physical space).

  • Lcoords – Local coordinates (xi) in reference space.

Returns:

Maximum distance from geometry object to point (in refence space) if not contained.

template<typename T>
inline bool contains_point_2d(std::shared_ptr<T> geom, Array<OneD, NekDouble> &global_coord, Array<OneD, NekDouble> &local_coord, const NekDouble tol)#

Test if a 2D Geometry object contains a point. Returns the computed reference coordinate (xi).

Parameters:
  • geom – 2D Geometry object, e.g. QuadGeom, TriGeom.

  • global_coord – Global coordinate to map to local coordinate.

  • local_coord – Output, computed locate coordinate in reference space.

  • tol – Input tolerance for geometry containing point.

template<typename T>
inline bool contains_point_3d(std::shared_ptr<T> geom, Array<OneD, NekDouble> &global_coord, Array<OneD, NekDouble> &local_coord, const NekDouble tol)#

Test if a 3D Geometry object contains a point. Returns the computed reference coordinate (xi).

Parameters:
  • geom – 3D Geometry object.

  • global_coord – Global coordinate to map to local coordinate.

  • local_coord – Output, computed locate coordinate in reference space.

  • tol – Input tolerance for geometry containing point.

inline Geometry3DSharedPtr get_geometry_3d(MeshGraphSharedPtr graph, const int geom_id)#
template<typename T>
inline void count_geometry_types(std::vector<T> &geoms, int *count_regular, int *count_deformed)#

Count the number of Regular and Deformed geometry objects in a container. Counts are incremented.

Parameters:
  • geoms[in] Container of geometry objects. Either RemoteGeom2D or RemoteGeom3D.

  • count_regular[inout] Number of regular geometry objects (eRegular).

  • count_deformed[inout] Number of deformed geometry objects (eDeformed).

template<typename T>
inline void count_geometry_types(std::map<int, T> &geoms, int *count_regular, int *count_deformed)#

Count the number of Regular and Deformed geometry objects in a container. Counts are incremented.

Parameters:
  • geoms[in] Container of geometry objects.

  • count_regular[inout] Number of regular geometry objects (eRegular).

  • count_deformed[inout] Number of deformed geometry objects (eDeformed).

inline void mesh_tuple_to_mh_tuple(const int ndim, const int64_t *index_mesh, std::shared_ptr<MeshHierarchy> mesh_hierarchy, INT *index_mh)#

Convert a mesh index (index_x, index_y, …) for this cartesian mesh to the format for a MeshHierarchy: (coarse_x, coarse_y,.., fine_x, fine_y,…).

Parameters:
  • ndim – Number of dimensions.

  • index_mesh – Tuple index into cartesian grid of cells.

  • mesh_hierarchy – MeshHierarchy instance.

  • index_mh – Output index in the MeshHierarchy.

inline double overlap_1d(const double lhs, const double rhs, const int cell, const double cell_width_fine)#

Use the bounds of an element in 1D to compute the overlap area with a given cell. Passed bounds should be shifted relative to an origin of 0.

Parameters:
  • lhs – Lower bound of element.

  • rhs – Upepr bound of element.

  • cell – Cell index (base 0).

  • cell_width_fine – Width of each cell.

template<typename T>
inline void bounding_box_map(T element, std::shared_ptr<MeshHierarchy> mesh_hierarchy, std::deque<std::pair<INT, double>> &cells)#

Compute all claims to cells, and associated weights, for the passed element using the element bounding box.

Parameters:
  • element[in] Nektar++ mesh element to use.

  • mesh_hierarchy[in] MeshHierarchy instance which cell claims will be made into.

  • cells[inout] Mesh heirarchy cells covered by bounding box.

template<typename T>
inline void bounding_box_claim(int element_id, T element, std::shared_ptr<MeshHierarchy> mesh_hierarchy, LocalClaim &local_claim, MHGeomMap &mh_geom_map)#

Compute all claims to cells, and associated weights, for the passed element using the element bounding box.

Parameters:
  • element_id – Integer element id for Nektar++ map.

  • element – Nektar++ mesh element to use.

  • mesh_hierarchy – MeshHierarchy instance which cell claims will be made into.

  • local_claimLocalClaim instance in which cell claims are being collected into.

  • mh_geom_map – MHGeomMap from MeshHierarchy global cells ids to Nektar++ element ids.

inline int pochhammer(const int m, const int n)#

Compute the Pochhammer symbol (m)_n.

Parameters:
  • m – Value of m.

  • n – Value of n.

Returns:

(m)_n.

inline double jacobi(const int p, const double z, const int alpha, const int beta)#

Computes jacobi polynomial P{alpha, beta}_p(z).

Parameters:
  • p – Order.

  • z – Evaluation point.

  • alpha – Alpha value.

  • beta – Beta value.

inline double relative_error(const double correct, const double to_test)#

Compute relative error between a correct value and a test value.

Parameters:
  • correct – Correct value to test against.

  • to_test – Value to compare with the correct value.

Returns:

relative error.

template<typename T, typename U>
inline void interpolate_onto_nektar_field_3d(T &func, std::shared_ptr<U> field)#

Interpolate f(x,y) or f(x,y,z) onto a Nektar++ field.

Parameters:
  • func – Function matching a signature like: double func(double x, double y) or func(double x, double y, double z).

  • field – Output Nektar++ field.

template<typename T, typename U>
inline void interpolate_onto_nektar_field_2d(T &func, std::shared_ptr<U> field)#

Interpolate f(x,y) onto a Nektar++ field.

Parameters:

func – Function matching a signature like: double func(double x, double y); @parma field Output Nektar++ field.

template<typename T>
inline void write_vtu(std::shared_ptr<T> field, std::string filename, std::string var = "v")#

Write a Nektar++ field to vtu for visualisation in Paraview.

Parameters:
  • field – Nektar++ field to write.

  • filename – Output filename. Most likely should end in vtu.

template<typename T>
inline double evaluate_scalar_2d(std::shared_ptr<T> field, const double x, const double y)#

Evaluate a scalar valued Nektar++ function at a point. Avoids assertion issue.

Parameters:
  • field – Nektar++ field.

  • x – X coordinate.

  • y – Y coordinate.

Returns:

Evaluation.

template<typename T>
inline double evaluate_scalar_3d(std::shared_ptr<T> field, const double x, const double y, const double z)#

Evaluate a scalar valued Nektar++ function at a point. Avoids assertion issue.

Parameters:
  • field – Nektar++ field.

  • x – X coordinate.

  • y – Y coordinate.

Returns:

Evaluation.

template<typename T>
inline double evaluate_scalar_derivative_2d(std::shared_ptr<T> field, const double x, const double y, const int direction)#

Evaluate the derivative of scalar valued Nektar++ function at a point. Avoids assertion issue.

Parameters:
  • field – Nektar++ field.

  • x – X coordinate.

  • y – Y coordinate.

  • direction – Direction for derivative.

Returns:

Output du/d(direction).

template<typename T>
inline bool find_owning_geom(Nektar::SpatialDomains::MeshGraphSharedPtr graph, const T &point, int *owning_rank_output, int *geom_id_output, double *coord_ref_output = nullptr, int *num_geoms_output = nullptr, MPI_Comm comm = MPI_COMM_WORLD)#

Globally find the nektar++ geometry object that owns a point.

Parameters:
  • graph[in] MeshGraph to locate particle on.

  • point[in] Subscriptable description of point.

  • owning_rank_output[out] Rank that owns the point.

  • coord_ref_output[out] Reference coordinates (optional).

  • num_geoms_output[out] Number of geometry objects that claimed the point (optional).

  • comm[in] MPI communicator to use (default MPI_COMM_WORLD).

Returns:

True if an owning geometry object was found.

inline void write_vtk_cells_owned(std::string filename, ParticleMeshInterfaceSharedPtr particle_mesh_interface)#

Write the vertices and edges of the owned geometry objects on this rank to a vtk file.

Parameters:
  • filename[in] Filename to write .<rank>.vtk will be appended to the given filename.

  • particle_mesh_interface[in] ParticleMeshInterface containing geometry objects.

inline void write_vtk_cells_halo(std::string filename, ParticleMeshInterfaceSharedPtr particle_mesh_interface)#

Write the vertices and edges of the halo geometry objects on this rank to a vtk file.

Parameters:
  • filename[in] Filename to write .<rank>.vtk will be appended to the given filename.

  • particle_mesh_interface[in] ParticleMeshInterface containing geometry objects.

inline void write_vtk_mesh_hierarchy_cells_owned(std::string filename, ParticleMeshInterfaceSharedPtr particle_mesh_interface)#

Write the vertices and edges of the owned mesh hierarchy cells on this rank to a vtk file.

Parameters:
  • filename[in] Filename to write .<rank>.vtk will be appended to the given filename.

  • particle_mesh_interface[in] ParticleMeshInterface containing geometry objects.

inline std::size_t get_num_local_work_items(SYCLTargetSharedPtr sycl_target, const std::size_t num_bytes, const std::size_t default_num)#

Get a number of local work items that should not exceed the maximum available local memory on the device.

Parameters:
  • sycl_target – SYCLTarget instance local memory will be allocated on.

  • num_bytes – Number of bytes requested per work item.

  • default_num – Default number of work items.

Returns:

Number of work items.

inline std::size_t get_global_size(const std::size_t N, const std::size_t L)#

For an iteration set size N and local workgroup size L determine M such that M>=N and M % L == 0.

Parameters:
  • N – Actual iteration set size.

  • L – Local workgroup size.

Returns:

M such that M >= N and M % L == 0.

template<typename T>
inline std::size_t get_particle_loop_global_size(ParticleDatSharedPtr<T> particle_dat, const std::size_t local_size)#

For a given local workgroup size determine a global size sufficient for all cells in a ParticleDat.

Parameters:
  • particle_dat – ParticleDat to use as iteration set.

  • local_size – Local workgroup size.

template<typename T>
inline T pad_to_vector_length(const T L)#

For an input integer L >= 0 return smallest M such that M >= L and M % NESO_VECTOR_LENGTH == 0.

Parameters:

L – Input length.

Returns:

Output length M.

inline std::vector<std::vector<double>> sobol_within_extents(const int N, const int ndim, const double *extents, uint64_t discard = 0, unsigned int seed = 0)#

Create a uniform distribution of particle positions within a set of extents via a Sobol quasi-random number generator.

Parameters:
  • N – Number of points to generate.

  • ndim – Number of dimensions.

  • extents – Extent of each of the dimensions.

  • discard – Optional number of particles skip over before drawing samples.

  • seed – Optional seed to use.

Returns:

(N)x(ndim) set of positions stored for each column.

inline double rsequence(const int i, const double irrational, const double seed = 0.0)#

Return the ith number in the additive reccurence “r-sequence” of uniform distributed quasi-random numbers.

Parameters:
  • i – The ith number in the sequence

  • irrational – The irrational number upon which the sequence is based

  • seed – The offset number of the sequence

Returns:

a double

inline double rsequence(const int i, const int dim, const double seed = 0.0)#

Return the ith number in the additive reccurence “r-sequence” of uniform distributed quasi-random numbers.

Parameters:
  • i – The ith number in the sequence

  • dim – Choose the inverse of the dimth hyper golden ratio as the irrational number to base the sequence on

  • seed – The offset number of the sequence

Returns:

a double

inline std::vector<std::vector<double>> rsequence_within_extents(const int N, const int ndim, const double *extents, const double seed = 0.0)#

Create a uniform distribution of particle positions within a set of extents via an R-sequence quasi-random number generator, using the inverse of hyper golden ratios.

Parameters:
  • N – Number of points to generate.

  • ndim – Number of dimensions.

  • extents – Extent of each of the dimensions.

  • seed – Seed to sequence

Returns:

(N)x(ndim) set of positions stored for each column.

Variables

constexpr double INVERSE_GOLDEN_RATIOS[10] = {0.6180339887498948, 0.7548776662466927, 0.8191725133961644, 0.8566748838545029, 0.8812714616335696, 0.8986537126286992, 0.9115923534820549, 0.9215993196339829, 0.9295701282320229, 0.9360691110777584}#
namespace Bary#
namespace BasisJacobi#

Functions

inline void mod_B(const int nummodes, const REAL z, const int k_stride_n, const REAL *const k_coeffs_pnm10, const REAL *const k_coeffs_pnm11, const REAL *const k_coeffs_pnm2, REAL *output)#

Evaluate the eModified_B basis functions up to a given order placing the evaluations in an output array. For reference see the function eval_modB_ij. Jacobi polynomials are evaluated using recusion relations:

For brevity the (alpha, beta) superscripts are dropped. i.e. P_n(z) = P_n^{alpha, beta}(z). P_n(z) = C_{n-1}^0 P_{n-1}(z) * z + C_{n-1}^1 P_{n-1}(z) + C_{n-2} * P_{n-2}(z) P_0(z) = 1 P_1(z) = 2 + 2 * (z - 1)

Parameters:
  • nummodes[in] Number of modes to compute, i.e. p modes evaluates at most an order p-1 polynomial.

  • z[in] Evaluation point to evaluate basis at.

  • k_stride_n[in] Stride between sets of coefficients for different alpha values in the coefficient arrays.

  • k_coeffs_pnm10[in] Coefficients for C_{n-1}^0 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm11[in] Coefficients for C_{n-1}^1 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm2[in] Coefficients for C_{n-2} for different alpha values stored row wise for each alpha.

  • output[inout] entry i contains the i-th eModified_B basis function evaluated at z. This particular basis function runs over two indices p and q and we linearise this two dimensional indexing to match the Nektar++ ordering.

inline void mod_A(const int nummodes, const REAL z, const int k_stride_n, const REAL *const k_coeffs_pnm10, const REAL *const k_coeffs_pnm11, const REAL *const k_coeffs_pnm2, REAL *output)#

Evaluate the eModified_A basis functions up to a given order placing the evaluations in an output array. For reference see the function eval_modA_i. Jacobi polynomials are evaluated using recusion relations:

For brevity the (alpha, beta) superscripts are dropped. i.e. P_n(z) = P_n^{alpha, beta}(z). P_n(z) = C_{n-1}^0 P_{n-1}(z) * z + C_{n-1}^1 P_{n-1}(z) + C_{n-2} * P_{n-2}(z) P_0(z) = 1 P_1(z) = 2 + 2 * (z - 1)

Parameters:
  • nummodes[in] Number of modes to compute, i.e. p modes evaluates at most an order p-1 polynomial.

  • z[in] Evaluation point to evaluate basis at.

  • k_stride_n[in] Stride between sets of coefficients for different alpha values in the coefficient arrays.

  • k_coeffs_pnm10[in] Coefficients for C_{n-1}^0 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm11[in] Coefficients for C_{n-1}^1 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm2[in] Coefficients for C_{n-2} for different alpha values stored row wise for each alpha.

  • output[inout] entry i contains the i-th eModified_A basis function evaluated at z.

inline void mod_C(const int nummodes, const REAL z, const int k_stride_n, const REAL *const k_coeffs_pnm10, const REAL *const k_coeffs_pnm11, const REAL *const k_coeffs_pnm2, REAL *output)#

Evaluate the eModified_C basis functions up to a given order placing the evaluations in an output array. For reference see the function eval_modC_ijk. Jacobi polynomials are evaluated using recusion relations:

For brevity the (alpha, beta) superscripts are dropped. i.e. P_n(z) = P_n^{alpha, beta}(z). P_n(z) = C_{n-1}^0 P_{n-1}(z) * z + C_{n-1}^1 P_{n-1}(z) + C_{n-2} * P_{n-2}(z) P_0(z) = 1 P_1(z) = 2 + 2 * (z - 1)

Parameters:
  • nummodes[in] Number of modes to compute, i.e. p modes evaluates at most an order p-1 polynomial.

  • z[in] Evaluation point to evaluate basis at.

  • k_stride_n[in] Stride between sets of coefficients for different alpha values in the coefficient arrays.

  • k_coeffs_pnm10[in] Coefficients for C_{n-1}^0 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm11[in] Coefficients for C_{n-1}^1 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm2[in] Coefficients for C_{n-2} for different alpha values stored row wise for each alpha.

  • output[inout] entry i contains the i-th eModified_C basis function evaluated at z.

inline void mod_PyrC(const int nummodes, const REAL z, const int k_stride_n, const REAL *const k_coeffs_pnm10, const REAL *const k_coeffs_pnm11, const REAL *const k_coeffs_pnm2, REAL *output)#

Evaluate the eModified_PyrC basis functions up to a given order placing the evaluations in an output array. For reference see the function eval_modPyrC_ijk. Jacobi polynomials are evaluated using recusion relations:

For brevity the (alpha, beta) superscripts are dropped. i.e. P_n(z) = P_n^{alpha, beta}(z). P_n(z) = C_{n-1}^0 P_{n-1}(z) * z + C_{n-1}^1 P_{n-1}(z) + C_{n-2} * P_{n-2}(z) P_0(z) = 1 P_1(z) = 2 + 2 * (z - 1)

Parameters:
  • nummodes[in] Number of modes to compute, i.e. p modes evaluates at most an order p-1 polynomial.

  • z[in] Evaluation point to evaluate basis at.

  • k_stride_n[in] Stride between sets of coefficients for different alpha values in the coefficient arrays.

  • k_coeffs_pnm10[in] Coefficients for C_{n-1}^0 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm11[in] Coefficients for C_{n-1}^1 for different alpha values stored row wise for each alpha.

  • k_coeffs_pnm2[in] Coefficients for C_{n-2} for different alpha values stored row wise for each alpha.

  • output[inout] entry i contains the i-th eModified_PyrC basis function evaluated at z.

namespace BasisReference#

Functions

double eval_modA_i(const int p, const double z)#

Reference implementation to compute eModified_A at an order p and point z.

Parameters:
  • p – Polynomial order.

  • z – Point in [-1, 1] to evaluate at.

Returns:

Basis function evaluated at point.

double eval_modB_ij(const int p, const int q, const double z)#

Reference implementation to compute eModified_B at an order p,q and point z.

Parameters:
  • p – First index for basis.

  • q – Second index for basis.

  • z – Point in [-1, 1] to evaluate at.

Returns:

Basis function evaluated at point.

double eval_modC_ijk(const int p, const int q, const int r, const double z)#

Reference implementation to compute eModified_C at an order p,q,r and point z.

Parameters:
  • p – First index for basis.

  • q – Second index for basis.

  • r – Third index for basis.

  • z – Point in [-1, 1] to evaluate at.

Returns:

Basis function evaluated at point.

double eval_modPyrC_ijk(const int p, const int q, const int r, const double z)#

Reference implementation to compute eModifiedPyr_C at an order p,q,r and point z.

Parameters:
  • p – First index for basis.

  • q – Second index for basis.

  • r – Third index for basis.

  • z – Point in [-1, 1] to evaluate at.

Returns:

Basis function evaluated at point.

int get_total_num_modes(const BasisType basis_type, const int P)#

Get the total number of modes in a given basis for a given number of input modes. See Nektar GetTotNumModes.

Parameters:
  • basis_type – Basis type to query number of values for.

  • P – Number of modes, i.e. Nektar GetNumModes();

Returns:

Total number of values required to represent the basis with the given number of modes.

void eval_modA(const int P, const double z, std::vector<double> &b)#

Reference implementation to compute eModified_A for order P-1 and point z.

Parameters:
  • P[in] Number of modes to compute.

  • z[in] Point in [-1, 1] to evaluate at.

  • b[inout] Basis functions evaluated at z for each mode.

void eval_modB(const int P, const double z, std::vector<double> &b)#

Reference implementation to compute eModified_B for order P-1 and point z.

Parameters:
  • P[in] Number of modes to compute.

  • z[in] Point in [-1, 1] to evaluate at.

  • b[inout] Basis functions evaluated at z for each mode.

void eval_modC(const int P, const double z, std::vector<double> &b)#

Reference implementation to compute eModified_C for order P-1 and point z.

Parameters:
  • P[in] Number of modes to compute.

  • z[in] Point in [-1, 1] to evaluate at.

  • b[inout] Basis functions evaluated at z for each mode.

void eval_modPyrC(const int P, const double z, std::vector<double> &b)#

Reference implementation to compute eModifiedPyr_C for order P-1 and point z.

Parameters:
  • P[in] Number of modes to compute.

  • z[in] Point in [-1, 1] to evaluate at.

  • b[inout] Basis functions evaluated at z for each mode.

void eval_basis(const BasisType basis_type, const int P, const double z, std::vector<double> &b)#

Reference implementation to compute a modified basis for order P-1 and point z.

Parameters:
  • basis_type[in] Basis type to compute.

  • P[in] Number of modes to compute.

  • z[in] Point in [-1, 1] to evaluate at.

  • b[inout] Basis functions evaluated at z for each mode.

int get_total_num_modes(const ShapeType shape_type, const int P, int *max_n = nullptr, int *max_alpha = nullptr)#

Get the total number of modes in a given shape for a given number of input modes.

Parameters:
  • shape_type[in] Shape type to query number of values for.

  • P[in] Number of modes, i.e. Nektar GetNumModes(), in each dimension;

  • max_n[inout] (optional) Get the maximum Jacobi polynomial order required.

  • max_alpha[inout] (optional) Get the maximum Jacobi alpha value required.

Returns:

Total number of values required to represent the basis with the given number of modes.

void eval_modes(const LibUtilities::ShapeType shape_type, const int P, const double eta0, const double eta1, const double eta2, std::vector<double> &b)#

Evaluate all the basis function modes for a geometry object with P modes in each coordinate direction using calls to eval_modA, …, eval_modPyrC.

Parameters:
  • shape_type[in] Geometry shape type to compute modes for, e.g. eHexahedron.

  • P[in] Number of modes in each dimesion.

  • eta0[in] Evaluation point, first dimension.

  • eta1[in] Evaluation point, second dimension.

  • eta2[in] Evaluation point, third dimension.

  • b[inout] Output vector of mode evaluations.

namespace ExpansionLooping#
namespace GeometryInterface#

Functions

template<typename T>
inline void loc_collapsed_to_loc_coord(const int shape_type, const T &eta, T &xi)#

Map the local collapsed coordinate (eta) to the local coordinate (xi).

Parameters:
  • shape_type[in] Integer denoting shape type found by cast of Nektar++ shape type enum to int.

  • eta[in] Local collapsed coordinate to map to local coordinate. Must be a subscriptable type for indices 0,1,2.

  • xi[inout] Local coordinate. Must be a subscriptable type for indices 0,1,2.

template<typename T>
inline void loc_coord_to_loc_collapsed_3d(const int shape_type, const T &xi, T &eta)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • shape_type[in] Integer denoting shape type found by cast of Nektar++

  • xi[in] Local coordinate to map to collapsed coordinate. Must be a subscriptable type for indices 0,1,2.

  • eta[inout] Local collapsed coordinate. Must be a subscriptable type for indices 0,1,2.

template<typename T>
inline void loc_coord_to_loc_collapsed_2d(const int shape_type, const T xi0, const T xi1, T *eta0, T *eta1)#

Map the local coordinate (xi) to the local collapsed coordinate (eta).

Parameters:
  • shape_type[in] Integer denoting shape type found by cast of Nektar++

  • xi0[in] Local coordinate to map to collapsed coordinate. Coordinate x.

  • xi1[in] Local coordinate to map to collapsed coordinate. Coordinate y.

  • eta0[inout] Local collapsed coordinate. Coordinate x.

  • eta1[inout] Local collapsed coordinate. Coordinate y.

template<typename T>
inline bool clamp_loc_coord(T *coord, const T tol = std::numeric_limits<T>::epsilon())#

Clamp a single coordinate to the interval [-1-tol, 1+tol] for a given tolerance.

Parameters:
  • coord[inout] Value to clamp into interval.

  • tol[in] Optional input tolerance, default machine precision for templated type.

Returns:

True if value was clamped otherwise false.

template<typename T>
inline bool clamp_loc_coords(T *coord0, T *coord1, const T tol = std::numeric_limits<T>::epsilon())#

Clamp a two coordinates to the interval [-1-tol, 1+tol] for a given tolerance.

Parameters:
  • coord0[inout] Value to clamp into interval.

  • coord1[inout] Value to clamp into interval.

  • tol[in] Optional input tolerance, default machine precision for templated type.

Returns:

True if any value was clamped otherwise false.

template<typename T>
inline bool clamp_loc_coords(T *coord0, T *coord1, T *coord2, const T tol = std::numeric_limits<T>::epsilon())#

Clamp a three coordinates to the interval [-1-tol, 1+tol] for a given tolerance.

Parameters:
  • coord0[inout] Value to clamp into interval.

  • coord1[inout] Value to clamp into interval.

  • coord2[inout] Value to clamp into interval.

  • tol[in] Optional input tolerance, default machine precision for templated type.

Returns:

True if any value was clamped otherwise false.

namespace GeometryTransport#
namespace [anonymous]#
namespace Hexahedron#

Functions

inline void newton_step_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL v40, const REAL v41, const REAL v42, const REAL v50, const REAL v51, const REAL v52, const REAL v60, const REAL v61, const REAL v62, const REAL v70, const REAL v71, const REAL v72, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#

Perform a Newton method update step for a Newton iteration that determines the local coordinates (xi) for a given set of physical coordinates. If v0,v1,v2 and v3 (passed component wise) are the vertices of a linear sided quadrilateral then this function performs the Newton update:

xi_{n+1} = xi_n - J^{-1}(xi_n) * F(xi_n)

where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates.

X is defined as

X(xi) = (1/8) * v0 * (1 - xi_0) * (1 - xi_1) * (1 - xi_2) + (1/8) * v1 * (1 + xi_0) * (1 - xi_1) * (1 - xi_2) + (1/8) * v2 * (1 + xi_0) * (1 + xi_1) * (1 - xi_2) + (1/8) * v3 * (1 - xi_0) * (1 + xi_1) * (1 - xi_2) + (1/8) * v4 * (1 - xi_0) * (1 - xi_1) * (1 + xi_2) + (1/8) * v5 * (1 + xi_0) * (1 - xi_1) * (1 + xi_2) + (1/8) * v6 * (1 + xi_0) * (1 + xi_1) * (1 + xi_2) + (1/8) * v7 * (1 - xi_0) * (1 + xi_1) * (1 + xi_2)

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • v40[in] Vertex 4, x component.

  • v41[in] Vertex 4, y component.

  • v42[in] Vertex 4, z component.

  • v50[in] Vertex 5, x component.

  • v51[in] Vertex 5, y component.

  • v52[in] Vertex 5, z component.

  • v60[in] Vertex 6, x component.

  • v61[in] Vertex 6, y component.

  • v62[in] Vertex 6, z component.

  • v70[in] Vertex 7, x component.

  • v71[in] Vertex 7, y component.

  • v72[in] Vertex 7, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[in] Current f evaluation at xi, x component.

  • f1[in] Current f evaluation at xi, y component.

  • f2[in] Current f evaluation at xi, z component.

  • xin0[inout] Output local coordinate iteration, x component.

  • xin1[inout] Output local coordinate iteration, y component.

  • xin2[inout] Output local coordinate iteration, z component.

inline void newton_f_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL v40, const REAL v41, const REAL v42, const REAL v50, const REAL v51, const REAL v52, const REAL v60, const REAL v61, const REAL v62, const REAL v70, const REAL v71, const REAL v72, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#

Compute and return F evaluation where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates. X is defined as

X(xi) = (1/8) * v0 * (1 - xi_0) * (1 - xi_1) * (1 - xi_2) + (1/8) * v1 * (1 + xi_0) * (1 - xi_1) * (1 - xi_2) + (1/8) * v2 * (1 + xi_0) * (1 + xi_1) * (1 - xi_2) + (1/8) * v3 * (1 - xi_0) * (1 + xi_1) * (1 - xi_2) + (1/8) * v4 * (1 - xi_0) * (1 - xi_1) * (1 + xi_2) + (1/8) * v5 * (1 + xi_0) * (1 - xi_1) * (1 + xi_2) + (1/8) * v6 * (1 + xi_0) * (1 + xi_1) * (1 + xi_2) + (1/8) * v7 * (1 - xi_0) * (1 + xi_1) * (1 + xi_2)

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • v40[in] Vertex 4, x component.

  • v41[in] Vertex 4, y component.

  • v42[in] Vertex 4, z component.

  • v50[in] Vertex 5, x component.

  • v51[in] Vertex 5, y component.

  • v52[in] Vertex 5, z component.

  • v60[in] Vertex 6, x component.

  • v61[in] Vertex 6, y component.

  • v62[in] Vertex 6, z component.

  • v70[in] Vertex 7, x component.

  • v71[in] Vertex 7, y component.

  • v72[in] Vertex 7, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[inout] Current f evaluation at xi, x component.

  • f1[inout] Current f evaluation at xi, y component.

  • f2[inout] Current f evaluation at xi, z component.

namespace Newton#
namespace Particles#
namespace Prism#

Functions

inline void newton_step_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL v40, const REAL v41, const REAL v42, const REAL v50, const REAL v51, const REAL v52, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#

Perform a Newton method update step for a Newton iteration that determines the local coordinates (xi) for a given set of physical coordinates. If v0,v1,v2 and v3 (passed component wise) are the vertices of a linear sided quadrilateral then this function performs the Newton update:

xi_{n+1} = xi_n - J^{-1}(xi_n) * F(xi_n)

where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates.

X is defined as

X(xi) = c_0 v_0 + c_1 v_1 + c_2 v_2 + c_3 v_3 + c_4 v_4 + c_5 v_5

where

eta_0 = 2 * ((1 + xi_0) / (1 - xi_2)) - 1 c_0 = 0.125 * (1 - eta_0) * (1 - xi_1) * (1 - xi_2) c_1 = 0.125 * (1 + eta_0) * (1 - xi_1) * (1 - xi_2) c_2 = 0.125 * (1 + eta_0) * (1 + xi_1) * (1 - xi_2) c_3 = 0.125 * (1 - eta_0) * (1 + xi_1) * (1 - xi_2) c_4 = 0.25 * (1 - xi_1) * (1 + xi_2) c_5 = 0.25 * (1 + xi_1) * (1 + xi_2)

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • v40[in] Vertex 4, x component.

  • v41[in] Vertex 4, y component.

  • v42[in] Vertex 4, z component.

  • v50[in] Vertex 5, x component.

  • v51[in] Vertex 5, y component.

  • v52[in] Vertex 5, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[in] Current f evaluation at xi, x component.

  • f1[in] Current f evaluation at xi, y component.

  • f2[in] Current f evaluation at xi, z component.

  • xin0[inout] Output local coordinate iteration, x component.

  • xin1[inout] Output local coordinate iteration, y component.

  • xin2[inout] Output local coordinate iteration, z component.

inline void newton_f_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL v40, const REAL v41, const REAL v42, const REAL v50, const REAL v51, const REAL v52, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#

Compute and return F evaluation where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates. X is defined as

X(xi) = c_0 v_0 + c_1 v_1 + c_2 v_2 + c_3 v_3 + c_4 v_4 + c_5 v_5

where

eta_0 = 2 * ((1 + xi_0) / (1 - xi_2)) - 1 c_0 = 0.125 * (1 - eta_0) * (1 - xi_1) * (1 - xi_2) c_1 = 0.125 * (1 + eta_0) * (1 - xi_1) * (1 - xi_2) c_2 = 0.125 * (1 + eta_0) * (1 + xi_1) * (1 - xi_2) c_3 = 0.125 * (1 - eta_0) * (1 + xi_1) * (1 - xi_2) c_4 = 0.25 * (1 - xi_1) * (1 + xi_2) c_5 = 0.25 * (1 + xi_1) * (1 + xi_2)

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • v40[in] Vertex 4, x component.

  • v41[in] Vertex 4, y component.

  • v42[in] Vertex 4, z component.

  • v50[in] Vertex 5, x component.

  • v51[in] Vertex 5, y component.

  • v52[in] Vertex 5, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[inout] Current f evaluation at xi, x component.

  • f1[inout] Current f evaluation at xi, y component.

  • f2[inout] Current f evaluation at xi, z component.

namespace Pyramid#

Functions

inline void newton_step_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL v40, const REAL v41, const REAL v42, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#

Perform a Newton method update step for a Newton iteration that determines the local coordinates (xi) for a given set of physical coordinates. If v0,v1,v2 and v3 (passed component wise) are the vertices of a linear sided quadrilateral then this function performs the Newton update:

xi_{n+1} = xi_n - J^{-1}(xi_n) * F(xi_n)

where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates.

X is defined as

X(xi) = c_0 v_0 + c_1 v_1 + c_2 v_2 + c_3 v_3 + c_4 v_4 + c_5 v_5

where d_2 = 1 - xi_2 eta_0 = 2 * ((1 + xi_0) / d_2) - 1 eta_1 = 2 * ((1 + xi_1) / d_2) - 1 eta_2 = xi_2

Note vertices C and D are swapped relative to the textbook.#

c0 = 0.125 * (1 - eta_0) * (1 - eta_1) * (1 - eta_2) c1 = 0.125 * (1 + eta_0) * (1 - eta_1) * (1 - eta_2) c2 = 0.125 * (1 + eta_0) * (1 + eta_1) * (1 - eta_2) c3 = 0.125 * (1 - eta_0) * (1 + eta_1) * (1 - eta_2) c4 = (1 + eta_2) * 0.5

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • v40[in] Vertex 4, x component.

  • v41[in] Vertex 4, y component.

  • v42[in] Vertex 4, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[in] Current f evaluation at xi, x component.

  • f1[in] Current f evaluation at xi, y component.

  • f2[in] Current f evaluation at xi, z component.

  • xin0[inout] Output local coordinate iteration, x component.

  • xin1[inout] Output local coordinate iteration, y component.

  • xin2[inout] Output local coordinate iteration, z component.

inline void newton_f_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL v40, const REAL v41, const REAL v42, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#

Compute and return F evaluation where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates. X is defined as

X(xi) = c_0 v_0 + c_1 v_1 + c_2 v_2 + c_3 v_3 + c_4 v_4 + c_5 v_5

where d_2 = 1 - xi_2 eta_0 = 2 * ((1 + xi_0) / d_2) - 1 eta_1 = 2 * ((1 + xi_1) / d_2) - 1 eta_2 = xi_2

Note vertices C and D are swapped relative to the textbook.#

c0 = 0.125 * (1 - eta_0) * (1 - eta_1) * (1 - eta_2) c1 = 0.125 * (1 + eta_0) * (1 - eta_1) * (1 - eta_2) c2 = 0.125 * (1 + eta_0) * (1 + eta_1) * (1 - eta_2) c3 = 0.125 * (1 - eta_0) * (1 + eta_1) * (1 - eta_2) c4 = (1 + eta_2) * 0.5

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • v40[in] Vertex 4, x component.

  • v41[in] Vertex 4, y component.

  • v42[in] Vertex 4, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[inout] Current f evaluation at xi, x component.

  • f1[inout] Current f evaluation at xi, y component.

  • f2[inout] Current f evaluation at xi, z component.

namespace Quadrilateral#

Functions

inline void newton_step_linear_2d(const REAL xi0, const REAL xi1, const REAL v00, const REAL v01, const REAL v10, const REAL v11, const REAL v20, const REAL v21, const REAL v30, const REAL v31, const REAL phys0, const REAL phys1, const REAL f0, const REAL f1, REAL *xin0, REAL *xin1)#

Perform a Newton method update step for a Newton iteration that determines the local coordinates (xi) for a given set of physical coordinates. If v0,v1,v2 and v3 (passed component wise) are the vertices of a linear sided quadrilateral then this function performs the Newton update:

xi_{n+1} = xi_n - J^{-1}(xi_n) * F(xi_n)

where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates.

X is defined as

X(xi) = 0.25 * v0 * (1 - xi_0) * (1 - xi_1) + 0.25 * v1 * (1 + xi_0) * (1 - xi_1) + 0.25 * v3 * (1 - xi_0) * (1 + xi_1) + 0.25 * v2 * (1 + xi_0) * (1 + xi_1)

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • f0[in] Current f evaluation at xi, x component.

  • f1[in] Current f evaluation at xi, y component.

  • xin0[inout] Output local coordinate iteration, x component.

  • xin1[inout] Output local coordinate iteration, y component.

inline void newton_f_linear_2d(const REAL xi0, const REAL xi1, const REAL v00, const REAL v01, const REAL v10, const REAL v11, const REAL v20, const REAL v21, const REAL v30, const REAL v31, const REAL phys0, const REAL phys1, REAL *f0, REAL *f1)#

Compute and return F evaluation where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates. X is defined as

X(xi) = 0.25 * v0 * (1 - xi_0) * (1 - xi_1) + 0.25 * v1 * (1 + xi_0) * (1 - xi_1) + 0.25 * v3 * (1 - xi_0) * (1 + xi_1) + 0.25 * v2 * (1 + xi_0) * (1 + xi_1)

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • f0[inout] Current f evaluation at xi, x component.

  • f1[inout] Current f evaluation at xi, y component.

namespace Tetrahedron#

Functions

inline void newton_step_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL phys0, const REAL phys1, const REAL phys2, const REAL f0, const REAL f1, const REAL f2, REAL *xin0, REAL *xin1, REAL *xin2)#

Perform a Newton method update step for a Newton iteration that determines the local coordinates (xi) for a given set of physical coordinates. If v0,v1,v2 and v3 (passed component wise) are the vertices of a linear sided quadrilateral then this function performs the Newton update:

xi_{n+1} = xi_n - J^{-1}(xi_n) * F(xi_n)

where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates.

X is defined as

X(xi) = (1/2)[v1-v0, v2-v0, v3-v0] (xi - [-1,-1,-1]^T) + v0

where v*-v0 form the columns of the matrix.

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[in] Current f evaluation at xi, x component.

  • f1[in] Current f evaluation at xi, y component.

  • f2[in] Current f evaluation at xi, z component.

  • xin0[inout] Output local coordinate iteration, x component.

  • xin1[inout] Output local coordinate iteration, y component.

  • xin2[inout] Output local coordinate iteration, z component.

inline void newton_f_linear_3d(const REAL xi0, const REAL xi1, const REAL xi2, const REAL v00, const REAL v01, const REAL v02, const REAL v10, const REAL v11, const REAL v12, const REAL v20, const REAL v21, const REAL v22, const REAL v30, const REAL v31, const REAL v32, const REAL phys0, const REAL phys1, const REAL phys2, REAL *f0, REAL *f1, REAL *f2)#

Compute and return F evaluation where

F(xi) = X(xi) - X_phys

where X_phys are the global coordinates. X is defined as

X(xi) = (1/2)[v1-v0, v2-v0, v3-v0] (xi - [-1,-1,-1]^T) + v0

where v*-v0 form the columns of the matrix.

This is a generated function. To modify this function please edit the script that generates this function. See top of file.

Parameters:
  • xi0[in] Current xi_n point, x component.

  • xi1[in] Current xi_n point, y component.

  • xi2[in] Current xi_n point, z component.

  • v00[in] Vertex 0, x component.

  • v01[in] Vertex 0, y component.

  • v02[in] Vertex 0, z component.

  • v10[in] Vertex 1, x component.

  • v11[in] Vertex 1, y component.

  • v12[in] Vertex 1, z component.

  • v20[in] Vertex 2, x component.

  • v21[in] Vertex 2, y component.

  • v22[in] Vertex 2, z component.

  • v30[in] Vertex 3, x component.

  • v31[in] Vertex 3, y component.

  • v32[in] Vertex 3, z component.

  • phys0[in] Target point in global space, x component.

  • phys1[in] Target point in global space, y component.

  • phys2[in] Target point in global space, z component.

  • f0[inout] Current f evaluation at xi, x component.

  • f1[inout] Current f evaluation at xi, y component.

  • f2[inout] Current f evaluation at xi, z component.

namespace std#
file atomic_data_reader.hpp
#include <string>
#include <vector>
#include <neso_particles.hpp>
file csv_atomic_data_reader.hpp
#include “atomic_data_reader.hpp
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
file custom_types.hpp
#include <CL/sycl.hpp>
#include <complex>

Typedefs

using Complex = std::complex<double>#
using Distribution = std::vector<Complex>#
using SYCLFlatDistribution = sycl::buffer<std::complex<double>>#
using Space = std::vector<std::complex<double>>#
using SpaceReal = std::vector<double>#
file diagnostics.hpp
#include “mesh.hpp
#include “plasma.hpp
file fft_fftw.hpp
#include “custom_types.hpp
#include <CL/sycl.hpp>
#include <fftw3.h>
#include <vector>
file fft_mkl.hpp
#include “custom_types.hpp
#include “oneapi/mkl/dfti.hpp”
#include <CL/sycl.hpp>
file fft_wrappers.hpp
#include “fft_fftw.hpp
file interpolator.hpp
#include <vector>
#include <neso_particles.hpp>
file linear_interpolator_1D.hpp
#include “interpolator.hpp
#include <CL/sycl.hpp>
#include <mpi.h>
#include <neso_particles.hpp>
#include <vector>
file mesh.hpp
#include “custom_types.hpp
#include “fft_wrappers.hpp
#include “plasma.hpp
#include “species.hpp
#include <vector>
#include <CL/sycl.hpp>
file basis_evaluation.hpp
#include “particle_interface.hpp
#include <cstdlib>
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <LocalRegions/QuadExp.h>
#include <LocalRegions/TriExp.h>
#include <StdRegions/StdExpansion2D.h>
#include “basis_reference.hpp
#include “special_functions.hpp
#include “utility_sycl.hpp
#include <fstream>
#include <iostream>
#include <string>
#include <tgmath.h>
file basis_reference.hpp
#include <cstdlib>
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <StdRegions/StdExpansion2D.h>
#include “special_functions.hpp
#include <array>
#include <fstream>
#include <iostream>
#include <string>
#include <tgmath.h>
#include <tuple>
file bounding_box_intersection.hpp
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <limits>
#include <map>
#include <memory>
#include <stack>
#include <vector>
#include <mpi.h>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file cell_id_translation.hpp
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <deque>
#include <limits>
#include <map>
#include <memory>
#include <set>
#include <stack>
#include <vector>
#include <mpi.h>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file coordinate_mapping.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file basis_evaluate_base.hpp
file expansion_looping.hpp
#include “hexahedron.hpp
#include “prism.hpp
#include “pyramid.hpp
#include “quadrilateral.hpp
#include “tetrahedron.hpp
#include “triangle.hpp
file geom_to_expansion_builder.hpp
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <LocalRegions/QuadExp.h>
#include <LocalRegions/TriExp.h>
#include <StdRegions/StdExpansion2D.h>
file hexahedron.hpp
file hexahedron.hpp
#include <neso_particles.hpp>
file jacobi_coeff_mod_basis.hpp
#include <cstdlib>
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <LocalRegions/QuadExp.h>
#include <LocalRegions/TriExp.h>
#include <StdRegions/StdExpansion2D.h>
file jacobi_expansion_looping_interface.hpp
#include “../basis_evaluation.hpp
#include <LibUtilities/BasicConst/NektarUnivConsts.hpp>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file prism.hpp
file prism.hpp
#include <neso_particles.hpp>
file pyramid.hpp
file pyramid.hpp
#include <neso_particles.hpp>
file quadrilateral.hpp
file quadrilateral.hpp
#include <neso_particles.hpp>
file tetrahedron.hpp
file tetrahedron.hpp
#include <neso_particles.hpp>
file triangle.hpp
file function_bary_evaluation.hpp
#include “coordinate_mapping.hpp
#include “particle_interface.hpp
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <LocalRegions/QuadExp.h>
#include <LocalRegions/TriExp.h>
#include <StdRegions/StdExpansion2D.h>
#include “utility_sycl.hpp
file function_basis_evaluation.hpp
#include “coordinate_mapping.hpp
#include “particle_interface.hpp
#include <cstdlib>
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <LocalRegions/QuadExp.h>
#include <LocalRegions/TriExp.h>
#include <StdRegions/StdExpansion2D.h>
#include “basis_evaluation.hpp
#include “special_functions.hpp
#include <CL/sycl.hpp>
#include <fstream>
#include <iostream>
#include <string>
file function_basis_projection.hpp
#include “coordinate_mapping.hpp
#include “particle_interface.hpp
#include <cstdlib>
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <LocalRegions/QuadExp.h>
#include <LocalRegions/TriExp.h>
#include <StdRegions/StdExpansion2D.h>
#include “basis_evaluation.hpp
#include “special_functions.hpp
#include “utility_sycl.hpp
#include <CL/sycl.hpp>
#include <fstream>
#include <iostream>
#include <string>
file function_evaluation.hpp
#include <map>
#include <memory>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <MultiRegions/ContField.h>
#include <MultiRegions/DisContField.h>
#include <neso_particles.hpp>
#include “particle_interface.hpp
file function_projection.hpp
#include <cmath>
#include <map>
#include <memory>
#include <string>
#include <LibUtilities/BasicUtils/SharedArray.hpp>
#include <MultiRegions/DisContField.h>
#include <neso_particles.hpp>
#include “basis_reference.hpp
#include “particle_interface.hpp
file geometry_container_3d.hpp
#include <SpatialDomains/MeshGraph.h>
#include <iostream>
#include <mpi.h>
#include “geometry_types_3d.hpp
#include “remote_geom_3d.hpp
#include “shape_mapping.hpp
file geometry_local_remote_3d.hpp
#include “remote_geom_3d.hpp
#include <map>
#include <memory>
#include <SpatialDomains/MeshGraph.h>
file geometry_transport.hpp
#include “remote_geom_2d.hpp
#include “remote_geom_3d.hpp
#include “shape_mapping.hpp
file geometry_transport_2d.hpp
#include <SpatialDomains/MeshGraph.h>
#include <iostream>
#include <map>
#include <mpi.h>
#include <vector>
#include “shape_mapping.hpp
#include “packed_geoms_2d.hpp
#include “remote_geom_2d.hpp
#include <neso_particles.hpp>
file geometry_transport_3d.hpp
#include <SpatialDomains/MeshGraph.h>
#include <iostream>
#include <mpi.h>
#include “remote_geom_3d.hpp
#include “shape_mapping.hpp
file geometry_types_3d.hpp
#include “remote_geom_3d.hpp
#include <map>
#include <memory>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file halo_extension.hpp
#include <map>
#include <memory>
#include <mpi.h>
#include <set>
#include <vector>
file packed_geom_2d.hpp
#include “remote_geom_2d.hpp
#include <SpatialDomains/MeshGraph.h>

Variables

int coordim#
int vid#
NekDouble x#
NekDouble y#
NekDouble z#
int a#
int b#
int n_points#
file packed_geoms_2d.hpp
#include “packed_geom_2d.hpp
#include <SpatialDomains/MeshGraph.h>
file remote_geom_2d.hpp
#include <SpatialDomains/MeshGraph.h>
file remote_geom_3d.hpp
#include <SpatialDomains/MeshGraph.h>
file shape_mapping.hpp
#include <SpatialDomains/MeshGraph.h>

Functions

inline constexpr int shape_type_to_int(Nektar::LibUtilities::ShapeType shape_type)#

Get the unqiue integer (cast) that corresponds to a Nektar++ shape type.

Parameters:

shape_type – ShapeType Enum value.

Returns:

Static cast of enum value.

inline constexpr Nektar::LibUtilities::ShapeType int_to_shape_type(const int type_int)#

Get the unqiue Enum (cast) that corresponds to an integer returned form shape_type_to_int.

Parameters:

type_int – Int returned from shape_type_to_int.

Returns:

Static cast to Enum value.

file parameter_store.hpp
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <string>
#include <type_traits>
#include <variant>
file particle_boundary_conditions.hpp
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <deque>
#include <limits>
#include <map>
#include <set>
#include <stack>
#include <vector>
#include <mpi.h>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file coarse_lookup_map.hpp
#include <array>
#include <list>
#include <map>
#include <neso_particles.hpp>
#include <utility>
#include <vector>
file coarse_mappers_base.hpp
#include “coarse_lookup_map.hpp
#include <memory>
file linear_newton_implementation.hpp
#include “hexahedron.hpp
#include “prism.hpp
#include “pyramid.hpp
#include “quadrilateral.hpp
#include “tetrahedron.hpp
file map_particles_2d.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <vector>
#include “coarse_lookup_map.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file map_particles_2d_regular.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <vector>
#include “coarse_mappers_base.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file map_particles_3d.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <tuple>
#include <vector>
#include “coarse_lookup_map.hpp
#include “map_particles_host.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file map_particles_3d_regular.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <tuple>
#include <vector>
#include “coarse_mappers_base.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file map_particles_common.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <vector>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file map_particles_host.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <vector>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file map_particles_newton.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <vector>
#include “coarse_mappers_base.hpp
#include <LibUtilities/BasicConst/NektarUnivConsts.hpp>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file mapping_newton_iteration_base.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file nektar_graph_local_mapper.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <vector>
#include “coarse_lookup_map.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file newton_geom_interfaces.hpp
#include “newton_hex.hpp
#include “newton_prism.hpp
#include “newton_pyr.hpp
#include “newton_quad.hpp
#include “newton_tet.hpp
file newton_hex.hpp
#include <neso_particles.hpp>
file newton_prism.hpp
#include <neso_particles.hpp>
file newton_pyr.hpp
#include <neso_particles.hpp>
file newton_quad.hpp
#include <neso_particles.hpp>
file newton_tet.hpp
#include <neso_particles.hpp>
file particle_cell_mapping.hpp
file particle_cell_mapping_2d.hpp
#include “coarse_lookup_map.hpp
#include “map_particles_2d.hpp
file particle_cell_mapping_3d.hpp
#include “coarse_lookup_map.hpp
#include “map_particles_3d.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file particle_cell_mapping_common.hpp
#include <cmath>
#include <map>
#include <memory>
#include <mpi.h>
#include <vector>
#include “map_particles_common.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>

Defines

MAPPING_CROSS_PRODUCT_3D(a1, a2, a3, b1, b2, b3, c1, c2, c3)#
MAPPING_DOT_PRODUCT_3D(a1, a2, a3, b1, b2, b3)#
file particle_cell_mapping_newton.hpp
#include “map_particles_newton.hpp
#include “x_map_newton.hpp
file x_map_newton.hpp
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file particle_interface.hpp
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <deque>
#include <limits>
#include <map>
#include <memory>
#include <set>
#include <stack>
#include <vector>
#include <mpi.h>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
#include “cell_id_translation.hpp
file particle_mesh_interface.hpp
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <deque>
#include <limits>
#include <map>
#include <memory>
#include <set>
#include <stack>
#include <vector>
#include <mpi.h>
#include <SpatialDomains/MeshGraph.h>
#include <neso_particles.hpp>
file special_functions.hpp
#include <cmath>
file utilities.hpp
#include <fstream>
#include <iostream>
#include <map>
#include <memory>
#include <mpi.h>
#include <string>
#include <LibUtilities/Foundations/Basis.h>
#include <LibUtilities/Polylib/Polylib.h>
#include <MultiRegions/ContField.h>
#include <MultiRegions/DisContField.h>
#include “cell_id_translation.hpp
#include <neso_particles.hpp>
file utility_mesh_cartesian.hpp
#include <neso_particles.hpp>
#include <memory>
#include <vector>
file utility_mesh_plotting.hpp
#include <SpatialDomains/Geometry.h>
#include <SpatialDomains/Geometry2D.h>
#include <SpatialDomains/Geometry3D.h>
#include <fstream>
#include <iostream>
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <string>
#include <vector>
file utility_sycl.hpp
#include <map>
#include <memory>
#include <neso_particles.hpp>
#include <string>
#include <vector>

Defines

NESO_VECTOR_LENGTH#
file particle_initialisation_line.hpp
#include <mpi.h>
#include <neso_particles.hpp>
#include <random>
#include <vector>
file position_distribution.hpp
#include <cstdint>
#include <map>
#include <random>
#include <vector>
#include <boost/random/sobol.hpp>
#include <boost/random/uniform_real_distribution.hpp>
file plasma.hpp
#include “mesh.hpp
#include “species.hpp
#include <CL/sycl.hpp>
file run_info.hpp
#include <CL/sycl.hpp>
file simulation.hpp
#include <iostream>
#include “diagnostics.hpp
#include “mesh.hpp
#include “plasma.hpp
#include <CL/sycl.hpp>

Functions

void initialize()#
void evolve(sycl::queue &q, Mesh &mesh, Plasma &plasma, FFT &fft, Diagnostics &diagnostics)#
file solver_callback_handler.hpp
#include <functional>
#include <vector>
file solver_runner.hpp
#include <LibUtilities/BasicUtils/SessionReader.h>
#include <SolverUtils/Driver.h>
#include <SpatialDomains/MeshGraph.h>
file species.hpp
#include “mesh.hpp
#include “velocity.hpp
#include <CL/sycl.hpp>
file velocity.hpp
dir /tmp/repo-checkout/NESO/include/nektar_interface/expansion_looping
dir /tmp/repo-checkout/NESO/include/nektar_interface/particle_cell_mapping/generated_linear
dir /tmp/repo-checkout/NESO/include/nektar_interface/geometry_transport
dir /tmp/repo-checkout/NESO/include
dir /tmp/repo-checkout/NESO/include/nektar_interface
dir /tmp/repo-checkout/NESO/include/nektar_interface/particle_cell_mapping
dir /tmp/repo-checkout/NESO/include/particle_utility
dir /tmp/repo-checkout/NESO/include/solvers