Geometry
Bramble.BrambleBareFunction
— Typestruct BrambleBareFunction{D,T,has_cart}
f_tuple::FunctionWrapper{T, Tuple{NTuple{D,T}}}
f_cartesian::FunctionWrapper{T, Tuple{CartesianIndex{D}}}
end
Structure to wrap around functions to make them more type agnostic. It uses FunctionWrappers
to provide functions calculated on Tuple
s and CartesianIndices
. The type arguments are D
, the dimension of the underlying domain in which the function is defined, f_tuple
, a version of the function appliable to Tuple
s and f_cartesian
, a version of the function appliable to CartesianIndices
(useful when dealing with meshes)
Bramble.CartesianProduct
— Typestruct CartesianProduct{D,T}
data::NTuple{D,Tuple{T,T}}
end
Type for storage of cartesian products of D
intervals having elements of type T
.
Bramble.CartesianProduct
— Method(X::CartesianProduct)(i)
Returns the i
-th interval in the CartesianProduct.
Base.eltype
— Methodeltype(X::CartesianProduct)
eltype(::Type{<:CartesianProduct})
Returns the element type of a CartesianProduct.
Example
julia> X = cartesianproduct(0, 1); eltype(X)
Float64
Bramble.dim
— Methoddim(X::CartesianProduct)
dim(::Type{<:CartesianProduct})
Returns the topological dimension of a CartesianProduct.
Example
julia> X = cartesianproduct(0, 1); dim(X)
1
julia> Y = cartesianproduct(((0,1), (4,5))); dim(Y)
2
Bramble.projection
— Methodprojection(X::CartesianProduct, i)
Returns the i
-th interval in CartesianProduct X
as a new 1
-dimensional CartesianProduct.
Example
julia> X = cartesianproduct(0, 1) × cartesianproduct(4, 5); projection(X, 1)
Type: Float64
Dim: 1
Set: [0.0, 1.0]
Bramble.tails
— Methodtails(X::CartesianProduct, i)
tails(X::CartesianProduct{D})
Returns i
-th interval in CartesianProduct X
as a Tuple. It can also be called on X, returning a
D-tuple with all intervals defining [CartesianProduct](@ref)
X`.
Example
julia> X = cartesianproduct(0, 1) × cartesianproduct(4, 5); tails(X,1)
(0.0, 1.0)
julia> X = cartesianproduct(0, 1) × cartesianproduct(4, 5); tails(X)
((0.0, 1.0), (4.0, 5.0))
Bramble.Domain
— Typestruct Domain{SetType, MarkersType}
set::SetType
markers::MarkersType
end
Structure to represent a domain composed of a CartesianProduct and a set of Markers.
Bramble.Marker
— Typestruct Marker{F}
label::Symbol
f::F
end
Structure to implement markers for a portion of a domain or even boundary conditions. Each Marker is composed of a symbol and a BrambleBareFunction.
Base.eltype
— Methodeltype(Ω::Domain)
eltype(::Type{<:Domain{SetType}})
Returns the type of the bounds defining Domain Ω
.
Example
julia> I = interval(0.0, 1.0); eltype(domain(I × I))
Float64
Bramble.dim
— Methoddim(Ω::Domain)
dim(::Type{<:Domain})
Returns the topological dimension of the Domain Ω
.
Example
julia> I = interval(0.0, 1.0); dim(domain(I × I))
2
Bramble.marker_funcs
— Methodmarker_funcs(Ω::Domain)
Returns a generator with the Marker's BrambleBareFunctions associated with Domain Ω
.
Bramble.projection
— Methodprojection(Ω::Domain, i)
Returns the i
-th 1
-dimensional CartesianProduct of the set associated with Domain Ω
.
For example, projection(domain(I × I), 1)
will return I
.
Bramble.set
— Methodset(Ω::Domain)
Returns the CartesianProduct associated with the Domain Ω
.