https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMSumAux.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
19/*
20 * Class to scale and sum an arbitrary number of MFEM variables into an auxiliary variable.
21 */
23{
24public:
26
28
29 virtual ~MFEMSumAux() = default;
30
31 // Computes the auxvariable.
32 virtual void execute() override;
33
34protected:
35 // Names of input MFEMVariables to sum.
36 const std::vector<VariableName> & _var_names;
37 // Scalar factors to multiply the input variables by.
38 const std::vector<mfem::real_t> _scale_factors;
40 std::vector<const mfem::ParGridFunction *> _summed_vars;
41};
42
43#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.
virtual ~MFEMSumAux()=default
const std::vector< VariableName > & _var_names
Definition MFEMSumAux.h:36
std::vector< const mfem::ParGridFunction * > _summed_vars
Pointers to input variable gridfunctions.
Definition MFEMSumAux.h:40
virtual void execute() override
Perform the main work for this object.
Definition MFEMSumAux.C:57
static InputParameters validParams()
Definition MFEMSumAux.C:18
const std::vector< mfem::real_t > _scale_factors
Definition MFEMSumAux.h:38
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131