Geometry

Sets

Bramble.CartesianProductType
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 of D interval endpoint pairs (min, max).
  • collapsed: Tuple of D boolean flags indicating whether each dimension is degenerate (min ≈ max).

See also: interval, point, box.

source
Bramble.CartesianProductMethod
(X::CartesianProduct{D, T})(i::Integer) -> Tuple{T, T}

Return the i-th component interval endpoints (min, max).

Throws

  • BoundsError: If i < 1 or i > D.
source
Base.eltypeMethod
eltype(X::CartesianProduct{D, T}) -> Type{T}
eltype(::Type{<:CartesianProduct{D, T}}) -> Type{T}

Return the scalar coordinate type T of CartesianProduct X.

source
Base.firstMethod
first(X::CartesianProduct{1}) -> T
last(X::CartesianProduct{1}) -> T

Return the lower (first) or upper (last) bound of a 1D CartesianProduct.

source
Base.inMethod
in(x, X::CartesianProduct) -> Bool

Query whether point x is contained in the closed set X.

source
Bramble.print_set_axesMethod
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.

source
Bramble.print_set_extentMethod
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.

source

Markers

Bramble.DomainMarkersType
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 boundary Symbol (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 markers f(x) or f(x, t).

See also: markers, symbols, tuples, conditions.

source
Bramble.DomainMarkersMethod
(dm::DomainMarkers)(t::Number) -> EvaluatedDomainMarkers

Evaluate time-dependent condition markers at timestamp t.

source
Bramble.EvaluatedDomainMarkersType
EvaluatedDomainMarkers(original_markers::DomainMarkers, evaluation_time::Number)

Time-evaluated wrapper representing a time-dependent DomainMarkers collection evaluated at timestamp t.

Fields

  • original_markers: Underlying DomainMarkers object.
  • evaluation_time: Evaluation timestamp t.
source
Bramble.MarkerType
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 boundary Symbol (e.g. :left), a Set{Symbol} of boundary names, or a boolean spatial predicate function f(x).
source
Bramble.MarkerPairType
MarkerPair{F}

Type alias for Pair{Symbol, F} used to specify region markers (e.g. :boundary => :left).

source
Bramble.conditionsMethod
conditions(domain_markers::DomainMarkers) -> Tuple

Return the tuple of predicate condition markers configured in domain_markers.

source
Bramble.conditionsMethod
conditions(edm::EvaluatedDomainMarkers) -> Tuple

Return condition markers evaluated at timestamp edm.evaluation_time, converting f(x, t) closures into unary spatial predicates f(x) via Base.Fix2(f, t).

source
Bramble.identifierMethod
identifier(m::Marker{F}) -> F
identifier(m::MarkerPair{F}) -> F

Return the identifying symbol, set of symbols, or predicate function of marker m.

source
Bramble.labelMethod
label(m::Marker) -> Symbol
label(m::MarkerPair) -> Symbol

Return the Symbol label of marker m.

source
Bramble.label_conditionsMethod
label_conditions(domain_markers::DomainMarkers)

Return an iterator yielding labels of all condition predicate markers.

source
Bramble.label_identifiersMethod
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.

source
Bramble.label_symbolsMethod
label_symbols(domain_markers::DomainMarkers)

Return an iterator yielding labels of all single-symbol markers.

source
Bramble.label_tuplesMethod
label_tuples(domain_markers::DomainMarkers)

Return an iterator yielding labels of all multi-symbol markers.

source
Bramble.symbolsMethod
symbols(domain_markers::DomainMarkers) -> Tuple

Return the tuple of single-symbol markers configured in domain_markers.

source
Bramble.symbolsMethod
symbols(edm::EvaluatedDomainMarkers) -> Set{Marker{Symbol}}

Return single-symbol markers from the underlying domain markers.

source
Bramble.tuplesMethod
tuples(domain_markers::DomainMarkers) -> Tuple

Return the tuple of multi-symbol markers configured in domain_markers.

source
Bramble.tuplesMethod
tuples(edm::EvaluatedDomainMarkers) -> Set{Marker{Set{Symbol}}}

Return multi-symbol markers from the underlying domain markers.

source

Domains

Base.eltypeMethod
eltype(Ω::Domain) -> Type
eltype(::Type{<:Domain{SetType}}) -> Type

Return the coordinate element type of Domain Ω.

source
Base.inMethod
in(x, Ω::Domain) -> Bool

Query whether point x lies within the closed domain Ω.

source
Bramble.conditionsMethod
conditions(Ω::Domain) -> Tuple

Return the tuple of condition predicate markers associated with domain Ω.

source
Bramble.symbolsMethod
symbols(Ω::Domain) -> Tuple

Return the tuple of single-symbol markers associated with domain Ω.

source
Bramble.tuplesMethod
tuples(Ω::Domain) -> Tuple

Return the tuple of multi-symbol markers associated with domain Ω.

source

Pretty printing

Bramble.PrettyPrinterType
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.

source
Bramble.print_coloredMethod
print_colored(pp::PrettyPrinter, text; color = :default, bold = false)

Print styled text according to current color settings.

source
Bramble.print_headerFunction
print_header(pp::PrettyPrinter, title::String, type_info::String = "")

Print a prominent header with optional type information.

source
Bramble.print_indentMethod
print_indent(pp::PrettyPrinter)

Print leading spaces corresponding to the current indentation level.

source
Bramble.print_intervalMethod
print_interval(pp::PrettyPrinter, min_val, max_val; collapsed = false)

Print formatted interval endpoints or a collapsed point marker.

source
Bramble.print_joinedMethod
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.

source
Bramble.print_key_valueMethod
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.

source
Bramble.print_marker_summaryMethod
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.

source
Bramble.show_blockMethod
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.

source
Bramble.with_indentFunction
with_indent(pp::PrettyPrinter, levels::Int = 1) -> PrettyPrinter

Return a new PrettyPrinter instance with indentation increased by levels.

source