https://mooseframework.inl.gov
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 
20 class MFEMParsedCoefficient : public mfem::Coefficient
21 {
22 private:
23  const std::vector<std::reference_wrapper<mfem::Coefficient>> & _coefficients;
25  mfem::Array<mfem::real_t> _vals;
26  mfem::Vector _transip;
27 
28 public:
29  MFEMParsedCoefficient(const unsigned & arity,
30  const std::vector<std::reference_wrapper<mfem::Coefficient>> & coefs,
31  const FunctionParserUtils<false>::SymFunctionPtr & sym_function);
32 
33  mfem::real_t Eval(mfem::ElementTransformation & T, const mfem::IntegrationPoint & ip) override;
34 };
35 
36 #endif
MFEMParsedCoefficient(const unsigned &arity, const std::vector< std::reference_wrapper< mfem::Coefficient >> &coefs, const FunctionParserUtils< false >::SymFunctionPtr &sym_function)
mfem::real_t Eval(mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override
const FunctionParserUtils< false >::SymFunctionPtr & _sym_function
Scalar coefficient that, given a set of scalar (possibly, but not necessarily, gridfunction) coeffici...
mfem::Array< mfem::real_t > _vals
const std::vector< std::reference_wrapper< mfem::Coefficient > > & _coefficients