https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
neml2::R2IncrementToRate Class Reference

Get the rate of a rank two tensor given its increment. More...

#include <R2IncrementToRate.h>

Inheritance diagram for neml2::R2IncrementToRate:
[legend]

Public Member Functions

 R2IncrementToRate (const OptionSet &options)
 

Static Public Member Functions

static OptionSet expected_options ()
 

Protected Member Functions

void set_value (bool out, bool dout_din, bool d2out_din2) override
 

Protected Attributes

const Variable< R2 > & _delta
 Increment of the rank two tensor. More...
 
const Variable< Scalar > & _t
 Time. More...
 
const Variable< Scalar > & _t_n
 
Variable< R2 > & _rate
 Rate. More...
 

Detailed Description

Get the rate of a rank two tensor given its increment.

Definition at line 21 of file R2IncrementToRate.h.

Constructor & Destructor Documentation

◆ R2IncrementToRate()

neml2::R2IncrementToRate::R2IncrementToRate ( const OptionSet &  options)

Definition at line 32 of file R2IncrementToRate.C.

33  : Model(options),
34  _delta(declare_input_variable<R2>("increment")),
35  _t(declare_input_variable<Scalar>("t")),
36  _t_n(declare_input_variable<Scalar>(history_name(_t.name(), 1))),
37  _rate(declare_output_variable<R2>("rate"))
38 {
39 }
Variable< R2 > & _rate
Rate.
const Variable< Scalar > & _t_n
const Variable< Scalar > & _t
Time.
const Variable< R2 > & _delta
Increment of the rank two tensor.

Member Function Documentation

◆ expected_options()

OptionSet neml2::R2IncrementToRate::expected_options ( )
static

Definition at line 22 of file R2IncrementToRate.C.

23 {
24  OptionSet options = Model::expected_options();
25  options.doc() = "Compute the rate of a rank two tensor given its increment and the time step.";
26  options.add_input("increment", "Increment of the rank two tensor");
27  options.add_input("time", "t", "Current time");
28  options.add_output("rate", "Rate of the rank two tensor");
29  return options;
30 }

◆ set_value()

void neml2::R2IncrementToRate::set_value ( bool  out,
bool  dout_din,
bool  d2out_din2 
)
overrideprotected

Definition at line 42 of file R2IncrementToRate.C.

43 {
44  if (out)
45  _rate = _delta / (_t - _t_n);
46 
47  if (dout_din)
48  {
49  _rate.d(_delta) = 1.0 / (_t - _t_n) * imap_v<R2>();
50  _rate.d(_t) = -_delta / (_t - _t_n) / (_t - _t_n);
51  _rate.d(_t_n) = _delta / (_t - _t_n) / (_t - _t_n);
52  }
53 }
Variable< R2 > & _rate
Rate.
const Variable< Scalar > & _t_n
const Variable< Scalar > & _t
Time.
const Variable< R2 > & _delta
Increment of the rank two tensor.

Member Data Documentation

◆ _delta

const Variable<R2>& neml2::R2IncrementToRate::_delta
protected

Increment of the rank two tensor.

Definition at line 32 of file R2IncrementToRate.h.

Referenced by set_value().

◆ _rate

Variable<R2>& neml2::R2IncrementToRate::_rate
protected

Rate.

Definition at line 39 of file R2IncrementToRate.h.

Referenced by set_value().

◆ _t

const Variable<Scalar>& neml2::R2IncrementToRate::_t
protected

Time.

Definition at line 35 of file R2IncrementToRate.h.

Referenced by set_value().

◆ _t_n

const Variable<Scalar>& neml2::R2IncrementToRate::_t_n
protected

Definition at line 36 of file R2IncrementToRate.h.

Referenced by set_value().


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