Domain

This folder contains structures that are used to encode different kinds of concrete and abstract domains.

Concrete continuous domains

Grids

Dionysos.Domain.GridType
abstract type Grid{N, T} end

Defines an abstract type for grid-based structures in N dimensions with floating-point values T.

source
Dionysos.Domain.get_pos_by_coordFunction
get_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.
source
Dionysos.Domain.GridFreeType
GridFree{N,T} <: Grid{N,T}

Uniform grid on unbounded space, centered at orig and with steps set by the vector h.

source
Dionysos.Domain.GridEllipsoidalRectangularType
GridEllipsoidalRectangular{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.

source
Dionysos.Domain.DeformedGridType
DeformedGrid{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.
source
Dionysos.Domain.get_volumeFunction
get_volume(Dgrid::DeformedGrid) -> T

Computes the volume of a grid cell.

  • If A is provided (linear transformation), uses det(A).
  • Otherwise, defaults to the volume of the base grid.
source

Abstract domains

Dionysos.Domain.GridDomainTypeType
abstract type GridDomainType{N, T} <: DomainType{N, T}

An abstract interface for grid-based domains, enforcing required methods for interaction.

source
Dionysos.Domain.merge_to_hyperrectangles_posFunction
merge_to_hyperrectangles_pos(domain::GridDomainType)

Aggregates the grid elements in GridDomainType into the largest possible hyperrectangles. Returns a list of HyperRectangles that efficiently represent the domain.

source
Dionysos.Domain.merge_to_hyperrectangles_realFunction
merge_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 HyperRectangles using get_rec(grid, pos).

source
Dionysos.Domain.PeriodicDomainListType
PeriodicDomainList{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.
source
Dionysos.Domain.wrap_posFunction
wrap_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.

source
Dionysos.Domain.wrap_coordFunction
wrap_coord(domain::PeriodicDomainList, coord::SVector{N, Float64}) -> SVector{N, Float64}

Transforms a coordinate into its wrapped equivalent within the periodic boundaries.

source
Dionysos.Domain.CustomListType
CustomList{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.

source