Mesh Data
The functions MeshCellData, MeshFaceData and MeshPointData allow describing data known respectively at cell centers, face centers, or mesh nodes. The "values" can be of any type: a vector of scalars (conductivity per cell), an array of functions, etc.
The function Bcube.convert_to_lagrange_P1(mesh, data) converts a MeshPointData into a Lagrange FEFunction of degree 1.
Bcube.MeshData — Type
MeshData{L <: AbstractMeshDataLocation, T <: AbstractVector} <: AbstractLazyRepresent a data whose values are known inside each cell/node/face of the mesh.
Note that the "values" can be anything : an vector of scalar (conductivity by cell), an array of functions, etc.
Example
n = 10
mesh = line_mesh(10)
cell_data = MeshCellData(rand(ncells(mesh)))
cell_data = MeshCellData([PhysicalFunction(x -> i*x) for i in 1:ncells(mesh)])
node_data = MeshPointData(rand(nnodes(mesh)))Bcube.convert_to_lagrange_P1 — Method
convert_to_lagrange_P1(mesh::AbstractMesh, data::MeshData{PointData})Return a Lagrange P1 representation of the MeshPointData.