www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
PolycrystalElasticDrivingForceAction Class Reference

Action that adds the elastic driving force for each order parameter. More...

#include <PolycrystalElasticDrivingForceAction.h>

Inheritance diagram for PolycrystalElasticDrivingForceAction:
[legend]

Public Member Functions

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

Private Attributes

const unsigned int _op_num
 Number of order parameters used in the model. More...
 
std::string _var_name_base
 Base name for the order parameters. More...
 
std::string _base_name
 
std::string _elasticity_tensor_name
 

Detailed Description

Action that adds the elastic driving force for each order parameter.

Definition at line 24 of file PolycrystalElasticDrivingForceAction.h.

Constructor & Destructor Documentation

◆ PolycrystalElasticDrivingForceAction()

PolycrystalElasticDrivingForceAction::PolycrystalElasticDrivingForceAction ( const InputParameters &  params)

Definition at line 35 of file PolycrystalElasticDrivingForceAction.C.

37  : Action(params),
38  _op_num(getParam<unsigned int>("op_num")),
39  _var_name_base(getParam<std::string>("var_name_base")),
40  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
41  _elasticity_tensor_name(_base_name + "elasticity_tensor")
42 {
43 }
const unsigned int _op_num
Number of order parameters used in the model.
std::string _var_name_base
Base name for the order parameters.

Member Function Documentation

◆ act()

void PolycrystalElasticDrivingForceAction::act ( )
virtual

Definition at line 46 of file PolycrystalElasticDrivingForceAction.C.

47 {
48 #ifdef DEBUG
49  Moose::err << "Inside the PolycrystalElasticDrivingForceAction Object\n";
50  Moose::err << "var name base:" << _var_name_base;
51 #endif
52 
53  for (unsigned int op = 0; op < _op_num; ++op)
54  {
55  // Create variable name
56  std::string var_name = _var_name_base + Moose::stringify(op);
57 
58  // Create Stiffness derivative name
59  MaterialPropertyName D_stiff_name = propertyNameFirst(_elasticity_tensor_name, var_name);
60 
61  // Set name of kernel being created
62  std::string kernel_type = "ACGrGrElasticDrivingForce";
63 
64  // Set the actual parameters for the kernel
65  InputParameters poly_params = _factory.getValidParams(kernel_type);
66  poly_params.set<NonlinearVariableName>("variable") = var_name;
67  poly_params.set<MaterialPropertyName>("D_tensor_name") = D_stiff_name;
68  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
69 
70  std::string kernel_name = "AC_ElasticDrivingForce_" + var_name;
71 
72  // Create kernel
73  _problem->addKernel(kernel_type, kernel_name, poly_params);
74  }
75 }
const unsigned int _op_num
Number of order parameters used in the model.
std::string _var_name_base
Base name for the order parameters.

Member Data Documentation

◆ _base_name

std::string PolycrystalElasticDrivingForceAction::_base_name
private

Definition at line 38 of file PolycrystalElasticDrivingForceAction.h.

◆ _elasticity_tensor_name

std::string PolycrystalElasticDrivingForceAction::_elasticity_tensor_name
private

Definition at line 39 of file PolycrystalElasticDrivingForceAction.h.

Referenced by act().

◆ _op_num

const unsigned int PolycrystalElasticDrivingForceAction::_op_num
private

Number of order parameters used in the model.

Definition at line 34 of file PolycrystalElasticDrivingForceAction.h.

Referenced by act().

◆ _var_name_base

std::string PolycrystalElasticDrivingForceAction::_var_name_base
private

Base name for the order parameters.

Definition at line 37 of file PolycrystalElasticDrivingForceAction.h.

Referenced by act().


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