www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
HHPFCRFFSplitKernelAction Class Reference

#include <HHPFCRFFSplitKernelAction.h>

Inheritance diagram for HHPFCRFFSplitKernelAction:
[legend]

Public Member Functions

 HHPFCRFFSplitKernelAction (const InputParameters &params)
 
virtual void act ()
 

Protected Attributes

const unsigned int _num_L
 
const std::string _L_name_base
 
const VariableName _n_name
 

Detailed Description

Definition at line 21 of file HHPFCRFFSplitKernelAction.h.

Constructor & Destructor Documentation

◆ HHPFCRFFSplitKernelAction()

HHPFCRFFSplitKernelAction::HHPFCRFFSplitKernelAction ( const InputParameters &  params)

Definition at line 40 of file HHPFCRFFSplitKernelAction.C.

41  : Action(params),
42  _num_L(getParam<unsigned int>("num_L")),
43  _L_name_base(getParam<std::string>("L_name_base")),
44  _n_name(getParam<VariableName>("n_name"))
45 {
46 }

Member Function Documentation

◆ act()

void HHPFCRFFSplitKernelAction::act ( )
virtual

Reimplemented in PFCRFFKernelAction.

Definition at line 49 of file HHPFCRFFSplitKernelAction.C.

Referenced by PFCRFFKernelAction::act().

50 {
51  // Loop over the L_variables
52  for (unsigned int l = 0; l < _num_L; ++l)
53  {
54  // Create L base name
55  std::string L_name = _L_name_base + Moose::stringify(l);
56 
57  // Create real and imaginary L variable names
58  std::string real_name = L_name + "_real";
59  std::string imag_name = L_name + "_imag";
60 
61  //
62  // Create the kernels for the real L variable
63  //
64 
65  // Create the diffusion kernel for L_real_l
66  InputParameters poly_params = _factory.getValidParams("Diffusion");
67  poly_params.set<NonlinearVariableName>("variable") = real_name;
68  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
69  _problem->addKernel("Diffusion", "diff_" + real_name, poly_params);
70 
71  // Create the (alpha^R_m L^R_m) term
72  poly_params = _factory.getValidParams("HHPFCRFF");
73  poly_params.set<NonlinearVariableName>("variable") = real_name;
74  poly_params.set<bool>("positive") = true;
75  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_R_" + Moose::stringify(l);
76  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
77  _problem->addKernel("HHPFCRFF", "HH1_" + real_name, poly_params);
78 
79  // **Create the -(alpha^I_m L^I_m) term
80  if (l > 0)
81  {
82  poly_params = _factory.getValidParams("HHPFCRFF");
83  poly_params.set<NonlinearVariableName>("variable") = real_name;
84  poly_params.set<bool>("positive") = false;
85  poly_params.set<std::vector<VariableName>>("coupled_var").push_back(imag_name);
86  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
87  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_I_" + Moose::stringify(l);
88  _problem->addKernel("HHPFCRFF", "HH2_" + real_name, poly_params);
89  }
90 
91  // **Create the -(A^R_m n) term
92  poly_params = _factory.getValidParams("HHPFCRFF");
93  poly_params.set<NonlinearVariableName>("variable") = real_name;
94  poly_params.set<bool>("positive") = false;
95  poly_params.set<std::vector<VariableName>>("coupled_var").push_back(_n_name);
96  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
97  poly_params.set<MaterialPropertyName>("prop_name") = "A_R_" + Moose::stringify(l);
98  _problem->addKernel("HHPFCRFF", "HH3_" + real_name, poly_params);
99 
100  //
101  // Create the kernels for the imaginary L variable, l > 0
102  //
103  if (l > 0)
104  {
105  // Create the diffusion kernel for L_imag_l
106  InputParameters poly_params = _factory.getValidParams("Diffusion");
107  poly_params.set<NonlinearVariableName>("variable") = imag_name;
108  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
109  _problem->addKernel("Diffusion", "diff_" + imag_name, poly_params);
110 
111  // **Create the (alpha^R_m L^I_m) term
112  poly_params = _factory.getValidParams("HHPFCRFF");
113  poly_params.set<NonlinearVariableName>("variable") = imag_name;
114  poly_params.set<bool>("positive") = true;
115  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
116  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_R_" + Moose::stringify(l);
117  _problem->addKernel("HHPFCRFF", "HH1_" + imag_name, poly_params);
118 
119  // **Create the (alpha^I_m L^R_m) term
120  poly_params = _factory.getValidParams("HHPFCRFF");
121  poly_params.set<NonlinearVariableName>("variable") = imag_name;
122  poly_params.set<bool>("positive") = true;
123  poly_params.set<std::vector<VariableName>>("coupled_var").push_back(real_name);
124  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
125  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_I_" + Moose::stringify(l);
126  _problem->addKernel("HHPFCRFF", "HH2_" + imag_name, poly_params);
127 
128  // **Create the -(A^I_m n) term
129  poly_params = _factory.getValidParams("HHPFCRFF");
130  poly_params.set<NonlinearVariableName>("variable") = imag_name;
131  poly_params.set<bool>("positive") = false;
132  poly_params.set<std::vector<VariableName>>("coupled_var").push_back(_n_name);
133  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
134  poly_params.set<MaterialPropertyName>("prop_name") = "A_I_" + Moose::stringify(l);
135  _problem->addKernel("HHPFCRFF", "HH3_" + imag_name, poly_params);
136  }
137  }
138 }

Member Data Documentation

◆ _L_name_base

const std::string HHPFCRFFSplitKernelAction::_L_name_base
protected

Definition at line 30 of file HHPFCRFFSplitKernelAction.h.

Referenced by act(), and PFCRFFKernelAction::act().

◆ _n_name

const VariableName HHPFCRFFSplitKernelAction::_n_name
protected

Definition at line 31 of file HHPFCRFFSplitKernelAction.h.

Referenced by act(), and PFCRFFKernelAction::act().

◆ _num_L

const unsigned int HHPFCRFFSplitKernelAction::_num_L
protected

Definition at line 29 of file HHPFCRFFSplitKernelAction.h.

Referenced by act(), and PFCRFFKernelAction::act().


The documentation for this class was generated from the following files: