![]() |
CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
|
The class VectorField3D. More...
#include "Headers/Field3D.h"


Public Member Functions | |
Constructors/destructors | |
| VectorField3D ()=default | |
| default constructor | |
| VectorField3D (const double deltaR, const double minX, const double maxX, const double minY, const double maxY, const double minZ, const double maxZ) | |
| constructor More... | |
| 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) | |
| constructor More... | |
| ~VectorField3D ()=default | |
| default destructor | |
Member functions to set the private/protected members | |
| 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 More... | |
| 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 More... | |
| 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 More... | |
Member functions to get the private/protected members | |
| std::vector< double > | VectorField (const int i, const int j, const int k) const |
| get the value of the vector field More... | |
| std::vector< double > | VectorField (const std::vector< double > pos) const |
| get the value of the vector field More... | |
| 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 More... | |
| 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 More... | |
Member functions to compute operations on the field | |
| void | FourierTransformField () |
| perform the anti-Fourier transform on the field | |
| void | FourierAntiTransformField () |
| perform the anti-Fourier transform on the field | |
| void | reset () |
| set to 0 the fields | |
Public Member Functions inherited from cbl::data::Field3D | |
| Field3D ()=default | |
| default constructor | |
| Field3D (const double deltaR, const double minX, const double maxX, const double minY, const double maxY, const double minZ, const double maxZ) | |
| constructor More... | |
| 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) | |
| constructor More... | |
| virtual | ~Field3D ()=default |
| default destructor | |
| 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 More... | |
| 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) |
| set the parameters More... | |
| int | nx () const |
| get the private member m_nX More... | |
| int | ny () const |
| get the private member m_nY More... | |
| int | nz () const |
| get the private member m_nZ More... | |
| int | nzFourier () const |
| get the private member m_nZF More... | |
| int | nCells () const |
| get the private member m_nCells More... | |
| int | nCellsFourier () const |
| get the private member m_nCells_Fourier More... | |
| double | MinX () const |
| get the private member m_MinX More... | |
| double | MinY () const |
| get the private member m_MinY More... | |
| double | MinZ () const |
| get the private member m_MinZ More... | |
| double | MaxX () const |
| get the private member m_MaxX More... | |
| double | MaxY () const |
| get the private member m_MaxY More... | |
| double | MaxZ () const |
| get the private member m_MaxZ More... | |
| double | deltaX () const |
| get the private member m_deltaX More... | |
| double | deltaY () const |
| get the private member m_deltaY More... | |
| double | deltaZ () const |
| get the private member m_deltaZ More... | |
| double | Volume () const |
| get the private member m_Volume More... | |
| double | XX (const int i) const |
| get the value of the X coordinates at the i-th cell More... | |
| double | YY (const int i) const |
| get the value of the Y coordinates at the i-th cell More... | |
| double | ZZ (const int i) const |
| get the value of the Z coordinates at the i-th cell More... | |
| double | kX (const int i) const |
| get the value of the X coordinates at the i-th cell, Fourier space More... | |
| double | kY (const int i) const |
| get the value of the Y coordinates at the i-th cell, Fourier space More... | |
| double | kZ (const int i) const |
| get the value of the Z coordinates at the i-th cell, Fourier space More... | |
| virtual double | ScalarField (const int i, const int j, const int k) const |
| get the value of the scalar field More... | |
| virtual double | ScalarField (const std::vector< double > pos) const |
| get the value of the scalar field More... | |
| virtual std::vector< double > | ScalarField () const |
| get the value of the scalar field More... | |
| 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 More... | |
| 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 More... | |
| virtual std::vector< double > | ScalarField_FourierSpace_real () const |
| get the value of the scalar field, Fourier space, real part More... | |
| virtual std::vector< double > | ScalarField_FourierSpace_complex () const |
| get the value of the scalar field, Fourier space, complex part More... | |
| virtual void | GaussianConvolutionField (const double kernel_size) |
| perform a smoothing of the field with a gaussian kernel More... | |
| 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 More... | |
| 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 More... | |
| 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 More... | |
Protected Attributes | |
| std::vector< double * > | m_field |
| vector field | |
| std::vector< fftw_complex * > | m_field_FourierSpace |
| vector field in fourier space | |
Protected Attributes inherited from cbl::data::Field3D | |
| int | m_nX |
| number of cells along the x-axis | |
| int | m_nY |
| number of cells along the y-axis | |
| int | m_nZ |
| number of cells along the z-axis | |
| int | m_nZF |
| number of cells along the z-axis, Fourier space | |
| int | m_nCells |
| number of cells | |
| int | m_nCells_Fourier |
| number of cells, Fourier space | |
| double | m_deltaX |
| X cell size. | |
| double | m_deltaY |
| Y cell size. | |
| double | m_deltaZ |
| Z cell size. | |
| double | m_MinX |
| lower x bound | |
| double | m_MinY |
| lower y bound | |
| double | m_MinZ |
| lower z bound | |
| double | m_MaxX |
| upper x bound | |
| double | m_MaxY |
| upper y bound | |
| double | m_MaxZ |
| upper z bound | |
| double | m_Volume |
| box volume | |
| std::vector< double > | m_X |
| coordinates of the cells along the x-axis | |
| std::vector< double > | m_Y |
| coordinates of the cells along the y-axis | |
| std::vector< double > | m_Z |
| coordinates of the cells along the z-axis | |
| std::vector< double > | m_kX |
| coordinates of the cells along the kx-axis | |
| std::vector< double > | m_kY |
| coordinates of the cells along the ky-axis | |
| std::vector< double > | m_kZ |
| coordinates of the cells along the kz-axis | |
Additional Inherited Members | |
Protected Member Functions inherited from cbl::data::Field3D | |
| long int | inds_to_index (const int i, const int j, const int k) const |
| contract 3 indeces into one More... | |
| long int | inds_to_index_Fourier (const int i, const int j, const int k) const |
| contract 3 indeces into one, Fourier space More... | |
The class VectorField3D.
This class is used to handle objects of type VectorField3D
| cbl::data::VectorField3D::VectorField3D | ( | const double | deltaR, |
| const double | minX, | ||
| const double | maxX, | ||
| const double | minY, | ||
| const double | maxY, | ||
| const double | minZ, | ||
| const double | maxZ | ||
| ) |
constructor
| deltaR | size of the cubic cells |
| minX | lower x bound |
| maxX | upper x bound |
| minY | lower y bound |
| maxY | upper y bound |
| minZ | lower z bound |
| maxZ | upper z bound |
Definition at line 380 of file Field3D.cpp.
| cbl::data::VectorField3D::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 | ||
| ) |
constructor
| nx | number of x-axis cells |
| ny | number of y-axis cells |
| nz | number of z-axis cells |
| minX | lower x bound |
| maxX | upper x bound |
| minY | lower y bound |
| maxY | upper y bound |
| minZ | lower z bound |
| maxZ | upper z bound |
Definition at line 414 of file Field3D.cpp.
|
virtual |
set the value of the vectorr field
| value | vector containing values of the vector field |
| i | the i-th cell along the x-axis |
| j | the j-th cell along the y-axis |
| k | the k-th cell along the z-axis |
| add | 1 → add to the current value; 0 → overwrite the value |
Reimplemented from cbl::data::Field3D.
Definition at line 518 of file Field3D.cpp.
|
virtual |
set the value of the vector field, Fourier space, complex part
| value | vector containing values of the vector field, Fourier space, complex part |
| i | the i-th cell along the x-axis |
| j | the j-th cell along the y-axis |
| k | the k-th cell along the z-axis |
| add | 1 → add to the current value; 0 → overwrite the value |
Reimplemented from cbl::data::Field3D.
Definition at line 540 of file Field3D.cpp.
|
virtual |
set the value of the vector field, Fourier space, real part
| value | vector containing values of the vector field, Fourier space, real part |
| i | the i-th cell along the x-axis |
| j | the j-th cell along the y-axis |
| k | the k-th cell along the z-axis |
| add | 1 → add to the current value; 0 → overwrite the value |
Reimplemented from cbl::data::Field3D.
Definition at line 529 of file Field3D.cpp.
|
virtual |
get the value of the vector field
| i | the i-th cell along the x-axis |
| j | the j-th cell along the y-axis |
| k | the k-th cell along the z-axis |
Reimplemented from cbl::data::Field3D.
Definition at line 551 of file Field3D.cpp.
|
virtual |
get the value of the vector field
| pos | vector containing the point coordinates |
Reimplemented from cbl::data::Field3D.
Definition at line 578 of file Field3D.cpp.
|
virtual |
get the value of the vector field, Fourier space, complex part
| i | the i-th cell along the x-axis |
| j | the j-th cell along the y-axis |
| k | the k-th cell along the z-axis |
Reimplemented from cbl::data::Field3D.
Definition at line 569 of file Field3D.cpp.
|
virtual |
get the value of the vector field, Fourier space, real part
| i | the i-th cell along the x-axis |
| j | the j-th cell along the y-axis |
| k | the k-th cell along the z-axis |
Reimplemented from cbl::data::Field3D.
Definition at line 560 of file Field3D.cpp.