Chi-Tech
Quadrature rules

Modules

 Simplified LDFESQ
 
 chi_math.Get1DQuadratureData
 
 chi_math.QuadratureGaussChebyshev
 
 chi_math.QuadratureGaussLegendre
 

Functions

Returns chi_lua::chiCreateLineQuadrature (int QuadratureType, int NumberOfPoints, bool VerboseFlag)
 
Returns chi_lua::chiCreateCustomAngularQuadrature (array azimuthal_angles, array polar_angles, array weight)
 
Returns chi_lua::chiCreateCylindricalProductQuadrature (int QuadratureType, varying values)
 
Returns chi_lua::chiCreateSphericalProductQuadrature (int QuadratureType, varying values)
 
Table chi_lua::chiGetProductQuadrature (int QuadHandle)
 
void chi_lua::chiOptimizeAngularQuadratureForPolarSymmetry (in handle, double normalization)
 
Returns chi_lua::chiCreateProductQuadrature (int QuadratureType, varying values)
 

Detailed Description

Function Documentation

◆ chiCreateCustomAngularQuadrature()

Returns chi_lua::chiCreateCustomAngularQuadrature ( array  azimuthal_angles,
array  polar_angles,
array  weight 
)

Creates an angular quadrature.

Parameters
azimuthal_anglesarray A lua table with N entries each being an azimuthal angle.
polar_anglesarray A lua table with N entries each being a polar angle angle.
weightarray A lua table with N entries each being a quadrature weight.
Returns
Returns a unique handle to the created angular quadrature
Author
Jan

Definition at line 2587 of file lua_functions.c.

◆ chiCreateCylindricalProductQuadrature()

Returns chi_lua::chiCreateCylindricalProductQuadrature ( int  QuadratureType,
varying  values 
)

Creates a curvilinear product quadrature suitable for cylindrical geometries.

Parameters
QuadratureTypeint Quadrature identifier.
valuesvarying Varying options based on the quadrature type.

_

QuadratureType:\n

GAUSS_LEGENDRE_CHEBYSHEV
Gauss-Legendre quadrature for the polar angle and Gauss-Chebyshev quadrature for the azimuthal angle. Arguments for this quadrature type, in order:

  • Np : (int) number of polar angles
  • Na : (int) number of azimuthal angles (unique number at each polar level), or (table<int>) number of azimuthal angles (diverse number at each polar level)
  • verbose : (bool) verbosity flag (optional).

QuadratureType:\n

GAUSS_LEGENDRE_LEGENDRE
Gauss-Legendre quadrature for the polar angle and Gauss-Legendre quadrature for the azimuthal angle. Arguments for this quadrature type, in order:

  • Np : (int) number of polar angles
  • Na : (int) number of azimuthal angles (unique number at each polar level), or (table<int>) number of azimuthal angles (diverse number at each polar level)
  • verbose : (bool) verbosity flag (optional).
Returns
Returns a unique handle to the created product quadrature rule

Usage Examples:

test/modules/LinearBoltzmannSolvers/Transport_Steady_Cyl/Transport2DCyl_1Monoenergetic.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady_Cyl/Transport2DCyl_2Multigroup.lua

Definition at line 2624 of file lua_functions.c.

◆ chiCreateLineQuadrature()

Returns chi_lua::chiCreateLineQuadrature ( int  QuadratureType,
int  NumberOfPoints,
bool  VerboseFlag 
)

Creates a quadrature.

Parameters
QuadratureTypeint Quadrature identifier.
NumberOfPointsint Number of quadrature points.
VerboseFlagbool As the name implies. Default: false.

_

QuadratureType:\n

GAUSS_LEGENDRE = Gauss-Legendre quadrature. GAUSS_CHEBYSHEV = Gauss-Chebyshev quadrature.

Returns
Returns a unique handle to the created quadrature rule
Author
Jan

Definition at line 2572 of file lua_functions.c.

◆ chiCreateProductQuadrature()

Returns chi_lua::chiCreateProductQuadrature ( int  QuadratureType,
varying  values 
)

Creates a Product-quadrature.

Parameters
QuadratureTypeint Quadrature identifier.
valuesvarying Varying options based on the quadrature type.

_

QuadratureType:

GAUSS_LEGENDRE
Gauss-Legendre quadrature for the polar angles and no quadrature rule for the azimuthal angle. Suitable only for 1D simulations. Expects to be followed by the number of angles Np. Optionally a verbosity flag can be added.

GAUSS_LEGENDRE_LEGENDRE
Gauss-Legendre quadrature for both the polar and azimuthal dimension. Expects to be followed by number of Azimuthal and Polar angles. Optionally a verbosity flag can be added.

GAUSS_LEGENDRE_CHEBYSHEV
Gauss-Legendre quadrature for the polar angle but Gauss-Chebyshev for the azimuthal angle. Expects to be followed by number of Azimuthal and Polar angles. Optionally a verbosity flag can be added.

CUSTOM_QUADRATURE
Expects to be followed by three lua tables. The first table is an array, of length Na, of the azimuthal angles (radians). The second table is an array, of length Np, of the polar angles (radians). The third table is an array, of length Na*Np, and contains the weight associated with each angle pair. Optionally a verbosity flag can be added.

Returns
Returns a unique handle to the created product quadrature rule

Usage Examples:

