Cardinal
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NekBinnedPlaneIntegral Class Reference

#include <NekBinnedPlaneIntegral.h>

Inheritance diagram for NekBinnedPlaneIntegral:
[legend]

Public Member Functions

 NekBinnedPlaneIntegral (const InputParameters &parameters)
 
virtual void executeUserObject () override
 
virtual void getBinVolumes () override
 Get the volume of each bin, used for normalizing in derived classes. More...
 
Real spatialValue (const Point &p, const unsigned int &component) const override
 
virtual void binnedPlaneIntegral (const field::NekFieldEnum &integrand, double *total_integral)
 
virtual void computeIntegral ()
 
virtual Real distanceFromGap (const Point &point, const unsigned int &gap_index) const
 
virtual unsigned int gapIndex (const Point &point) const
 
virtual void gapIndexAndDistance (const Point &point, unsigned int &index, Real &distance) const
 
virtual Real spatialValue (const Point &p) const override final
 
virtual const unsigned int bin (const Point &p) const
 
virtual const unsigned int num_bins () const
 
virtual const std::vector< Point > spatialPoints () const override
 
virtual void computeBinVolumes () final
 Compute the volume of each bin and check for zero contributions. More...
 
const std::vector< unsigned int > unrolledBin (const unsigned int &total_bin_index) const
 
const field::NekFieldEnumfield () const
 
Point nekPoint (const int &local_elem_id, const int &local_node_id) const
 
virtual void initialize ()
 
virtual void finalize ()
 
virtual void execute () override
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

void computePoints1D ()
 Get the output points for a single bin. More...
 
void computePoints2D ()
 Get the output points for two combined bins. More...
 
void computePoints3D ()
 Get the output points for three combined bins. More...
 
void resetPartialStorage ()
 Reset the scratch space storage to zero values. More...
 
void fillCoordinates (const std::vector< unsigned int > &indices, Point &p) const
 

Protected Attributes

const Real & _gap_thickness
 Width of region enclosing gap for which points contribute to gap integral. More...
 
const PlaneSpatialBinUserObject_side_bin
 The user object providing the side binning. More...
 
unsigned int _side_index
 The index into the _bins that represents the side bin object. More...
 
const std::vector< UserObjectName > & _bin_names
 Names of the userobjects providing the bins. More...
 
const field::NekFieldEnum _field
 field to postprocess with the bins More...
 
const bool & _map_space_by_qp
 
const bool & _check_zero_contributions
 
std::vector< const SpatialBinUserObject * > _bins
 Userobjects providing the bins. More...
 
std::vector< bool > _has_direction
 For each x, y, z direction, whether the combined distribution covers that direction. More...
 
std::vector< unsigned int > _bin_providing_direction
 For each x, y, z direction, which bin provides that direction. More...
 
component::BinnedVelocityComponentEnum _velocity_component
 
unsigned int _n_bins
 total number of bins More...
 
std::vector< Point > _points
 points at which to output the user object to give unique values More...
 
std::vector< Point > _velocity_bin_directions
 velocity direction to use for each bin More...
 
double * _bin_values
 values of the userobject in each bin More...
 
double * _bin_values_x
 temporary storage space to hold the results of component-wise evaluations More...
 
double * _bin_values_y
 
double * _bin_values_z
 
double * _bin_volumes
 Volumes of each bin. More...
 
int * _bin_counts
 
double * _bin_partial_values
 Partial-sum of bin value per Nek rank. More...
 
int * _bin_partial_counts
 Partial-sum of bin count per Nek rank. More...
 
const unsigned int & _interval
 Interval with which to evaluate the user object. More...
 
const NekRSProblemBase_nek_problem
 Underlying problem object. More...
 
bool _fixed_mesh
 Whether the mesh this userobject operates on is fixed, allowing caching of volumes and areas. More...
 

Detailed Description

Compute a side integral of the NekRS solution in spatial bins.

Constructor & Destructor Documentation

◆ NekBinnedPlaneIntegral()

NekBinnedPlaneIntegral::NekBinnedPlaneIntegral ( const InputParameters &  parameters)

Member Function Documentation

◆ bin()

virtual const unsigned int NekSpatialBinUserObject::bin ( const Point &  p) const
virtualinherited

◆ binnedPlaneIntegral()

