PhysicsComponentBase

The PhysicsComponentBase 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 initializeComponentPhysics(), which simply adds the component to the Physics. This implementation may be overriden in derived classes.

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

registerMooseAction("MooseApp", CylinderComponent, "add_mesh_generator");
registerMooseAction("MooseApp", CylinderComponent, "init_component_physics");
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.