Geometry
Sets
Bramble.CartesianProduct — Type
CartesianProduct{D, T}(box::NTuple{D, Tuple{T, T}}, collapsed::NTuple{D, Bool})Cartesian product of D closed intervals embedded in $\mathbb{R}^D$ with scalar coordinate type T.
Fields
box: Tuple ofDinterval endpoint pairs(min, max).collapsed: Tuple ofDboolean flags indicating whether each dimension is degenerate (min ≈ max).
Bramble.CartesianProduct — Method
(X::CartesianProduct{D, T})(i::Integer) -> Tuple{T, T}Return the i-th component interval endpoints (min, max).
Throws
BoundsError: Ifi < 1ori > D.
Base.eltype — Method
eltype(X::CartesianProduct{D, T}) -> Type{T}
eltype(::Type{<:CartesianProduct{D, T}}) -> Type{T}Return the scalar coordinate type T of CartesianProduct X.
Base.first — Method
first(X::CartesianProduct{1}) -> T
last(X::CartesianProduct{1}) -> TReturn the lower (first) or upper (last) bound of a 1D CartesianProduct.
Bramble.print_set_axes — Method
print_set_axes(pp::PrettyPrinter, X::CartesianProduct{D})Print one label: [min, max] line per coordinate of a multi-dimensional set, collapsing degenerate axes. The companion of print_set_extent for D > 1, and likewise shared with Domain's renderer.
Bramble.print_set_extent — Method
print_set_extent(pp::PrettyPrinter, X::CartesianProduct{1})Print a 1D set's extent: Point at v when the interval is degenerate, Interval [a, b] otherwise.
Shared with Domain's own detailed renderer, which used to carry a verbatim copy (gpena/Bramble.jl#47). Lives here rather than in geometry/pretty_print.jl because that file is included before this one, so a signature naming CartesianProduct there would not resolve.
Markers
Bramble.DomainMarkers — Type
DomainMarkers(symbols::Tuple, tuples::Tuple, conditions::Tuple)Container categorizing and indexing boundary and interior markers for a computational domain.
Every field is a statically typed tuple, so symbols, tuples, and conditions markers are each an unrolled, zero-allocation sweep to iterate.
Fields
symbols: Tuple of markers identified by a single predefined boundarySymbol(e.g.:left).tuples: Tuple of markers identified by collections of predefined boundary symbols (e.g.Set([:top, :right])).conditions: Statically typed tuple of predicate function markersf(x)orf(x, t).
See also: markers, symbols, tuples, conditions.
Bramble.DomainMarkers — Method
(dm::DomainMarkers)(t::Number) -> EvaluatedDomainMarkersEvaluate time-dependent condition markers at timestamp t.
Bramble.EvaluatedDomainMarkers — Type
EvaluatedDomainMarkers(original_markers::DomainMarkers, evaluation_time::Number)Time-evaluated wrapper representing a time-dependent DomainMarkers collection evaluated at timestamp t.
Fields
original_markers: UnderlyingDomainMarkersobject.evaluation_time: Evaluation timestampt.
Bramble.Marker — Type
Marker(label::Symbol, identifier::F)Labeled geometric region or boundary marker on a computational domain.
Arguments
label: Region identifier (e.g.:inlet,:wall,:boundary).identifier: Location specification, either a predefined boundarySymbol(e.g.:left), aSet{Symbol}of boundary names, or a boolean spatial predicate functionf(x).
Bramble.MarkerPair — Type
MarkerPair{F}Type alias for Pair{Symbol, F} used to specify region markers (e.g. :boundary => :left).
Bramble.conditions — Method
conditions(domain_markers::DomainMarkers) -> TupleReturn the tuple of predicate condition markers configured in domain_markers.
Bramble.conditions — Method
conditions(edm::EvaluatedDomainMarkers) -> TupleReturn condition markers evaluated at timestamp edm.evaluation_time, converting f(x, t) closures into unary spatial predicates f(x) via Base.Fix2(f, t).
Bramble.identifier — Method
identifier(m::Marker{F}) -> F
identifier(m::MarkerPair{F}) -> FReturn the identifying symbol, set of symbols, or predicate function of marker m.
Bramble.label — Method
label(m::Marker) -> Symbol
label(m::MarkerPair) -> SymbolReturn the Symbol label of marker m.
Bramble.label_conditions — Method
label_conditions(domain_markers::DomainMarkers)Return an iterator yielding labels of all condition predicate markers.
Bramble.label_identifiers — Method
label_identifiers(domain_markers::DomainMarkers)
labels(domain_markers::DomainMarkers)Return a tuple of the Symbol label of every marker in domain_markers.
Concatenates the per-category labels of symbols, tuples, and conditions as a single compile-time-unrolled tuple build, so this allocates 0 bytes. For the labels of one category alone, label_symbols, label_tuples, or label_conditions are equally zero-allocation.
Bramble.label_identifiers — Method
label_identifiers(edm::EvaluatedDomainMarkers)
labels(edm::EvaluatedDomainMarkers)Return a tuple of the Symbol label of every marker in evaluated marker collection edm.
Zero-allocation, like label_identifiers(::DomainMarkers).
Bramble.label_symbols — Method
label_symbols(domain_markers::DomainMarkers)Return an iterator yielding labels of all single-symbol markers.
Bramble.label_tuples — Method
label_tuples(domain_markers::DomainMarkers)Return an iterator yielding labels of all multi-symbol markers.
Bramble.symbols — Method
symbols(domain_markers::DomainMarkers) -> TupleReturn the tuple of single-symbol markers configured in domain_markers.
Bramble.symbols — Method
symbols(edm::EvaluatedDomainMarkers) -> Set{Marker{Symbol}}Return single-symbol markers from the underlying domain markers.
Bramble.tuples — Method
tuples(domain_markers::DomainMarkers) -> TupleReturn the tuple of multi-symbol markers configured in domain_markers.
Bramble.tuples — Method
tuples(edm::EvaluatedDomainMarkers) -> Set{Marker{Set{Symbol}}}Return multi-symbol markers from the underlying domain markers.
Domains
Bramble.Domain — Type
Domain(set::SetType, markers::MarkersType)Computational domain pairing a geometric set (e.g. CartesianProduct) with labeled DomainMarkers.
Fields
set: Geometric set defining the spatial bounding box or interval.markers:DomainMarkerscollection indexing labeled boundaries and subregions.
See also: domain, CartesianProduct, DomainMarkers.
Bramble.Domain — Method
(Ω::Domain)(t::Number) -> DomainEvaluate a time-dependent Domain at timestamp t.
Base.eltype — Method
eltype(Ω::Domain) -> Type
eltype(::Type{<:Domain{SetType}}) -> TypeReturn the coordinate element type of Domain Ω.
Bramble.conditions — Method
conditions(Ω::Domain) -> TupleReturn the tuple of condition predicate markers associated with domain Ω.
Bramble.marker_identifiers — Method
marker_identifiers(Ω::Domain)Return an iterator yielding the identifying symbols, symbol sets, or predicate functions of all markers in domain Ω.
Iterating symbols, tuples, or conditions directly, or through label_symbols/label_tuples/label_conditions, allocates 0 bytes.
Bramble.symbols — Method
symbols(Ω::Domain) -> TupleReturn the tuple of single-symbol markers associated with domain Ω.
Bramble.tuples — Method
tuples(Ω::Domain) -> TupleReturn the tuple of multi-symbol markers associated with domain Ω.
Pretty printing
Bramble.PrettyPrinter — Type
PrettyPrinter(io::IO, indent_level::Int)Helper struct managing visual formatting, indentation, and styled console output.
Carries no compact flag: compact versus detailed is decided by which show method the caller reached — two-argument show for the embeddable one-liner, MIME"text/plain" for the detailed block — rather than by a runtime flag every renderer had to branch on (gpena/Bramble.jl#45). A PrettyPrinter is therefore only ever built inside a detailed renderer.
Bramble.get_dimension_label — Method
get_dimension_label(i::Int) -> StringReturn the standard coordinate label for dimension index i.
Bramble.print_colored — Method
print_colored(pp::PrettyPrinter, text; color = :default, bold = false)Print styled text according to current color settings.
Bramble.print_dimension_info — Method
print_dimension_info(pp::PrettyPrinter, label::String, min_val, max_val, collapsed::Bool)Print coordinate dimension bounds.
Bramble.print_empty_message — Function
print_empty_message(pp::PrettyPrinter, message::String = "(none)")Print an empty collection indicator in muted text.
Bramble.print_header — Function
print_header(pp::PrettyPrinter, title::String, type_info::String = "")Print a prominent header with optional type information.
Bramble.print_indent — Method
print_indent(pp::PrettyPrinter)Print leading spaces corresponding to the current indentation level.
Bramble.print_interval — Method
print_interval(pp::PrettyPrinter, min_val, max_val; collapsed = false)Print formatted interval endpoints or a collapsed point marker.
Bramble.print_joined — Method
print_joined(f, pp::PrettyPrinter, items; sep = ", ")Print each of items by calling f(item), separating consecutive ones with sep.
Replaces seven hand-rolled variants of the same loop across the geometry and mesh renderers (gpena/Bramble.jl#47) — i < length(xs) && print(io, ", ") in five places and a first flag in print_marker_summary, which had to guard three optional groups. f is passed as a closure in the same style as _each_marked in form/dirichlet_constraints.jl, which measured at zero allocations, so the pattern costs nothing here.
items may be any iterable; the separator is written before each entry after the first, so an empty or single-element collection prints no separator at all and a caller with optional groups just filters them out rather than tracking whether anything came before.
Bramble.print_key_value — Method
print_key_value(pp::PrettyPrinter, key::String, value::String; key_color = :green, value_color = :blue, separator = " => ")Print a key-value pair formatted with distinct colors.
Bramble.print_labels_list — Method
print_labels_list(pp::PrettyPrinter, labels; prefix = "Labels: ")Print a comma-separated list of symbols.
Bramble.print_marker_summary — Method
print_marker_summary(pp::PrettyPrinter, n_sym::Int, n_tup::Int, n_cond::Int)Print categorized counts of symbols, tuples, and function condition markers without intermediate allocations.
Bramble.print_section_header — Method
print_section_header(pp::PrettyPrinter, title::String)Print a section header with accent color.
Bramble.print_value — Method
print_value(pp::PrettyPrinter, value; color = :blue)Print a colored value.
Bramble.show_block — Method
show_block(f, io::IO)Render a detailed (MIME"text/plain") block and print it to io without its trailing newline.
f(inner) writes to inner, an IO carrying io's own :color and :compact settings, so printstyled still emits styling. The buffered text is printed with one trailing newline removed: display supplies the final newline itself, and a renderer emitting its own leaves a blank line behind (gpena/Bramble.jl#46).
Replaces an earlier remove_trailing_newline(io) that rewrote the caller's stream in place and silently did nothing unless io happened to be a bare IOBuffer — which at the REPL, and inside array display, it never is. Buffering into a stream this function owns is what makes the trim actually happen.
Bramble.with_indent — Function
with_indent(pp::PrettyPrinter, levels::Int = 1) -> PrettyPrinterReturn a new PrettyPrinter instance with indentation increased by levels.