OOF2: The Manual

Name

OOF.Mesh.Set_Field_Initializer — Determine how to assign values to a Field on a Mesh.

Synopsis

OOF.Mesh.Set_Field_Initializer(mesh, field, initializer)

Details

  • Parent Menu: OOF.Mesh
  • Callback: function initField in module ooflib.engine.IO.meshmenu
  • Parameters:

    mesh
    Type: The path to an existing Mesh object.
    field
    Type: A Field object.
    initializer
    Type: A field initializer from one of the ScalarFieldInit or TwoVectorFieldInit classes.

Description

Assign an initializer to the given Field on the given Mesh. The Field must already be defined.

The initializer will be evaluated at every node of the Mesh. Different kinds of Fields (i.e, scalar and vector) require different kinds of initializers. The GUI makes it impossible to apply a scalar initializer to a vector Field, but it's necessary to be careful when writing scripts. The different kinds of initializers are described in ScalarFieldInit and TwoVectorFieldInit.

[Note] Note

Assigning an initializer to a Field does not actually change the Field's values until OOF.Mesh.Apply_Field_Initializers or OOF.Mesh.Apply_Field_Initializers_at_Time is called, via the Apply or Apply at time buttons on the Solver Page.