From b6b99d7f2532b381204385d155f189f157c823b7 Mon Sep 17 00:00:00 2001 From: Daryl Hawkins Date: Thu, 6 Nov 2025 13:46:49 -0800 Subject: [PATCH] Updating spherical benchmarks to use new booundary interface. --- Six_1g_spherical_benchmarks/Problem_1.py | 8 ++------ Six_1g_spherical_benchmarks/Problem_2.py | 8 -------- Six_1g_spherical_benchmarks/Problem_3.py | 8 -------- Six_1g_spherical_benchmarks/Problem_4.py | 8 ++------ Six_1g_spherical_benchmarks/Problem_5.py | 8 ++------ Six_1g_spherical_benchmarks/Problem_6.py | 8 -------- 6 files changed, 6 insertions(+), 42 deletions(-) diff --git a/Six_1g_spherical_benchmarks/Problem_1.py b/Six_1g_spherical_benchmarks/Problem_1.py index 440c20e..6b3ff26 100644 --- a/Six_1g_spherical_benchmarks/Problem_1.py +++ b/Six_1g_spherical_benchmarks/Problem_1.py @@ -32,6 +32,7 @@ partitioner=PETScGraphPartitioner(type='parmetis'), ) grid = meshgen.Execute() + grid.SetUniformBoundaryID("sphere_surface") # Get measured volumes volumes_per_block = grid.ComputeVolumePerBlockID() @@ -103,12 +104,7 @@ ], scattering_order=0, boundary_conditions=[ - {"name": "xmin", "type": "isotropic", "group_strength": bsrc}, - {"name": "xmax", "type": "isotropic", "group_strength": bsrc}, - {"name": "ymin", "type": "isotropic", "group_strength": bsrc}, - {"name": "ymax", "type": "isotropic", "group_strength": bsrc}, - {"name": "zmin", "type": "isotropic", "group_strength": bsrc}, - {"name": "zmax", "type": "isotropic", "group_strength": bsrc}, + {"name": "sphere_surface", "type": "isotropic", "group_strength": bsrc}, ], ) diff --git a/Six_1g_spherical_benchmarks/Problem_2.py b/Six_1g_spherical_benchmarks/Problem_2.py index d203db3..da96c6e 100644 --- a/Six_1g_spherical_benchmarks/Problem_2.py +++ b/Six_1g_spherical_benchmarks/Problem_2.py @@ -68,14 +68,6 @@ ], scattering_order=0, volumetric_sources=[mg_src], - boundary_conditions=[ - {"name": "xmin", "type": "vacuum"}, - {"name": "xmax", "type": "vacuum"}, - {"name": "ymin", "type": "vacuum"}, - {"name": "ymax", "type": "vacuum"}, - {"name": "zmin", "type": "vacuum"}, - {"name": "zmax", "type": "vacuum"} - ], ) ss_solver = SteadyStateSourceSolver(problem=phys) diff --git a/Six_1g_spherical_benchmarks/Problem_3.py b/Six_1g_spherical_benchmarks/Problem_3.py index cbbdfe4..313927d 100644 --- a/Six_1g_spherical_benchmarks/Problem_3.py +++ b/Six_1g_spherical_benchmarks/Problem_3.py @@ -65,14 +65,6 @@ ], scattering_order=0, volumetric_sources=[mg_src], - boundary_conditions=[ - {"name": "xmin", "type": "vacuum"}, - {"name": "xmax", "type": "vacuum"}, - {"name": "ymin", "type": "vacuum"}, - {"name": "ymax", "type": "vacuum"}, - {"name": "zmin", "type": "vacuum"}, - {"name": "zmax", "type": "vacuum"}, - ], ) ss_solver = SteadyStateSourceSolver(problem=phys) diff --git a/Six_1g_spherical_benchmarks/Problem_4.py b/Six_1g_spherical_benchmarks/Problem_4.py index d723594..8b1afb6 100644 --- a/Six_1g_spherical_benchmarks/Problem_4.py +++ b/Six_1g_spherical_benchmarks/Problem_4.py @@ -31,6 +31,7 @@ partitioner=PETScGraphPartitioner(type='parmetis'), ) grid = meshgen.Execute() + grid.SetUniformBoundaryID("sphere_surface") # Create XS num_groups = 1 @@ -67,12 +68,7 @@ ], scattering_order=0, boundary_conditions=[ - {"name": "xmin", "type": "isotropic", "group_strength": bsrc}, - {"name": "xmax", "type": "isotropic", "group_strength": bsrc}, - {"name": "ymin", "type": "isotropic", "group_strength": bsrc}, - {"name": "ymax", "type": "isotropic", "group_strength": bsrc}, - {"name": "zmin", "type": "isotropic", "group_strength": bsrc}, - {"name": "zmax", "type": "isotropic", "group_strength": bsrc}, + {"name": "sphere_surface", "type": "isotropic", "group_strength": bsrc}, ], ) diff --git a/Six_1g_spherical_benchmarks/Problem_5.py b/Six_1g_spherical_benchmarks/Problem_5.py index 2d6955b..1d5c18c 100644 --- a/Six_1g_spherical_benchmarks/Problem_5.py +++ b/Six_1g_spherical_benchmarks/Problem_5.py @@ -31,6 +31,7 @@ partitioner=PETScGraphPartitioner(type='parmetis'), ) grid = meshgen.Execute() + grid.SetUniformBoundaryID("sphere_surface") # Create XS num_groups = 1 @@ -67,12 +68,7 @@ ], scattering_order=0, boundary_conditions=[ - {"name": "xmin", "type": "isotropic", "group_strength": bsrc}, - {"name": "xmax", "type": "isotropic", "group_strength": bsrc}, - {"name": "ymin", "type": "isotropic", "group_strength": bsrc}, - {"name": "ymax", "type": "isotropic", "group_strength": bsrc}, - {"name": "zmin", "type": "isotropic", "group_strength": bsrc}, - {"name": "zmax", "type": "isotropic", "group_strength": bsrc}, + {"name": "sphere_surface", "type": "isotropic", "group_strength": bsrc}, ], ) diff --git a/Six_1g_spherical_benchmarks/Problem_6.py b/Six_1g_spherical_benchmarks/Problem_6.py index 3c9d49f..3ef913d 100644 --- a/Six_1g_spherical_benchmarks/Problem_6.py +++ b/Six_1g_spherical_benchmarks/Problem_6.py @@ -68,14 +68,6 @@ ], scattering_order=0, volumetric_sources=[mg_src], - boundary_conditions=[ - {"name": "xmin", "type": "vacuum"}, - {"name": "xmax", "type": "vacuum"}, - {"name": "ymin", "type": "vacuum"}, - {"name": "ymax", "type": "vacuum"}, - {"name": "zmin", "type": "vacuum"}, - {"name": "zmax", "type": "vacuum"}, - ], ) ss_solver = SteadyStateSourceSolver(problem=phys)