Immersa.AbstractPrescribedBodyType
AbstractPrescribedBody <: AbstractBody

Abstract supertype for all bodies whose motion is fully prescribed (not coupled).

Subtypes include AbstractStaticBody (zero motion) and AbstractMovingBody (time-dependent prescribed motion).

source
Immersa.AbstractStaticBodyType
AbstractStaticBody <: AbstractPrescribedBody

Abstract supertype for bodies with zero motion. Concrete subtypes: NothingBody, StaticBody.

source
Immersa.AbstractMovingBodyType
AbstractMovingBody <: AbstractPrescribedBody

Abstract supertype for bodies with prescribed time-dependent motion. Concrete subtype: MovingBody.

source
Immersa.NothingBodyType
NothingBody{}

The NothingBody struct defines a trivial, empty static body used as a placeholder when no physical body is present.

Related functions

Functions associated with NothingBody perform no operations:

  • point_count(::NothingBody): returns 0 (no points).
  • init_body_points!(::BodyPoints, ::NothingBody): does nothing.
  • update_body_points!(::BodyPoints, ::NothingBody, i, t): does nothing.
source
Immersa.StaticBodyType
StaticBody{N,T,S<:AbstractVector{T},A<:AbstractVector{SVector{N,T}},U}

A real, immobile body defined by fixed positions and spacings, with an optional velocity callback for actuated surfaces.

Fields

  • x::A : Vector of positions (SVector{N,T}) in N-dimensional space.
  • ds::S : Vector of weights or spacings associated with points.
  • u::U : Velocity callback (u, i, t) -> nothing, called at each step. Defaults to a no-op.

Type parameters

  • N : Spatial dimension.
  • T : Scalar type (e.g., Float64).
  • S : Type of vector for ds.
  • A : Type of vector for x.
  • U : Type of the velocity callback.

Constructor

StaticBody(x, ds)
StaticBody(x, ds, u)

When u is omitted, a no-op callback is used.

Related functions

  • point_count(body) : Returns the number of points on the body.
  • init_body_points!(points, body) : Initialises BodyPoints with the static body's positions, zero velocities, and spacings.
  • update_body_points!(points, body, i, t) : No-op; static bodies do not move.
source
Immersa.PoseTwist2DType
PoseTwist2D{T}

Describes a 2-D rigid-body pose (position + orientation) and its time derivative (translational and angular velocity).

Fields

  • c::SVector{2,T} : Centre-of-mass translation.
  • θ::T : Rotation angle.
  • ċ::SVector{2,T} : Translational velocity.
  • θ̇::T : Angular velocity.
source
Immersa.MovingBodyType
MovingBody{N,T,S,A,F} <: AbstractMovingBody

A body with prescribed time-dependent motion defined by a user-supplied callback.

Fields

  • x_ref::A : Reference (initial) positions (Vector{SVector{N,T}}).
  • ds::S : Weights or spacings associated with points.
  • motion!::F: Callback (x, u, i, t) -> nothing that overwrites positions x and velocities u at step i and time t.

Constructor

MovingBody(x_ref, ds, motion!)

Related functions

  • point_count(body) : Returns the number of points.
  • init_body_points!(points, body) : Initialises BodyPoints from the reference shape with zero velocity.
  • update_body_points!(points, body, i, t) : Calls motion! to update positions and velocities.
source
Immersa.init_body_points!Function
init_body_points!(points::BodyPoints, body::StaticBody{N,T})

Copy the static body's positions and spacings into points and set all velocities to zero.

source
init_body_points!(points::BodyPoints, body::MovingBody{N,T})

Copy the reference positions and spacings into points and set all velocities to zero.

source
init_body_points!(points::BodyPoints, body::GroupedPrescribedBody)

Initialise body points for each sub-body in the group.

source
Immersa.GroupedPrescribedBodyType
GroupedPrescribedBody{T<:Tuple{Vararg{AbstractPrescribedBody}}}

A composite body that groups multiple AbstractPrescribedBody instances into a single body interface. Operations iterate over all contained bodies.

Fields

  • bodies::T : Tuple of prescribed bodies.

Related functions

  • point_count(body) : Returns the sum of point counts across all sub-bodies.
  • init_body_points!(points, body) : Initialises points for each sub-body.
  • update_body_points!(points, body, i, t) : Updates points for each sub-body.
source
Immersa.point_countFunction
point_count(body::StaticBody) -> Int

Return the number of immersed-boundary points on a StaticBody.

source
point_count(body::MovingBody) -> Int

Return the number of immersed-boundary points on a MovingBody.

source
point_count(body::GroupedPrescribedBody) -> Int

Return the total number of immersed-boundary points across all sub-bodies.

source
point_count(body::GeometricNonlinearBody) -> Int

Return the total number of immersed-boundary points (deforming + prescribed).

source
Immersa.update_body_points!Function
update_body_points!(points::BodyPoints, body::MovingBody, i, t)

Invoke the body's motion! callback to overwrite positions and velocities at step i and time t.

source
update_body_points!(::BodyPoints, ::StaticBody, i, t)

No-op for static bodies — positions and velocities are unchanged.

source
update_body_points!(points::BodyPoints, body::GroupedPrescribedBody, i, t)

Update body points for each sub-body in the group at step i and time t.

source