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 19 of file HHPFCRFFSplitKernelAction.h.

Constructor & Destructor Documentation

HHPFCRFFSplitKernelAction::HHPFCRFFSplitKernelAction ( const InputParameters &  params)

Definition at line 36 of file HHPFCRFFSplitKernelAction.C.

37  : Action(params),
38  _num_L(getParam<unsigned int>("num_L")),
39  _L_name_base(getParam<std::string>("L_name_base")),
40  _n_name(getParam<VariableName>("n_name"))
41 {
42 }

Member Function Documentation

void HHPFCRFFSplitKernelAction::act ( )
virtual

Reimplemented in PFCRFFKernelAction.

Definition at line 45 of file HHPFCRFFSplitKernelAction.C.

Referenced by PFCRFFKernelAction::act().

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

Member Data Documentation

const std::string HHPFCRFFSplitKernelAction::_L_name_base
protected

Definition at line 28 of file HHPFCRFFSplitKernelAction.h.

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

const VariableName HHPFCRFFSplitKernelAction::_n_name
protected

Definition at line 29 of file HHPFCRFFSplitKernelAction.h.

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

const unsigned int HHPFCRFFSplitKernelAction::_num_L
protected

Definition at line 27 of file HHPFCRFFSplitKernelAction.h.

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


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