www.mooseframework.org
DerivativeKernelInterface.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #ifndef DERIVATIVEKERNELINTERFACE_H
8 #define DERIVATIVEKERNELINTERFACE_H
9 
10 #include "DerivativeMaterialInterface.h"
11 
16 template <class T>
17 class DerivativeKernelInterface : public DerivativeMaterialInterface<T>
18 {
19 public:
20  DerivativeKernelInterface(const InputParameters & parameters);
21 
23  static InputParameters validParams();
24 
25 protected:
26  unsigned int _nvar;
27  std::string _F_name;
28 };
29 
30 template <class T>
32  : DerivativeMaterialInterface<T>(parameters),
33  _nvar(this->_coupled_moose_vars.size()),
34  _F_name(this->template getParam<std::string>("f_name"))
35 {
36 }
37 
38 template <class T>
39 InputParameters
41 {
42  InputParameters params = ::validParams<T>();
43  params.addRequiredParam<std::string>(
44  "f_name", "Base name of the free energy function F defined in a DerivativeParsedMaterial");
45  return params;
46 }
47 
48 #endif // DERIVATIVEKERNELINTERFACE_H
DerivativeKernelInterface(const InputParameters &parameters)
Interface class ("Veneer") to provide generator methods for derivative material property names...
static InputParameters validParams()
as partial template specialization is not allowed in C++ we have to implement this as a static method...