An open source method of characteristics neutron transport code.
LeonardPolarQuad Class Reference

Leonard's polar quadrature. More...

#include "src/Quadrature.h"

Public Member Functions

 LeonardPolarQuad ()
 Dummy constructor calls the parent constructor.
 
void setNumPolarAngles (size_t num_polar)
 Set the number of polar angles to initialize. More...
 
void initialize ()
 Routine to initialize the polar quadrature. More...
 
void precomputeWeights (bool solve_3D)
 Calculates total weights for every azimuthal/polar combination based on the Leonard polar quadrature. More...
 
- Public Member Functions inherited from Quadrature
 Quadrature ()
 Dummy constructor sets the default number of angles to zero.
 
size_t getNumPolarAngles () const
 Returns the number of polar angles. More...
 
size_t getNumAzimAngles () const
 Returns the number of azimuthal angles. More...
 
double getSinTheta (size_t azim, size_t polar) const
 Returns the $ sin(\theta)$ value for a particular polar angle. More...
 
double getSinThetaInline (size_t azim, size_t polar) const
 Returns the $ sin(\theta)$ value for a particular polar angle. More...
 
double getTheta (size_t azim, size_t polar) const
 Returns the polar angle in radians for a given azimuthal and polar angle index. More...
 
double getPhi (size_t azim) const
 Returns the azimuthal angle value in radians. More...
 
double getAzimWeight (size_t azim) const
 Returns the azimuthal angle weight value for a particular azimuthal angle. More...
 
double getPolarWeight (size_t azim, size_t polar) const
 Returns the polar weight for a particular azimuthal and polar angle. More...
 
double getWeight (size_t azim, size_t polar) const
 Returns the total weight for Tracks with the given azimuthal and polar indexes. More...
 
double getWeightInline (size_t azim, size_t polar) const
 Returns the total weight for Tracks with the given azimuthal and polar indexes without error checking and inlined. More...
 
const std::vector< DoubleVec > & getSinThetas () const
 Returns a pointer to the Quadrature's vector of polar angle sines $ sin\theta_{p} $. More...
 
const std::vector< DoubleVec > & getThetas () const
 Returns a reference to the Quadrature's vector of polar angles $ \theta_{p} $. More...
 
const DoubleVecgetPhis () const
 Returns a pointer to the Quadrature's vector of azimuthal angles $ \phi $. More...
 
const DoubleVecgetAzimWeights () const
 Returns a pointer to the Quadrature's vector of azimuthal weights. More...
 
const std::vector< DoubleVec > & getPolarWeights () const
 Returns a pointer to the Quadrature's vector of polar weights. More...
 
QuadratureType getQuadratureType () const
 Returns the type of Quadrature created. More...
 
const DoubleVecgetAzimSpacings () const
 Returns an vector of adjusted azimuthal spacings. More...
 
double getAzimSpacing (size_t azim) const
 Returns the adjusted azimuthal spacing at the requested azimuthal angle index. More...
 
const std::vector< DoubleVec > & getPolarSpacings () const
 Returns a 2D vector of adjusted polar spacings. More...
 
double getPolarSpacing (size_t azim, size_t polar) const
 Returns the adjusted polar spacing at the requested azimuthal angle index and polar angle index. More...
 
virtual void setNumAzimAngles (size_t num_azim)
 Set the number of azimuthal angles to initialize. More...
 
void setThetas (const DoubleVec &thetas)
 Sets the Quadrature's vector of polar angles. More...
 
void setPolarWeights (const DoubleVec &weights)
 Set the Quadrature's vector of polar weights. More...
 
void setTheta (double theta, size_t azim, size_t polar)
 Sets the polar angle for the given indexes. More...
 
void setPhi (double phi, size_t azim)
 Sets the azimuthal angle for the given index. More...
 
void setAzimSpacing (double spacing, size_t azim)
 Sets the azimuthal spacing for the given index. More...
 
void setPolarSpacing (double spacing, size_t azim, size_t polar)
 Sets the polar spacing for the given indexes. More...
 
void setAzimWeight (double weight, size_t azim)
 Sets the azimuthal weight for the given index. More...
 
void setPolarWeight (double weight, size_t azim, size_t polar)
 Sets the polar weight for the given indexes. More...
 
std::string toString () const
 Converts this Quadrature to a character vector of its attributes. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Quadrature
template<typename T >
void setPolarValues (std::vector< std::vector< T > > &vec, size_t azim_index, size_t polar_index, T value)
 
template<typename T >
void setAzimuthalValues (std::vector< T > &vec, size_t azim_index, T value)
 
- Static Protected Member Functions inherited from Quadrature
template<typename T >
static void resize2D (std::vector< std::vector< T > > &vec, size_t dim1, size_t dim2)
 
- Protected Attributes inherited from Quadrature
QuadratureType _quad_type
 
size_t _num_azim
 
size_t _num_polar
 
std::vector< DoubleVec_sin_thetas
 
std::vector< DoubleVec_thetas
 
DoubleVec _phis
 
DoubleVec _azim_spacings
 
DoubleVec _azim_weights
 
std::vector< DoubleVec_polar_spacings
 
std::vector< DoubleVec_polar_weights
 
std::vector< DoubleVec_total_weights
 

Detailed Description

Leonard's polar quadrature.

Member Function Documentation

◆ initialize()

void LeonardPolarQuad::initialize ( )
virtual

Routine to initialize the polar quadrature.

This routine uses the tabulated values for the Leonard polar angle quadrature, including the sine thetas and weights.

Reimplemented from Quadrature.

◆ precomputeWeights()

void LeonardPolarQuad::precomputeWeights ( bool  solve_3D)
virtual

Calculates total weights for every azimuthal/polar combination based on the Leonard polar quadrature.

Parameters
solve_3DBoolean indicating whether this is a 3D quadrature

Reimplemented from Quadrature.

◆ setNumPolarAngles()

void LeonardPolarQuad::setNumPolarAngles ( size_t  num_polar)
virtual

Set the number of polar angles to initialize.

Parameters
num_polarthe number of polar angles (4 or 6)

Reimplemented from Quadrature.


The documentation for this class was generated from the following files: