RandomTensor

Uniform random IC with values between min and max.

Fill a tensor with uniformly distributed random values ranging from "min" to "max".

Example Input File Syntax

Input Parameters

  • bufferThe buffer this compute is writing to

    C++ Type:std::string

    Controllable:No

    Description:The buffer this compute is writing to

  • maxMaximum value.

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Maximum value.

  • minMinimum value.

    C++ Type:double

    Unit:(no unit assumed)

    Controllable:No

    Description:Minimum value.

Required Parameters

  • generate_on_cpuTrueTo ensure reproducibility across devices it is recommended to generate random tensors on the CPU.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:To ensure reproducibility across devices it is recommended to generate random tensors on the CPU.

  • seedRandom number seed.

    C++ Type:int

    Controllable:No

    Description:Random number seed.

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