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 22 of file PolycrystalElasticDrivingForceAction.h.

Constructor & Destructor Documentation

PolycrystalElasticDrivingForceAction::PolycrystalElasticDrivingForceAction ( const InputParameters &  params)

Definition at line 31 of file PolycrystalElasticDrivingForceAction.C.

33  : Action(params),
34  _op_num(getParam<unsigned int>("op_num")),
35  _var_name_base(getParam<std::string>("var_name_base")),
36  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
37  _elasticity_tensor_name(_base_name + "elasticity_tensor")
38 {
39 }
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

void PolycrystalElasticDrivingForceAction::act ( )
virtual

Definition at line 42 of file PolycrystalElasticDrivingForceAction.C.

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

std::string PolycrystalElasticDrivingForceAction::_base_name
private

Definition at line 36 of file PolycrystalElasticDrivingForceAction.h.

std::string PolycrystalElasticDrivingForceAction::_elasticity_tensor_name
private

Definition at line 37 of file PolycrystalElasticDrivingForceAction.h.

Referenced by act().

const unsigned int PolycrystalElasticDrivingForceAction::_op_num
private

Number of order parameters used in the model.

Definition at line 32 of file PolycrystalElasticDrivingForceAction.h.

Referenced by act().

std::string PolycrystalElasticDrivingForceAction::_var_name_base
private

Base name for the order parameters.

Definition at line 35 of file PolycrystalElasticDrivingForceAction.h.

Referenced by act().


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