Utilities

Surface point utilities on bodies and body lists

ImmersedLayers.areas — Method
areas(b::Body/BodyList)

Return ScalarData filled with the 1-d areas (via midpoint rule) associated with b.

source
ImmersedLayers.normals — Method
normals(b::Body/BodyList)

Return VectorData filled with the normal vectors (via midpoint rule) associated with b.

source
ImmersedLayers.points — Method
points(b::Body/BodyList)

Return VectorData filled with the coordinates of the points associated with b.

source
ImmersedLayers.arcs — Method
arcs(b::Body/BodyList)

Return ScalarData filled with the arclength coordinates associated with b.

source
Base.ones — Method
ones(u::PointData)

Returns PointData of the same type as u filled with ones.

source
Base.ones — Method
ones(u::VectorData/TensorData,dim::Int)

Returns point data of the same type as u, filled with ones in component dim.

source
LinearAlgebra.dot — Method
dot(u1::PointData,u2::PointData,ds::ScalarData)

Return the inner product between u1 and u2, weighted by ds.

source
LinearAlgebra.dot — Method
dot(u1::PointData,u2::PointData,ds::ScalarData,bl::BodyList,i)

Return the inner product between u1 and u2, weighted by ds, for only the data associated with body i in body list bl.

source
LinearAlgebra.norm — Method
norm(u::PointData,ds::ScalarData,bl::BodyList,i)

Return the norm of u, weighted by ds, for body i in body list bl

source
CartesianGrids.integrate — Method
integrate(u::PointData,ds::ScalarData)

Calculate the discrete surface integral of data u, using the surface element areas in ds. This uses trapezoidal rule quadrature. If u is VectorData, then this returns a vector of the integrals in each coordinate direction.

source
CartesianGrids.integrate — Method
integrate(u::PointData,ds::ScalarData,bl::BodyList,i::Int)

Calculate the discrete surface integral of scalar data u, restricting the integral to body i in body list bl, using the surface element areas in ds. This uses trapezoidal rule quadrature. If u is VectorData, then this returns a vector of the integrals in each coordinate direction.

source
Base.copyto! — Method
copyto!(u::PointData,v::PointData,bl::BodyList,i::Int)

Copy the data in the elements of v associated with body i in body list bl to the corresponding elements in u. These data must be of the same type (e.g., ScalarData or VectorData) and have the same length.

source
Base.copyto! — Method
copyto!(u::ScalarData,v::AbstractVector,bl::BodyList,i::Int)

Copy the data in v to the elements in u associated with body i in body list bl. v must have the same length as this subarray of u associated with i.

source
Base.view — Method
view(v::VectorData,bl::BodyList,i::Int)

Provide a view of the range of values in VectorData v, corresponding to the points of the body with index i in a BodyList bl.

source

Grid utilities

Base.ones — Method
ones(u::GridData)

Returns GridData of the same type as u filled with ones.

source
Base.ones — Method
ones(u::VectorGridData/TensorGridData,dim::Int)

Returns grid data of the same type as u, filled with ones in component dim.

source
CartesianGrids.integrate — Method
integrate(u::GridData,g::PhysicalGrid)

Calculate the discrete integral of grid data u, using the cell volumes of grid g. If u is VectorData, then this returns a vector of the integrals in each coordinate direction.

source
LinearAlgebra.dot — Method
dot(u1::GridData,u2::GridData,g::PhysicalGrid)

Return the inner product between u1 and u2 weighted by the volume (area) of the cell in grid g.

source
LinearAlgebra.norm — Method
norm(u::GridData,g::PhysicalGrid)

Return the L2 norm of u, weighted by the volume (area) of the cell in grid g.

source