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

#include <TensorMechanicsActionBase.h>

Inheritance diagram for TensorMechanicsActionBase:
[legend]

Public Member Functions

 TensorMechanicsActionBase (const InputParameters &params)
 

Static Public Member Functions

static MultiMooseEnum outputPropertiesType ()
 

Static Public Attributes

static const std::map< std::string, std::string > _ranktwoaux_table
 table data for output generation More...
 
static const std::vector< char > _component_table = {'x', 'y', 'z'}
 
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _ranktwoscalaraux_table
 

Protected Attributes

const bool _use_ad
 

Detailed Description

Definition at line 20 of file TensorMechanicsActionBase.h.

Constructor & Destructor Documentation

◆ TensorMechanicsActionBase()

TensorMechanicsActionBase::TensorMechanicsActionBase ( const InputParameters &  params)

Definition at line 109 of file TensorMechanicsActionBase.C.

110  : Action(parameters), _use_ad(getParam<bool>("use_automatic_differentiation"))
111 {
112  // check if a container block with common parameters is found
113  auto action = _awh.getActions<CommonTensorMechanicsAction>();
114  if (action.size() == 1)
115  _pars.applyParameters(action[0]->parameters());
116 
117  // append additional_generate_output
118  if (isParamValid("additional_generate_output"))
119  {
120  MultiMooseEnum generate_output = getParam<MultiMooseEnum>("generate_output");
121  MultiMooseEnum additional_generate_output =
122  getParam<MultiMooseEnum>("additional_generate_output");
123  for (auto & output : additional_generate_output)
124  generate_output.push_back(output);
125 
126  _pars.set<MultiMooseEnum>("generate_output") = generate_output;
127  }
128 }
Store common tensor mechanics parameters.

Member Function Documentation

◆ outputPropertiesType()

MultiMooseEnum TensorMechanicsActionBase::outputPropertiesType ( )
static

Definition at line 131 of file TensorMechanicsActionBase.C.

Referenced by validParams< TensorMechanicsAction >(), and validParams< TensorMechanicsActionBase >().

132 {
133  std::string options = "";
134  for (auto & r2a : _ranktwoaux_table)
135  for (unsigned int a = 0; a < 3; ++a)
136  for (unsigned int b = 0; b < 3; ++b)
137  options += (options == "" ? "" : " ") + r2a.first + '_' + _component_table[a] +
138  _component_table[b];
139 
140  for (auto & r2sa : _ranktwoscalaraux_table)
141  for (auto & t : r2sa.second.second)
142  options += " " + r2sa.first + "_" + t;
143 
144  return MultiMooseEnum(options);
145 }
static const std::vector< char > _component_table
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _ranktwoscalaraux_table
static const std::map< std::string, std::string > _ranktwoaux_table
table data for output generation

Member Data Documentation

◆ _component_table

const std::vector< char > TensorMechanicsActionBase::_component_table = {'x', 'y', 'z'}
static

◆ _ranktwoaux_table

const std::map< std::string, std::string > TensorMechanicsActionBase::_ranktwoaux_table
static
Initial value:
= {
{"strain", "total_strain"},
{"stress", "stress"},
{"elastic_strain", "elastic_strain"},
{"plastic_strain", "plastic_strain"},
{"creep_strain", "creep_strain"}}

table data for output generation

Definition at line 29 of file TensorMechanicsActionBase.h.

Referenced by TensorMechanicsAction::actOutputGeneration(), and outputPropertiesType().

◆ _ranktwoscalaraux_table

const std::map< std::string, std::pair< std::string, std::vector< std::string > > > TensorMechanicsActionBase::_ranktwoscalaraux_table
static
Initial value:
= {
{"vonmises", {"VonMisesStress", {"stress"}}},
{"hydrostatic", {"Hydrostatic", {"stress"}}},
{"max_principal", {"MaxPrincipal", {"stress"}}},
{"mid_principal", {"MidPrincipal", {"stress"}}},
{"min_principal", {"MinPrincipal", {"stress"}}},
{"firstinv", {"FirstInvariant", {"stress", "strain"}}},
{"secondinv", {"SecondInvariant", {"stress", "strain"}}},
{"thirdinv", {"ThirdInvariant", {"stress", "strain"}}}}

Definition at line 32 of file TensorMechanicsActionBase.h.

Referenced by TensorMechanicsAction::actOutputGeneration(), and outputPropertiesType().

◆ _use_ad

const bool TensorMechanicsActionBase::_use_ad
protected

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