#include <RayTracingAngularQuadrature.h>
Public Member Functions | |
RayTracingAngularQuadrature (const unsigned int dim, const unsigned int polar_order, const unsigned int azimuthal_order, const Real mu_min, const Real mu_max) | |
Constructor. More... | |
void | rotate (const libMesh::Point &rotation_direction) |
Rotates the quadrature to a given direction. More... | |
const libMesh::Point & | getDirection (const unsigned int l) const |
Get the direction associated with direction l . More... | |
const std::vector< Real > & | getWeights (const unsigned int l) const |
Get the weights associated with the direction l . More... | |
Real | getTotalWeight (const unsigned int l) const |
Gets the total of the weights associated with the direction l . More... | |
const std::vector< Real > & | getPolarSins (const unsigned int l) const |
Gets the polar sins for the direction l . More... | |
std::size_t | numDirections () const |
Get the number of directions in the rotated and projected quadrature. More... | |
bool | hasDirection (const unsigned int l) const |
Whether or not the angular quadrature has direction l . More... | |
void | checkDirection (const unsigned int l) const |
Throws a MooseError if the angular quadrature does not have direction l . More... | |
std::size_t | numPolar (const unsigned int l) const |
The number of polar directions associated with the given direction. More... | |
unsigned int | polarOrder () const |
Get the polar order. More... | |
unsigned int | azimuthalOrder () const |
Get the azimuthal order. More... | |
Real | muMin () const |
Get the minimum mu. More... | |
Real | muMax () const |
Get the maximum mu. More... | |
const libMesh::Point & | currentRotationDirection () const |
Get the current rotation direction. More... | |
unsigned int | dim () const |
Get the quadrature dimension. More... | |
Static Public Member Functions | |
static void | gaussLegendre (const unsigned int order, std::vector< Real > &x, std::vector< Real > &w) |
Builds Gauss-Legendre quadrature on 0, 1, with weights that sum to 1. More... | |
static void | chebyshev (const unsigned int order, std::vector< Real > &x, std::vector< Real > &w) |
Builds Chebyshev quadrature on [0, 2] with weights that sum to 2. More... | |
static void | rotationMatrix (const libMesh::Point &direction, libMesh::DenseMatrix< Real > &matrix) |
Builds the rotation matrix for direction direction into matrix . More... | |
static libMesh::Point | orthonormalVector (const libMesh::Point &v) |
Gets the vector that is orthonormal to v . More... | |
Private Member Functions | |
void | build () |
Build the quadrature. More... | |
Private Attributes | |
const unsigned int | _dim |
The dimension. More... | |
const unsigned int | _polar_order |
The polar order. More... | |
const unsigned int | _azimuthal_order |
The azimuthal order. More... | |
const Real | _mu_min |
The minimum mu. More... | |
const Real | _mu_max |
The maximum mu. More... | |
std::vector< Real > | _phi |
Quadrature phi. More... | |
std::vector< Real > | _mu |
Quadrature mu. More... | |
std::vector< Real > | _polar_sin |
Quadrature polar sin. More... | |
std::vector< Real > | _w |
Quadrature combined weights. More... | |
libMesh::Point | _current_rotation_direction |
The current rotation direction. More... | |
std::vector< libMesh::Point > | _current_directions |
The current quadrature information. More... | |
std::vector< std::vector< Real > > | _current_weights |
std::vector< std::vector< Real > > | _current_polar_sins |
Definition at line 19 of file RayTracingAngularQuadrature.h.
RayTracingAngularQuadrature::RayTracingAngularQuadrature | ( | const unsigned int | dim, |
const unsigned int | polar_order, | ||
const unsigned int | azimuthal_order, | ||
const Real | mu_min, | ||
const Real | mu_max | ||
) |
Constructor.
dim | The mesh dimension |
polar_order | Order for the polar quadrature |
azimuthal_order | Azimuthal order for the quadrature |
mu_min | Minimum mu for the quadrature |
mu_max | Maximum mu for the quadrature |
Definition at line 18 of file RayTracingAngularQuadrature.C.
|
inline |
Get the azimuthal order.
Definition at line 146 of file RayTracingAngularQuadrature.h.
Referenced by TEST().
|
private |
Build the quadrature.
Definition at line 50 of file RayTracingAngularQuadrature.C.
Referenced by RayTracingAngularQuadrature().
|
static |
Builds Chebyshev quadrature on [0, 2] with weights that sum to 2.
order | The quadrature order |
x | Vector to fill the points into |
w | Vector to fill the weights into |
Definition at line 247 of file RayTracingAngularQuadrature.C.
Referenced by build(), and TEST().
Throws a MooseError if the angular quadrature does not have direction l
.
Definition at line 240 of file RayTracingAngularQuadrature.C.
Referenced by getDirection(), getPolarSins(), getTotalWeight(), getWeights(), numPolar(), and RayTracingAngularQuadratureErrorTest::RayTracingAngularQuadratureErrorTest().
|
inline |
Get the current rotation direction.
Definition at line 159 of file RayTracingAngularQuadrature.h.
Referenced by TEST().
|
inline |
Get the quadrature dimension.
Definition at line 164 of file RayTracingAngularQuadrature.h.
Referenced by RayTracingAngularQuadrature(), and testPolarSins2D().
|
static |
Builds Gauss-Legendre quadrature on 0, 1, with weights that sum to 1.
order | The quadrature order |
x | Vector to fill the points into |
w | Vector to fill the weights into |
Definition at line 85 of file RayTracingAngularQuadrature.C.
Referenced by build(), RayTracingAngularQuadratureErrorTest::RayTracingAngularQuadratureErrorTest(), TEST(), and ViewFactorRayStudy::ViewFactorRayStudy().
const libMesh::Point & RayTracingAngularQuadrature::getDirection | ( | const unsigned int | l | ) | const |
Get the direction associated with direction l
.
This direction will be rotated per currentRotationDirection(), set by setRotation().
Definition at line 203 of file RayTracingAngularQuadrature.C.
Referenced by testDirections().
Gets the polar sins for the direction l
.
In the case of 2D, the 3D directions projected into the 2D plane may overlap. In this case, we combine the directions into a single direction with multiple polar sins. This is the reason for the vector return.
Definition at line 224 of file RayTracingAngularQuadrature.C.
Referenced by testPolarSins2D().
Gets the total of the weights associated with the direction l
.
The weights across all directions sum to 2.
In the case of 2D, the 3D directions projected into the 2D plane may overlap. In this case, we combine the directions into a single direction with multiple weights. This is the reason why a getter for the "total" weight for a single direction exists.
Definition at line 217 of file RayTracingAngularQuadrature.C.
Get the weights associated with the direction l
.
The weights across all directions sum to 2.
In the case of 2D, the 3D directions projected into the 2D plane may overlap. In this case, we combine the directions into a single direction with multiple weights. This is the reason for the vector return.
Definition at line 210 of file RayTracingAngularQuadrature.C.
Referenced by testWeights().
|
inline |
Whether or not the angular quadrature has direction l
.
Definition at line 121 of file RayTracingAngularQuadrature.h.
Referenced by checkDirection(), and TEST().
|
inline |
Get the maximum mu.
Definition at line 154 of file RayTracingAngularQuadrature.h.
Referenced by TEST().
|
inline |
Get the minimum mu.
Definition at line 150 of file RayTracingAngularQuadrature.h.
Referenced by TEST().
|
inline |
Get the number of directions in the rotated and projected quadrature.
Note that in the case of 2D, we overlap 3D directions projected into the 2D plane. Therefore, in 2D, this value may be less than the number of directions in the 3D quadrature.
Definition at line 117 of file RayTracingAngularQuadrature.h.
Referenced by TEST(), testDirections(), testPolarSins2D(), and testWeights().
std::size_t RayTracingAngularQuadrature::numPolar | ( | const unsigned int | l | ) | const |
The number of polar directions associated with the given direction.
In 2D, projecting the 3D directions into the 2D plane may result in directions that overlap, in which case we end up with one direction and multiple polars for said direction.
In 3D, this will always be 1.
Definition at line 231 of file RayTracingAngularQuadrature.C.
Referenced by testPolarSins2D().
|
static |
Gets the vector that is orthonormal to v
.
Definition at line 282 of file RayTracingAngularQuadrature.C.
Referenced by RayTracingAngularQuadratureErrorTest::RayTracingAngularQuadratureErrorTest(), and rotationMatrix().
|
inline |
Get the polar order.
Definition at line 142 of file RayTracingAngularQuadrature.h.
Referenced by TEST().
void RayTracingAngularQuadrature::rotate | ( | const libMesh::Point & | rotation_direction | ) |
Rotates the quadrature to a given direction.
Definition at line 129 of file RayTracingAngularQuadrature.C.
Referenced by ConeRayStudy::defineRays(), RayTracingAngularQuadrature(), and TEST().
|
static |
Builds the rotation matrix for direction direction
into matrix
.
Definition at line 262 of file RayTracingAngularQuadrature.C.
Referenced by rotate().
|
private |
The azimuthal order.
Definition at line 177 of file RayTracingAngularQuadrature.h.
Referenced by azimuthalOrder(), build(), and RayTracingAngularQuadrature().
|
private |
The current quadrature information.
We need "current" information because the quadrature can be rotated and because in 2D, there are cases where projected directions that are the same in the 2D plane are combined together with multiple weights and polar sins.
Definition at line 202 of file RayTracingAngularQuadrature.h.
Referenced by getDirection(), hasDirection(), numDirections(), and rotate().
|
private |
Definition at line 204 of file RayTracingAngularQuadrature.h.
Referenced by getPolarSins(), numPolar(), and rotate().
|
private |
The current rotation direction.
Definition at line 208 of file RayTracingAngularQuadrature.h.
Referenced by currentRotationDirection(), and rotate().
|
private |
Definition at line 203 of file RayTracingAngularQuadrature.h.
Referenced by getTotalWeight(), getWeights(), numPolar(), and rotate().
|
private |
The dimension.
Definition at line 173 of file RayTracingAngularQuadrature.h.
Referenced by build(), dim(), numPolar(), and rotate().
|
private |
Quadrature mu.
Definition at line 186 of file RayTracingAngularQuadrature.h.
|
private |
The maximum mu.
Definition at line 181 of file RayTracingAngularQuadrature.h.
Referenced by build(), muMax(), and RayTracingAngularQuadrature().
|
private |
The minimum mu.
Definition at line 179 of file RayTracingAngularQuadrature.h.
Referenced by build(), muMin(), and RayTracingAngularQuadrature().
|
private |
Quadrature phi.
Definition at line 184 of file RayTracingAngularQuadrature.h.
|
private |
The polar order.
Definition at line 175 of file RayTracingAngularQuadrature.h.
Referenced by build(), polarOrder(), and RayTracingAngularQuadrature().
|
private |
Quadrature polar sin.
Definition at line 188 of file RayTracingAngularQuadrature.h.
|
private |
Quadrature combined weights.
Definition at line 190 of file RayTracingAngularQuadrature.h.