@@ -40,11 +40,11 @@ function make_space_geometry(workspace::FEMWorkspace)
4040 # Create inner domain disk
4141 num_points_circumference = formulation. points_per_circumference
4242 @debug " Creating inner domain disk with radius $(domain_radius) m"
43- _, _, air_region_marker = draw_disk (x_center, y_center, domain_radius, mesh_size_domain, num_points_circumference)
43+ _, _, air_region_marker, domain_boundary_markers = draw_disk (x_center, y_center, domain_radius, mesh_size_domain, num_points_circumference)
4444
4545 # Create outer domain annular region
4646 @debug " Creating outer domain annular region with radius $(domain_radius_inf) m"
47- _, _, air_infshell_marker = draw_annular (x_center, y_center, domain_radius, domain_radius_inf, mesh_size_inf, num_points_circumference)
47+ _, _, air_infshell_marker, domain_infty_markers = draw_annular (x_center, y_center, domain_radius, domain_radius_inf, mesh_size_inf, num_points_circumference)
4848
4949 # Get earth model from workspace
5050 earth_props = workspace. problem_def. earth_props
@@ -153,12 +153,26 @@ function make_space_geometry(workspace::FEMWorkspace)
153153 earth_material
154154 )
155155
156- # Add surfaces to the workspace
156+ # Add curves to the workspace
157157 workspace. unassigned_entities[air_boundary_marker] = air_boundary_entity
158158 workspace. unassigned_entities[air_infty_marker] = air_infty_entity
159159 workspace. unassigned_entities[earth_boundary_marker] = earth_boundary_entity
160160 workspace. unassigned_entities[earth_infty_marker] = earth_infty_entity
161161
162+ @debug " Domain boundary markers:"
163+ for point_marker in domain_boundary_markers
164+ target_entity = point_marker[2 ] > 0 ? air_boundary_entity : earth_boundary_entity
165+ workspace. unassigned_entities[point_marker] = target_entity
166+ @debug " Point $point_marker : ($(point_marker[1 ]) , $(point_marker[2 ]) , $(point_marker[3 ]) )"
167+ end
168+
169+ @debug " Domain -> infinity markers:"
170+ for point_marker in domain_infty_markers
171+ target_entity = point_marker[2 ] > 0 ? air_infty_entity : earth_infty_entity
172+ workspace. unassigned_entities[point_marker] = target_entity
173+ @debug " Point $point_marker : ($(point_marker[1 ]) , $(point_marker[2 ]) , $(point_marker[3 ]) )"
174+ end
175+
162176 # Add physical groups to the workspace
163177 register_physical_group! (workspace, air_region_tag, air_material)
164178 register_physical_group! (workspace, earth_region_tag, earth_material)
@@ -202,7 +216,7 @@ function make_space_geometry(workspace::FEMWorkspace)
202216 num_elements = formulation. elements_per_length_interfaces
203217 earth_interface_mesh_size = _calc_mesh_size (0 , domain_radius, earth_material, num_elements, workspace)
204218
205- _, _, earth_interface_marker = draw_line (- domain_radius_inf, 0.0 , domain_radius_inf, 0.0 , earth_interface_mesh_size, round (Int, domain_radius))
219+ _, _, earth_interface_markers = draw_line (- domain_radius_inf, 0.0 , domain_radius_inf, 0.0 , earth_interface_mesh_size, round (Int, domain_radius))
206220
207221 # Create physical tag for the earth interface
208222 interface_idx = 1 # Earth interface index
@@ -228,6 +242,7 @@ function make_space_geometry(workspace::FEMWorkspace)
228242 mesh_size_min = earth_interface_mesh_size / 100 # characteristic_len / workspace.formulation.elements_per_length_insulator
229243 mesh_size_max = earth_interface_mesh_size
230244 transition_mesh = collect (LinRange (mesh_size_min, mesh_size_max, n_regions))
245+ # TODO : Transition regions should be parametric and specified by the user in the formulation
231246 _, _, earth_transition_markers = draw_transition_region (cx, cy, transition_radii, transition_mesh, num_points_circumference)
232247
233248 # Register transition regions in the workspace
@@ -246,7 +261,14 @@ function make_space_geometry(workspace::FEMWorkspace)
246261 @info " Transition regions created"
247262
248263 # Add interface to the workspace
249- workspace. unassigned_entities[earth_interface_marker] = earth_interface_entity
264+ @debug " Domain -> infinity markers:"
265+ for point_marker in earth_interface_markers
266+ workspace. unassigned_entities[point_marker] = earth_interface_entity
267+ @debug " Point $point_marker : ($(point_marker[1 ]) , $(point_marker[2 ]) , $(point_marker[3 ]) )"
268+ end
269+
270+
271+
250272 @info " Earth interfaces created"
251273
252274end
0 commit comments