Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | List of all members
alsfvm::functional::LegendrePointWise Class Reference

#include <alsfvm/functional/LegendrePointWise.hpp>

Inheritance diagram for alsfvm::functional::LegendrePointWise:
alsfvm::functional::Functional

Public Member Functions

 LegendrePointWise (const Parameters &parameters)
 
virtual void operator() (volume::Volume &conservedVolumeOut, const volume::Volume &conservedVolumeIn, const real weight, const grid::Grid &grid) override
 
virtual ivec3 getFunctionalSize (const grid::Grid &grid) const override
 Returns grid.getDimensions() More...
 
- Public Member Functions inherited from alsfvm::functional::Functional
virtual ~Functional ()
 
virtual ivec3 getGhostCellSizes (const grid::Grid &grid, const volume::Volume &volume) const
 
virtual std::string getPlatformToAllocateOn (const std::string &platform) const
 

Additional Inherited Members

- Public Types inherited from alsfvm::functional::Functional
typedef alsutils::parameters::Parameters Parameters
 To be used to pass parameters to the constructors. More...
 

Detailed Description

Computes the spatial integral of the n-th Legendre polynomial, ie it will output $v(x,y)$, where

\[v(x,y) = L_k(u(x, y))\]

where $L_n$ is the n-th Legendre polynomial.

You have the option of scaling the input u to the interval [-1,1] by specifying the keywords maxValue and minValue, this will essentially compute

\[v(x,y) = L_m(\frac{u(x, y)-\mathrm{minValue}}{\mathrm{maxValue}-\mathrm{minValue}})\]

In terms of pairing between one point Young measures and test functions, this corresponds to

\[\langle \nu, g\rangle \]

where and $g(\xi) = L_m(\xi)$.

Note
The computation of the Legendre polynomials are done through the boost library, see http://www.boost.org/doc/libs/1_46_1/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_poly/legendre.html for any implementation details. In short, $L_n(x)=boost::math::legendre_p(n,x)$

Constructor & Destructor Documentation

◆ LegendrePointWise()

alsfvm::functional::LegendrePointWise::LegendrePointWise ( const Parameters parameters)

The following parameters are accepted through parameters

Name Description
minValue minimum value that the solution can obtain
maxValue maximum value that the solution can obtain
degree the degree of the polynomial $L_n(x)$
variables the variables to compute for (space separated)

Member Function Documentation

◆ getFunctionalSize()

ivec3 alsfvm::functional::LegendrePointWise::getFunctionalSize ( const grid::Grid grid) const
overridevirtual

Returns grid.getDimensions()

Implements alsfvm::functional::Functional.

◆ operator()()

void alsfvm::functional::LegendrePointWise::operator() ( volume::Volume conservedVolumeOut,
const volume::Volume conservedVolumeIn,
const real  weight,
const grid::Grid grid 
)
overridevirtual

Computes the operator value on the givne input data

Note
In order to support time integration, the result should be added to conservedVolumeOut and extraVolumeOut, not overriding it.
Parameters
[out]conservedVolumeOutat the end, should have the contribution of the functional for the conservedVariables
[in]conservedVolumeInthe state of the conserved variables
[in]weightthe current weight to be applied to the functional. Ie, the functional should compute
conservedVolumeOut += weight + f(conservedVolumeIn)
[in]gridthe grid to use

Implements alsfvm::functional::Functional.


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