virtual void NekBinnedPlaneIntegral::binnedPlaneIntegral ( const field::NekFieldEnum integrand,
double *  total_integral 
)
virtual

Compute the integral over the side bins

Parameters
[in]integrandfield to integrate
[out]total_integralintegral over each bin

◆ computeBinVolumes()

virtual void NekSpatialBinUserObject::computeBinVolumes ( )
finalvirtualinherited

Compute the volume of each bin and check for zero contributions.

◆ computeIntegral()

virtual void NekBinnedPlaneIntegral::computeIntegral ( )
virtual

Compute the integrals

◆ computePoints1D()

void NekSpatialBinUserObject::computePoints1D ( )
protectedinherited

Get the output points for a single bin.

◆ computePoints2D()

void NekSpatialBinUserObject::computePoints2D ( )
protectedinherited

Get the output points for two combined bins.

◆ computePoints3D()

void NekSpatialBinUserObject::computePoints3D ( )
protectedinherited

Get the output points for three combined bins.

◆ distanceFromGap()

virtual Real NekPlaneSpatialBinUserObject::distanceFromGap ( const Point &  point,
const unsigned int &  gap_index 
) const
virtualinherited

◆ execute()

virtual void NekUserObject::execute ( )
overridevirtualinherited

◆ executeUserObject()

virtual void NekBinnedPlaneIntegral::executeUserObject ( )
overridevirtual

Execute the user object; separating this call from execute() allows all derived classes to leverage this base class's 'interval' parameter to decide when to call the user object

Implements NekUserObject.

Reimplemented in NekBinnedPlaneAverage.

◆ field()

const field::NekFieldEnum& NekSpatialBinUserObject::field ( ) const
inlineinherited

Get the integrating field

Returns
field

◆ fillCoordinates()

void NekSpatialBinUserObject::fillCoordinates ( const std::vector< unsigned int > &  indices,
Point &  p 
) const
protectedinherited

Get the coordinates for a point at the given indices for the bins

Parameters
[in]indicesindices of the bin distributions to combine
[out]ppoint at the (i, j, k) indices of the combined bins

◆ finalize()

virtual void NekUserObject::finalize ( )
inlinevirtualinherited

◆ gapIndex()

virtual unsigned int NekPlaneSpatialBinUserObject::gapIndex ( const Point &  point) const
virtualinherited

◆ gapIndexAndDistance()

virtual void NekPlaneSpatialBinUserObject::gapIndexAndDistance ( const Point &  point,
unsigned int &  index,
Real &  distance 
) const
virtualinherited

◆ getBinVolumes()

virtual void NekBinnedPlaneIntegral::getBinVolumes ( )
overridevirtual

Get the volume of each bin, used for normalizing in derived classes.

Implements NekSpatialBinUserObject.

◆ initialize()

virtual void NekUserObject::initialize ( )
inlinevirtualinherited

◆ nekPoint()

Point NekSpatialBinUserObject::nekPoint ( const int &  local_elem_id,
const int &  local_node_id 
) const
inherited

Get the point at which to evaluate the user object

Parameters
[in]local_elem_idlocal element ID on the Nek rank
[in]local_node_idlocal node ID on the element
Returns
point, in dimensional form

◆ num_bins()

virtual const unsigned int NekSpatialBinUserObject::num_bins ( ) const
virtualinherited

◆ resetPartialStorage()

void NekSpatialBinUserObject::resetPartialStorage ( )
protectedinherited

Reset the scratch space storage to zero values.

◆ spatialPoints()

virtual const std::vector<Point> NekSpatialBinUserObject::spatialPoints ( ) const
inlineoverridevirtualinherited

◆ spatialValue() [1/2]

virtual Real NekSpatialBinUserObject::spatialValue ( const Point &  p) const
finaloverridevirtualinherited

◆ spatialValue() [2/2]

Real NekBinnedPlaneIntegral::spatialValue ( const Point &  p,
const unsigned int &  component 
) const
overridevirtual

When using 'field = velocity_component', get the spatial value for a particular component

Parameters
[in]ppoint
[in]componentcomponent
Returns
value along direction of component

Implements NekSpatialBinUserObject.

◆ unrolledBin()

const std::vector<unsigned int> NekSpatialBinUserObject::unrolledBin ( const unsigned int &  total_bin_index) const
inherited

Get the individual bin indices given a total combined bin

