www.mooseframework.org
SphericalAverage.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
30 Real
32 {
33  // overwrite this method to implement cylindrical averages etc.
34  return (_q_point[_qp] - _origin).norm();
35 }
static InputParameters validParams()
registerMooseObject("MooseApp", SphericalAverage)
const MooseArray< Point > & _q_point
virtual Real computeDistance() override
compute the distance of the current quadrature point for binning
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
SphericalAverage(const InputParameters &parameters)
unsigned int _qp
current quadrature point - used in computeVolume()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Point _origin
origin of sphere [or other body]
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...
static InputParameters validParams()
Compute a spherical average of a variable as a function of radius throughout the simulation domain...
Base clase for computing spatial average of a variable over simple spatial regions of the computation...