quadgrid 0.1
simple cartesian quad grid with particles for c++/octave
Loading...
Searching...
No Matches
p2g_helper_t< GVAR_t, PVAR_t, P2C_t > Class Template Reference

#include <particles_imp.h>

Public Member Functions

 p2g_helper_t (const PVAR_t x_, const PVAR_t y_, GVAR_t M_, GVAR_t gvar_, const P2C_t ptcl_to_grd_, const idx_t nrows_, const real_t hx_, const real_t hy_, const PVAR_t dprop_, bool apply_mass_)
DEVICE void operator() (idx_t ip)

Private Types

using idx_t = particles_t::idx_t

Private Attributes

const PVAR_t x
const PVAR_t y
const PVAR_t dprop
const P2C_t ptcl_to_grd
const idx_t nrows
const real_t hx
const real_t hy
GVAR_t M
GVAR_t gvar
bool apply_mass

Detailed Description

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
class p2g_helper_t< GVAR_t, PVAR_t, P2C_t >

Definition at line 18 of file particles_imp.h.

Member Typedef Documentation

◆ idx_t

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
using p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::idx_t = particles_t::idx_t
private

Definition at line 21 of file particles_imp.h.

Constructor & Destructor Documentation

◆ p2g_helper_t()

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::p2g_helper_t ( const PVAR_t x_,
const PVAR_t y_,
GVAR_t M_,
GVAR_t gvar_,
const P2C_t ptcl_to_grd_,
const idx_t nrows_,
const real_t hx_,
const real_t hy_,
const PVAR_t dprop_,
bool apply_mass_ )
inline

Definition at line 36 of file particles_imp.h.

39 : x(x_), y(y_), M(M_), gvar(gvar_),
const idx_t nrows
const P2C_t ptcl_to_grd
const real_t hx
const PVAR_t dprop
const PVAR_t y
const real_t hy
const PVAR_t x

Member Function Documentation

◆ operator()()

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
DEVICE void p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::operator() ( idx_t ip)
inline

Definition at line 45 of file particles_imp.h.

45 {
46 using qgt = quadgrid_t<GVAR_t>;
47 real_t N = 0.0;
48 auto xx = x[ip];
49 auto yy = y[ip];
52 for (idx_t inode = 0; inode < 4; ++inode) {
53 N = apply_mass ? qgt::shp (xx, yy, inode, c, r, hx, hy)/M[qgt::gt(inode, c, r, nrows)] :
54 qgt::shp (xx, yy, inode, c, r, hx, hy);
56 }
57 }
particles_t::idx_t idx_t

Member Data Documentation

◆ apply_mass

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
bool p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::apply_mass
private

Definition at line 32 of file particles_imp.h.

◆ dprop

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const PVAR_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::dprop
private

Definition at line 24 of file particles_imp.h.

◆ gvar

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
GVAR_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::gvar
private

Definition at line 30 of file particles_imp.h.

◆ hx

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const real_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::hx
private

Definition at line 27 of file particles_imp.h.

◆ hy

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const real_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::hy
private

Definition at line 28 of file particles_imp.h.

◆ M

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
GVAR_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::M
private

Definition at line 29 of file particles_imp.h.

◆ nrows

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const idx_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::nrows
private

Definition at line 26 of file particles_imp.h.

◆ ptcl_to_grd

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const P2C_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::ptcl_to_grd
private

Definition at line 25 of file particles_imp.h.

◆ x

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const PVAR_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::x
private

Definition at line 22 of file particles_imp.h.

◆ y

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const PVAR_t p2g_helper_t< GVAR_t, PVAR_t, P2C_t >::y
private

Definition at line 23 of file particles_imp.h.


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