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

#include <drift_diffusion.h>

Public Member Functions

 p2gd_step2 (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 real_t D_, const PVAR_t dpropx_, const PVAR_t dpropy_, bool apply_mass_)
DEVICE void operator() (idx_t ip)
 p2gd_step2 (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 real_t D_, const PVAR_t dpropx_, const PVAR_t dpropy_, bool apply_mass_)
DEVICE void operator() (idx_t ip)

Private Types

using idx_t = particles_t::idx_t
using idx_t = particles_t::idx_t

Private Attributes

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

Detailed Description

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

Definition at line 105 of file drift_diffusion.h.

Member Typedef Documentation

◆ idx_t [1/2]

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

Definition at line 108 of file drift_diffusion.h.

◆ idx_t [2/2]

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

Definition at line 122 of file taylor_dispersion.h.

Constructor & Destructor Documentation

◆ p2gd_step2() [1/2]

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
p2gd_step2< PVAR_t, GVAR_t, P2C_t >::p2gd_step2 ( 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 real_t D_,
const PVAR_t dpropx_,
const PVAR_t dpropy_,
bool apply_mass_ )
inline

Definition at line 125 of file drift_diffusion.h.

128 : x(x_), y(y_), M(M_), gvar(gvar_),
const idx_t nrows
const PVAR_t y
const PVAR_t dpropy
const PVAR_t x
const real_t hx
const real_t D
const PVAR_t dpropx
const P2C_t ptcl_to_grd
const real_t hy

◆ p2gd_step2() [2/2]

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
p2gd_step2< PVAR_t, GVAR_t, P2C_t >::p2gd_step2 ( 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 real_t D_,
const PVAR_t dpropx_,
const PVAR_t dpropy_,
bool apply_mass_ )
inline

Definition at line 139 of file taylor_dispersion.h.

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 134 of file drift_diffusion.h.

134 {
135 using qgt = quadgrid_t<GVAR_t>;
136 real_t Nx = 0.0, Ny = 0.0;
137 auto xx = x[ip];
138 auto yy = y[ip];
141 for (idx_t inode = 0; inode < 4; ++inode) {
142 Nx = apply_mass ? qgt::shg (xx, yy, 0, inode, c, r, hx, hy) / M[qgt::gt(inode, c, r, nrows)] :
143 qgt::shg (xx, yy, 0, inode, c, r, hx, hy);
144 Ny = apply_mass ? qgt::shg (xx, yy, 1, inode, c, r, hx, hy) / M[qgt::gt(inode, c, r, nrows)] :
145 qgt::shg (xx, yy, 1, inode, c, r, hx, hy);
146
148 }
149 }
particles_t::idx_t idx_t

◆ operator()() [2/2]

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

Definition at line 148 of file taylor_dispersion.h.

148 {
149 using qgt = quadgrid_t<GVAR_t>;
150 real_t Nx = 0.0, Ny = 0.0;
151 auto xx = x[ip];
152 auto yy = y[ip];
155 for (idx_t inode = 0; inode < 4; ++inode) {
156 Nx = apply_mass ? qgt::shg (xx, yy, 0, inode, c, r, hx, hy) / M[qgt::gt(inode, c, r, nrows)] :
157 qgt::shg (xx, yy, 0, inode, c, r, hx, hy);
158 Ny = apply_mass ? qgt::shg (xx, yy, 1, inode, c, r, hx, hy) / M[qgt::gt(inode, c, r, nrows)] :
159 qgt::shg (xx, yy, 1, inode, c, r, hx, hy);
160
162 }
163 }

Member Data Documentation

◆ apply_mass

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

Definition at line 121 of file drift_diffusion.h.

◆ D

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
const real_t p2gd_step2< PVAR_t, GVAR_t, P2C_t >::D
private

Definition at line 117 of file drift_diffusion.h.

◆ dpropx

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
const PVAR_t p2gd_step2< PVAR_t, GVAR_t, P2C_t >::dpropx
private

Definition at line 111 of file drift_diffusion.h.

◆ dpropy

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
const PVAR_t p2gd_step2< PVAR_t, GVAR_t, P2C_t >::dpropy
private

Definition at line 112 of file drift_diffusion.h.

◆ gvar

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

Definition at line 119 of file drift_diffusion.h.

◆ hx

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

Definition at line 115 of file drift_diffusion.h.

◆ hy

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

Definition at line 116 of file drift_diffusion.h.

◆ M

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

Definition at line 118 of file drift_diffusion.h.

◆ nrows

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

Definition at line 114 of file drift_diffusion.h.

◆ ptcl_to_grd

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

Definition at line 113 of file drift_diffusion.h.

◆ x

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

Definition at line 109 of file drift_diffusion.h.

◆ y

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

Definition at line 110 of file drift_diffusion.h.


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