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

#include <TensorMechanicsAction.h>

Inheritance diagram for TensorMechanicsAction:
[legend]

Public Member Functions

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

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 Types

enum  Strain { Strain::Small, Strain::Finite }
 strain formulation More...
 
enum  StrainAndIncrement { StrainAndIncrement::SmallTotal, StrainAndIncrement::FiniteTotal, StrainAndIncrement::SmallIncremental, StrainAndIncrement::FiniteIncremental }
 strain formulation More...
 
enum  PlanarFormulation { PlanarFormulation::None, PlanarFormulation::PlaneStrain, PlanarFormulation::GeneralizedPlaneStrain }
 use an out of plane stress/strain formulation More...
 
enum  OutOfPlaneDirection { OutOfPlaneDirection::x, OutOfPlaneDirection::y, OutOfPlaneDirection::z }
 

Protected Member Functions

void actSubdomainChecks ()
 
void actOutputGeneration ()
 
void actGatherActionParameters ()
 
virtual std::string getKernelType ()
 
virtual InputParameters getKernelParameters (std::string type)
 

Protected Attributes

Moose::CoordinateSystemType _coord_system
 
std::vector< SubdomainName > _subdomain_names
 if this vector is not empty the variables, kernels and materials are restricted to these subdomains More...
 
std::set< SubdomainID > _subdomain_ids
 set generated from the passed in vector of subdomain names More...
 
std::set< SubdomainID > _subdomain_id_union
 set generated from the combined block restrictions of all TensorMechanics/Master action blocks More...
 
enum TensorMechanicsAction::Strain _strain
 
enum TensorMechanicsAction::StrainAndIncrement _strain_and_increment
 
enum TensorMechanicsAction::PlanarFormulation _planar_formulation
 
const OutOfPlaneDirection _out_of_plane_direction
 
bool _use_displaced_mesh
 use displaced mesh (true unless _strain is SMALL) More...
 
std::vector< std::string > _generate_output
 output aux variables to generate for sclar stress/strain tensor quantities More...
 
const bool _use_ad
 
std::vector< VariableName > _displacements
 displacement variables More...
 
unsigned int _ndisp
 
std::vector< VariableName > _coupled_displacements
 
std::vector< AuxVariableName > _save_in
 residual debugging More...
 
std::vector< AuxVariableName > _diag_save_in
 

Detailed Description

Definition at line 20 of file TensorMechanicsAction.h.

Member Enumeration Documentation

◆ OutOfPlaneDirection

Enumerator

Definition at line 82 of file TensorMechanicsAction.h.

83  {
84  x,
85  y,
86  z
87  };

◆ PlanarFormulation

use an out of plane stress/strain formulation

Enumerator
None 
PlaneStrain 
GeneralizedPlaneStrain 

Definition at line 74 of file TensorMechanicsAction.h.

