ComponentPhysicsInterface

The ComponentPhysicsInterface is a base class designed to facilitate the use of Physics by an ActionComponent. It offers:

  • a "physics" parameter in which the user lists the Physics active on the component.

  • a default implementation of addPhysics(), which simply adds the component to the Physics. This implementation may be overriden in derived classes.

An ActionComponent inheriting ComponentPhysicsInterface must be registered to the init_component_physics task. For example,

registerMooseAction("MooseApp", CylinderComponent, "add_mesh_generator");
// CylinderComponent is an example of ComponentPhysicsInterface
registerMooseAction("MooseApp", CylinderComponent, "init_component_physics");
// CylinderComponent is an example of ComponentMaterialPropertyInterface
registerMooseAction("MooseApp", CylinderComponent, "add_material");
// CylinderComponent is an example of ComponentInitialConditionInterface
registerMooseAction("MooseApp", CylinderComponent, "check_integrity");
registerActionComponent("MooseApp", CylinderComponent);
(moose/framework/src/actioncomponents/CylinderComponent.C)
commentnote

This helper leverages virtual inheritance: it inherits the ActionComponent class virtually. This offers some simplicity in its definition, but components leveraging this helper must also inherit the ActionComponent class virtually.