www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | 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 Types

typedef DataFileName DataFileParameterType
 
typedef std::string SymbolName
 

Public Member Functions

 PolycrystalElasticDrivingForceAction (const InputParameters &params)
 
virtual void act ()
 
void timedAct ()
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 
MooseObjectName uniqueActionName () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
void appendTask (const std::string &task)
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
PerfGraphperfGraph ()
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &name, const std::string *param=nullptr) const
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

std::string _registered_identifier
 
std::string _specific_task_name
 
std::set< std::string > _all_tasks
 
ActionWarehouse_awh
 
const std::string & _current_task
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 
PerfID _act_timer
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 

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

Constructor & Destructor Documentation

◆ PolycrystalElasticDrivingForceAction()

PolycrystalElasticDrivingForceAction::PolycrystalElasticDrivingForceAction ( const InputParameters params)

Definition at line 33 of file PolycrystalElasticDrivingForceAction.C.

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

Member Function Documentation

◆ act()

void PolycrystalElasticDrivingForceAction::act ( )
virtual

Implements Action.

Definition at line 44 of file PolycrystalElasticDrivingForceAction.C.

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

◆ validParams()

InputParameters PolycrystalElasticDrivingForceAction::validParams ( )
static

Definition at line 18 of file PolycrystalElasticDrivingForceAction.C.

19 {
21  params.addClassDescription("Action that adds the elastic driving force for each order parameter");
22  params.addRequiredParam<unsigned int>("op_num", "specifies the number of grains to create");
23  params.addRequiredParam<std::string>("var_name_base", "specifies the base name of the variables");
24  params.addParam<bool>(
25  "use_displaced_mesh", false, "Whether to use displaced mesh in the kernels");
26  params.addParam<std::string>("base_name",
27  "Optional parameter that allows the user to define "
28  "multiple mechanics material systems on the same "
29  "block, i.e. for multiple phases");
30  return params;
31 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _base_name

const std::string PolycrystalElasticDrivingForceAction::_base_name
private

Definition at line 34 of file PolycrystalElasticDrivingForceAction.h.

◆ _elasticity_tensor_name

std::string PolycrystalElasticDrivingForceAction::_elasticity_tensor_name
private

Definition at line 35 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 30 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 33 of file PolycrystalElasticDrivingForceAction.h.

Referenced by act().


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