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

#include <drift_diffusion.h>

Public Member Functions

 g2pd_step4 (PVAR_t x_, PVAR_t y_, const GVAR_t M_, const GVAR_t gvar1_, const GVAR_t gvar2_, const GVAR_t gvar3_, const GVAR_t gvar4_, const P2C_t ptcl_to_grd_, const idx_t nrows_, const real_t hx_, const real_t hy_, PVAR_t dprop_, bool apply_mass_)
DEVICE void operator() (idx_t ip)

Private Types

using idx_t = particles_t::idx_t

Private Attributes

PVAR_t x
PVAR_t y
const GVAR_t M
const GVAR_t gvar1
const GVAR_t gvar2
const GVAR_t gvar3
const GVAR_t gvar4
const P2C_t ptcl_to_grd
const idx_t nrows
const real_t hx
const real_t hy
PVAR_t dprop
bool apply_mass

Detailed Description

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

Definition at line 199 of file drift_diffusion.h.

Member Typedef Documentation

◆ idx_t

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

Definition at line 202 of file drift_diffusion.h.

Constructor & Destructor Documentation

◆ g2pd_step4()

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
g2pd_step4< GVAR_t, PVAR_t, P2C_t >::g2pd_step4 ( PVAR_t x_,
PVAR_t y_,
const GVAR_t M_,
const GVAR_t gvar1_,
const GVAR_t gvar2_,
const GVAR_t gvar3_,
const GVAR_t gvar4_,
const P2C_t ptcl_to_grd_,
const idx_t nrows_,
const real_t hx_,
const real_t hy_,
PVAR_t dprop_,
bool apply_mass_ )
inline

Definition at line 216 of file drift_diffusion.h.

const real_t hy
const idx_t nrows
const GVAR_t gvar3
const real_t hx
const P2C_t ptcl_to_grd
const GVAR_t M
const GVAR_t gvar2
const GVAR_t gvar1
const GVAR_t gvar4

Member Function Documentation

◆ operator()()

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

Definition at line 226 of file drift_diffusion.h.

226 {
227 using qgt = quadgrid_t<GVAR_t>;
228 real_t Nx = 0.0, Ny = 0.0;
229 auto xx = x[ip];
230 auto yy = y[ip];
233
234 for (idx_t inode = 0; inode < 4; ++inode) {
235 Nx = apply_mass ?
236 qgt::shg (xx, yy, 0, inode, c, r, hx, hy) * M[qgt::gt(inode, c, r, nrows)] :
237 qgt::shg (xx, yy, 0, inode, c, r, hx, hy);
238 Ny = apply_mass ?
239 qgt::shg (xx, yy, 1, inode, c, r, hx, hy) * M[qgt::gt(inode, c, r, nrows)] :
240 qgt::shg (xx, yy, 1, inode, c, r, hx, hy);
241 dprop[ip] += Nx * (gvar1[qgt::gt(inode, c, r, nrows)] + gvar2[qgt::gt(inode, c, r, nrows)]) +
242 Ny * (gvar3[qgt::gt(inode, c, r, nrows)] + gvar4[qgt::gt(inode, c, r, nrows)]);;
243
244 }
245 }
particles_t::idx_t idx_t

Member Data Documentation

◆ apply_mass

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

Definition at line 212 of file drift_diffusion.h.

◆ dprop

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
PVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::dprop
private

Definition at line 211 of file drift_diffusion.h.

◆ gvar1

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const GVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::gvar1
private

Definition at line 206 of file drift_diffusion.h.

◆ gvar2

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const GVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::gvar2
private

Definition at line 206 of file drift_diffusion.h.

◆ gvar3

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const GVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::gvar3
private

Definition at line 206 of file drift_diffusion.h.

◆ gvar4

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const GVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::gvar4
private

Definition at line 206 of file drift_diffusion.h.

◆ hx

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

Definition at line 209 of file drift_diffusion.h.

◆ hy

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

Definition at line 210 of file drift_diffusion.h.

◆ M

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
const GVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::M
private

Definition at line 205 of file drift_diffusion.h.

◆ nrows

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

Definition at line 208 of file drift_diffusion.h.

◆ ptcl_to_grd

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

Definition at line 207 of file drift_diffusion.h.

◆ x

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
PVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::x
private

Definition at line 203 of file drift_diffusion.h.

◆ y

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
PVAR_t g2pd_step4< GVAR_t, PVAR_t, P2C_t >::y
private

Definition at line 204 of file drift_diffusion.h.


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