https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMDivAux.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 "libmesh/ignore_warnings.h"
15#include "mfem/miniapps/common/pfem_extras.hpp"
16#include "libmesh/restore_warnings.h"
17#include "MFEMAuxKernel.h"
18
23{
24public:
26
28
29 virtual ~MFEMDivAux() = default;
30
32 virtual void execute() override;
33
34 // Updates divergence operator.
35 virtual void update() override;
36
37protected:
39 const VariableName _source_var_name;
41 const mfem::ParGridFunction & _source_var;
43 const mfem::real_t _scale_factor;
45 mfem::common::ParDiscreteDivOperator _div;
46};
47
48#endif
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Class to construct an auxiliary solver used to update a real auxvariable.
Class to set an L2 auxvariable to be the divergence of an H(div) vector variable.
Definition MFEMDivAux.h:23
const VariableName _source_var_name
Name of source MFEMVariable to take the divergence of.
Definition MFEMDivAux.h:39
const mfem::ParGridFunction & _source_var
Reference to source gridfunction.
Definition MFEMDivAux.h:41
mfem::common::ParDiscreteDivOperator _div
Divergence operator.
Definition MFEMDivAux.h:45
static InputParameters validParams()
Definition MFEMDivAux.C:18
virtual ~MFEMDivAux()=default
virtual void execute() override
Computes the auxvariable.
Definition MFEMDivAux.C:44
const mfem::real_t _scale_factor
Scalar factor to multiply the result by.
Definition MFEMDivAux.h:43
virtual void update() override
Method called to update any owned objects upon an FE space update.
Definition MFEMDivAux.C:51
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131