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

#include <drift_diffusion.h>

Public Member Functions

 p2g_step1 (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 dprop1_, const PVAR_t dprop2_, bool apply_mass_)
DEVICE void operator() (idx_t ip)
 p2g_step1 (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 dprop1_, const PVAR_t dprop2_, 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 dprop1
const PVAR_t dprop2
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 PVAR_t, typename GVAR_t, typename P2C_t>
class p2g_step1< PVAR_t, GVAR_t, P2C_t >

Definition at line 58 of file drift_diffusion.h.

Member Typedef Documentation

◆ idx_t [1/2]

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

Definition at line 61 of file drift_diffusion.h.

◆ idx_t [2/2]

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

Definition at line 75 of file taylor_dispersion.h.

Constructor & Destructor Documentation

◆ p2g_step1() [1/2]

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
p2g_step1< PVAR_t, GVAR_t, P2C_t >::p2g_step1 ( 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 dprop1_,
const PVAR_t dprop2_,
bool apply_mass_ )
inline

Definition at line 76 of file drift_diffusion.h.

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

◆ p2g_step1() [2/2]

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
p2g_step1< PVAR_t, GVAR_t, P2C_t >::p2g_step1 ( 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 dprop1_,
const PVAR_t dprop2_,
bool apply_mass_ )
inline

Definition at line 90 of file taylor_dispersion.h.

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 86 of file drift_diffusion.h.

86 {
87
88 using qgt = quadgrid_t<GVAR_t>;
89 real_t N = 0.0;
90 auto xx = x[ip];
91 auto yy = y[ip];
94 for (idx_t inode = 0; inode < 4; ++inode) {
95 N = apply_mass ? qgt::shp (xx, yy, inode, c, r, hx, hy)/M[qgt::gt(inode, c, r, nrows)] :
96 qgt::shp (xx, yy, inode, c, r, hx, hy);
98 }
99 }
particles_t::idx_t idx_t

◆ operator()() [2/2]

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

Definition at line 100 of file taylor_dispersion.h.

100 {
101
102 using qgt = quadgrid_t<GVAR_t>;
103 real_t N = 0.0;
104 auto xx = x[ip];
105 auto yy = y[ip];
108 for (idx_t inode = 0; inode < 4; ++inode) {
109 N = apply_mass ? qgt::shp (xx, yy, inode, c, r, hx, hy)/M[qgt::gt(inode, c, r, nrows)] :
110 qgt::shp (xx, yy, inode, c, r, hx, hy);
112 }
113 }

Member Data Documentation

◆ apply_mass

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

Definition at line 72 of file drift_diffusion.h.

◆ dprop1

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
const PVAR_t p2g_step1< PVAR_t, GVAR_t, P2C_t >::dprop1
private

Definition at line 64 of file drift_diffusion.h.

◆ dprop2

template<typename PVAR_t, typename GVAR_t, typename P2C_t>
const PVAR_t p2g_step1< PVAR_t, GVAR_t, P2C_t >::dprop2
private

Definition at line 65 of file drift_diffusion.h.

◆ gvar

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

Definition at line 71 of file drift_diffusion.h.

◆ hx

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

Definition at line 68 of file drift_diffusion.h.

◆ hy

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

Definition at line 69 of file drift_diffusion.h.

◆ M

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

Definition at line 70 of file drift_diffusion.h.

◆ nrows

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

Definition at line 67 of file drift_diffusion.h.

◆ ptcl_to_grd

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

Definition at line 66 of file drift_diffusion.h.

◆ x

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

Definition at line 62 of file drift_diffusion.h.

◆ y

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

Definition at line 63 of file drift_diffusion.h.


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