@@ -239,6 +239,11 @@ function Base.union(initial_condition::InitialCondition, initial_conditions...)
239239 particle_spacing = initial_condition. particle_spacing
240240 ic = first (initial_conditions)
241241
242+ if initial_condition. particle_spacing isa Vector || ic. particle_spacing isa Vector
243+ throw (ArgumentError (" `union` operation does not support non-uniform particle spacings. " *
244+ " Please ensure all `InitialCondition`s use a scalar particle spacing." ))
245+ end
246+
242247 if ndims (ic) != ndims (initial_condition)
243248 throw (ArgumentError (" all passed initial conditions must have the same dimensionality" ))
244249 end
@@ -272,6 +277,11 @@ Base.union(initial_condition::InitialCondition) = initial_condition
272277function Base. setdiff (initial_condition:: InitialCondition , initial_conditions... )
273278 ic = first (initial_conditions)
274279
280+ if initial_condition. particle_spacing isa Vector || ic. particle_spacing isa Vector
281+ throw (ArgumentError (" `setdiff` operation does not support non-uniform particle spacings. " *
282+ " Please ensure all `InitialCondition`s use a scalar particle spacing." ))
283+ end
284+
275285 if ndims (ic) != ndims (initial_condition)
276286 throw (ArgumentError (" all passed initial conditions must have the same dimensionality" ))
277287 end
@@ -302,6 +312,11 @@ Base.setdiff(initial_condition::InitialCondition) = initial_condition
302312function Base. intersect (initial_condition:: InitialCondition , initial_conditions... )
303313 ic = first (initial_conditions)
304314
315+ if initial_condition. particle_spacing isa Vector || ic. particle_spacing isa Vector
316+ throw (ArgumentError (" `intersect` operation does not support non-uniform particle spacings. " *
317+ " Please ensure all `InitialCondition`s use a scalar particle spacing." ))
318+ end
319+
305320 if ndims (ic) != ndims (initial_condition)
306321 throw (ArgumentError (" all passed initial conditions must have the same dimensionality" ))
307322 end
0 commit comments