ConstantTensor

Constant tensor in real space.

ConstantTensor and ConstantReciprocalTensor set a tensor to a constant value in real space and reciprocal space respectively. The reciprocal space version takes an "imaginary" value parameter.

Overview

Writes a constant scalar into the target buffer each time it runs. Use "buffer" to select the destination and "real" to provide the value.

Example Input File Syntax

[TensorComputes<<<{"href": "../../syntax/TensorComputes/index.html"}>>>]
  [Initialize<<<{"href": "../../syntax/TensorComputes/Initialize/index.html"}>>>]
    [A]
      type = ConstantTensor<<<{"description": "Constant tensor in real space.", "href": "ConstantTensor.html"}>>>
      buffer<<<{"description": "The buffer this compute is writing to"}>>> = A
      real<<<{"description": "Real part of the constant value."}>>> = 2
    []
  []
[]
(test/tests/neml2/scalar.i)

Input Parameters

  • bufferThe buffer this compute is writing to

    C++ Type:std::string

    Controllable:No

    Description:The buffer this compute is writing to

Required Parameters

  • fullFalseConstruct a full tensor will all entries

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Construct a full tensor will all entries

  • real0.0Real part of the constant value.

    Default:0.0

    C++ Type:std::string

    Controllable:No

    Description:Real part of the constant value.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

Advanced Parameters

Input Files