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

#include <drift_diffusion.h>

Public Member Functions

 g2p_step3 (PVAR_t x_, PVAR_t y_, const GVAR_t M_, const GVAR_t gvar1_, const GVAR_t gvar2_, 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)
 g2p_step3 (PVAR_t x_, PVAR_t y_, const GVAR_t M_, const GVAR_t gvar1_, const GVAR_t gvar2_, 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
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 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 g2p_step3< GVAR_t, PVAR_t, P2C_t >

Definition at line 155 of file drift_diffusion.h.

Member Typedef Documentation

◆ idx_t [1/2]

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

Definition at line 158 of file drift_diffusion.h.

◆ idx_t [2/2]

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

Definition at line 172 of file taylor_dispersion.h.

Constructor & Destructor Documentation

◆ g2p_step3() [1/2]

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
g2p_step3< GVAR_t, PVAR_t, P2C_t >::g2p_step3 ( PVAR_t x_,
PVAR_t y_,
const GVAR_t M_,
const GVAR_t gvar1_,
const GVAR_t gvar2_,
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 173 of file drift_diffusion.h.

176 : x(x_), y(y_), M(M_), gvar1(gvar1_), gvar2(gvar2_),
const real_t hx
const idx_t nrows
const GVAR_t gvar1
const GVAR_t M
const real_t hy
const GVAR_t gvar2
const P2C_t ptcl_to_grd

◆ g2p_step3() [2/2]

template<typename GVAR_t, typename PVAR_t, typename P2C_t>
g2p_step3< GVAR_t, PVAR_t, P2C_t >::g2p_step3 ( PVAR_t x_,
PVAR_t y_,
const GVAR_t M_,
const GVAR_t gvar1_,
const GVAR_t gvar2_,
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 187 of file taylor_dispersion.h.

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 182 of file drift_diffusion.h.

182 {
183 using qgt = quadgrid_t<GVAR_t>;
184 real_t N = 0.0;
185 auto xx = x[ip];
186 auto yy = y[ip];
189 for (idx_t inode = 0; inode < 4; ++inode) {
190 N = apply_mass ? qgt::shp (xx, yy, inode, c, r, hx, hy) * M[qgt::gt(inode, c, r, nrows)] :
191 qgt::shp (xx, yy, inode, c, r, hx, hy);
192 dprop[ip] += N * (gvar1[qgt::gt(inode, c, r, nrows)] + gvar2[qgt::gt(inode, c, r, nrows)]);
193 }
194 }
particles_t::idx_t idx_t

◆ operator()() [2/2]

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

Definition at line 196 of file taylor_dispersion.h.

196 {
197 using qgt = quadgrid_t<GVAR_t>;
198 real_t N = 0.0;
199 auto xx = x[ip];
200 auto yy = y[ip];
203 for (idx_t inode = 0; inode < 4; ++inode) {
204 N = apply_mass ? qgt::shp (xx, yy, inode, c, r, hx, hy) * M[qgt::gt(inode, c, r, nrows)] :
205 qgt::shp (xx, yy, inode, c, r, hx, hy);
206 dprop[ip] += N * (gvar1[qgt::gt(inode, c, r, nrows)] + gvar2[qgt::gt(inode, c, r, nrows)]);
207 }
208 }

Member Data Documentation

◆ apply_mass

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

Definition at line 169 of file drift_diffusion.h.

◆ dprop

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

Definition at line 168 of file drift_diffusion.h.

◆ gvar1

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

Definition at line 162 of file drift_diffusion.h.

◆ gvar2

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

Definition at line 163 of file drift_diffusion.h.

◆ hx

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

Definition at line 166 of file drift_diffusion.h.

◆ hy

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

Definition at line 167 of file drift_diffusion.h.

◆ M

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

Definition at line 161 of file drift_diffusion.h.

◆ nrows

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

Definition at line 165 of file drift_diffusion.h.

◆ ptcl_to_grd

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

Definition at line 164 of file drift_diffusion.h.

◆ x

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

Definition at line 159 of file drift_diffusion.h.

◆ y

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

Definition at line 160 of file drift_diffusion.h.


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