https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMParsedCoefficient.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 "FunctionParserUtils.h"
15
20class MFEMParsedCoefficient : public mfem::Coefficient
21{
22private:
23 const std::vector<std::reference_wrapper<mfem::Coefficient>> & _coefficients;
25 mfem::Array<mfem::real_t> _vals;
26 mfem::Vector _transip;
27
28public:
29 MFEMParsedCoefficient(const unsigned & arity,
30 const std::vector<std::reference_wrapper<mfem::Coefficient>> & coefs,
32
33 mfem::real_t Eval(mfem::ElementTransformation & T, const mfem::IntegrationPoint & ip) override;
34};
35
36#endif
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
Scalar coefficient that, given a set of scalar (possibly, but not necessarily, gridfunction) coeffici...
const FunctionParserUtils< false >::SymFunctionPtr & _sym_function
const std::vector< std::reference_wrapper< mfem::Coefficient > > & _coefficients
mfem::Array< mfem::real_t > _vals
mfem::real_t Eval(mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override