https://mooseframework.inl.gov
MFEMDotProductAux.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 #pragma once
12 
13 #include "MFEMAuxKernel.h"
14 #include "mfem.hpp"
15 
24 {
25 public:
27 
29  ~MFEMDotProductAux() override = default;
30 
31  void execute() override;
32 
33 protected:
35  const VariableName _u_var_name;
36  const VariableName _v_var_name;
37 
39  const mfem::ParGridFunction & _u_var;
40  const mfem::ParGridFunction & _v_var;
41  const mfem::real_t _scale_factor;
42 
44  mfem::VectorGridFunctionCoefficient _u_coef;
45  mfem::VectorGridFunctionCoefficient _v_coef;
46  mfem::InnerProductCoefficient _dot_uv;
47  mfem::ConstantCoefficient _scale_c;
48 
50  mfem::ProductCoefficient _final_coef;
51 };
52 
53 #endif // MOOSE_MFEM_ENABLED
const mfem::ParGridFunction & _u_var
References to the vector ParGridFunctions.
const mfem::ParGridFunction & _v_var
mfem::VectorGridFunctionCoefficient _u_coef
Coefficient wrappers.
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
const VariableName _v_var_name
mfem::VectorGridFunctionCoefficient _v_coef
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
void execute() override
Execute method.
const mfem::real_t _scale_factor
const VariableName _u_var_name
Names of vector sources.
~MFEMDotProductAux() override=default
mfem::InnerProductCoefficient _dot_uv
Class to construct an auxiliary solver used to update an auxvariable.
Definition: MFEMAuxKernel.h:20
MFEMDotProductAux(const InputParameters &parameters)
mfem::ProductCoefficient _final_coef
Final coefficient that applies the scale factor to the inner product.
mfem::ConstantCoefficient _scale_c
static InputParameters validParams()
Project s(x) * (U .