Domain
This folder contains structures that are used to encode different kinds of concrete and abstract domains.
Concrete continuous domains
Dionysos.Domain.ContinuousUnboundedDomain
— TypeContinuousUnboundedDomain{N,T}
Struct for a basic unbounded continuous domain.
Dionysos.Domain.ContinuousBoundedDomain
— TypeContinuousBoundedDomain{N,T,B}
Struct for a basic bounded continuous domain.
Dionysos.Domain.ContinuousBoundedEllipsoidDomain
— TypeContinuousBoundedEllipsoidDomain{N,T,S<:Grid{N,T}}
Struct for a basic bounded continuous domain formed by a finite number of ellipsoids.
Grids
Dionysos.Domain.Grid
— Typeabstract type Grid{N, T} end
Defines an abstract type for grid-based structures in N
dimensions with floating-point values T
.
Dionysos.Domain.get_pos_by_coord
— Functionget_pos_by_coord(grid::Grid{N, T}, x::SVector{N, T}) -> NTuple{N, Int}
Returns the discrete position (grid indices) corresponding to a coordinate x
.
- The cell (0,0) is centered between
-h/2
and+h/2
. h
is the length of a grid cell in each dimension.
Dionysos.Domain.GridFree
— TypeGridFree{N,T} <: Grid{N,T}
Uniform grid on unbounded space, centered at orig
and with steps set by the vector h
.
Dionysos.Domain.GridEllipsoidalRectangular
— TypeGridEllipsoidalRectangular{N,T} <: Grid{N,T}
Uniform grid on rectangular space rect
, centered at orig
and with steps set by the vector h
. Cells are (possibly overlapping) ellipsoids defined at each grid point c
as (x-c)'P(x-c) ≤ 1
.
Dionysos.Domain.DeformedGrid
— TypeDeformedGrid{N, T} <: Grid{N, T}
Represents a deformed version of a GridFree
grid, where points are mapped via an invertible transformation f
and its inverse fi
.
Fields
grid::GridFree{N, T}
: The underlying grid.f::Function
: The forward transformation (physical -> deformed).fi::Function
: The inverse transformation (deformed -> physical).A::Union{Nothing, SMatrix{N, N, T, N*N}}
: Optional linear transformation matrix for volume calculations.
Dionysos.Domain.get_volume
— Functionget_volume(Dgrid::DeformedGrid) -> T
Computes the volume of a grid cell.
- If
A
is provided (linear transformation), usesdet(A)
. - Otherwise, defaults to the volume of the base grid.
Abstract domains
Dionysos.Domain.DomainType
— Typeabstract type DomainType{N, T} end
General abstract type for spatial domains in N
dimensions with elements of type T
.
Dionysos.Domain.GridDomainType
— Typeabstract type GridDomainType{N, T} <: DomainType{N, T}
An abstract interface for grid-based domains, enforcing required methods for interaction.
Dionysos.Domain.merge_to_hyperrectangles_pos
— Functionmerge_to_hyperrectangles_pos(domain::GridDomainType)
Aggregates the grid elements in GridDomainType
into the largest possible hyperrectangles. Returns a list of HyperRectangle
s that efficiently represent the domain.
Dionysos.Domain.merge_to_hyperrectangles_real
— Functionmerge_hyperrectangles_real(domain_list::GridDomainType)
Uses the existing merge_to_hyperrectangles(domain_list)
function to merge elements in grid positions, then converts the result into real-world HyperRectangle
s using get_rec(grid, pos)
.
Dionysos.Domain.DomainList
— TypeDomainList{N,T,S<:Grid{N,T}}
Struct for a basic domain based on a Grid
.
Dionysos.Domain.PeriodicDomainList
— TypePeriodicDomainList{N, T, S} <: GridDomainType{N, T}
A periodic extension of DomainList
, where specified dimensions wrap around at given periods.
Fields
domain::DomainList{N, T, S}
: The underlying domain structure.periodic_dims::Vector{Bool}
: Boolean vector indicating which dimensions are periodic.periods::SVector{N, T}
: The length of the period in each dimension.start::SVector{N, T}
: The start of the periodic cycle in each dimension.
Features
- Uses
DomainList
for element management. - Implements periodic boundary conditions for wrapping elements.
Dionysos.Domain.has_same_periodicity
— Functionhas_same_periodicity(domain1::PeriodicDomainList, domain2::PeriodicDomainList) -> Bool
Returns true
if both domains have the same periodic settings.
Dionysos.Domain.wrap_pos
— Functionwrap_pos(domain::PeriodicDomainList, pos::NTuple{N, Int}) -> NTuple{N, Int}
Wraps a grid position pos
into its equivalent within periodic boundaries.
Handles periodicity correctly based on how the grid is defined.
Dionysos.Domain.wrap_coord
— Functionwrap_coord(domain::PeriodicDomainList, coord::SVector{N, Float64}) -> SVector{N, Float64}
Transforms a coordinate into its wrapped equivalent within the periodic boundaries.
Dionysos.Domain.GeneralDomainList
— TypeGeneralDomainList{N,E<:AbstractSet{NTuple{N,Int}},T,S<:Grid{N,T},F} <: DomainType{N,T}
Struct for a rectangular domain with rectangular obstacles.
Dionysos.Domain.RectangularObstacles
— TypeRectangularObstacles{VT} <: AbstractSet{VT}
Struct for a rectangular domain with rectangular obstacles.
Dionysos.Domain.CustomList
— TypeCustomList{N, T} <: DomainType{N, T}
A flexible, generic domain representation that stores elements as a list of SVector{N, T}
. Useful for managing discrete sets of points in an N
-dimensional space.