https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ACSwitching.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
12#include "ACBulk.h"
13#include "ADAllenCahnBase.h"
14
23template <bool is_ad>
24using ACSwitchingBase = typename std::conditional<is_ad, ADAllenCahnBase<Real>, ACBulk<Real>>::type;
25
26template <bool is_ad>
27class ACSwitchingTempl : public ACSwitchingBase<is_ad>
28{
29public:
31
32 ACSwitchingTempl(const InputParameters & parameters);
33 virtual void initialSetup() override;
34
35protected:
37 VariableName _etai_name;
38
40 std::vector<MaterialPropertyName> _Fj_names;
41 unsigned int _num_j;
42
44 std::vector<const GenericMaterialProperty<Real, is_ad> *> _prop_Fj;
45
47 std::vector<MaterialPropertyName> _hj_names;
48
50 std::vector<const GenericMaterialProperty<Real, is_ad> *> _prop_dhjdetai;
51
52 using ACSwitchingBase<is_ad>::_qp;
53 using ACSwitchingBase<is_ad>::_var;
54 using ACSwitchingBase<is_ad>::_test;
55};
56
57class ACSwitching : public ACSwitchingTempl<false>
58{
59public:
60 ACSwitching(const InputParameters & parameters);
61
62 virtual void initialSetup() override;
63
64protected:
65 virtual Real computeDFDOP(PFFunctionType type) override;
66 virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
67
69 std::vector<std::vector<const MaterialProperty<Real> *>> _prop_dFjdarg;
70
72 std::vector<const MaterialProperty<Real> *> _prop_d2hjdetai2;
73
75 std::vector<std::vector<const MaterialProperty<Real> *>> _prop_d2hjdetaidarg;
76};
77
78class ADACSwitching : public ACSwitchingTempl<true>
79{
80public:
81 using ACSwitchingTempl<true>::ACSwitchingTempl;
82
83protected:
84 virtual ADReal computeDFDOP() override;
85};
DualNumber< Real, DNDerivativeType, true > ADReal
InputParameters validParams()
This is the Allen-Cahn equation base class that implements the bulk or local energy term of the equat...
Definition ACBulk.h:25
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real