ConstantInitialCondition

class ConstantInitialCondition : public godzilla::InitialCondition

Constant initial condition.

Use to set the initial condition of a field to constant values Note that if the field has multiple components, you can provide a single value for each component

Public Functions

virtual Int get_num_components() const override

Get the number of constrained components.

Returns:

The number of constrained components

virtual void evaluate(Real time, const Real x[], Scalar u[]) override

Evaluate the initial condition.

Parameters:
  • time – The time at which to sample

  • x – The coordinates

  • u – The output field values