Meshes
MMJMesh.Meshes.Data
— TypeData
Data
makes it possible to associate data with mesh entities. This can happen on three levels:
setdata!(m, :foo, 99)
sets property:foo
to99
for all mesh entitiessetdata!(group(m, :bar), :foo, 99)
sets property:foo
for all mesh entities in group:bar
to99
setdata!(node(m, 1), :foo, 99)
sets property:foo
for node 1 to99
If a property is specified on two or more levels, the most specific level is selected.
MMJMesh.Meshes.Group
— Typestruct Group{T} <: AbstractVector{Int}
A set of indices of objects of type T
. Requires a function index(o::T) -> Int
in this module.
MMJMesh.Meshes.GroupCollection
— Typestruct GroupCollection
A collection of Group
s each identified by a Symbol
. Predefined groups are created by associating a Symbol
with a recipe function. The recipe function is called when the group is first accessed. The recipe function either returns a Group
object which is then cached or nothing
in the case it manipulates the GroupCollection
directly.
MMJMesh.Meshes.Mesh
— TypeMesh(dt, dg [, nn=0, g1=GeometricObjectI, g2=GeometricObjectI])
Mesh(coordinates, dt [, g1=GeometricObjectI, g2=GeometricObjectI])
Mesh(coordinates, elements, dt [, g1=GeometricObjectI, g2=GeometricObjectI])
Mesh of parametric dimension dt
embedded in dg
dimensional space. Types g1
and g2
are default types for geometric objects of parametric dimension 1 and 2.
MMJMesh.Meshes.MeshEntity
— TypeMeshEntity{DT,DG,NN,G}
Entity of a finite element mesh of parametric dimension DT
embeded in DG
dimensional space connected to NN
nodes with a geometry of type G
.
MMJMesh.Meshes.MeshEntityList
— TypeMeshEntityList{DT}
List of entities of a finite element mesh of parametric dimension DT
.
MMJMesh.Meshes._entitygroupnames
— Method_entitygroupnames(m::Mesh; d::Int, predefined::Bool=false)
Returns a vector of the groups each entity of dimension d
belongs to.
MMJMesh.Meshes._idvector
— Method_idvector(values::AbstractVector) -> ids
Assigns an integer id to each unique entry in values
and returns the ids
vector such that ids[i]
is the id of the i
-th value. Larger values have a larger id such that the resulting ids
array satisfies cmp(values[i], values[j]) == cmp(ids[i], ids[j])
.
MMJMesh.Meshes._registergrouprecipies
— Method_registergrouprecipies(m::Mesh)
Registers recipes to generate groups for boundary entities and entities of a certain parametric dimension. To be called once on Mesh
creation.
MMJMesh.Meshes.definegroup!
— Methoddefinegroup!(m, dim, name, indices)
For mesh m
, define group of dim
-dimensional entities called name
with entities indices
.
MMJMesh.Meshes.edim
— Methodedim(type)
edim(group)
Enitity dimension of group or group type.
MMJMesh.Meshes.groupids
— Methodgroupids(m::Mesh; d::Int, predefined::Bool=false)
Unique numerical ids groups of specified dimension.
MMJMesh.Meshes.groupname
— Methodgroupname(e)
Returns the smallest group containing e
`.
MMJMesh.Meshes.groupnames
— Methodgroupnames(m; d=-1, predefined=false)
Returns names of all non-empty groups in Mesh m
of dimension d
. If d
is not specified, groups of all dimensions are included. If predefined
is false
, only user defined groups are considered.
MMJMesh.Meshes.groupnames
— Methodgroupnames(e)
Names of groups entity e belongs to sorted by group size. That is, the most specific group is returned first.
MMJMesh.Meshes.hasgroups
— Methodhasgroups(m::Mesh; d::Int=-1, predefined::Bool=false)
Tests groups are defined.
MMJMesh.Meshes.name
— Methodname(g)
Name of group g
.
MMJMesh.Meshes.ngroups
— Methodngroups(m::Mesh; d::Int=-1, predefined::Bool=false)
Number of groups.
MMJMesh.Meshes.on
— Methodon(p::Point)
on(s::GeometricObjectP)
Generates a predicate which tests if an object is on the specified geometric object. To be used in conjunction with the entiy(m, dim, predicate)
function.