|
template<class Functor , class real_type > |
thrust::host_vector< real_type > | dg::pullback (const Functor &f, const aRealGeometryX2d< real_type > &g) |
| \( f_i = f( x(\zeta_i, \eta_i), y(\zeta_i, \eta_i))\) More...
|
|
template<class Functor , class real_type > |
thrust::host_vector< real_type > | dg::pullback (const Functor &f, const aRealGeometryX3d< real_type > &g) |
| \( f_i = f( x(\zeta_i, \eta_i, \nu_i), y(\zeta_i, \eta_i, \nu_i), z(\zeta_i,\eta_i,\nu_i))\) More...
|
|
template<class Functor , class real_type > |
thrust::host_vector< real_type > | dg::pullback (const Functor &f, const aRealGeometry2d< real_type > &g) |
| \( f_i = f( x(\zeta_i, \eta_i), y(\zeta_i, \eta_i))\) More...
|
|
template<class Functor , class real_type > |
thrust::host_vector< real_type > | dg::pullback (const Functor &f, const aRealGeometry3d< real_type > &g) |
| \( f_i = f( x(\zeta_i, \eta_i, \nu_i), y(\zeta_i, \eta_i, \nu_i), z(\zeta_i,\eta_i,\nu_i))\) More...
|
|
template<class Functor , class real_type > |
MPI_Vector< thrust::host_vector< real_type > > | dg::pullback (const Functor &f, const aRealMPIGeometry2d< real_type > &g) |
| \( f_i = f( x(\zeta_i, \eta_i), y(\zeta_i, \eta_i))\) More...
|
|
template<class Functor , class real_type > |
MPI_Vector< thrust::host_vector< real_type > > | dg::pullback (const Functor &f, const aRealMPIGeometry3d< real_type > &g) |
| \( f_i = f( x(\zeta_i, \eta_i, \nu_i), y(\zeta_i, \eta_i, \nu_i), z(\zeta_i,\eta_i,\nu_i))\) More...
|
|
template<class Functor1 , class Functor2 , class container , class Geometry > |
void | dg::pushForwardPerp (const Functor1 &vR, const Functor2 &vZ, container &vx, container &vy, const Geometry &g) |
| \( \bar v = J v\) More...
|
|
template<class Functor1 , class Functor2 , class Functor3 , class container , class Geometry > |
void | dg::pushForward (const Functor1 &vR, const Functor2 &vZ, const Functor3 &vPhi, container &vx, container &vy, container &vz, const Geometry &g) |
| \( {\bar v} = J v\) More...
|
|
template<class FunctorRR , class FunctorRZ , class FunctorZZ , class container , class Geometry > |
void | dg::pushForwardPerp (const FunctorRR &chiRR, const FunctorRZ &chiRZ, const FunctorZZ &chiZZ, SparseTensor< container > &chi, const Geometry &g) |
| \( \bar \chi = J \chi J^T\) More...
|
|
template<class Functor , class real_type >
thrust::host_vector< real_type > dg::pullback |
( |
const Functor & |
f, |
|
|
const aRealGeometry3d< real_type > & |
g |
|
) |
| |
\( f_i = f( x(\zeta_i, \eta_i, \nu_i), y(\zeta_i, \eta_i, \nu_i), z(\zeta_i,\eta_i,\nu_i))\)
Pull back a function defined in physical coordinates to the curvilinear (computational) coordinate system. The pullback is equivalent to the following:
- generate the list of physical space coordinates (e.g. in 2d \( x_i = x(\zeta_i, \eta_i),\ y_i = y(\zeta_i, \eta_i)\) for all
i
) using the map member of the grid e.g. aRealGeometry2d::map()
- evaluate the given function or functor at these coordinates and store the result in the output vector (e.g. in 2d \( v_i = f(x_i,y_i)\) for all
i
)
- Note
- the grid defines what its physical coordinates are, i.e. it could be either Cartesian or Cylindrical coordinates
- Template Parameters
-
Functor | The binary (for 2d grids) or ternary (for 3d grids) function or functor with signature: real_type ( real_type x, real_type y) ; real_type ( real_type x, real_type y, real_type z) |
- Parameters
-
f | The function defined in physical coordinates |
g | a two- or three dimensional Geometry (g.map() is used to evaluate f ) |
- Note
- Template deduction for the Functor will fail if you overload functions with different dimensionality (e.g. real_type sine( real_type x) and real_type sine(real_type x, real_type y) ) You will want to rename those uniquely
- Returns
- The output vector
v
as a host vector
- See also
- If the function is defined in computational space coordinates, then use
dg::evaluate
template<class Functor1 , class Functor2 , class Functor3 , class container , class Geometry >
void dg::pushForward |
( |
const Functor1 & |
vR, |
|
|
const Functor2 & |
vZ, |
|
|
const Functor3 & |
vPhi, |
|
|
container & |
vx, |
|
|
container & |
vy, |
|
|
container & |
vz, |
|
|
const Geometry & |
g |
|
) |
| |
\( {\bar v} = J v\)
Push forward a vector from cylindrical or Cartesian to a new coordinate system. Applies the Jacobian matrix \( {\bar v} = J v\):
\[ v^x(x,y) = x_R (x,y) v^R(R(x,y), Z(x,y)) + x_Z v^Z(R(x,y), Z(x,y)) \\ v^y(x,y) = y_R (x,y) v^R(R(x,y), Z(x,y)) + y_Z v^Z(R(x,y), Z(x,y)) \]
where \( x_R = \frac{\partial x}{\partial R}\), ...
- Template Parameters
-
Functor1 | Binary or Ternary functor |
Functor2 | Binary or Ternary functor |
Functor3 | Binary or Ternary functor |
Container | A data container class for which the blas1 functionality is overloaded and to which the return type of blas1::subroutine() can be converted using dg::construct . We assume that Container is copyable/assignable and has a swap member function. In connection with Geometry this is one of
|
Geometry | A type that is or derives from one of the abstract geometry base classes ( aGeometry2d , aGeometry3d , aMPIGeometry2d , ...). Geometry determines which Container type can be used. |
- Parameters
-
vR | input R-component in cartesian or cylindrical coordinates |
vZ | input Z-component in cartesian or cylindrical coordinates |
vPhi | input Z-component in cartesian or cylindrical coordinates |
vx | x-component of vector (gets properly resized) |
vy | y-component of vector (gets properly resized) |
vz | z-component of vector (gets properly resized) |
g | The geometry object |
template<class Functor1 , class Functor2 , class container , class Geometry >
void dg::pushForwardPerp |
( |
const Functor1 & |
vR, |
|
|
const Functor2 & |
vZ, |
|
|
container & |
vx, |
|
|
container & |
vy, |
|
|
const Geometry & |
g |
|
) |
| |
\( \bar v = J v\)
Push forward a vector from cylindrical or Cartesian to a new coordinate system. Applies the Jacobian matrix \( {\bar v} = J v\):
\[ v^x(x,y) = x_R (x,y) v^R(R(x,y), Z(x,y)) + x_Z v^Z(R(x,y), Z(x,y)) \\ v^y(x,y) = y_R (x,y) v^R(R(x,y), Z(x,y)) + y_Z v^Z(R(x,y), Z(x,y)) \]
where \( x_R = \frac{\partial x}{\partial R}\), ...
- Template Parameters
-
Functor1 | Binary or Ternary functor |
Functor2 | Binary or Ternary functor |
Container | A data container class for which the blas1 functionality is overloaded and to which the return type of blas1::subroutine() can be converted using dg::construct . We assume that Container is copyable/assignable and has a swap member function. In connection with Geometry this is one of
|
Geometry | A type that is or derives from one of the abstract geometry base classes ( aGeometry2d , aGeometry3d , aMPIGeometry2d , ...). Geometry determines which Container type can be used. |
- Parameters
-
vR | input R-component in cylindrical coordinates |
vZ | input Z-component in cylindrical coordinates |
vx | x-component of vector (gets properly resized) |
vy | y-component of vector (gets properly resized) |
g | The geometry object |
template<class FunctorRR , class FunctorRZ , class FunctorZZ , class container , class Geometry >
void dg::pushForwardPerp |
( |
const FunctorRR & |
chiRR, |
|
|
const FunctorRZ & |
chiRZ, |
|
|
const FunctorZZ & |
chiZZ, |
|
|
SparseTensor< container > & |
chi, |
|
|
const Geometry & |
g |
|
) |
| |
\( \bar \chi = J \chi J^T\)
Push forward a symmetric 2d tensor from cylindrical or Cartesian to a new coordinate system. Applies the Jacobian matrix \( \bar \chi = J \chi J^T\):
\[ \chi^{xx}(x,y) = x_R^2 \chi^{RR} + 2x_Rx_Z \chi^{RZ} + x_Z^2\chi^{ZZ} \\ \chi^{xy}(x,y) = x_Ry_R \chi^{RR} + (x_Ry_Z+y_Rx_Z) \chi^{RZ} + x_Zy_Z\chi^{ZZ} \\ \chi^{yy}(x,y) = y_R^2 \chi^{RR} + 2y_Ry_Z \chi^{RZ} + y_Z^2\chi^{ZZ} \\ \]
where \( x_R = \frac{\partial x}{\partial R}\), ...
- Template Parameters
-
FunctorRR | Binary or Ternary functor |
FunctorRZ | Binary or Ternary functor |
FunctorZZ | Binary or Ternary functor |
Container | A data container class for which the blas1 functionality is overloaded and to which the return type of blas1::subroutine() can be converted using dg::construct . We assume that Container is copyable/assignable and has a swap member function. In connection with Geometry this is one of
|
Geometry | A type that is or derives from one of the abstract geometry base classes ( aGeometry2d , aGeometry3d , aMPIGeometry2d , ...). Geometry determines which Container type can be used. |
- Parameters
-
chiRR | input RR-component in cylindrical coordinates |
chiRZ | input RZ-component in cylindrical coordinates |
chiZZ | input ZZ-component in cylindrical coordinates |
chi | tensor (gets properly resized) |
g | The geometry object |