https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMComplexAuxKernel.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 "MFEMExecutedObject.h"
15#include "MFEMContainers.h"
16
21{
22public:
24
26 virtual ~MFEMComplexAuxKernel() = default;
27
29 virtual void update() {}
30
31 virtual std::optional<std::string> suppliedVariableName() const override;
32
34 void complexAdd(mfem::ParComplexGridFunction & a,
35 const mfem::ParComplexGridFunction & b,
36 const std::complex<mfem::real_t> scale = {1.0, 0.0});
37
39 void complexScale(mfem::ParComplexGridFunction & a,
40 const std::complex<mfem::real_t> scale = {1.0, 0.0});
41
42protected:
44 const AuxVariableName _result_var_name;
45
47 mfem::ParComplexGridFunction & _result_var;
48
50 long _sequence{0};
51};
52
53#endif
Real scale
Definition MortarUtils.C:62
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 complex auxvariable.
virtual std::optional< std::string > suppliedVariableName() const override
Return the variable name supplied by this object, or std::nullopt if none.
virtual ~MFEMComplexAuxKernel()=default
void complexAdd(mfem::ParComplexGridFunction &a, const mfem::ParComplexGridFunction &b, const std::complex< mfem::real_t > scale={1.0, 0.0})
Method to add a scaled complex variable to another complex variable.
virtual void update()
Method called to update any owned objects upon an FE space update.
const AuxVariableName _result_var_name
Name of complex auxvariable to store the result of the auxkernel in.
mfem::ParComplexGridFunction & _result_var
Reference to result complex gridfunction.
long _sequence
Counter to keep track of FE space updates.
void complexScale(mfem::ParComplexGridFunction &a, const std::complex< mfem::real_t > scale={1.0, 0.0})
Method to scale a complex variable by a complex constant.
static InputParameters validParams()
Base class for MFEM objects that participate in execution ordering but are not UserObjects.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131