Parameters
[in]total_bin_indextotal combined bin index
Returns
indices into each of the individual bin distributions

◆ validParams()

static InputParameters NekBinnedPlaneIntegral::validParams ( )
static

Member Data Documentation

◆ _bin_counts

int* NekSpatialBinUserObject::_bin_counts
protectedinherited

Number of GLL points (for 'map_space_by_qp = true') or elements (for 'map_space_by_qp = false') that contribute to each bin, for error checking

◆ _bin_names

const std::vector<UserObjectName>& NekSpatialBinUserObject::_bin_names
protectedinherited

Names of the userobjects providing the bins.

◆ _bin_partial_counts

int* NekSpatialBinUserObject::_bin_partial_counts
protectedinherited

Partial-sum of bin count per Nek rank.

◆ _bin_partial_values

double* NekSpatialBinUserObject::_bin_partial_values
protectedinherited

Partial-sum of bin value per Nek rank.

◆ _bin_providing_direction

std::vector<unsigned int> NekSpatialBinUserObject::_bin_providing_direction
protectedinherited

For each x, y, z direction, which bin provides that direction.

◆ _bin_values

double* NekSpatialBinUserObject::_bin_values
protectedinherited

values of the userobject in each bin

◆ _bin_values_x

double* NekSpatialBinUserObject::_bin_values_x
protectedinherited

temporary storage space to hold the results of component-wise evaluations

◆ _bin_values_y

double* NekSpatialBinUserObject::_bin_values_y
protectedinherited

◆ _bin_values_z

double* NekSpatialBinUserObject::_bin_values_z
protectedinherited

◆ _bin_volumes

double* NekSpatialBinUserObject::_bin_volumes
protectedinherited

Volumes of each bin.

◆ _bins

std::vector<const SpatialBinUserObject *> NekSpatialBinUserObject::_bins
protectedinherited

Userobjects providing the bins.

◆ _check_zero_contributions

const bool& NekSpatialBinUserObject::_check_zero_contributions
protectedinherited

Whether to throw an error if no GLL points or elements map to each bin (which would indicate that the binning is probably way too fine relative to the NekRS solution)

◆ _field

const field::NekFieldEnum NekSpatialBinUserObject::_field
protectedinherited

field to postprocess with the bins

◆ _fixed_mesh

bool NekUserObject::_fixed_mesh
protectedinherited

Whether the mesh this userobject operates on is fixed, allowing caching of volumes and areas.

◆ _gap_thickness

const Real& NekPlaneSpatialBinUserObject::_gap_thickness
protectedinherited

Width of region enclosing gap for which points contribute to gap integral.

◆ _has_direction

std::vector<bool> NekSpatialBinUserObject::_has_direction
protectedinherited

For each x, y, z direction, whether the combined distribution covers that direction.

◆ _interval

const unsigned int& NekUserObject::_interval
protectedinherited

Interval with which to evaluate the user object.

◆ _map_space_by_qp

const bool& NekSpatialBinUserObject::_map_space_by_qp
protectedinherited

Whether to map the NekRS space to bins by element centroid (false) or quadrature point (true).

◆ _n_bins

unsigned int NekSpatialBinUserObject::_n_bins
protectedinherited

total number of bins

◆ _nek_problem

const NekRSProblemBase* NekUserObject::_nek_problem
protectedinherited

Underlying problem object.

◆ _points

std::vector<Point> NekSpatialBinUserObject::_points
protectedinherited

points at which to output the user object to give unique values

◆ _side_bin

const PlaneSpatialBinUserObject* NekPlaneSpatialBinUserObject::_side_bin
protectedinherited

The user object providing the side binning.

◆ _side_index

unsigned int NekPlaneSpatialBinUserObject::_side_index
protectedinherited

The index into the _bins that represents the side bin object.

◆ _velocity_bin_directions

std::vector<Point> NekSpatialBinUserObject::_velocity_bin_directions
protectedinherited

velocity direction to use for each bin

◆ _velocity_component

component::BinnedVelocityComponentEnum NekSpatialBinUserObject::_velocity_component
protectedinherited

Direction in which to evaluate velocity, if using 'field = velocity_component'. Options: user (then provide a general vector direction with the 'velocity_direction' parameter normal (normal to the gap planes, only valid for side bin user objects)


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