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

#include <particles_imp.h>

Public Member Functions

 p2gd_helper_t (const PVAR_t x_, const PVAR_t y_, const 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 DPROPX_t dpropx_, const DPROPY_t dpropy_, const DPROPAREA_t dproparea_, 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 DPROPX_t dpropx
const DPROPY_t dpropy
const DPROPAREA_t dproparea
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, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
class p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >

Definition at line 133 of file particles_imp.h.

Member Typedef Documentation

◆ idx_t

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
using p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::idx_t = particles_t::idx_t
private

Definition at line 136 of file particles_imp.h.

Constructor & Destructor Documentation

◆ p2gd_helper_t()

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::p2gd_helper_t ( const PVAR_t x_,
const PVAR_t y_,
const 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 DPROPX_t dpropx_,
const DPROPY_t dpropy_,
const DPROPAREA_t dproparea_,
bool apply_mass_ )
inline

Definition at line 153 of file particles_imp.h.

156 : x(x_), y(y_), M(M_), gvar(gvar_),
const DPROPY_t dpropy
const real_t hy
const PVAR_t y
const DPROPX_t dpropx
const PVAR_t x
const real_t hx
const P2C_t ptcl_to_grd
const idx_t nrows
const DPROPAREA_t dproparea

Member Function Documentation

◆ operator()()

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
DEVICE void p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::operator() ( idx_t ip)
inline

Definition at line 162 of file particles_imp.h.

162 {
163 using qgt = quadgrid_t<GVAR_t>;
164 real_t Nx = 0.0, Ny = 0.0;
165 auto xx = x[ip];
166 auto yy = y[ip];
169 for (idx_t inode = 0; inode < 4; ++inode) {
170 Nx = apply_mass ? qgt::shg (xx, yy, 0, inode, c, r, hx, hy) / M[qgt::gt(inode, c, r, nrows)] :
171 qgt::shg (xx, yy, 0, inode, c, r, hx, hy);
172 Ny = apply_mass ? qgt::shg (xx, yy, 1, inode, c, r, hx, hy) / M[qgt::gt(inode, c, r, nrows)] :
173 qgt::shg (xx, yy, 1, inode, c, r, hx, hy);
174
176 }
177 }
particles_t::idx_t idx_t

Member Data Documentation

◆ apply_mass

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
bool p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::apply_mass
private

Definition at line 149 of file particles_imp.h.

◆ dproparea

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const DPROPAREA_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::dproparea
private

Definition at line 141 of file particles_imp.h.

◆ dpropx

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const DPROPX_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::dpropx
private

Definition at line 139 of file particles_imp.h.

◆ dpropy

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const DPROPY_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::dpropy
private

Definition at line 140 of file particles_imp.h.

◆ gvar

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
GVAR_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::gvar
private

Definition at line 147 of file particles_imp.h.

◆ hx

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const real_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::hx
private

Definition at line 144 of file particles_imp.h.

◆ hy

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const real_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::hy
private

Definition at line 145 of file particles_imp.h.

◆ M

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
GVAR_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::M
private

Definition at line 146 of file particles_imp.h.

◆ nrows

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const idx_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::nrows
private

Definition at line 143 of file particles_imp.h.

◆ ptcl_to_grd

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const P2C_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::ptcl_to_grd
private

Definition at line 142 of file particles_imp.h.

◆ x

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const PVAR_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::x
private

Definition at line 137 of file particles_imp.h.

◆ y

template<typename GVAR_t, typename PVAR_t, typename P2C_t, typename DPROPX_t, typename DPROPY_t, typename DPROPAREA_t>
const PVAR_t p2gd_helper_t< GVAR_t, PVAR_t, P2C_t, DPROPX_t, DPROPY_t, DPROPAREA_t >::y
private

Definition at line 138 of file particles_imp.h.


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