www.mooseframework.org
ElementIntegralIndicator.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 
11 
12 // MOOSE includes
13 #include "MooseVariableFE.h"
14 
15 #include "libmesh/quadrature.h"
16 
17 template <>
20 {
22  return params;
23 }
24 
26  : ElementIndicator(parameters)
27 {
28 }
29 
30 void
32 {
33  Real sum = 0;
34  for (_qp = 0; _qp < _qrule->n_points(); _qp++)
35  sum += _JxW[_qp] * _coord[_qp] * computeQpIntegral();
36 
37  // sum = std::sqrt(sum);
38 
40 }
41 
42 Real
44 {
45  return _u[_qp];
46 }
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
const QBase *const & _qrule
MooseVariable & _field_var
ElementIntegralIndicator(const InputParameters &parameters)
void setNodalValue(OutputType value, unsigned int idx=0)
unsigned int _qp
const VariableValue & _u
Holds the solution at current quadrature points.
InputParameters validParams< ElementIndicator >()