test/framework/tutorials/tutorial_93_raytracing.lua
test/modules/LinearBoltzmannSolvers/MGDiffusion_KEigen/KEigenvalueMIP2D_1a_QBlock.lua
test/modules/LinearBoltzmannSolvers/MGDiffusion_KEigen/KEigenvalueMIP2D_1b_QBlock.lua
test/modules/LinearBoltzmannSolvers/MGDiffusion_KEigen/KEigenvalueMIP1D_1G.lua
test/modules/LinearBoltzmannSolvers/Transport_SteadyCBC/Transport2D_1Poly.lua
test/modules/LinearBoltzmannSolvers/Transport_SteadyCBC/Transport1D_1.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_3c_response.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_1a_forward.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_2a_forward.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_2b_adjoint.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_1b_adjoint.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_2c_response.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_3a_forward.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_3b_adjoint.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_1c_response.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_1.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_3.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport2D_3.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport2D_2.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_2.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_3Poly_quad_mod.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_5PolyA_AniHeteroBndry.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_1Poly_Balance.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_5Cycles2.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_4b_DSA_ortho.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_1Poly_BalanceMG.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_1Poly.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_1a_Extruder.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_4a_DSA_ortho.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_6ASplitMesh.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_3a_DSA_ortho.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_1Poly_qmom_part1.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_2Unstructured.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_6BSplitMesh.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport1D_1.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport1D_3a_DSA_ortho.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_1Poly_qmom_part2.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport1D_4_DSA_ortho_inf.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_4Cycles1.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_1b_Ortho.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_2Unstructured.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport3D_1Poly_parmetis.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1c_QBlock_CBC.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1c_QBlock.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport1D_1G_CBC.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1a_QBlock_CBC.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1b_QBlock.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1b_QBlock_CBC.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport1D_1G.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1a_QBlock.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/c5g7/c5g7.lua
test/modules/LinearBoltzmannSolvers/MGDiffusion_Steady/MIPDiffusion3D_3a_DSA_ortho.lua
test/modules/LinearBoltzmannSolvers/MGDiffusion_Steady/MIPDiffusion3D_1b_Ortho.lua

Author
Jan

Definition at line 2808 of file lua_functions.c.

◆ chiCreateSphericalProductQuadrature()

Returns chi_lua::chiCreateSphericalProductQuadrature ( int  QuadratureType,
varying  values 
)

Creates a curvilinear product quadrature suitable for spherical geometries.

Parameters
QuadratureTypeint Quadrature identifier.
valuesvarying Varying options based on the quadrature type.

_

QuadratureType:\n

GAUSS_CHEBYSHEV
Gauss-Chebyshev quadrature for the polar angle and no quadrature for the azimuthal angle. Arguments for this quadrature type, in order:

  • Np : (int) number of polar angles
  • verbose : (bool) verbosity flag (optional).

QuadratureType:\n

GAUSS_LEGENDRE
Gauss-Legendre quadrature for the polar angle and no quadrature for the azimuthal angle. Arguments for this quadrature type, in order:

  • Np : (int) number of polar angles
  • verbose : (bool) verbosity flag (optional).
Returns
Returns a unique handle to the created product quadrature rule

Definition at line 2653 of file lua_functions.c.

◆ chiGetProductQuadrature()

Table chi_lua::chiGetProductQuadrature ( int  QuadHandle)

Get the values of a product quadrature

Parameters
QuadHandleint Handle to an existing product quadrature.
Returns
Table A lua table with each entry being another table with entries .weight .polar .azimuthal.
Author
Jan

Definition at line 2664 of file lua_functions.c.

◆ chiOptimizeAngularQuadratureForPolarSymmetry()

void chi_lua::chiOptimizeAngularQuadratureForPolarSymmetry ( in  handle,
double  normalization 
)

Optimizes the indicated angular quadrature for polar symmetry.

Parameters
handleint. Handle to the quadrature to be optimized.
normalizationdouble. (Optional) The normalization to be applied to the modified quadrature. Any negative number will inhibit renormalization. [Default=-1.0]

_

Example:

Example:

pquad = chiCreateProductQuadrature(GAUSS_LEGENDRE_CHEBYSHEV,2, 1)
Returns chiCreateProductQuadrature(int QuadratureType, varying values)
void chiOptimizeAngularQuadratureForPolarSymmetry(in handle, double normalization)

Usage Examples:

test/framework/tutorials/tutorial_93_raytracing.lua
test/modules/LinearBoltzmannSolvers/MGDiffusion_KEigen/KEigenvalueMIP2D_1a_QBlock.lua
test/modules/LinearBoltzmannSolvers/MGDiffusion_KEigen/KEigenvalueMIP2D_1b_QBlock.lua
test/modules/LinearBoltzmannSolvers/Transport_SteadyCBC/Transport2D_1Poly.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_3c_response.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_1a_forward.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_2a_forward.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_2b_adjoint.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_1b_adjoint.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_2c_response.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_3a_forward.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_3b_adjoint.lua
test/modules/LinearBoltzmannSolvers/Transport_Adjoint/Adjoint2D_1c_response.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport2D_3.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport2D_2.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_3Poly_quad_mod.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_5PolyA_AniHeteroBndry.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_1Poly_Balance.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_4b_DSA_ortho.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_1Poly_BalanceMG.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_1Poly.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_4a_DSA_ortho.lua
test/modules/LinearBoltzmannSolvers/Transport_Steady/Transport2D_2Unstructured.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1c_QBlock_CBC.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1c_QBlock.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1a_QBlock_CBC.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1b_QBlock.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1b_QBlock_CBC.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/KEigenvalueTransport2D_1a_QBlock.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/c5g7/c5g7.lua

Author
Jan

Definition at line 2715 of file lua_functions.c.