https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMVectorQuadratureFunction.C
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
14#include "MFEMProblem.h"
15
17
20{
23 "Declares a vector MFEM coefficient holding precomputed values of a source vector "
24 "coefficient at quadrature points. Values are (re)projected lazily when the coefficient "
25 "is used.");
26 params.addRequiredParam<MFEMVectorCoefficientName>(
27 "vector_coefficient", "Vector coefficient to project onto the quadrature points.");
28 return params;
29}
30
32 : MFEMQuadratureFunctionBase(parameters), _qf(&_qspace)
33{
34 mfem::VectorCoefficient & source = getVectorCoefficient("vector_coefficient");
35 _qf.SetVDim(source.GetVDim());
36 _qf = 0.0;
38 name(), source, _qf, updatePolicy(), name());
39}
40
41#endif
registerMooseObject("MooseApp", MFEMVectorQuadratureFunction)
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
mfem::VectorCoefficient & getVectorCoefficient(const std::string &name)
Retrieve a vector MFEM coefficient using the value of an input parameter.
Definition MFEMObject.C:64
MFEMProblem & getMFEMProblem()
Return the owning MFEM problem.
Definition MFEMObject.h:45
Moose::MFEM::CoefficientManager & getCoefficients()
Method to get the PropertyManager object for storing material properties and converting them to MFEM ...
Base class for MOOSE objects declaring an MFEM coefficient backed by precomputed values of a source c...
static InputParameters validParams()
MFEMQuadratureFunctionCoefficientBase::UpdatePolicy updatePolicy() const
Return the update policy selected by the 'updates' input parameter, to hand to the coefficient (which...
Vector coefficient holding precomputed values of a source vector coefficient at the quadrature points...
Declares a vector MFEM coefficient represented as a precomputed vector of values of a source vector c...
mfem::QuadratureFunction _qf
Storage for the projected values of the source coefficient.
MFEMVectorQuadratureFunction(const InputParameters &parameters)
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
mfem::VectorCoefficient & declareVector(const std::string &name, const std::string &existing_or_literal)
Declare an alias to an existing vector coefficientor or, if it does not exist, try interpreting the n...