Mapping
This folder contains mappings to make the link between the concrete system and the abstract system, and vice-versa.
Grids
Dionysos.Mapping.Grid — Type
abstract type Grid{N, T} endDefines an abstract type for grid-based structures in N dimensions with floating-point values T.
Dionysos.Mapping.get_pos_by_coord — Function
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/2and+h/2. his the length of a grid cell in each dimension.
Dionysos.Mapping.GridFree — Type
GridFree{N,T} <: Grid{N,T}Uniform grid on unbounded space, centered at orig and with steps set by the vector h.
Dionysos.Mapping.GridEllipsoidalRectangular — Type
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.
Dionysos.Mapping.DeformedGrid — Type
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.
Abstract Mappings
Dionysos.Mapping.AbstractMapping — Type
AbstractMapping{N,T}:
- defines a universe of labels (1..getnstate)
- provides coord <-> state conversions
Dionysos.Mapping.GridMapping — Type
GridMapping{N,T} <: AbstractMapping{N,T}:
- adds grid, and pos <-> state conversions
Concrete Mappings
Simple Mappings
Dionysos.Mapping.ListMapping — Type
ListMapping{N,T} <: AbstractMapping{N,T}Finite list of concrete points (SVector{N,T}) with id=1..K.
Grid Mappings
Dionysos.Mapping.ExplicitGridMapping — Type
ExplicitGridMapping: explicit enumeration of positions -> ids (dict) and ids -> positions (vector)
Dionysos.Mapping.ImplicitGridMapping — Type
ImplicitGridMapping:
- universe is a rectangular index box (minpos..maxpos) possibly periodic
- id computed by row-major linearization (no dict)
- pos recovered by inverse mapping
Dionysos.Mapping.HierarchicalGridMapping — Type
HierarchicalGridMapping:
- multiscale grid mapping with multiple levels of resolution
- each level is a GridMapping (e.g. ImplicitGridMapping)
Dionysos.Mapping.PeriodicGridMapping — Type
PeriodicGridMapping{N, T, M, P} <: GridMapping{N, T}A periodic wrapper over an underlying GridMapping.
Fields (mirrors PeriodicDomainList):
periodic_dims::SVector{P, Int}periods::SVector{P, T}start::SVector{P, T}underlying_mapping::Mperiodic_index_map::NTuple{N, Union{Nothing, Int}}