Version: SMASH-3.1
smash::FieldsOnLattice Class Reference

#include <fields.h>

A class for calculating the fields A^mu associated with the VDF potentials.

The structure of the class is heavily based on the DensityOnLattice class.

It holds the values of the A^mu FourVector as well as fourgradients of its components.

Definition at line 32 of file fields.h.

Public Member Functions

 FieldsOnLattice ()
 Default constructor. More...
 
FourVector A_mu () const
 
std::array< FourVector, 4 > dAmu_dxnu () const
 
ThreeVector dvecA_dt ()
 
ThreeVector grad_A0 ()
 Compute the gradient of A^0 on the local lattice. More...
 
ThreeVector curl_vecA ()
 Compute the curl of the field on the local lattice. More...
 
void overwrite_A_mu (FourVector new_A_mu)
 Overwrite the value of the field on the local lattice. More...
 
void overwrite_dAmu_dt_to_zero ()
 Overwrite the time derivative of A^mu to zero. More...
 
void overwrite_dAmu_dxnu (FourVector dAmu_dt, FourVector dAmu_dx, FourVector dAmu_dy, FourVector dAmu_dz)
 Overwrite the four-gradient of A^mu on the local lattice, using the provided values of its components. More...
 

Private Attributes

FourVector A_mu_
 Four-vector density of the field. More...
 
std::array< FourVector, 4 > dAmu_dxnu_
 Four-gradient of the four-vector density of the field. More...
 

Constructor & Destructor Documentation

◆ FieldsOnLattice()

smash::FieldsOnLattice::FieldsOnLattice ( )
inline

Default constructor.

Definition at line 35 of file fields.h.

36  : A_mu_(FourVector()),
37  dAmu_dxnu_({FourVector(), FourVector(), FourVector(), FourVector()}) {}
FourVector A_mu_
Four-vector density of the field.
Definition: fields.h:116
std::array< FourVector, 4 > dAmu_dxnu_
Four-gradient of the four-vector density of the field.
Definition: fields.h:118

Member Function Documentation

◆ A_mu()

FourVector smash::FieldsOnLattice::A_mu ( ) const
inline
Returns
The field four-vector A^mu

Definition at line 42 of file fields.h.

42 { return A_mu_; }

◆ dAmu_dxnu()

std::array<FourVector, 4> smash::FieldsOnLattice::dAmu_dxnu ( ) const
inline
Returns
The four-gradient of the field four-vector A^mu

Definition at line 47 of file fields.h.

47 { return dAmu_dxnu_; }

◆ dvecA_dt()

ThreeVector smash::FieldsOnLattice::dvecA_dt ( )
inline
Returns
The time derivative of the 3-vector part of A^mu on the local lattice

Definition at line 53 of file fields.h.

53 { return dAmu_dxnu_[0].threevec(); }

◆ grad_A0()

ThreeVector smash::FieldsOnLattice::grad_A0 ( )
inline

Compute the gradient of A^0 on the local lattice.

Returns
\(\nabla A^0\)

Definition at line 60 of file fields.h.

60  {
61  ThreeVector A_0_grad = ThreeVector();
62  for (int i = 1; i < 4; i++) {
63  A_0_grad[i - 1] = dAmu_dxnu_[i].x0();
64  }
65  return A_0_grad;
66  }

◆ curl_vecA()

ThreeVector smash::FieldsOnLattice::curl_vecA ( )
inline

Compute the curl of the field on the local lattice.

Returns
\(\boldsymbol{\nabla}\times\mathbf{A}\)

Definition at line 73 of file fields.h.

73  {
74  ThreeVector curl_vec_A = ThreeVector();
75  curl_vec_A.set_x1(dAmu_dxnu_[2].x3() - dAmu_dxnu_[3].x2());
76  curl_vec_A.set_x2(dAmu_dxnu_[3].x1() - dAmu_dxnu_[1].x3());
77  curl_vec_A.set_x3(dAmu_dxnu_[1].x2() - dAmu_dxnu_[2].x1());
78  return curl_vec_A;
79  }

◆ overwrite_A_mu()

void smash::FieldsOnLattice::overwrite_A_mu ( FourVector  new_A_mu)
inline

Overwrite the value of the field on the local lattice.

Parameters
[in]new_A_munew value of the field

Definition at line 86 of file fields.h.

86 { A_mu_ = new_A_mu; }

◆ overwrite_dAmu_dt_to_zero()

void smash::FieldsOnLattice::overwrite_dAmu_dt_to_zero ( )
inline

Overwrite the time derivative of A^mu to zero.

Definition at line 91 of file fields.h.

91  {
92  FourVector tmp0(0.0, 0.0, 0.0, 0.0);
93 
94  dAmu_dxnu_[0] = tmp0;
95  }

◆ overwrite_dAmu_dxnu()

void smash::FieldsOnLattice::overwrite_dAmu_dxnu ( FourVector  dAmu_dt,
FourVector  dAmu_dx,
FourVector  dAmu_dy,
FourVector  dAmu_dz 
)
inline

Overwrite the four-gradient of A^mu on the local lattice, using the provided values of its components.

Parameters
[in]dAmu_dtnew value of the time derivative of A^mu
[in]dAmu_dxnew value of the x-derivative of A^mu
[in]dAmu_dynew value of the y-derivative of A^mu
[in]dAmu_dznew value of the z-derivative of A^mu

Definition at line 106 of file fields.h.

107  {
108  dAmu_dxnu_[0] = dAmu_dt;
109  dAmu_dxnu_[1] = dAmu_dx;
110  dAmu_dxnu_[2] = dAmu_dy;
111  dAmu_dxnu_[3] = dAmu_dz;
112  }

Member Data Documentation

◆ A_mu_

FourVector smash::FieldsOnLattice::A_mu_
private

Four-vector density of the field.

Definition at line 116 of file fields.h.

◆ dAmu_dxnu_

std::array<FourVector, 4> smash::FieldsOnLattice::dAmu_dxnu_
private

Four-gradient of the four-vector density of the field.

Definition at line 118 of file fields.h.


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