Extension: Geometries
#include "dg/geometries/geometries.h"

Public Member Functions

 CylindricalSymmTensorLvl1 ()
 Initialize with the identity tensor. More...
 
 CylindricalSymmTensorLvl1 (CylindricalFunctor chi_xx, CylindricalFunctor chi_xy, CylindricalFunctor chi_yy, CylindricalFunctor divChiX, CylindricalFunctor divChiY)
 Copy given functors. More...
 
void reset (CylindricalFunctor chi_xx, CylindricalFunctor chi_xy, CylindricalFunctor chi_yy, CylindricalFunctor divChiX, CylindricalFunctor divChiY)
 replace with given functors More...
 
const CylindricalFunctorxx () const
 xy component \( \chi^{xx}\) More...
 
const CylindricalFunctorxy () const
 xy component \( \chi^{xy}\) More...
 
const CylindricalFunctoryy () const
 yy component \( \chi^{yy}\) More...
 
const CylindricalFunctordivX () const
 \( \partial_x \chi^{xx} + \partial_y\chi^{yx}\) is the x-component of the divergence of the tensor \( \chi\) More...
 
const CylindricalFunctordivY () const
 \( \partial_x \chi^{xy} + \partial_y\chi^{yy}\) is the y-component of the divergence of the tensor \( \chi \) More...
 

Detailed Description

A symmetric 2d tensor field and its divergence

unsigned nGrid = js["grid"]["generator"]["initial"]["n"].asUInt();
unsigned NxGrid = js["grid"]["generator"]["initial"]["Nx"].asUInt();
unsigned NyGrid = js["grid"]["generator"]["initial"]["Ny"].asUInt();
double epsHector = js["grid"]["generator"]["eps"].asDouble();
if( mode == 0)
{
std::cout << " ... of type conformal ...\n";
generator = std::make_unique< dg::geo::Hector<dg::IDMatrix,
dg::DMatrix, dg::DVec>>( mag.get_psip(), psi_0, psi_1,
mag.R0(), 0., nGrid, NxGrid, NyGrid, epsHector,
true);
}
else if( mode == 1)
{
std::cout << " ... of type adaption ...\n";
generator = std::make_unique< dg::geo::Hector<dg::IDMatrix,
dg::DMatrix, dg::DVec>>( mag.get_psip(), nc, psi_0,
psi_1, mag.R0(), 0., nGrid, NxGrid, NyGrid,
epsHector, true);
}
else
{
std::cout << " ... of type monitor metric ...\n";
dg::geo::make_LiseikinCollective( mag.get_psip(), 0.1, 0.001);
generator = std::make_unique< dg::geo::Hector<dg::IDMatrix,
dg::DMatrix, dg::DVec>>( mag.get_psip(), lc, psi_0,
psi_1, mag.R0(), 0., nGrid, NxGrid, NyGrid,
epsHector, true);
}
static CylindricalFunctorsLvl1 make_NablaPsiInvCollective(const CylindricalFunctorsLvl2 &psi)
A container class that contains all NablaPsiInv functors.
Definition: adaption.h:123
static CylindricalSymmTensorLvl1 make_LiseikinCollective(const CylindricalFunctorsLvl2 &psi, double k, double eps)
Definition: adaption.h:254
thrust::device_vector< double > DVec
IDMatrix_t< double > IDMatrix
EllSparseBlockMatDevice< double > DMatrix
This struct bundles a function and its first derivatives.
Definition: fluxfunctions.h:182
Definition: fluxfunctions.h:361
The High PrEcision Conformal grid generaTOR.
Definition: hector.h:221

Constructor & Destructor Documentation

◆ CylindricalSymmTensorLvl1() [1/2]

dg::geo::CylindricalSymmTensorLvl1::CylindricalSymmTensorLvl1 ( )
inline

Initialize with the identity tensor.

◆ CylindricalSymmTensorLvl1() [2/2]

dg::geo::CylindricalSymmTensorLvl1::CylindricalSymmTensorLvl1 ( CylindricalFunctor  chi_xx,
CylindricalFunctor  chi_xy,
CylindricalFunctor  chi_yy,
CylindricalFunctor  divChiX,
CylindricalFunctor  divChiY 
)
inline

Copy given functors.

let's assume the tensor is called \( \chi \) (chi)

Parameters
chi_xxcontravariant xx component \( \chi^{xx}\)
chi_xycontravariant xy component \( \chi^{xy}\)
chi_yycontravariant yy component \( \chi^{yy}\)
divChiX\( \partial_x \chi^{xx} + \partial_y\chi^{yx}\) is the x-component of the divergence of the tensor \( \chi\)
divChiY\( \partial_x \chi^{xy} + \partial_y\chi^{yy}\) is the y-component of the divergence of the tensor \( \chi \)

Member Function Documentation

◆ divX()

const CylindricalFunctor & dg::geo::CylindricalSymmTensorLvl1::divX ( ) const
inline

\( \partial_x \chi^{xx} + \partial_y\chi^{yx}\) is the x-component of the divergence of the tensor \( \chi\)

◆ divY()

const CylindricalFunctor & dg::geo::CylindricalSymmTensorLvl1::divY ( ) const
inline

\( \partial_x \chi^{xy} + \partial_y\chi^{yy}\) is the y-component of the divergence of the tensor \( \chi \)

◆ reset()

void dg::geo::CylindricalSymmTensorLvl1::reset ( CylindricalFunctor  chi_xx,
CylindricalFunctor  chi_xy,
CylindricalFunctor  chi_yy,
CylindricalFunctor  divChiX,
CylindricalFunctor  divChiY 
)
inline

replace with given functors

◆ xx()

const CylindricalFunctor & dg::geo::CylindricalSymmTensorLvl1::xx ( ) const
inline

xy component \( \chi^{xx}\)

◆ xy()

const CylindricalFunctor & dg::geo::CylindricalSymmTensorLvl1::xy ( ) const
inline

xy component \( \chi^{xy}\)

◆ yy()

const CylindricalFunctor & dg::geo::CylindricalSymmTensorLvl1::yy ( ) const
inline

yy component \( \chi^{yy}\)


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