https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SphericalAverage.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "SphericalAverage.h"
11
12#include "libmesh/quadrature.h"
13
15
18{
20 params.addClassDescription("Compute a spherical average of a variable as a function of radius "
21 "throughout the simulation domain.");
22 return params;
23}
24
26 : SpatialAverageBase(parameters)
27{
28}
29
30Real
32{
33 // overwrite this method to implement cylindrical averages etc.
34 return (_q_point[_qp] - _origin).norm();
35}
registerMooseObject("MooseApp", SphericalAverage)
const MooseArray< Point > & _q_point
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
Base clase for computing spatial average of a variable over simple spatial regions of the computation...
static InputParameters validParams()
const Point _origin
origin of sphere [or other body]
unsigned int _qp
current quadrature point - used in computeVolume()
Compute a spherical average of a variable as a function of radius throughout the simulation domain.
static InputParameters validParams()
virtual Real computeDistance() override
compute the distance of the current quadrature point for binning
SphericalAverage(const InputParameters &parameters)