www.mooseframework.org
CoupledMaterialDerivative.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #pragma once
11 
12 #include "Kernel.h"
13 #include "JvarMapInterface.h"
14 #include "DerivativeMaterialInterface.h"
15 
16 // Forward Declaration
18 
19 template <>
21 
25 class CoupledMaterialDerivative : public DerivativeMaterialInterface<JvarMapKernelInterface<Kernel>>
26 {
27 public:
28  CoupledMaterialDerivative(const InputParameters & parameters);
29  virtual void initialSetup() override;
30 
31 protected:
32  virtual Real computeQpResidual() override;
33  virtual Real computeQpJacobian() override;
34  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
35 
37  std::string _v_name;
38  unsigned int _v_var;
39 
41  const MaterialProperty<Real> & _dFdv;
42 
44  const MaterialProperty<Real> & _d2Fdvdu;
45 
47  const unsigned int _nvar;
48 
50  std::vector<const MaterialProperty<Real> *> _d2Fdvdarg;
51 };
52 
CoupledMaterialDerivative::CoupledMaterialDerivative
CoupledMaterialDerivative(const InputParameters &parameters)
Definition: CoupledMaterialDerivative.C:33
CoupledMaterialDerivative::initialSetup
virtual void initialSetup() override
Definition: CoupledMaterialDerivative.C:51
CoupledMaterialDerivative::_d2Fdvdarg
std::vector< const MaterialProperty< Real > * > _d2Fdvdarg
2nd order material property derivatives w.r.t. v and then all other coupled variables
Definition: CoupledMaterialDerivative.h:50
CoupledMaterialDerivative::_v_name
std::string _v_name
name of the coupled variable the derivative is taken with respect to
Definition: CoupledMaterialDerivative.h:37
CoupledMaterialDerivative::_dFdv
const MaterialProperty< Real > & _dFdv
Material property derivative w.r.t. v.
Definition: CoupledMaterialDerivative.h:41
CoupledMaterialDerivative::_nvar
const unsigned int _nvar
Number of coupled variables.
Definition: CoupledMaterialDerivative.h:47
CoupledMaterialDerivative::computeQpJacobian
virtual Real computeQpJacobian() override
Definition: CoupledMaterialDerivative.C:63
CoupledMaterialDerivative::_v_var
unsigned int _v_var
Definition: CoupledMaterialDerivative.h:38
CoupledMaterialDerivative
This kernel adds the term (dFdv, test), where v is a coupled variable.
Definition: CoupledMaterialDerivative.h:25
CoupledMaterialDerivative::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
Definition: CoupledMaterialDerivative.C:69
CoupledMaterialDerivative::computeQpResidual
virtual Real computeQpResidual() override
Definition: CoupledMaterialDerivative.C:57
CoupledMaterialDerivative::_d2Fdvdu
const MaterialProperty< Real > & _d2Fdvdu
2nd order material property derivative w.r.t. v then u
Definition: CoupledMaterialDerivative.h:44
validParams< CoupledMaterialDerivative >
InputParameters validParams< CoupledMaterialDerivative >()
Definition: CoupledMaterialDerivative.C:16