https://mooseframework.inl.gov
LAROMANCEStressUpdateBase.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
13 #include "nlohmann/json.h"
14 
15 template <bool is_ad>
17 {
18 
19 public:
21 
23 
24  virtual void resetIncrementalMaterialProperties() override;
25  virtual void
26  storeIncrementalMaterialProperties(const unsigned int total_number_substeps) override;
27 
28 protected:
29  virtual void exportJSON();
30 
31  virtual bool substeppingCapabilityEnabled() override;
32 
33  enum class ROMInputTransform
34  {
35  LINEAR,
36  LOG,
37  EXP
38  };
39 
40  virtual void initialSetup() override;
41 
42  // Setup unit conversion factors. The required units in the ROM are:
43  // Cell dislocation density: m^-2
44  // Wall dislocation density: m^-2
45  // MX phase fracture: nondim.
46  // stress: MPa
47  // strain: nondim.
48  // temperature: K
50 
51  virtual void initQpStatefulProperties() override;
52  virtual void
53  computeStressInitialize(const GenericReal<is_ad> & effective_trial_stress,
54  const GenericRankFourTensor<is_ad> & elasticity_tensor) override;
55  virtual GenericReal<is_ad> computeResidual(const GenericReal<is_ad> & effective_trial_stress,
56  const GenericReal<is_ad> & scalar) override;
57 
58  virtual GenericReal<is_ad>
59  computeDerivative(const GenericReal<is_ad> & /*effective_trial_stress*/,
60  const GenericReal<is_ad> & /*scalar*/) override
61  {
62  return _derivative;
63  }
64 
65  virtual void
66  computeStressFinalize(const GenericRankTwoTensor<is_ad> & plastic_strain_increment) override;
67  virtual GenericReal<is_ad>
68  maximumPermissibleValue(const GenericReal<is_ad> & effective_trial_stress) const override;
69  virtual Real computeTimeStepLimit() override;
70 
71  void outputIterationSummary(std::stringstream * iter_output,
72  const unsigned int total_it) override;
73 
74  virtual void outputIterationStep(std::stringstream * iter_output,
75  const GenericReal<is_ad> & effective_trial_stress,
76  const GenericReal<is_ad> & scalar,
77  const Real reference_residual) override;
78 
80  enum class WindowFailure
81  {
82  ERROR,
83  EXCEPTION,
84  WARN,
85  IGNORE,
86  DONOTHING,
87  USELIMIT,
89  };
90 
97  void precomputeROM(const unsigned out_index);
98 
107  GenericReal<is_ad> computeROM(const unsigned int tile,
108  const unsigned int partition,
109  const unsigned out_index,
110  const bool derivative = false);
111 
118  bool checkInTile(const unsigned int p, const unsigned int t) const;
119 
128  bool areTilesNotIdentical(const unsigned int p,
129  const unsigned int t,
130  const unsigned int tt,
131  const unsigned int in_index);
132 
144  const ROMInputTransform transform,
145  const Real transform_coef,
146  const std::vector<Real> & transformed_limits,
147  const bool derivative = false);
148 
157  void buildPolynomials(const unsigned int p,
158  const GenericReal<is_ad> & rom_input,
159  std::vector<GenericReal<is_ad>> & polynomial_inputs,
160  const GenericReal<is_ad> & drom_input = 0,
161  const bool derivative = false);
162 
172  void precomputeValues(const unsigned int p,
173  const std::vector<Real> & coefs,
174  const std::vector<std::vector<GenericReal<is_ad>>> & polynomial_inputs,
175  std::vector<GenericReal<is_ad>> & precomputed);
176 
191  computeValues(const unsigned int p,
192  const std::vector<GenericReal<is_ad>> & precomputed,
193  const std::vector<std::vector<GenericReal<is_ad>>> & polynomial_inputs,
194  const std::vector<GenericReal<is_ad>> & dpolynomial_inputs = {},
195  const bool derivative = false);
196 
208  virtual GenericReal<is_ad> convertOutput(const unsigned int p,
209  const std::vector<Real> & old_input_values,
210  const GenericReal<is_ad> & rom_output,
211  const unsigned out_index,
212  const GenericReal<is_ad> & drom_output = 0.0,
213  const bool derivative = false);
214 
223  const unsigned int degree,
224  const bool derivative = false);
225 
234  GenericReal<is_ad> sigmoid(const Real lower,
235  const Real upper,
236  const GenericReal<is_ad> & val,
237  const bool derivative = false);
238 
247  void computeTileWeight(std::vector<std::vector<GenericReal<is_ad>>> & weights,
248  GenericReal<is_ad> & input,
249  const unsigned int in_index,
250  const bool derivative = false);
251 
257  virtual void computePartitionWeights(std::vector<GenericReal<is_ad>> & weights,
258  std::vector<GenericReal<is_ad>> & dweights_dstress)
259  {
260  if (_num_partitions != 1)
261  mooseError("Internal error: If number of partitions is not one, then computePartitionWeights "
262  "must be defined");
263  weights[0] = 1.0;
264  dweights_dstress[0] = 0.0;
265  }
266 
274  template <typename T>
275  void convertValue(T & x,
276  const ROMInputTransform transform,
277  const Real coef,
278  const bool derivative = false)
279  {
280  if (transform == ROMInputTransform::EXP)
281  {
282  mooseAssert(coef != 0, "Coefficient must not be zero.");
283  if (derivative)
284  x = std::exp(x / coef) / coef;
285  else
286  x = std::exp(x / coef);
287  }
288  else if (transform == ROMInputTransform::LOG)
289  {
290  mooseAssert(x + coef > 0, "Sum must be greater than 0.");
291  if (derivative)
292  x = 1.0 / (x + coef);
293  else
294  x = std::log(x + coef);
295  }
296  else if (transform == ROMInputTransform::LINEAR)
297  {
298  mooseAssert(coef == 0.0, "Coefficient cannot be supplied with linear transformation");
299  if (derivative)
300  x = 1.0;
301  }
302  }
303 
304  /*
305  * Calculates and returns vector utilized in assign values
306  * @param p Partition index
307  * @return Vector that preallocates indexing calculations for polynomial calculation
308  */
309  std::vector<unsigned int> getMakeFrameHelper(const unsigned int p) const;
310 
311  /*
312  * Calculates and returns the transformed limits for the ROM calculations
313  * Indexes are [partition][tile][output][input].
314  * Inputs ordering is
315  * input[0]: cell_old
316  * input[1]: wall_old
317  * input[2]: trial stress,
318  * input[3]: effective strain old,
319  * input[4]: temperature
320  * input[5]: environmental factor (optional)
321  * output ordering is:
322  * output[0]: cell dislocations increment
323  * output[1]: wall dislocations increment
324  * output[2]: strain increment
325  * @param p Partition index
326  * @param limits Human readable limits
327  * @return Multi-dimentional vector of transformed limits
328  */
329  std::vector<std::vector<std::vector<std::vector<Real>>>>
330  getTransformedLimits(const unsigned int p,
331  const std::vector<std::vector<std::vector<Real>>> limits);
332 
333  /*
334  * Returns vector of the functions to use for the conversion of input variables.
335  * Indexes are [partition][tile][output][input].
336  * Inputs ordering is
337  * input[0]: cell_old
338  * input[1]: wall_old
339  * input[2]: trial stress,
340  * input[3]: effective strain old,
341  * input[4]: temperature
342  * input[5]: environmental factor (optional)
343  * output ordering is:
344  * output[0]: cell dislocations increment
345  * output[1]: wall dislocations increment
346  * output[2]: strain increment
347  * @return vector of the functions to use for the conversion of input variables.
348  */
349  virtual std::vector<std::vector<std::vector<std::vector<ROMInputTransform>>>> getTransform()
350  {
351  checkJSONKey("transform");
352  return _json["transform"]
353  .template get<std::vector<std::vector<std::vector<std::vector<ROMInputTransform>>>>>();
354  }
355 
356  /*
357  * Returns factors for the functions for the conversion functions given in getTransform
358  * Indexes are [partition][tile][output][input].
359  * Inputs ordering is
360  * input[0]: cell_old
361  * input[1]: wall_old
362  * input[2]: trial stress,
363  * input[3]: effective strain old,
364  * input[4]: temperature
365  * input[5]: environmental factor (optional)
366  * output ordering is:
367  * output[0]: cell dislocations increment
368  * output[1]: wall dislocations increment
369  * output[2]: strain increment
370  * @return factors for the functions for the conversion functions given in getTransform
371  */
372  virtual std::vector<std::vector<std::vector<std::vector<Real>>>> getTransformCoefs()
373  {
374  checkJSONKey("transform_coefs");
375  return _json["transform_coefs"]
376  .template get<std::vector<std::vector<std::vector<std::vector<Real>>>>>();
377  }
378 
379  /* Optional method that returns human-readable limits used for normalization. Default is to just
380  * use the input limits.
381  * Indexes are [partition][tile][input][upper/lower].
382  * Inputs ordering is
383  * input[0]: cell_old
384  * input[1]: wall_old
385  * input[2]: trial stress,
386  * input[3]: effective strain old,
387  * input[4]: temperature
388  * input[5]: environmental factor (optional)
389  * @return human-readable limits for the normalization limits
390  */
391  virtual std::vector<std::vector<std::vector<std::vector<Real>>>> getNormalizationLimits()
392  {
393  if (_json.contains("normalization_limits"))
394  return _json["normalization_limits"]
395  .template get<std::vector<std::vector<std::vector<std::vector<Real>>>>>();
396 
397  return getInputLimits();
398  }
399 
400  /* Returns human-readable limits for the inputs.
401  * Indexes are [partition][tile][input][upper/lower].
402  * Inputs ordering is
403  * input[0]: cell_old
404  * input[1]: wall_old
405  * input[2]: trial stress,
406  * input[3]: effective strain old,
407  * input[4]: temperature
408  * input[5]: environmental factor (optional)
409  * @return human-readable limits for the input limits
410  */
411  virtual std::vector<std::vector<std::vector<std::vector<Real>>>> getInputLimits()
412  {
413  checkJSONKey("input_limits");
414  return _json["input_limits"]
415  .template get<std::vector<std::vector<std::vector<std::vector<Real>>>>>();
416  }
417 
418  /*
419  * Material specific coefficients multiplied by the Legendre polynomials for each of the input
420  * variables
421  * @return Legendre polynomial coefficients
422  */
423  virtual std::vector<std::vector<std::vector<std::vector<Real>>>> getCoefs()
424  {
425  checkJSONKey("coefs");
426  return _json["coefs"].template get<std::vector<std::vector<std::vector<std::vector<Real>>>>>();
427  }
428 
429  /*
430  * Material specific orientations of tiling
431  * variables. Indexing is partition, then input
432  * @return Vector of a vector declaring tiling orientation
433  */
434  virtual std::vector<std::vector<unsigned int>> getTilings()
435  {
436  if (_json.contains("tiling"))
437  return _json["tiling"].template get<std::vector<std::vector<unsigned int>>>();
438 
439  if (_environmental)
440  return {{1, 1, 1, 1, 1, 1}};
441  return {{1, 1, 1, 1, 1}};
442  };
443 
444  /*
445  * Minimum strain value allowed by the ROM. This is material specific, and needs to be overwritten
446  * by individual roms and each partition
447  * @return Vector of material specific ROM low strain value for each partition
448  */
449  virtual std::vector<Real> getStrainCutoff()
450  {
451  checkJSONKey("cutoff");
452  return _json["cutoff"].template get<std::vector<Real>>();
453  }
454 
457 
460 
461  /*
462  * Vector of vectors WindowFailure enum that informs how to handle input that is outside of the
463  * limits. Shape is number of inputs by 2 (lower and upper window enum)
464  */
465  std::vector<std::pair<WindowFailure, WindowFailure>> _window_failure;
466 
468  const bool _verbose;
469 
474 
477 
479  const Function * const _cell_function;
480 
483 
488 
491 
493  const Function * const _wall_function;
494 
496  const Function * const _stress_function;
497 
500 
502  const unsigned int _cell_input_index;
503 
505  const unsigned int _wall_input_index;
506 
508  const unsigned int _stress_input_index;
509 
511  const unsigned int _old_strain_input_index;
512 
514  const unsigned int _temperature_input_index;
515 
517  const unsigned int _environmental_input_index;
518 
520  const unsigned int _cell_output_index;
521 
523  const unsigned int _wall_output_index;
524 
526  const unsigned int _strain_output_index;
527 
530 
532  unsigned int _num_partitions;
533 
535  std::vector<unsigned int> _num_tiles;
536 
538  unsigned int _num_inputs;
539 
541  unsigned int _num_outputs;
542 
544  std::vector<unsigned int> _degree;
545 
547  std::vector<unsigned int> _num_coefs;
548 
550  std::vector<std::vector<std::vector<std::vector<ROMInputTransform>>>> _transform;
551 
553  std::vector<std::vector<std::vector<std::vector<Real>>>> _transform_coefs;
554 
556  std::vector<std::vector<std::vector<std::vector<Real>>>> _input_limits;
557 
559  std::vector<std::vector<std::vector<std::vector<Real>>>> _normalization_limits;
560 
562  std::vector<std::vector<std::vector<std::vector<Real>>>> _coefs;
563 
565  std::vector<std::vector<std::vector<std::vector<std::vector<Real>>>>>
567 
569  std::vector<std::vector<unsigned int>> _makeframe_helper;
570 
573 
576 
579 
582 
585 
588 
590  std::vector<GenericReal<is_ad>> _input_values;
591 
593  std::vector<Real> _old_input_values;
594 
596  std::vector<std::vector<std::vector<GenericReal<is_ad>>>> _rom_inputs;
597 
599  std::vector<std::vector<std::vector<std::vector<GenericReal<is_ad>>>>> _polynomial_inputs;
600 
602  std::vector<std::vector<std::vector<GenericReal<is_ad>>>> _precomputed_vals;
603 
605  std::vector<std::pair<Real, Real>> _global_limits;
606 
608  std::vector<std::vector<GenericReal<is_ad>>> _non_stress_weights;
609 
611  std::vector<std::vector<GenericReal<is_ad>>> _weights;
612 
614  std::vector<GenericReal<is_ad>> _partition_weights;
615 
617  std::vector<GenericReal<is_ad>> _dpartition_weight_dstress;
618 
620  std::vector<std::vector<unsigned int>> _tiling;
621 
623  std::vector<Real> _cutoff;
624 
627 
632 
635 
638 
640  std::vector<std::string> _index_name;
641 
643  void checkJSONKey(const std::string & key);
644 
646  nlohmann::json _json;
647 
649  using Material::_name;
650  using Material::_q_point;
651  using Material::_qp;
659 };
660 
const MooseArray< Point > & _q_point
nlohmann::json _json
JSON object constructed from the datafile.
std::vector< unsigned int > _num_coefs
Total number of Legendre polynomial coefficients for the ROM data set in each parition.
Moose::GenericType< Real, is_ad > GenericReal
GenericMaterialProperty< Real, is_ad > & _cell_dislocations_step
const unsigned int _cell_output_index
Index corresponding to the position for cell dislocations increment in the output vector...
std::vector< GenericReal< is_ad > > _dpartition_weight_dstress
Container for d_parition_weights d_stress.
void outputIterationSummary(std::stringstream *iter_output, const unsigned int total_it) override
Output summary information for the convergence history of the model.
GenericReal< is_ad > computePolynomial(const GenericReal< is_ad > &value, const unsigned int degree, const bool derivative=false)
Calculate the value or derivative of Legendre polynomial up to 3rd order.
const Function *const _wall_function
Optional wall dislocation forcing function.
virtual std::vector< std::vector< std::vector< std::vector< Real > > > > getNormalizationLimits()
const Function *const _cell_function
Optional cell dislocation forcing function.
void convertValue(T &x, const ROMInputTransform transform, const Real coef, const bool derivative=false)
Convert input based on the transform type.
const unsigned int _old_strain_input_index
Index corresponding to the position for the old strain in the input vector.
void buildPolynomials(const unsigned int p, const GenericReal< is_ad > &rom_input, std::vector< GenericReal< is_ad >> &polynomial_inputs, const GenericReal< is_ad > &drom_input=0, const bool derivative=false)
Assemble the array of Legendre polynomials to be multiplied by the ROM coefficients.
LAROMANCEStressUpdateBaseTempl(const InputParameters &parameters)
GenericReal< is_ad > normalizeInput(const GenericReal< is_ad > &input, const ROMInputTransform transform, const Real transform_coef, const std::vector< Real > &transformed_limits, const bool derivative=false)
Convert the input variables into the form expected by the ROM Legendre polynomials to have a normaliz...
GenericMaterialProperty< Real, is_ad > & _cell_dislocations
Material properties for cell (glissile) dislocation densities (1/m^2)
virtual GenericReal< is_ad > maximumPermissibleValue(const GenericReal< is_ad > &effective_trial_stress) const override
Compute the maximum permissible value of the scalar.
const GenericMaterialProperty< Real, is_ad > * _environmental
Optionally coupled environmental factor.
const unsigned int _strain_output_index
Index corresponding to the position for strain increment in the output vector.
const Function *const _stress_function
Optiontal effective stress forcing function.
unsigned int _num_outputs
Number of inputs to the ROM data set.
std::vector< unsigned int > _degree
Legendre polynomial degree for the ROM data set for each partition.
bool checkInTile(const unsigned int p, const unsigned int t) const
Checks if the input combination is in a specific tile.
std::vector< unsigned int > getMakeFrameHelper(const unsigned int p) const
virtual std::vector< std::vector< std::vector< std::vector< ROMInputTransform > > > > getTransform()
GenericReal< is_ad > sigmoid(const Real lower, const Real upper, const GenericReal< is_ad > &val, const bool derivative=false)
Calculate the sigmoid function weighting for the input based on the limits.
std::vector< std::vector< std::vector< std::vector< Real > > > > _coefs
Coefficients used with Legendre polynomials defined by the ROM data set for each partition.
const Function *const _creep_strain_old_forcing_function
Optional old creep strain forcing function.
unsigned int _num_inputs
Number of inputs for the ROM data set.
virtual std::vector< std::vector< std::vector< std::vector< Real > > > > getInputLimits()
const GenericVariableValue< is_ad > & _temperature
Coupled temperature variable.
virtual void outputIterationStep(std::stringstream *iter_output, const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar, const Real reference_residual) override
Output information for a single iteration step to build the convergence history of the model...
const MaterialProperty< Real > & _wall_dislocations_old
GenericReal< is_ad > _wall_dislocation_increment
Container for wall dislocation increment.
std::vector< std::pair< Real, Real > > _global_limits
Container for global limits.
virtual bool substeppingCapabilityEnabled() override
Does the model include the infrastructure for substep decomposition of the elastic strain initially u...
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
const unsigned int _wall_input_index
Index corresponding to the position for the dislocations within the cell wall in the input vector...
const unsigned int _stress_input_index
Index corresponding to the position for the stress in the input vector.
unsigned int _num_partitions
Number of partitions.
RankTwoTensor _plastic_strain_increment
Total plastic strain increment in step (summing substep contributions)
void precomputeROM(const unsigned out_index)
Precompute the ROM strain rate information for all inputs except for strain.
std::vector< std::pair< WindowFailure, WindowFailure > > _window_failure
GenericMaterialProperty< Real, is_ad > & _second_partition_weight
Material property to store partition weight.
LAROMANCEStressUpdateBaseTempl< true > ADLAROMANCEStressUpdateBase
virtual std::vector< std::vector< std::vector< std::vector< Real > > > > getTransformCoefs()
unsigned int _qp
std::vector< std::vector< unsigned int > > _makeframe_helper
Helper container defined by the ROM data set.
LAROMANCEStressUpdateBaseTempl< false > LAROMANCEStressUpdateBase
std::vector< Real > _old_input_values
Container for old input values.
void checkJSONKey(const std::string &key)
check if a JSON file was loaded and if the specified key exists
std::vector< std::vector< std::vector< std::vector< Real > > > > _normalization_limits
Normalization limits defined by the ROM data set for each partition.
const Real _max_wall_increment
Maximum wall dislocation increment.
std::vector< std::vector< std::vector< std::vector< std::vector< Real > > > > > _transformed_normalization_limits
Limits transformed from readabile input to ROM readable limits for normalization. ...
std::vector< GenericReal< is_ad > > _partition_weights
Container for weights for each tile as computed for all input values beside stress.
std::vector< std::vector< std::vector< std::vector< Real > > > > getTransformedLimits(const unsigned int p, const std::vector< std::vector< std::vector< Real >>> limits)
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
const std::vector< double > x
const unsigned int _temperature_input_index
Index corresponding to the position for the tempeature in the input vector.
std::vector< std::vector< GenericReal< is_ad > > > _non_stress_weights
Container for weights for each tile as computed for all input values beside stress.
GenericMaterialProperty< Real, is_ad > & _wall_dislocations_step
Material properties accumulated at substeps.
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
virtual GenericReal< is_ad > computeDerivative(const GenericReal< is_ad > &, const GenericReal< is_ad > &) override
Compute the derivative of the residual as a function of the scalar variable.
const GenericVariableValue< is_ad > & coupledGenericValue(const std::string &var_name, unsigned int comp=0) const
const MaterialProperty< Real > & _cell_dislocations_old
GenericReal< is_ad > computeValues(const unsigned int p, const std::vector< GenericReal< is_ad >> &precomputed, const std::vector< std::vector< GenericReal< is_ad >>> &polynomial_inputs, const std::vector< GenericReal< is_ad >> &dpolynomial_inputs={}, const bool derivative=false)
Arranges the calculated Legendre polynomials into the proper oder and multiplies the Legendre polynom...
std::vector< std::string > _index_name
index names for error output
const unsigned int _environmental_input_index
Index corresponding to the position for the environmental factor in the input vector.
virtual GenericReal< is_ad > computeResidual(const GenericReal< is_ad > &effective_trial_stress, const GenericReal< is_ad > &scalar) override
Compute the residual for a predicted value of the scalar.
virtual void setupUnitConversionFactors(const InputParameters &parameters)
virtual Real computeTimeStepLimit() override
Compute the limiting value of the time step for this material.
virtual GenericReal< is_ad > convertOutput(const unsigned int p, const std::vector< Real > &old_input_values, const GenericReal< is_ad > &rom_output, const unsigned out_index, const GenericReal< is_ad > &drom_output=0.0, const bool derivative=false)
Computes the output variable increments from the ROM predictions by bringing out of the normalized ma...
GenericReal< is_ad > _derivative
Container for derivative of creep increment with respect to strain.
const std::string _name
std::vector< GenericReal< is_ad > > _input_values
Container for input values.
std::vector< unsigned int > _num_tiles
Number of ROM tiles per partition.
GenericReal< is_ad > computeROM(const unsigned int tile, const unsigned int partition, const unsigned out_index, const bool derivative=false)
Computes the ROM calculated increment for a given output and tile.
std::vector< std::vector< std::vector< GenericReal< is_ad > > > > _precomputed_vals
Container for ROM precomputed values.
std::vector< std::vector< GenericReal< is_ad > > > _weights
Container for weights for each tile as computed for all input values beside stress.
virtual std::vector< Real > getStrainCutoff()
This class provides baseline functionallity for creep models based on the stress update material in a...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< std::vector< std::vector< GenericReal< is_ad > > > > > _polynomial_inputs
Container for ROM polynomial inputs.
GenericMaterialProperty< Real, is_ad > & _creep_rate
Creep rate material property.
virtual void computeStressInitialize(const GenericReal< is_ad > &effective_trial_stress, const GenericRankFourTensor< is_ad > &elasticity_tensor) override
Perform any necessary initialization before return mapping iterations.
MaterialProperty< Real > & _number_of_substeps
Material property capturing number of substeps for output purposes (defaults to one if substepping is...
const bool _verbose
Flag to output verbose infromation.
std::vector< Real > _cutoff
Container for strain cutoff.
virtual std::vector< std::vector< unsigned int > > getTilings()
void mooseError(Args &&... args) const
const InputParameters & parameters() const
virtual void resetIncrementalMaterialProperties() override
Reset material properties.
WindowFailure
Enum to error, warn, ignore, or extrapolate if input is outside of window of applicability.
virtual void computeStressFinalize(const GenericRankTwoTensor< is_ad > &plastic_strain_increment) override
Perform any necessary steps to finalize state after return mapping iterations.
const unsigned int _cell_input_index
Index corresponding to the position for the dislocations with in the cell in the input vector...
Real _stress_ucf
Unit conversion factors required to convert from the specified unit to MPa.
GenericMaterialProperty< Real, is_ad > & _wall_rate
Wall dislocations rate of change.
std::vector< std::vector< std::vector< std::vector< ROMInputTransform > > > > _transform
Transform rules defined by the ROM data set for each partition.
void computeTileWeight(std::vector< std::vector< GenericReal< is_ad >>> &weights, GenericReal< is_ad > &input, const unsigned int in_index, const bool derivative=false)
Compute the contribution (weight) of each tile in each partition, based on the input and tile boundar...
std::vector< std::vector< std::vector< GenericReal< is_ad > > > > _rom_inputs
Container for converted rom_inputs.
virtual void computePartitionWeights(std::vector< GenericReal< is_ad >> &weights, std::vector< GenericReal< is_ad >> &dweights_dstress)
Compute the weight of the different partitions.
const unsigned int _wall_output_index
Index corresponding to the position for wall dislocations increment in the output vector...
const Real _max_cell_increment
Maximum cell dislocation increment.
virtual std::vector< std::vector< std::vector< std::vector< Real > > > > getCoefs()
virtual void storeIncrementalMaterialProperties(const unsigned int total_number_substeps) override
Properly set up the incremental calculation storage of the stateful material properties in the inheri...
MaterialProperty< Real > & _extrapolation
Material property to hold smootherstep applied in order to extrapolate.
std::vector< std::vector< std::vector< std::vector< Real > > > > _input_limits
Input limits defined by the ROM data set for each partition.
bool areTilesNotIdentical(const unsigned int p, const unsigned int t, const unsigned int tt, const unsigned int in_index)
Checks if two tile domains are equal.
void precomputeValues(const unsigned int p, const std::vector< Real > &coefs, const std::vector< std::vector< GenericReal< is_ad >>> &polynomial_inputs, std::vector< GenericReal< is_ad >> &precomputed)
Arranges the calculated Legendre polynomials into the proper oder and multiplies the Legendre polynom...
virtual void initQpStatefulProperties() override
std::vector< std::vector< unsigned int > > _tiling
Container for tiling orientations.
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
GenericReal< is_ad > _cell_dislocation_increment
Container for cell dislocation increment.
std::vector< std::vector< std::vector< std::vector< Real > > > > _transform_coefs
Transform coefficients defined by the ROM data set for each partition.
GenericMaterialProperty< Real, is_ad > & _cell_rate
Cell dislocations rate of change.
GenericMaterialProperty< Real, is_ad > & _wall_dislocations
Material properties for wall (locked) dislocation densities (1/m^2)