|
criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
|
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. | |
| RealVec & | operator[] (int i) |
| Return an element of the FieldQtyGrad. | |
| const RealVec & | operator[] (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, nFieldQty > | operator/ (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. | |
| FieldQtyGrad & | operator*= (const Real &a) |
| Multiply a FieldQtyGrad by a scalar. | |
| FieldQtyGrad & | operator/= (const Real &a) |
| Divide a FieldQty by a scalar. | |
| FieldQtyGrad & | operator+= (const FieldQtyGrad &a) |
| Add a FieldQtyGrad object to this one. | |
| FieldQtyGrad & | operator-= (const FieldQtyGrad &a) |
| Subtract a FieldQtyGrad object from this one. | |
Public Attributes | |
| std::array< RealVec, nFieldQty > | qGrad |
Class to hold and compute gradients of field quantities.
|
inline |
Construct a field quantity gradient filled with zeros.
|
inline |
Add contribution of packet at target point.
| pkt | Packet being added |
| r | Vector from packet to target point |
| h2Inv | Squared 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.
|
inline |
Multiply a FieldQtyGrad by a scalar.
| a | The scalar by which to multiply |
|
inline |
Multiply a FieldQtyGrad by a scalar.
| a | The scalar by which to multiply |
|
inline |
Multiply a FieldQtyGrad by a scalar.
| a | The scalar by which to multiply |
|
inline |
Add two FieldQtyGrad objects.
| a | The FieldQtyGrad to add |
|
inline |
|
inline |
Subtract two FieldQtyGrad objects.
| a | The FieldQtyGrad to subtract |
|
inline |
Subtract a FieldQtyGrad object from this one.
| a | The FieldQtyGrd to subtract |
|
inline |
Divide two FieldQtyGrad objects.
| a | The FieldQtyGrad by which to divide |
|
inline |
Divide a FieldQtyGrad by a scalar.
| a | The scalar by which to divide |
|
inline |
|
inline |
Return an element of the FieldQtyGrad.
| i | The index of the quantity gradient to return |
|
inline |
Return an element of the FieldQtyGrad.
| i | The index of the quantity gradient to return |
|
inline |
Set all field quantities to zero.