Mercurial > repos > public > sbplib_julia
comparison src/Grids/manifolds.jl @ 1948:dd77b45ee1ac feature/grids/manifolds
Add some docstrings
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Feb 2025 22:37:55 +0100 |
parents | c63116e2ec8e |
children | 3fb5b03162ee |
comparison
equal
deleted
inserted
replaced
1947:76c6bde84656 | 1948:dd77b45ee1ac |
---|---|
52 function charts end | 52 function charts end |
53 | 53 |
54 """ | 54 """ |
55 connections(::Atlas) | 55 connections(::Atlas) |
56 | 56 |
57 TBD: What exactly should this return? | 57 Collection of pairs of multiblock boundary identifiers. |
58 """ | 58 """ |
59 function connections end | 59 function connections end |
60 | 60 |
61 | |
62 """ | |
63 CartesianAtlas{D,C<:Chart,AT<:AbstractArray{C,D}} <: Atlas | |
64 | |
65 An atlas where the charts are arranged and connected like an array. | |
66 """ | |
61 struct CartesianAtlas{D,C<:Chart,AT<:AbstractArray{C,D}} <: Atlas | 67 struct CartesianAtlas{D,C<:Chart,AT<:AbstractArray{C,D}} <: Atlas |
62 charts::AT | 68 charts::AT |
63 end | 69 end |
64 | 70 |
65 charts(a::CartesianAtlas) = a.charts | 71 charts(a::CartesianAtlas) = a.charts |
84 end | 90 end |
85 | 91 |
86 return c | 92 return c |
87 end | 93 end |
88 | 94 |
95 """ | |
96 boundary_identifiers(a::CartesianAtlas) | |
97 | |
98 All non-connected boundaries of the charts of `a`. | |
99 """ | |
89 function boundary_identifiers(a::CartesianAtlas) | 100 function boundary_identifiers(a::CartesianAtlas) |
90 bs = MultiBlockBoundary[] | 101 bs = MultiBlockBoundary[] |
91 | 102 |
92 for d ∈ 1:ndims(charts(a)) | 103 for d ∈ 1:ndims(charts(a)) |
93 Is = eachslice(CartesianIndices(charts(a)); dims=d) | 104 Is = eachslice(CartesianIndices(charts(a)); dims=d) |
104 | 115 |
105 return bs | 116 return bs |
106 end | 117 end |
107 | 118 |
108 | 119 |
120 """ | |
121 UnstructuredAtlas{C<:Chart, CN<:Tuple{MultiBlockBoundary,MultiBlockBoundary}, ...} <: Atlas | |
122 | |
123 An atlas with connections determined by a vector `MultiBlockBoundary` pairs. | |
124 """ | |
109 struct UnstructuredAtlas{C<:Chart, CN<:Tuple{MultiBlockBoundary,MultiBlockBoundary}, CV<:AbstractVector{C}, CNV<:AbstractVector{CN}} <: Atlas | 125 struct UnstructuredAtlas{C<:Chart, CN<:Tuple{MultiBlockBoundary,MultiBlockBoundary}, CV<:AbstractVector{C}, CNV<:AbstractVector{CN}} <: Atlas |
110 charts::CV | 126 charts::CV |
111 connections::CNV | 127 connections::CNV |
112 end | 128 end |
113 | 129 |
114 charts(a::UnstructuredAtlas) = a.charts | 130 charts(a::UnstructuredAtlas) = a.charts |
115 connections(a::UnstructuredAtlas) = a.connections | 131 connections(a::UnstructuredAtlas) = a.connections |
116 | 132 |
133 """ | |
134 boundary_identifiers(a::UnstructuredAtlas) | |
135 | |
136 All non-connected boundaries of the charts of `a`. | |
137 """ | |
117 function boundary_identifiers(a::UnstructuredAtlas) | 138 function boundary_identifiers(a::UnstructuredAtlas) |
118 bs = MultiBlockBoundary[] | 139 bs = MultiBlockBoundary[] |
119 | 140 |
120 for (i,c) ∈ enumerate(charts(a)) | 141 for (i,c) ∈ enumerate(charts(a)) |
121 for b ∈ boundary_identifiers(c) | 142 for b ∈ boundary_identifiers(c) |