https://mooseframework.inl.gov
MFEMCurlAux.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 #include "libmesh/ignore_warnings.h"
14 #include "mfem/miniapps/common/pfem_extras.hpp"
15 #include "libmesh/restore_warnings.h"
16 #include "MFEMAuxKernel.h"
17 
21 class MFEMCurlAux : public MFEMAuxKernel
22 {
23 public:
25 
27 
28  virtual ~MFEMCurlAux() = default;
29 
31  virtual void execute() override;
32 
33 protected:
35  const VariableName _source_var_name;
37  const mfem::ParGridFunction & _source_var;
39  const mfem::real_t _scale_factor;
41  mfem::common::ParDiscreteCurlOperator _curl;
42 };
43 
44 #endif
const mfem::real_t _scale_factor
Scalar factor to multiply the result by.
Definition: MFEMCurlAux.h:39
MFEMCurlAux(const InputParameters &parameters)
Definition: MFEMCurlAux.C:30
Class to set an H(div) auxvariable to be the curl of an H(curl) vector variable.
Definition: MFEMCurlAux.h:21
virtual void execute() override
Computes the auxvariable.
Definition: MFEMCurlAux.C:43
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual ~MFEMCurlAux()=default
const mfem::ParGridFunction & _source_var
Reference to source gridfunction.
Definition: MFEMCurlAux.h:37
Class to construct an auxiliary solver used to update an auxvariable.
Definition: MFEMAuxKernel.h:20
static InputParameters validParams()
Definition: MFEMCurlAux.C:18
const VariableName _source_var_name
Name of source MFEMVariable to take the curl of.
Definition: MFEMCurlAux.h:35
mfem::common::ParDiscreteCurlOperator _curl
Curl operator.
Definition: MFEMCurlAux.h:41
const InputParameters & parameters() const
Get the parameters of the object.