https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CoupledSwitchingTimeDerivative.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#pragma once
11
14#include "JvarMapInterface.h"
16
17// Forward Declaration
18
30template <bool is_ad>
32 typename std::conditional<is_ad, ADCoupledTimeDerivative, CoupledTimeDerivative>::type;
33
34template <bool is_ad>
37 JvarMapKernelInterface<CoupledSwitchingTimeDerivativeBase<is_ad>>>
38{
39public:
41
43 virtual void initialSetup() override;
44
45protected:
48 const VariableName _v_name;
49
51 std::vector<MaterialPropertyName> _Fj_names;
52
54 const unsigned int _num_j;
55
57 std::vector<const GenericMaterialProperty<Real, is_ad> *> _prop_Fj;
58
60 std::vector<MaterialPropertyName> _hj_names;
61
63 std::vector<const GenericMaterialProperty<Real, is_ad> *> _prop_dhjdetai;
64
65 using CoupledSwitchingTimeDerivativeBase<is_ad>::_qp;
66};
67
69{
70public:
72 virtual void initialSetup() override;
73
74protected:
75 virtual Real computeQpResidual() override;
76 virtual Real computeQpJacobian() override;
77 virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
79 std::vector<const MaterialProperty<Real> *> _prop_dFjdv;
80
82 std::vector<std::vector<const MaterialProperty<Real> *>> _prop_dFjdarg;
83
85 std::vector<const MaterialProperty<Real> *> _prop_d2hjdetai2;
86
88 std::vector<std::vector<const MaterialProperty<Real> *>> _prop_d2hjdetaidarg;
89};
90
DualNumber< Real, DNDerivativeType, true > ADReal
typename std::conditional< is_ad, ADCoupledTimeDerivative, CoupledTimeDerivative >::type CoupledSwitchingTimeDerivativeBase
This kernel adds a contribution where are the phases, are the switching functions,...
const VariableName _v_name
name of order parameter that derivatives are taken wrt (needed to retrieve the derivative material pr...
std::vector< const GenericMaterialProperty< Real, is_ad > * > _prop_Fj
Values of the functions for each phase .
const unsigned int _num_j
Number of phases.
std::vector< MaterialPropertyName > _hj_names
switching function names
std::vector< const GenericMaterialProperty< Real, is_ad > * > _prop_dhjdetai
Derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< MaterialPropertyName > _Fj_names
Names of functions for each phase .
std::vector< const MaterialProperty< Real > * > _prop_dFjdv
Derivatives of the functions wrt the nonlinear variable for this kernel.
std::vector< const MaterialProperty< Real > * > _prop_d2hjdetai2
Second derivatives of the switching functions wrt the order parameter for this kernel.
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_dFjdarg
Derivatives of the functions (needed for off-diagonal Jacobians)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2hjdetaidarg
Second derivatives of the switching functions (needed for off-diagonal Jacobians)