InitialCondition

class InitialCondition : public godzilla::Object, public godzilla::PrintInterface

Base class for initial conditions.

Subclassed by godzilla::ConstantInitialCondition, godzilla::FunctionInitialCondition

Public Functions

virtual void create() override

Called to construct the object.

Int get_dimension() const

Get problem spatial dimension.

Returns:

Spatial dimension

const std::string &get_field_name() const

Get field name.

Returns:

The field name

Int get_field_id() const

Get the ID of the field this boundary condition operates on.

Returns:

ID of the field

virtual Int get_num_components() const = 0

Get the number of constrained components.

Returns:

The number of constrained components

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

Evaluate the initial condition.

Parameters:
  • time – The time at which to sample

  • x – The coordinates

  • u – The output field values