![]() |
Chi-Tech
|
Namespaces | |
| namespace | cell_mapping |
| namespace | finite_element |
| namespace | functions |
| namespace | PETScUtils |
| namespace | SimplifiedLDFESQ |
| namespace | spatial_discretization |
Typedefs | |
| typedef std::shared_ptr< AngularQuadrature > | AngularQuadraturePtr |
| typedef std::shared_ptr< SpatialDiscretization > | SpatialDiscretizationPtr |
| template<int R, int N> | |
| using | TensorRN = TensorRNX< R, N, double > |
| template<int N> | |
| using | Tensor2N = TensorRNX< 2, N, double > |
| template<int N> | |
| using | VectorN = VectorNX< N, double > |
| using | Vector2 = VectorN< 2 > |
| using | Vector3 = VectorN< 3 > |
| typedef std::function< double(double)> | ScalarScalarFunction |
| typedef std::function< double(double, double, double, double)> | ScalarXYZTFunction |
| using | NonLinearSolverPETSc = NonLinearSolver< Mat, Vec, SNES > |
| typedef chi_mesh::Vector3 | QuadraturePointXYZ |
| typedef std::shared_ptr< SpatialDiscretization > | SDMPtr |
Functions | |
| int | SampleCDF (double x, std::vector< double > cdf_bin) |
| double | Factorial (int x) |
| std::pair< double, double > | OmegaToPhiThetaSafe (const chi_mesh::Vector3 &omega) |
| void | PrintVector (const VecDbl &x) |
| void | Scale (VecDbl &x, const double &val) |
| void | Set (VecDbl &x, const double &val) |
| VecDbl | VecMul (const VecDbl &x, const double &val) |
| double | Vec1Norm (const VecDbl &x) |
| double | Vec2Norm (const VecDbl &x) |
| double | VecInfinityNorm (const VecDbl &x) |
| double | VecPNorm (const VecDbl &x, const double &p) |
| double | Dot (const VecDbl &x, const VecDbl &y) |
| VecDbl | operator+ (const VecDbl &a, const VecDbl &b) |
| VecDbl | operator- (const VecDbl &a, const VecDbl &b) |
| void | PrintMatrix (const MatDbl &A) |
| void | Scale (MatDbl &A, const double &val) |
| void | Set (MatDbl &A, const double &val) |
| MatDbl | Transpose (const MatDbl &A) |
| void | SwapRow (size_t r1, size_t r2, MatDbl &A) |
| void | SwapColumn (size_t c1, size_t c2, MatDbl &A) |
| MatDbl | MatMul (const MatDbl &A, const double c) |
| VecDbl | MatMul (const MatDbl &A, const VecDbl &x) |
| MatDbl | MatMul (const MatDbl &A, const MatDbl &B) |
| MatDbl | MatAdd (const MatDbl &A, const MatDbl &B) |
| MatDbl | MatSubtract (const MatDbl &A, const MatDbl &B) |
| double | Determinant (const MatDbl &A) |
| MatDbl | SubMatrix (const size_t r, const size_t c, const MatDbl &A) |
| void | GaussElimination (MatDbl &A, VecDbl &b, int n) |
| MatDbl | InverseGEPivoting (const MatDbl &A) |
| MatDbl | Inverse (const MatDbl &A) |
| double | PowerIteration (const MatDbl &A, VecDbl &e_vec, int max_it=2000, double tol=1.0e-13) |
| double | Vec2NormMPI (const VecDbl &x, MPI_Comm comm) |
| template<typename T , typename D = int> | |
| std::vector< T > | Range (T start, T end, D delta=1) |
| std::string | SteppingMethodStringName (SteppingMethod method) |
| SteppingMethod | SteppingMethodFromString (const std::string &name) |
| template<> | |
| int | LinearSolverMatrixAction (Mat matrix, Vec vector, Vec action) |
| template<class MatType , class VecType > | |
| int | LinearSolverMatrixAction (MatType matrix, VecType vector, VecType action) |
| template<> | |
| int | PreconditionerApplication (PC pc, Vec vector, Vec action) |
| template<class PCType , class VecType > | |
| int | PreconditionerApplication (PCType pc, VecType vector, VecType action) |
| RegisterChiObjectParametersOnly (chi_math, NonLinearSolverOptions) | |
| double | Legendre (int N, double x) |
| double | dLegendredx (int N, double x) |
| double | d2Legendredx2 (int N, double x) |
| double | AssocLegendre (unsigned int ell, int m, double x) |
| double | Ylm (unsigned int ell, int m, double varphi, double theta) |
| chi::InputParameters | GetSyntax_Get1DQuadratureData () |
| chi::ParameterBlock | Get1DQuadratureData (const chi::InputParameters ¶ms) |
| RegisterWrapperFunction (chi_math, Get1DQuadratureData, GetSyntax_Get1DQuadratureData, Get1DQuadratureData) | |
| RegisterChiObject (chi_math, QuadratureGaussChebyshev) | |
| RegisterChiObject (chi_math, QuadratureGaussLegendre) | |
| VecDbl | NewtonIteration (const NonLinearFunction &non_linear_function, const VecDbl &x_0, unsigned int max_iters, double epsilon, bool verbose=false) |
| RegisterChiObject (chi_math, CrankNicolsonTimeIntegration) | |
| RegisterChiObject (chi_math, ImplicitEulerTimeIntegration) | |
| RegisterChiObject (chi_math, ThetaSchemeTimeIntegration) | |
Container object for functions relating to Legendre polynomials.
| typedef std::shared_ptr<AngularQuadrature> chi_math::AngularQuadraturePtr |
Definition at line 46 of file chi_runtime.h.
| using chi_math::NonLinearSolverPETSc = typedef NonLinearSolver<Mat, Vec, SNES> |
Definition at line 11 of file NonLinearSolverPETSc.h.
Definition at line 27 of file quadrature.h.
| typedef std::function<double(double)> chi_math::ScalarScalarFunction |
Definition at line 9 of file function_dimA_to_dimB.h.
| typedef std::function<double(double, double, double, double)> chi_math::ScalarXYZTFunction |
Definition at line 11 of file function_dimA_to_dimB.h.
| typedef std::shared_ptr< SpatialDiscretization > chi_math::SDMPtr |
Definition at line 20 of file fieldfunction_gridbased.h.
| typedef std::shared_ptr<SpatialDiscretization> chi_math::SpatialDiscretizationPtr |
Definition at line 47 of file chi_runtime.h.
| using chi_math::Tensor2N = typedef TensorRNX<2,N,double> |
Definition at line 330 of file chi_math_tensorRNX.h.
| using chi_math::TensorRN = typedef TensorRNX<R,N,double> |
Definition at line 327 of file chi_math_tensorRNX.h.
| using chi_math::Vector2 = typedef VectorN<2> |
Definition at line 473 of file chi_math_vectorNX.h.
| using chi_math::Vector3 = typedef VectorN<3> |
Definition at line 474 of file chi_math_vectorNX.h.
| using chi_math::VectorN = typedef VectorNX<N,double> |
Definition at line 471 of file chi_math_vectorNX.h.
|
strong |
| Enumerator | |
|---|---|
| Arbitrary | |
| ProductQuadrature | |
| SLDFESQ | |
Definition at line 12 of file angular_quadrature_base.h.
|
strong |
Coordinate system type.
| Enumerator | |
|---|---|
| UNDEFINED | |
| CARTESIAN | |
| CYLINDRICAL | |
| SPHERICAL | |
Definition at line 28 of file chi_math.h.
|
strong |
| Enumerator | |
|---|---|
| L1_NORM | |
| L2_NORM | |
| LINF_NORM | |
Definition at line 46 of file chi_math.h.
|
strong |
| Enumerator | |
|---|---|
| UNKNOWN | |
| GAUSS_LEGENDRE | |
| GAUSS_CHEBYSHEV | |
| GAUSS_LEGENDRE_LEGENDRE | |
| GAUSS_LEGENDRE_CHEBYSHEV | |
| CUSTOM_QUADRATURE | |
Definition at line 11 of file angular_product_quadrature.h.
|
strong |
Definition at line 12 of file quadrature.h.
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| RHS_NORM | |
| RHS_PRECONDITIONED_NORM | |
| CUSTOM_SCALE | |
Definition at line 6 of file linear_solver_context.h.
|
strong |
Spatial discretization type.
| Enumerator | |
|---|---|
| UNDEFINED | |
| FINITE_VOLUME | |
| PIECEWISE_LINEAR_CONTINUOUS | |
| PIECEWISE_LINEAR_DISCONTINUOUS | |
| LAGRANGE_CONTINUOUS | |
| LAGRANGE_DISCONTINUOUS | |
Definition at line 36 of file chi_math.h.
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| EXPLICIT_EULER | |
| IMPLICIT_EULER | |
| CRANK_NICOLSON | |
| THETA_SCHEME | |
Definition at line 9 of file chi_math_time_stepping.h.
|
strong |
Nodal variable storage format.
| Enumerator | |
|---|---|
| NODAL | |
| BLOCK | |
Definition at line 23 of file unknown_manager.h.
|
strong |
Different types of variables.
| Enumerator | |
|---|---|
| SCALAR | |
| VECTOR_2 | |
| VECTOR_3 | |
| VECTOR_N | |
| TENSOR | |
Definition at line 13 of file unknown_manager.h.
|
strong |
| Enumerator | |
|---|---|
| SET_VALUE | |
| ADD_VALUE | |
Definition at line 12 of file ParallelVector.h.
| double chi_math::AssocLegendre | ( | unsigned int | ell, |
| int | m, | ||
| double | x | ||
| ) |
Provides the function evaluation of the associated Legendre polynomial at value x.
This code has a whitepaper associated with it Spherical Harmonics
| ell | int The ell order of the polynomial. |
| m | int The m-th moment of the polynomial |
| x | double The evaluation point. |
Definition at line 16 of file assoc_legendrepoly.cc.
| double chi_math::d2Legendredx2 | ( | int | N, |
| double | x | ||
| ) |
Provides the function evaluation of the second derivative of Pn at value x
| N | int Order of the Legendre polynomial. |
| x | double The evaluation point. |
Definition at line 54 of file legendrepoly.cc.
| double chi_math::Determinant | ( | const MatDbl & | A | ) |
Computes the determinant of a matrix.
Definition at line 211 of file chi_math_02_matrix_operations.cc.
| double chi_math::dLegendredx | ( | int | N, |
| double | x | ||
| ) |
Provides the function evaluation of the derivative of Pn at value x
| N | int Order of the Legendre polynomial. |
| x | double The evaluation point. |
Definition at line 37 of file legendrepoly.cc.
Computes the dot product of two vectors.
Definition at line 36 of file chi_math_03_vector_operations.cc.
| double chi_math::Factorial | ( | int | x | ) |
Computes the factorial of an integer.
Definition at line 5 of file chi_math_01_utility.cc.
Gauss Elimination without pivoting.
Definition at line 286 of file chi_math_02_matrix_operations.cc.
| chi::ParameterBlock chi_math::Get1DQuadratureData | ( | const chi::InputParameters & | params | ) |
Definition at line 31 of file quadrature.cc.
| chi::InputParameters chi_math::GetSyntax_Get1DQuadratureData | ( | ) |
Definition at line 18 of file quadrature.cc.
Computes the inverse of a matrix.
Definition at line 379 of file chi_math_02_matrix_operations.cc.
Computes the inverse of a matrix using Gauss-Elimination with pivoting.
Definition at line 318 of file chi_math_02_matrix_operations.cc.
| double chi_math::Legendre | ( | int | N, |
| double | x | ||
| ) |
Provides the function evaluation of the Legendre polynomial P_N at value x.
| N | int Order of the Legendre polynomial. |
| x | double The evaluation point. |
Definition at line 11 of file legendrepoly.cc.
Definition at line 11 of file linear_matrix_action_Ax.cc.
| int chi_math::LinearSolverMatrixAction | ( | MatType | matrix, |
| VecType | vector, | ||
| VecType | action | ||
| ) |
Adds two matrices and returns the result.
Definition at line 160 of file chi_math_02_matrix_operations.cc.
Multiply matrix with a constant and return result.
Definition at line 96 of file chi_math_02_matrix_operations.cc.
Mutliply two matrices and return result.
Definition at line 133 of file chi_math_02_matrix_operations.cc.
Multiply matrix with a vector and return resulting vector
Definition at line 113 of file chi_math_02_matrix_operations.cc.
Subtracts matrix A from B and returns the result.
Definition at line 185 of file chi_math_02_matrix_operations.cc.
| VecDbl chi_math::NewtonIteration | ( | const NonLinearFunction & | non_linear_function, |
| const VecDbl & | x_0, | ||
| unsigned int | max_iters, | ||
| double | epsilon, | ||
| bool | verbose = false |
||
| ) |
Newton iteration.
Definition at line 9 of file serial_newton_iteration.cc.
| std::pair< double, double > chi_math::OmegaToPhiThetaSafe | ( | const chi_mesh::Vector3 & | omega | ) |
Determines the azimuthal- and polar-angle associated with the given direction vector. Returns a pair = [azimuthal-angle,polar-angle].
Definition at line 18 of file chi_math_01_utility.cc.
Adds two vectors component-wise.
Definition at line 144 of file chi_math_03_vector_operations.cc.
Subtracts two vectors component-wise.
Definition at line 156 of file chi_math_03_vector_operations.cc.
| double chi_math::PowerIteration | ( | const MatDbl & | A, |
| VecDbl & | e_vec, | ||
| int | max_it = 2000, |
||
| double | tol = 1.0e-13 |
||
| ) |
Performs power iteration to obtain the fundamental eigen mode. The eigen-value of the fundamental mode is return whilst the eigen-vector is return via reference.
Definition at line 454 of file chi_math_02_matrix_operations.cc.
Definition at line 11 of file preconditioner_apply.cc.
| int chi_math::PreconditionerApplication | ( | PCType | pc, |
| VecType | vector, | ||
| VecType | action | ||
| ) |
| void chi_math::PrintMatrix | ( | const MatDbl & | A | ) |
Prints the contents of a matrix.
Definition at line 6 of file chi_math_02_matrix_operations.cc.
| void chi_math::PrintVector | ( | const VecDbl & | x | ) |
Prints the Vector.
Definition at line 6 of file chi_math_03_vector_operations.cc.
| std::vector< T > chi_math::Range | ( | T | start, |
| T | end, | ||
| D | delta = 1 |
||
| ) |
Returns a range of number according to the logic of the parameters.
| start | First number in the sequence. |
| end | Termination criteria. If the delta is positive then the sequence will terminate if i>=end, otherwise if the delta is negative the sequence will terminate if i<=end |
| delta | Cannot be 0. Default 1. Can be negative. |
Definition at line 18 of file chi_math_range.h.
| chi_math::RegisterChiObject | ( | chi_math | , |
| CrankNicolsonTimeIntegration | |||
| ) |
| chi_math::RegisterChiObject | ( | chi_math | , |
| ImplicitEulerTimeIntegration | |||
| ) |
| chi_math::RegisterChiObject | ( | chi_math | , |
| QuadratureGaussChebyshev | |||
| ) |
| chi_math::RegisterChiObject | ( | chi_math | , |
| QuadratureGaussLegendre | |||
| ) |
| chi_math::RegisterChiObject | ( | chi_math | , |
| ThetaSchemeTimeIntegration | |||
| ) |
| chi_math::RegisterChiObjectParametersOnly | ( | chi_math | , |
| NonLinearSolverOptions | |||
| ) |
| chi_math::RegisterWrapperFunction | ( | chi_math | , |
| Get1DQuadratureData | , | ||
| GetSyntax_Get1DQuadratureData | , | ||
| Get1DQuadratureData | |||
| ) |
| int chi_math::SampleCDF | ( | double | x, |
| std::vector< double > | cdf_bin | ||
| ) |
Sample a Cumulative Distribution Function (CDF) given a probability.
The supplied vector should contain the upper bin boundary for each bin and will return the bin associated with the bin that brackets the supplied probability.
Example: Suppose we sample bins 0-9. Suppose also that the probalities for each bin is as follows:
The CDF for this probability distribution will look like this
Supplying a random number between 0 and 1 should indicate sampling one of the bins 0,1,5 or 8. The most inefficient way to do this is to linearly loop through the cdf and check
. An optimized version of this sampling would be to perform a recursive block search which starts with a course view of the cdf and then gradually refines the view until the final linear search can be performed.
Definition at line 272 of file cdfsampler.cc.
| void chi_math::Scale | ( | MatDbl & | A, |
| const double & | val | ||
| ) |
Scales the matrix by a constant value.
Definition at line 27 of file chi_math_02_matrix_operations.cc.
| void chi_math::Scale | ( | VecDbl & | x, |
| const double & | val | ||
| ) |
Scales a vector in place by constant.
Definition at line 15 of file chi_math_03_vector_operations.cc.
| void chi_math::Set | ( | MatDbl & | A, |
| const double & | val | ||
| ) |
Sets all the entries of the matrix to a constant value.
Definition at line 36 of file chi_math_02_matrix_operations.cc.
| void chi_math::Set | ( | VecDbl & | x, |
| const double & | val | ||
| ) |
Sets a constant value to a vector.
Definition at line 23 of file chi_math_03_vector_operations.cc.
| SteppingMethod chi_math::SteppingMethodFromString | ( | const std::string & | name | ) |
| std::string chi_math::SteppingMethodStringName | ( | SteppingMethod | method | ) |
Returns the string name of a time stepping method.
Definition at line 11 of file chi_math_time_stepping.cc.
Returns a sub-matrix.
Definition at line 254 of file chi_math_02_matrix_operations.cc.
| void chi_math::SwapColumn | ( | size_t | c1, |
| size_t | c2, | ||
| MatDbl & | A | ||
| ) |
Swaps two columns of a matrix.
Definition at line 81 of file chi_math_02_matrix_operations.cc.
| void chi_math::SwapRow | ( | size_t | r1, |
| size_t | r2, | ||
| MatDbl & | A | ||
| ) |
Swaps two rows of a matrix.
Definition at line 63 of file chi_math_02_matrix_operations.cc.
Returns the transpose of a matrix.
Definition at line 45 of file chi_math_02_matrix_operations.cc.
| double chi_math::Vec1Norm | ( | const VecDbl & | x | ) |
Returns the 1-norm. Also known as the Taxicab or Manhattan norm.
Definition at line 73 of file chi_math_03_vector_operations.cc.
| double chi_math::Vec2Norm | ( | const VecDbl & | x | ) |
Returns the 2-norm. Also known as the Euclidian or Frobenius norm.
Definition at line 93 of file chi_math_03_vector_operations.cc.
| double chi_math::Vec2NormMPI | ( | const VecDbl & | x, |
| MPI_Comm | comm | ||
| ) |
Computes a global L2-norm
Definition at line 9 of file chi_math_mpi_03_vecops.cc.
| double chi_math::VecInfinityNorm | ( | const VecDbl & | x | ) |
Multiplies the vector with a constant and returns result.
Definition at line 54 of file chi_math_03_vector_operations.cc.
| double chi_math::VecPNorm | ( | const VecDbl & | x, |
| const double & | p | ||
| ) |
| double chi_math::Ylm | ( | unsigned int | ell, |
| int | m, | ||
| double | varphi, | ||
| double | theta | ||
| ) |
Implementation of the tesseral spherical harmonics.
This code has a whitepaper associated with it Spherical Harmonics
Definition at line 12 of file spherical_harmonics.cc.