www.mooseframework.org
ElementIntegralIndicator.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
16 
17 // MOOSE includes
18 #include "MooseVariable.h"
19 
20 #include "libmesh/quadrature.h"
21 
22 template <>
25 {
27  return params;
28 }
29 
31  : ElementIndicator(parameters)
32 {
33 }
34 
35 void
37 {
38  Real sum = 0;
39  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
40  sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
41 
42  // sum = std::sqrt(sum);
43 
45 }
46 
47 Real
49 {
50  return _u[_qp];
51 }
virtual void computeIndicator() override
Pure virtual that must be overridden.
InputParameters validParams< ElementIntegralIndicator >()
const MooseArray< Real > & _coord
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const MooseArray< Real > & _JxW
void setNodalValue(Number value, unsigned int idx=0)
Set the nodal value for this variable to keep everything up to date.
MooseVariable & _field_var
ElementIntegralIndicator(const InputParameters &parameters)
unsigned int _qp
const VariableValue & _u
Holds the solution at current quadrature points.
InputParameters validParams< ElementIndicator >()