criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
criptic::FieldQtyGrad Class Reference

Class to hold and compute gradients of field quantities. More...

#include <FieldQty.H>

Public Member Functions

 FieldQtyGrad ()
 Construct a field quantity gradient filled with zeros.
 
void setZero ()
 Set all field quantities to zero.
 
void addPacket (const CRPacket &pkt, const RealVec &r, const RealTensor2 &h2Inv)
 Add contribution of packet at target point.
 
RealVecoperator[] (int i)
 Return an element of the FieldQtyGrad.
 
const RealVecoperator[] (int i) const
 Return an element of the FieldQtyGrad.
 
FieldQtyGrad operator+ (const FieldQtyGrad &a) const
 Add two FieldQtyGrad objects.
 
FieldQtyGrad operator- (const FieldQtyGrad &a) const
 Subtract two FieldQtyGrad objects.
 
std::array< RealVec, nFieldQtyoperator/ (const FieldQtyGrad &a) const
 Divide two FieldQtyGrad objects.
 
FieldQtyGrad operator* (const Real a) const
 Multiply a FieldQtyGrad by a scalar.
 
FieldQtyGrad operator/ (const Real a) const
 Divide a FieldQtyGrad by a scalar.
 
FieldQtyGrad operator* (const RealVec &a) const
 Multiply a FieldQtyGrad by a scalar.
 
FieldQtyGradoperator*= (const Real &a)
 Multiply a FieldQtyGrad by a scalar.
 
FieldQtyGradoperator/= (const Real &a)
 Divide a FieldQty by a scalar.
 
FieldQtyGradoperator+= (const FieldQtyGrad &a)
 Add a FieldQtyGrad object to this one.
 
FieldQtyGradoperator-= (const FieldQtyGrad &a)
 Subtract a FieldQtyGrad object from this one.
 

Public Attributes

std::array< RealVec, nFieldQtyqGrad
 

Detailed Description

Class to hold and compute gradients of field quantities.

Constructor & Destructor Documentation

◆ FieldQtyGrad()

criptic::FieldQtyGrad::FieldQtyGrad ( )
inline

Construct a field quantity gradient filled with zeros.

Member Function Documentation

◆ addPacket()

void criptic::FieldQtyGrad::addPacket ( const CRPacket pkt,
const RealVec r,
const RealTensor2 h2Inv 
)
inline

Add contribution of packet at target point.

Parameters
pktPacket being added
rVector from packet to target point
h2InvSquared inverse of bandwidth matrix

The addition done in this routine is non-normalized, so once all packets have been added, divide by (2 pi)^(3/2) det(h) to get properly normalized quantities.

◆ operator*() [1/2]

criptic::FieldQtyGrad::operator* ( const Real  a) const
inline

Multiply a FieldQtyGrad by a scalar.

Parameters
aThe scalar by which to multiply
Returns
A FieldQtyGrad containing the elementwise product

◆ operator*() [2/2]

criptic::FieldQtyGrad::operator* ( const RealVec a) const
inline

Multiply a FieldQtyGrad by a scalar.

Parameters
aThe scalar by which to multiply
Returns
A FieldQtyGrad containing the elementwise product

◆ operator*=()

criptic::FieldQtyGrad::operator*= ( const Real a)
inline

Multiply a FieldQtyGrad by a scalar.

Parameters
aThe scalar by which to multiply
Returns
This FieldQtyGrad multiplied by a

◆ operator+()

criptic::FieldQtyGrad::operator+ ( const FieldQtyGrad a) const
inline

Add two FieldQtyGrad objects.

Parameters
aThe FieldQtyGrad to add
Returns
A FieldQtyGrad containing the elementwise sum

◆ operator+=()

criptic::FieldQtyGrad::operator+= ( const FieldQtyGrad a)
inline

Add a FieldQtyGrad object to this one.

Parameters
aThe FieldQtyGrad to add
Returns
This FieldQtyGrad

◆ operator-()

criptic::FieldQtyGrad::operator- ( const FieldQtyGrad a) const
inline

Subtract two FieldQtyGrad objects.

Parameters
aThe FieldQtyGrad to subtract
Returns
A FieldQtyGrad containing the elementwise difference

◆ operator-=()

criptic::FieldQtyGrad::operator-= ( const FieldQtyGrad a)
inline

Subtract a FieldQtyGrad object from this one.

Parameters
aThe FieldQtyGrd to subtract
Returns
This FieldQtyGrad

◆ operator/() [1/2]

criptic::FieldQtyGrad::operator/ ( const FieldQtyGrad a) const
inline

Divide two FieldQtyGrad objects.

Parameters
aThe FieldQtyGrad by which to divide
Returns
An array containing the elementwise division

◆ operator/() [2/2]

criptic::FieldQtyGrad::operator/ ( const Real  a) const
inline

Divide a FieldQtyGrad by a scalar.

Parameters
aThe scalar by which to divide
Returns
A FieldQtyGrad containing the elementwise dividend

◆ operator/=()

criptic::FieldQtyGrad::operator/= ( const Real a)
inline

Divide a FieldQty by a scalar.

Parameters
aThe scalar by which to divide
Returns
This FieldQty divided by a

◆ operator[]() [1/2]

criptic::FieldQtyGrad::operator[] ( int  i)
inline

Return an element of the FieldQtyGrad.

Parameters
iThe index of the quantity gradient to return
Returns
The value of quantity gradient t

◆ operator[]() [2/2]

criptic::FieldQtyGrad::operator[] ( int  i) const
inline

Return an element of the FieldQtyGrad.

Parameters
iThe index of the quantity gradient to return
Returns
The value of quantity gradient t

◆ setZero()

void criptic::FieldQtyGrad::setZero ( )
inline

Set all field quantities to zero.

Member Data Documentation

◆ qGrad

std::array<RealVec,nFieldQty> criptic::FieldQtyGrad::qGrad

Array of field quantity gradients


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