75  {
76  None,
77  PlaneStrain,
79  /* PlaneStress */
enum TensorMechanicsAction::PlanarFormulation _planar_formulation

◆ Strain

enum TensorMechanicsAction::Strain
strongprotected

strain formulation

Enumerator
Small 
Finite 

Definition at line 58 of file TensorMechanicsAction.h.

59  {
60  Small,
61  Finite
62  } _strain;
enum TensorMechanicsAction::Strain _strain

◆ StrainAndIncrement

strain formulation

Enumerator
SmallTotal 
FiniteTotal 
SmallIncremental 
FiniteIncremental 

Definition at line 65 of file TensorMechanicsAction.h.

66  {
67  SmallTotal,
68  FiniteTotal,
69  SmallIncremental,
70  FiniteIncremental
enum TensorMechanicsAction::StrainAndIncrement _strain_and_increment

Constructor & Destructor Documentation

◆ TensorMechanicsAction()

TensorMechanicsAction::TensorMechanicsAction ( const InputParameters &  params)

Definition at line 63 of file TensorMechanicsAction.C.

64  : TensorMechanicsActionBase(params),
65  _displacements(getParam<std::vector<VariableName>>("displacements")),
66  _ndisp(_displacements.size()),
68  _save_in(getParam<std::vector<AuxVariableName>>("save_in")),
69  _diag_save_in(getParam<std::vector<AuxVariableName>>("diag_save_in")),
70  _subdomain_names(getParam<std::vector<SubdomainName>>("block")),
72  _strain(getParam<MooseEnum>("strain").getEnum<Strain>()),
73  _planar_formulation(getParam<MooseEnum>("planar_formulation").getEnum<PlanarFormulation>()),
75  getParam<MooseEnum>("out_of_plane_direction").getEnum<OutOfPlaneDirection>())
76 {
77  // determine if incremental strains are to be used
78  if (isParamValid("incremental"))
79  {
80  const bool incremental = getParam<bool>("incremental");
81  if (!incremental && _strain == Strain::Small)
83  else if (!incremental && _strain == Strain::Finite)
85  else if (incremental && _strain == Strain::Small)
87  else if (incremental && _strain == Strain::Finite)
89  else
90  mooseError("Internal error");
91  }
92  else
93  {
94  if (_strain == Strain::Small)
96  else if (_strain == Strain::Finite)
98  else
99  mooseError("Internal error");
100  }
101 
102  // determine if displaced mesh is to be used
104  if (params.isParamSetByUser("use_displaced_mesh"))
105  {
106  bool use_displaced_mesh_param = getParam<bool>("use_displaced_mesh");
107  if (use_displaced_mesh_param != _use_displaced_mesh && params.isParamSetByUser("strain"))
108  mooseError("Wrong combination of use displaced mesh and strain model");
109  _use_displaced_mesh = use_displaced_mesh_param;
110  }
111 
112  // convert vector of VariableName to vector of VariableName
113  for (unsigned int i = 0; i < _ndisp; ++i)
115 
116  if (_save_in.size() != 0 && _save_in.size() != _ndisp)
117  mooseError("Number of save_in variables should equal to the number of displacement variables ",
118  _ndisp);
119 
120  if (_diag_save_in.size() != 0 && _diag_save_in.size() != _ndisp)
121  mooseError(
122  "Number of diag_save_in variables should equal to the number of displacement variables ",
123  _ndisp);
124 
125  // plane strain consistency check
127  {
129  mooseError(
130  "Must specify two displacements for plane strain when the out of plane direction is z");
132  mooseError("Must specify three displacements for plane strain when the out of plane "
133  "direction is x or y");
134  }
135 
136  // convert output variable names to lower case
137  for (const auto & out : getParam<MultiMooseEnum>("generate_output"))
138  {
139  std::string lower(out);
140  std::transform(lower.begin(), lower.end(), lower.begin(), ::tolower);
141  _generate_output.push_back(lower);
142  }
143 
144  // Error if volumetric locking correction is true for 1D problems
145  if (_ndisp == 1 && getParam<bool>("volumetric_locking_correction"))
146  mooseError("Volumetric locking correction should be set to false for 1D problems.");
147 }
enum TensorMechanicsAction::Strain _strain
std::set< SubdomainID > _subdomain_ids
set generated from the passed in vector of subdomain names
std::vector< VariableName > _coupled_displacements
enum TensorMechanicsAction::StrainAndIncrement _strain_and_increment
const OutOfPlaneDirection _out_of_plane_direction
std::vector< std::string > _generate_output
output aux variables to generate for sclar stress/strain tensor quantities
std::vector< VariableName > _displacements
displacement variables
std::vector< AuxVariableName > _save_in
residual debugging
std::vector< AuxVariableName > _diag_save_in
bool _use_displaced_mesh
use displaced mesh (true unless _strain is SMALL)
std::vector< SubdomainName > _subdomain_names
if this vector is not empty the variables, kernels and materials are restricted to these subdomains ...
enum TensorMechanicsAction::PlanarFormulation _planar_formulation
TensorMechanicsActionBase(const InputParameters &params)

Member Function Documentation

◆ act()

void TensorMechanicsAction::act ( )
virtual

Reimplemented in LegacyTensorMechanicsAction, and PoroMechanicsAction.

Definition at line 150 of file TensorMechanicsAction.C.

Referenced by LegacyTensorMechanicsAction::act(), and PoroMechanicsAction::act().

151 {
152  std::string ad_prepend = "";
153  std::string ad_append = "";
154  if (_use_ad)
155  {
156  ad_prepend = "AD";
157  ad_append = "<RESIDUAL>";
158  }
159 
160  //
161  // Consistency check for the coordinate system
162  //
164 
165  //
166  // Gather info from all other TensorMechanicsAction
167  //
169 
170  //
171  // Deal with the optional AuxVariable based tensor quantity output
172  //
174 
175  //
176  // Meta action which optionally spawns other actions
177  //
178  if (_current_task == "meta_action")
179  {
181  {
182  if (_use_ad)
183  paramError("use_ad", "AD not setup for use with PlaneStrain");
184  // Set the action parameters
185  const std::string type = "GeneralizedPlaneStrainAction";
186  auto action_params = _action_factory.getValidParams(type);
187  action_params.set<bool>("_built_by_moose") = true;
188  action_params.set<std::string>("registered_identifier") = "(AutoBuilt)";
189  action_params.applyParameters(parameters(), {"use_displaced_mesh"});
190  action_params.set<bool>("use_displaced_mesh") = _use_displaced_mesh;
191  if (isParamValid("pressure_factor"))
192  action_params.set<Real>("factor") = getParam<Real>("pressure_factor");
193  // Create and add the action to the warehouse
194  auto action = MooseSharedNamespace::static_pointer_cast<MooseObjectAction>(
195  _action_factory.create(type, name() + "_gps", action_params));
196  _awh.addActionBlock(action);
197  }
198  }
199 
200  //
201  // Add variables (optional)
202  //
203  else if (_current_task == "add_variable" && getParam<bool>("add_variables"))
204  {
205  // determine necessary order
206  const bool second = _problem->mesh().hasSecondOrderElements();
207 
208  // Loop through the displacement variables
209  for (const auto & disp : _displacements)
210  {
211  // Create displacement variables
212  _problem->addVariable(disp,
213  FEType(Utility::string_to_enum<Order>(second ? "SECOND" : "FIRST"),
214  Utility::string_to_enum<FEFamily>("LAGRANGE")),
215  1.0,
216  _subdomain_id_union.empty() ? nullptr : &_subdomain_id_union);
217  }
218  }
219 
220  //
221  // Add Strain Materials
222  //
223  else if (_current_task == "add_material")
224  {
225  std::string type;
226 
227  //
228  // no plane strain
229  //
231  {
232  std::map<std::pair<Moose::CoordinateSystemType, StrainAndIncrement>, std::string> type_map = {
233  {{Moose::COORD_XYZ, StrainAndIncrement::SmallTotal}, "ComputeSmallStrain"},
234  {{Moose::COORD_XYZ, StrainAndIncrement::SmallIncremental},
235  "ComputeIncrementalSmallStrain"},
236  {{Moose::COORD_XYZ, StrainAndIncrement::FiniteIncremental}, "ComputeFiniteStrain"},
237  {{Moose::COORD_RZ, StrainAndIncrement::SmallTotal}, "ComputeAxisymmetricRZSmallStrain"},
238  {{Moose::COORD_RZ, StrainAndIncrement::SmallIncremental},
239  "ComputeAxisymmetricRZIncrementalStrain"},
240  {{Moose::COORD_RZ, StrainAndIncrement::FiniteIncremental},
241  "ComputeAxisymmetricRZFiniteStrain"},
242  {{Moose::COORD_RSPHERICAL, StrainAndIncrement::SmallTotal},
243  "ComputeRSphericalSmallStrain"},
244  {{Moose::COORD_RSPHERICAL, StrainAndIncrement::SmallIncremental},
245  "ComputeRSphericalIncrementalStrain"},
246  {{Moose::COORD_RSPHERICAL, StrainAndIncrement::FiniteIncremental},
247  "ComputeRSphericalFiniteStrain"}};
248 
249  auto type_it = type_map.find(std::make_pair(_coord_system, _strain_and_increment));
250  if (type_it != type_map.end())
251  type = type_it->second;
252  else
253  mooseError("Unsupported strain formulation");
254  }
257  {
258  if (_use_ad)
259  paramError("use_ad", "AD not setup for use with PlaneStrain");
260 
261  std::map<StrainAndIncrement, std::string> type_map = {
262  {StrainAndIncrement::SmallTotal, "ComputePlaneSmallStrain"},
263  {StrainAndIncrement::SmallIncremental, "ComputePlaneIncrementalStrain"},
264  {StrainAndIncrement::FiniteIncremental, "ComputePlaneFiniteStrain"}};
265 
266  // choose kernel type based on coordinate system
267  auto type_it = type_map.find(_strain_and_increment);
268  if (type_it != type_map.end())
269  type = type_it->second;
270  else
271  mooseError("Unsupported coordinate system for plane strain.");
272  }
273  else
274  mooseError("Unsupported planar formulation");
275 
276  // set material parameters
277  auto params = _factory.getValidParams(ad_prepend + type + ad_append);
278  params.applyParameters(parameters(),
279  {"displacements", "use_displaced_mesh", "scalar_out_of_plane_strain"});
280 
281  if (isParamValid("strain_base_name"))
282  params.set<std::string>("base_name") = getParam<std::string>("strain_base_name");
283 
284  params.set<std::vector<VariableName>>("displacements") = _coupled_displacements;
285  params.set<bool>("use_displaced_mesh") = false;
286 
287  if (isParamValid("scalar_out_of_plane_strain"))
288  params.set<std::vector<VariableName>>("scalar_out_of_plane_strain") = {
289  getParam<VariableName>("scalar_out_of_plane_strain")};
290 
291  if (_use_ad)
292  {
293  _problem->addADResidualMaterial(
294  ad_prepend + type + "<RESIDUAL>", name() + "_strain" + "_residual", params);
295  _problem->addADJacobianMaterial(
296  ad_prepend + type + "<JACOBIAN>", name() + "_strain" + "_jacobian", params);
297  _problem->haveADObjects(true);
298  }
299  else
300  _problem->addMaterial(type, name() + "_strain", params);
301  }
302 
303  //
304  // Add Stress Divergence Kernels
305  //
306  else if (_current_task == "add_kernel")
307  {
308  auto tensor_kernel_type = getKernelType();
309  auto params = getKernelParameters(ad_prepend + tensor_kernel_type + ad_append);
310 
311  for (unsigned int i = 0; i < _ndisp; ++i)
312  {
313  std::string kernel_name = "TM_" + name() + Moose::stringify(i);
314 
315  // Set appropriate components for kernels, including in the cases where a planar model is
316  // running in planes other than the x-y plane (defined by _out_of_plane_strain_direction).
318  continue;
319  else if (_out_of_plane_direction == OutOfPlaneDirection::y && i == 1)
320  continue;
321 
322  params.set<unsigned int>("component") = i;
323 
324  params.set<NonlinearVariableName>("variable") = _displacements[i];
325 
326  if (_save_in.size() == _ndisp)
327  params.set<std::vector<AuxVariableName>>("save_in") = {_save_in[i]};
328  if (_diag_save_in.size() == _ndisp)
329  params.set<std::vector<AuxVariableName>>("diag_save_in") = {_diag_save_in[i]};
330 
331  if (_use_ad)
332  {
333  _problem->addKernel(
334  ad_prepend + tensor_kernel_type + "<RESIDUAL>", kernel_name + "_residual", params);
335  _problem->addKernel(
336  ad_prepend + tensor_kernel_type + "<JACOBIAN>", kernel_name + "_jacobian", params);
337  _problem->haveADObjects(true);
338  }
339  else
340  _problem->addKernel(tensor_kernel_type, kernel_name, params);
341  }
342  }
343 }
virtual std::string getKernelType()
std::vector< VariableName > _coupled_displacements
virtual InputParameters getKernelParameters(std::string type)
enum TensorMechanicsAction::StrainAndIncrement _strain_and_increment
const OutOfPlaneDirection _out_of_plane_direction
std::set< SubdomainID > _subdomain_id_union
set generated from the combined block restrictions of all TensorMechanics/Master action blocks ...
const std::string name
Definition: Setup.h:22
std::vector< VariableName > _displacements
displacement variables
std::vector< AuxVariableName > _save_in
residual debugging
std::vector< AuxVariableName > _diag_save_in
bool _use_displaced_mesh
use displaced mesh (true unless _strain is SMALL)
enum TensorMechanicsAction::PlanarFormulation _planar_formulation
Moose::CoordinateSystemType _coord_system

◆ actGatherActionParameters()

void TensorMechanicsAction::actGatherActionParameters ( )
protected

Definition at line 453 of file TensorMechanicsAction.C.

Referenced by act().

454 {
455  //
456  // Gather info about all other master actions when we add variables
457  //
458  if (_current_task == "validate_coordinate_systems" && getParam<bool>("add_variables"))
459  {
460  auto actions = _awh.getActions<TensorMechanicsAction>();
461  for (const auto & action : actions)
462  {
463  const auto size_before = _subdomain_id_union.size();
464  const auto added_size = action->_subdomain_ids.size();
465  _subdomain_id_union.insert(action->_subdomain_ids.begin(), action->_subdomain_ids.end());
466  const auto size_after = _subdomain_id_union.size();
467 
468  if (size_after != size_before + added_size)
469  mooseError("The block restrictions in the TensorMechanics/Master actions must be "
470  "non-overlapping.");
471 
472  if (added_size == 0 && actions.size() > 1)
473  mooseError("No TensorMechanics/Master action can be block unrestricted if more than one "
474  "TensorMechanics/Master action is specified.");
475  }
476  }
477 }
std::set< SubdomainID > _subdomain_id_union
set generated from the combined block restrictions of all TensorMechanics/Master action blocks ...

◆ actOutputGeneration()

void TensorMechanicsAction::actOutputGeneration ( )
protected

Definition at line 379 of file TensorMechanicsAction.C.

Referenced by act().

380 {
381  //
382  // Add variables (optional)
383  //
384  if (_current_task == "add_aux_variable")
385  {
386  // Loop through output aux variables
387  for (auto out : _generate_output)
388  {
389  // Create output helper aux variables
390  _problem->addAuxVariable(out,
391  FEType(Utility::string_to_enum<Order>("CONSTANT"),
392  Utility::string_to_enum<FEFamily>("MONOMIAL")),
393  _subdomain_id_union.empty() ? nullptr : &_subdomain_id_union);
394  }
395  }
396 
397  //
398  // Add output AuxKernels
399  //
400  else if (_current_task == "add_aux_kernel")
401  {
402  // Loop through output aux variables
403  for (auto out : _generate_output)
404  {
405  std::string type = "";
406  InputParameters params = emptyInputParameters();
407 
408  // RankTwoAux
409  for (const auto & r2a : _ranktwoaux_table)
410  for (unsigned int a = 0; a < 3; ++a)
411  for (unsigned int b = 0; b < 3; ++b)
412  if (r2a.first + '_' + _component_table[a] + _component_table[b] == out)
413  {
414  type = "RankTwoAux";
415  params = _factory.getValidParams(type);
416  params.set<MaterialPropertyName>("rank_two_tensor") = r2a.second;
417  params.set<unsigned int>("index_i") = a;
418  params.set<unsigned int>("index_j") = b;
419  }
420 
421  // RankTwoScalarAux
422  for (const auto & r2sa : _ranktwoscalaraux_table)
423  for (const auto & t : r2sa.second.second)
424  if (r2sa.first + '_' + t == out)
425  {
426  const auto r2a = _ranktwoaux_table.find(t);
427  if (r2a != _ranktwoaux_table.end())
428  {
429  type = "RankTwoScalarAux";
430  params = _factory.getValidParams(type);
431  params.set<MaterialPropertyName>("rank_two_tensor") = r2a->second;
432  params.set<MooseEnum>("scalar_type") = r2sa.second.first;
433  }
434  else
435  mooseError("Internal error. The permitted tensor shortcuts in "
436  "'_ranktwoscalaraux_table' must be keys in the '_ranktwoaux_table'.");
437  }
438 
439  if (type != "")
440  {
441  params.applyParameters(parameters());
442  params.set<AuxVariableName>("variable") = out;
443  params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
444  _problem->addAuxKernel(type, out + '_' + name(), params);
445  }
446  else
447  mooseError("Unable to add output AuxKernel");
448  }
449  }
450 }
static const std::vector< char > _component_table
static const std::map< std::string, std::pair< std::string, std::vector< std::string > > > _ranktwoscalaraux_table
std::set< SubdomainID > _subdomain_id_union
set generated from the combined block restrictions of all TensorMechanics/Master action blocks ...
const std::string name
Definition: Setup.h:22
std::vector< std::string > _generate_output
output aux variables to generate for sclar stress/strain tensor quantities
static const std::map< std::string, std::string > _ranktwoaux_table
table data for output generation

◆ actSubdomainChecks()

void TensorMechanicsAction::actSubdomainChecks ( )
protected

Definition at line 346 of file TensorMechanicsAction.C.

Referenced by act().

347 {
348  //
349  // Do the coordinate system check only once the problem is created
350  //
351  if (_current_task == "setup_mesh_complete")
352  {
353  // get subdomain IDs
354  for (auto & name : _subdomain_names)
355  _subdomain_ids.insert(_mesh->getSubdomainID(name));
356  }
357 
358  if (_current_task == "validate_coordinate_systems")
359  {
360  // use either block restriction list or list of all subdomains in the mesh
361  const auto & check_subdomains =
362  _subdomain_ids.empty() ? _problem->mesh().meshSubdomains() : _subdomain_ids;
363  if (check_subdomains.empty())
364  mooseError("No subdomains found");
365 
366  // make sure all subdomains are using the same coordinate system
367  _coord_system = _problem->getCoordSystem(*check_subdomains.begin());
368  for (auto subdomain : check_subdomains)
369  if (_problem->getCoordSystem(subdomain) != _coord_system)
370  mooseError("The TensorMechanics action requires all subdomains to have the same coordinate "
371  "system.");
372 
373  if (_coord_system == Moose::COORD_RZ && _out_of_plane_direction != OutOfPlaneDirection::z)
374  paramError("out_of_plane_direction", "must be set to z for axisymmetric simulations.");
375  }
376 }
std::set< SubdomainID > _subdomain_ids
set generated from the passed in vector of subdomain names
const OutOfPlaneDirection _out_of_plane_direction
const std::string name
Definition: Setup.h:22
std::vector< SubdomainName > _subdomain_names
if this vector is not empty the variables, kernels and materials are restricted to these subdomains ...
Moose::CoordinateSystemType _coord_system

◆ getKernelParameters()

InputParameters TensorMechanicsAction::getKernelParameters ( std::string  type)
protectedvirtual

Definition at line 496 of file TensorMechanicsAction.C.

Referenced by act().

497 {
498  InputParameters params = _factory.getValidParams(type);
499  params.applyParameters(parameters(),
500  {"displacements", "use_displaced_mesh", "save_in", "diag_save_in"});
501 
502  params.set<std::vector<VariableName>>("displacements") = _coupled_displacements;
503  params.set<bool>("use_displaced_mesh") = _use_displaced_mesh;
504 
505  return params;
506 }
std::vector< VariableName > _coupled_displacements
bool _use_displaced_mesh
use displaced mesh (true unless _strain is SMALL)

◆ getKernelType()

std::string TensorMechanicsAction::getKernelType ( )
protectedvirtual

Reimplemented in DynamicTensorMechanicsAction.

Definition at line 480 of file TensorMechanicsAction.C.

Referenced by act().

481 {
482  std::map<Moose::CoordinateSystemType, std::string> type_map = {
483  {Moose::COORD_XYZ, "StressDivergenceTensors"},
484  {Moose::COORD_RZ, "StressDivergenceRZTensors"},
485  {Moose::COORD_RSPHERICAL, "StressDivergenceRSphericalTensors"}};
486 
487  // choose kernel type based on coordinate system
488  auto type_it = type_map.find(_coord_system);
489  if (type_it != type_map.end())
490  return type_it->second;
491  else
492  mooseError("Unsupported coordinate system");
493 }
Moose::CoordinateSystemType _coord_system

◆ outputPropertiesType()

MultiMooseEnum TensorMechanicsActionBase::outputPropertiesType ( )
staticinherited

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'}
staticinherited

◆ _coord_system

Moose::CoordinateSystemType TensorMechanicsAction::_coord_system
protected

◆ _coupled_displacements

std::vector<VariableName> TensorMechanicsAction::_coupled_displacements
protected

Definition at line 38 of file TensorMechanicsAction.h.

Referenced by act(), getKernelParameters(), and TensorMechanicsAction().

◆ _diag_save_in

std::vector<AuxVariableName> TensorMechanicsAction::_diag_save_in
protected

Definition at line 43 of file TensorMechanicsAction.h.

Referenced by act(), and TensorMechanicsAction().

◆ _displacements

std::vector<VariableName> TensorMechanicsAction::_displacements
protected

displacement variables

Definition at line 36 of file TensorMechanicsAction.h.

Referenced by act(), and TensorMechanicsAction().

◆ _generate_output

std::vector<std::string> TensorMechanicsAction::_generate_output
protected

output aux variables to generate for sclar stress/strain tensor quantities

Definition at line 95 of file TensorMechanicsAction.h.

Referenced by actOutputGeneration(), and TensorMechanicsAction().

◆ _ndisp

unsigned int TensorMechanicsAction::_ndisp
protected

Definition at line 37 of file TensorMechanicsAction.h.

Referenced by act(), and TensorMechanicsAction().

◆ _out_of_plane_direction

const OutOfPlaneDirection TensorMechanicsAction::_out_of_plane_direction
protected

Definition at line 89 of file TensorMechanicsAction.h.

Referenced by act(), actSubdomainChecks(), and TensorMechanicsAction().

◆ _planar_formulation

enum TensorMechanicsAction::PlanarFormulation TensorMechanicsAction::_planar_formulation
protected

Referenced by act(), and TensorMechanicsAction().

◆ _ranktwoaux_table

const std::map< std::string, std::string > TensorMechanicsActionBase::_ranktwoaux_table
staticinherited
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 actOutputGeneration(), and TensorMechanicsActionBase::outputPropertiesType().

◆ _ranktwoscalaraux_table

const std::map< std::string, std::pair< std::string, std::vector< std::string > > > TensorMechanicsActionBase::_ranktwoscalaraux_table
staticinherited
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 actOutputGeneration(), and TensorMechanicsActionBase::outputPropertiesType().

◆ _save_in

std::vector<AuxVariableName> TensorMechanicsAction::_save_in
protected

residual debugging

Definition at line 42 of file TensorMechanicsAction.h.

Referenced by act(), and TensorMechanicsAction().

◆ _strain

enum TensorMechanicsAction::Strain TensorMechanicsAction::_strain
protected

Referenced by TensorMechanicsAction().

◆ _strain_and_increment

enum TensorMechanicsAction::StrainAndIncrement TensorMechanicsAction::_strain_and_increment
protected

Referenced by act(), and TensorMechanicsAction().

◆ _subdomain_id_union

std::set<SubdomainID> TensorMechanicsAction::_subdomain_id_union
protected

set generated from the combined block restrictions of all TensorMechanics/Master action blocks

Definition at line 55 of file TensorMechanicsAction.h.

Referenced by act(), actGatherActionParameters(), and actOutputGeneration().

◆ _subdomain_ids

std::set<SubdomainID> TensorMechanicsAction::_subdomain_ids
protected

set generated from the passed in vector of subdomain names

Definition at line 52 of file TensorMechanicsAction.h.

Referenced by actSubdomainChecks().

◆ _subdomain_names

std::vector<SubdomainName> TensorMechanicsAction::_subdomain_names
protected

if this vector is not empty the variables, kernels and materials are restricted to these subdomains

Definition at line 49 of file TensorMechanicsAction.h.

Referenced by actSubdomainChecks().

◆ _use_ad

const bool TensorMechanicsActionBase::_use_ad
protectedinherited

◆ _use_displaced_mesh

bool TensorMechanicsAction::_use_displaced_mesh
protected

use displaced mesh (true unless _strain is SMALL)

Definition at line 92 of file TensorMechanicsAction.h.

Referenced by act(), getKernelParameters(), and TensorMechanicsAction().


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