170 Field3D (
const double deltaR,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
187 Field3D (
const int nx,
const int ny,
const int nz,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
216 void set_parameters (
const double deltaR,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
233 void set_parameters (
const int nx,
const int ny,
const int nz,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
346 double XX(
const int i)
const {
return m_X[i];}
355 double YY(
const int i)
const {
return m_Y[i];}
364 double ZZ(
const int i)
const {
return m_Z[i];}
374 double kX(
const int i)
const {
return m_kX[i];}
384 double kY(
const int i)
const {
return m_kY[i];}
394 double kZ(
const int i)
const {
return m_kZ[i];}
405 virtual double ScalarField (
const int i,
const int j,
const int k)
const
406 { (void)i; (void)j; (void)k;
ErrorCBL(
"",
"Scalarield",
"Field3D.h");
return 0; }
417 { (void)pos;
ErrorCBL(
"",
"Scalarield",
"Field3D.h");
return 0; }
425 {
ErrorCBL(
"",
"Scalarield",
"Field3D.h"); std::vector<double> vv;
return vv; }
436 virtual std::vector<double>
VectorField (
const int i,
const int j,
const int k)
const
437 { (void)i; (void)j; (void)k;
ErrorCBL(
"",
"VectorField",
"Field3D.h");
return {0}; }
446 virtual std::vector<double>
VectorField (
const std::vector<double> pos)
const
447 { (void)pos;
ErrorCBL(
"",
"VectorField",
"Field3D.h");
double vv = 0.;
return {vv}; }
459 { (void)i; (void)j; (void)k;
ErrorCBL(
"",
"ScalarField_FourierSpace_real",
"Field3D.h");
return 0; }
471 { (void)i; (void)j; (void)k;
ErrorCBL(
"",
"ScalarField_FourierSpace_complex",
"Field3D.h");
return 0; }
479 {
ErrorCBL(
"",
"Scalarield_FourierSpace_real",
"Field3D.h"); std::vector<double> vv;
return vv; }
487 {
ErrorCBL(
"",
"Scalarield_FourierSpace_complex",
"Field3D.h"); std::vector<double> vv;
return vv; }
499 { (void)i; (void)j; (void)k;
ErrorCBL(
"",
"VectorField_FourierSpace_real",
"Field3D.h");
return {0}; }
511 { (void)i; (void)j; (void)k;
ErrorCBL(
"",
"VectorField_FourierSpace_complex",
"Field3D.h");
return {0}; }
525 {
ErrorCBL(
"",
"FourierTransformField",
"Field3D.h"); }
531 {
ErrorCBL(
"",
"FourierAntiTransformField",
"Field3D.h"); }
538 { (void)kernel_size;
ErrorCBL(
"",
"GaussianConvolutionField",
"Field3D.h"); }
550 virtual void set_ScalarField (
const double value,
const int i,
const int j,
const int k,
const bool add=0)
551 { (void)value; (void)i; (void)j; (void)k; (void)add;
ErrorCBL(
"",
"set_ScalarField",
"Field3D.h"); }
563 virtual void set_VectorField (
const std::vector<double> value,
const int i,
const int j,
const int k,
const bool add=0)
564 { (void)value; (void)i; (void)j; (void)k; (void)add;
ErrorCBL(
"",
"set_Vectorield",
"Field3D.h"); }
578 { (void)value; (void)i; (void)j; (void)k; (void)add;
ErrorCBL(
"",
"set_ScalarField_FourierSpace_real",
"Field3D.h"); }
592 { (void)value; (void)i; (void)j; (void)k; (void)add;
ErrorCBL(
"",
"set_ScalarField_FourierSpace_complex",
"Field3D.h"); }
607 { (void)value; (void)i; (void)j; (void)k; (void)add;
ErrorCBL(
"",
"set_VectorField_FourierSpace_real",
"Field3D.h"); }
622 { (void)value; (void)i; (void)j; (void)k; (void)add;
ErrorCBL(
"",
"set_VectorField_FourierSpace_complex",
"Field3D.h"); }
628 {
ErrorCBL(
"",
"reset",
"Field3D.h"); }
684 ScalarField3D (
const double deltaR,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
701 ScalarField3D (
const int nx,
const int ny,
const int nz,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
728 void set_ScalarField (
const double value,
const int i,
const int j,
const int k,
const bool add=0);
779 double ScalarField (
const int i,
const int j,
const int k)
const;
788 double ScalarField (
const std::vector<double> pos)
const;
904 VectorField3D (
const double deltaR,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
920 VectorField3D (
const int nx,
const int ny,
const int nz,
const double minX,
const double maxX,
const double minY,
const double maxY,
const double minZ,
const double maxZ);
947 void set_VectorField (
const std::vector<double> value,
const int i,
const int j,
const int k,
const bool add=0);
994 std::vector<double>
VectorField (
const int i,
const int j,
const int k)
const;
1003 std::vector<double>
VectorField (
const std::vector<double> pos)
const;
double deltaX() const
get the private member m_deltaX
double MaxY() const
get the private member m_MaxY
int nCells() const
get the private member m_nCells
virtual void FourierTransformField()
perform the Fourier transform on the field
double kX(const int i) const
get the value of the X coordinates at the i-th cell, Fourier space
double MinY() const
get the private member m_MinY
double m_Volume
box volume
int nzFourier() const
get the private member m_nZF
int m_nCells
number of cells
double m_MaxX
upper x bound
double m_MinY
lower y bound
virtual void set_ScalarField_FourierSpace_complex(const double value, const int i, const int j, const int k, const bool add=0)
set the value of the scalar field in Fourier space, complex part
Field3D()=default
default constructor
virtual std::vector< double > VectorField_FourierSpace_complex(const int i, const int j, const int k) const
get the value of the vector field, Fourier space, complex part
double kY(const int i) const
get the value of the Y coordinates at the i-th cell, Fourier space
virtual void set_VectorField(const std::vector< double > value, const int i, const int j, const int k, const bool add=0)
set the value of the vectorr field
std::vector< double > m_kX
coordinates of the cells along the kx-axis
virtual void FourierAntiTransformField()
perform the anti-Fourier transform on the field
double m_MinX
lower x bound
virtual double ScalarField_FourierSpace_real(const int i, const int j, const int k) const
get the value of the scalar field, Fourier space, real part
long int inds_to_index_Fourier(const int i, const int j, const int k) const
contract 3 indeces into one, Fourier space
double XX(const int i) const
get the value of the X coordinates at the i-th cell
double m_deltaY
Y cell size.
virtual void reset()
set to 0 the fields
double kZ(const int i) const
get the value of the Z coordinates at the i-th cell, Fourier space
virtual double ScalarField(const int i, const int j, const int k) const
get the value of the scalar field
double deltaZ() const
get the private member m_deltaZ
int ny() const
get the private member m_nY
int m_nX
number of cells along the x-axis
double m_deltaX
X cell size.
double m_MinZ
lower z bound
double m_MaxY
upper y bound
void set_parameters(const double deltaR, const double minX, const double maxX, const double minY, const double maxY, const double minZ, const double maxZ)
set the parameters
int m_nZF
number of cells along the z-axis, Fourier space
double MinX() const
get the private member m_MinX
int nx() const
get the private member m_nX
virtual void GaussianConvolutionField(const double kernel_size)
perform a smoothing of the field with a gaussian kernel
double MaxZ() const
get the private member m_MaxZ
virtual void set_VectorField_FourierSpace_complex(const std::vector< double > value, const int i, const int j, const int k, const bool add=0)
set the value of the vector field, Fourier space, complex part
std::vector< double > m_kY
coordinates of the cells along the ky-axis
std::vector< double > m_Y
coordinates of the cells along the y-axis
virtual std::vector< double > ScalarField_FourierSpace_real() const
get the value of the scalar field, Fourier space, real part
virtual void set_ScalarField(const double value, const int i, const int j, const int k, const bool add=0)
set the value of the scalar field
std::vector< double > m_Z
coordinates of the cells along the z-axis
virtual std::vector< double > ScalarField() const
get the value of the scalar field
virtual ~Field3D()=default
default destructor
double ZZ(const int i) const
get the value of the Z coordinates at the i-th cell
double deltaY() const
get the private member m_deltaY
double m_MaxZ
upper z bound
virtual double ScalarField_FourierSpace_complex(const int i, const int j, const int k) const
get the value of the scalar field, Fourier space, complex part
long int inds_to_index(const int i, const int j, const int k) const
contract 3 indeces into one
int m_nZ
number of cells along the z-axis
virtual std::vector< double > ScalarField_FourierSpace_complex() const
get the value of the scalar field, Fourier space, complex part
int m_nY
number of cells along the y-axis
int nCellsFourier() const
get the private member m_nCells_Fourier
double Volume() const
get the private member m_Volume
virtual void set_ScalarField_FourierSpace_real(const double value, const int i, const int j, const int k, const bool add=0)
set the value of the scalar field in Fourier space, real part
virtual std::vector< double > VectorField(const int i, const int j, const int k) const
get the value of the vector field
int nz() const
get the private member m_nZ
virtual std::vector< double > VectorField(const std::vector< double > pos) const
get the value of the vector field
std::vector< double > m_X
coordinates of the cells along the x-axis
virtual void set_VectorField_FourierSpace_real(const std::vector< double > value, const int i, const int j, const int k, const bool add=0)
set the value of the vector field, Fourier space, real part
double MinZ() const
get the private member m_MinZ
virtual double ScalarField(const std::vector< double > pos) const
get the value of the scalar field
double m_deltaZ
Z cell size.
std::vector< double > m_kZ
coordinates of the cells along the kz-axis
int m_nCells_Fourier
number of cells, Fourier space
virtual std::vector< double > VectorField_FourierSpace_real(const int i, const int j, const int k) const
get the value of the vector field, Fourier space, real part
double YY(const int i) const
get the value of the Y coordinates at the i-th cell
double MaxX() const
get the private member m_MaxX
ScalarField3D()=default
default constructor
std::vector< double > ScalarField() const
get the values of the scalar field
void set_ScalarField_FourierSpace_complex(const double value, const int i, const int j, const int k, const bool add=0)
set the value of the scalar field in Fourier space, real part
void FourierTransformField()
perform the Fourier transform on the field
void FourierAntiTransformField()
perform the anti-Fourier transform on the field
double * m_field
scalar field
void GaussianConvolutionField(const double kernel_size)
perform a smoothing of the field with a gaussian kernel
void reset()
set to 0 the fields
void set_ScalarField_FourierSpace_real(const double value, const int i, const int j, const int k, const bool add=0)
set the value of the scalar field in Fourier space, real part
virtual ~ScalarField3D()=default
default destructor
void set_ScalarField(const double value, const int i, const int j, const int k, const bool add=0)
set the value of the scalar field
fftw_complex * m_field_FourierSpace
fourier transform of the scalar field
void reset()
set to 0 the fields
~VectorField3D()=default
default destructor
void FourierTransformField()
perform the anti-Fourier transform on the field
void set_VectorField_FourierSpace_real(const std::vector< double > value, const int i, const int j, const int k, const bool add=0)
set the value of the vector field, Fourier space, real part
void set_VectorField_FourierSpace_complex(const std::vector< double > value, const int i, const int j, const int k, const bool add=0)
set the value of the vector field, Fourier space, complex part
std::vector< double * > m_field
vector field
std::vector< fftw_complex * > m_field_FourierSpace
vector field in fourier space
std::vector< double > VectorField_FourierSpace_complex(const int i, const int j, const int k) const
get the value of the vector field, Fourier space, complex part
void set_VectorField(const std::vector< double > value, const int i, const int j, const int k, const bool add=0)
set the value of the vectorr field
std::vector< double > VectorField_FourierSpace_real(const int i, const int j, const int k) const
get the value of the vector field, Fourier space, real part
VectorField3D()=default
default constructor
std::vector< double > VectorField(const int i, const int j, const int k) const
get the value of the vector field
void FourierAntiTransformField()
perform the anti-Fourier transform on the field
The global namespace of the CosmoBolognaLib
int ErrorCBL(const std::string msg, const std::string functionCBL, const std::string fileCBL, const cbl::glob::ExitCode exitCode=cbl::glob::ExitCode::_error_)
throw an exception: it is used for handling exceptions inside the CosmoBolognaLib