https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMElementAverageValue.h
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#ifdef MOOSE_MFEM_ENABLED
11
12#pragma once
13
14#include "MFEMPostprocessor.h"
16
22{
23public:
25
27
28 void initialize() override {}
29 void execute() override;
30
31 PostprocessorValue getValue() const override final;
32
33private:
35 mfem::ParGridFunction & _var;
37 mfem::ConstantCoefficient _one;
39 mfem::ParLinearForm _lf;
41 mfem::real_t _value{0};
42};
43
44#endif
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for construction of an object that is restricted to a subset of subdomains of the problem ...
Computes the volumetric average of a scalar MFEM variable over the mesh or a subset of subdomains.
mfem::ParGridFunction & _var
Reference to the MFEM grid function whose average is being computed.
mfem::ParLinearForm _lf
Linear form used to accumulate the integral of the variable over elements.
PostprocessorValue getValue() const override final
This will get called to actually grab the final value the postprocessor has calculated.
static InputParameters validParams()
mfem::real_t _value
Cached computed average value returned by getValue()
void initialize() override
Perform any pre-execution setup for this object.
mfem::ConstantCoefficient _one
Constant coefficient of value 1 used in integration for volume calculation.
void execute() override
Perform the main work for this object.
Postprocessor for MFEM results.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131