diff --git a/README.md b/README.md index 1d6f34f..0acf9b4 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ MacroUtils is a collection of high-level APIs in order to make your life easier ## Requires -1. Simcenter STAR-CCM+ 2310 libraries; +1. Simcenter STAR-CCM+ 2402 libraries; -1. Integrated development environment (IDE) supporting JDK 17.0.6 and gradle +1. Integrated development environment (IDE) supporting JDK 17.0.8 and gradle ## Recommended IDE -NetBeans 17 or later. +NetBeans 18 or later. ## Need an older version? diff --git a/macroutils/src/macroutils/MacroUtils.java b/macroutils/src/macroutils/MacroUtils.java index 5493492..23718a8 100644 --- a/macroutils/src/macroutils/MacroUtils.java +++ b/macroutils/src/macroutils/MacroUtils.java @@ -28,7 +28,7 @@ * * @since STAR-CCM+ v7.02, May of 2012 * @author Fabio Kasper - * @version 2310 + * @version 2402 */ public final class MacroUtils { diff --git a/macroutils/src/macroutils/creator/CreateRegion.java b/macroutils/src/macroutils/creator/CreateRegion.java index 2a0ce8c..2b61d06 100644 --- a/macroutils/src/macroutils/creator/CreateRegion.java +++ b/macroutils/src/macroutils/creator/CreateRegion.java @@ -4,7 +4,6 @@ import macroutils.MacroUtils; import macroutils.StaticDeclarations; import star.common.GeometryPart; -import star.common.ManagesParts; import star.common.Region; import star.common.RegionManager; import star.common.Simulation; @@ -117,7 +116,7 @@ public ArrayList fromParts(ArrayList agp, ArrayList ar1 = _get.regions.all(false); ar1.removeAll(ar0); _io.say.msg(vo, "Regions created: %d", ar1.size()); - ArrayList amp = new ArrayList<>(); + ArrayList amp = new ArrayList<>(); amp.add(_sim.get(SimulationPartManager.class)); //-- Attempt to automatically create the Interfaces. rmg.updateInterfacesFromPartContacts(amp, im.getMode()); diff --git a/macroutils/src/macroutils/misc/MainRemover.java b/macroutils/src/macroutils/misc/MainRemover.java index 0a47876..65519f5 100644 --- a/macroutils/src/macroutils/misc/MainRemover.java +++ b/macroutils/src/macroutils/misc/MainRemover.java @@ -2,12 +2,11 @@ import java.util.ArrayList; import java.util.Collections; -import java.util.Vector; +import java.util.List; import java.util.stream.Collectors; import macroutils.MacroUtils; import star.base.neo.ClientServerObject; import star.base.neo.ClientServerObjectManager; -import star.base.neo.NeoObjectVector; import star.base.neo.NeoProperty; import star.base.report.Monitor; import star.base.report.MonitorManager; @@ -388,7 +387,7 @@ private void _invalidCells(boolean aggressiveRemoval) { for (String s : npKeys) { _io.say.msg(true, " - %-35s: %s", s, np.get(s).toString()); } - Vector inputs = fvRegions.stream().collect(Collectors.toCollection(Vector::new)); + List inputs = fvRegions.stream().collect(Collectors.toList()); _sim.getMeshManager().removeInvalidCells(inputs, np); _io.say.ok(true); } diff --git a/macroutils/src/macroutils/setter/SetGeometry.java b/macroutils/src/macroutils/setter/SetGeometry.java index 4c98923..66eef01 100644 --- a/macroutils/src/macroutils/setter/SetGeometry.java +++ b/macroutils/src/macroutils/setter/SetGeometry.java @@ -1,10 +1,7 @@ package macroutils.setter; import java.util.ArrayList; -import java.util.Vector; -import java.util.stream.Collectors; import macroutils.MacroUtils; -import star.base.neo.NeoObjectVector; import star.cadmodeler.SolidModelPart; import star.common.GeometryPart; import star.common.PartCurve; @@ -84,16 +81,15 @@ public void splitPartSurfaceByAngle(PartSurface ps, double angle, boolean vo) { /** * Splits the given Part Surfaces by an angle. * - * @param aps given ArrayList of Part Surfaces. - * @param angle given Split Angle. - * @param vo given verbose option. False will not print anything. + * @param inputs given ArrayList of Part Surfaces. + * @param angle given Split Angle. + * @param vo given verbose option. False will not print anything. */ - public void splitPartSurfacesByAngle(ArrayList aps, double angle, boolean vo) { + public void splitPartSurfacesByAngle(ArrayList inputs, double angle, boolean vo) { _io.say.action("Splitting Part Surfaces by Angle", vo); - _io.say.objects(aps, "Part Surfaces", vo); + _io.say.objects(inputs, "Part Surfaces", vo); _io.say.msg(vo, "Split Angle: %g.", angle); - Vector inputs = aps.stream().collect(Collectors.toCollection(Vector::new)); - for (PartSurface ps : aps) { + for (PartSurface ps : inputs) { _get.partSurfaces.manager(ps).splitPartSurfacesByAngle(inputs, angle); } _io.say.ok(vo); @@ -113,25 +109,23 @@ public void splitPartSurfacesByPartCurves(GeometryPart gp, boolean vo) { /** * Splits the given Part Surfaces by the given Part Curves. * - * @param aps given ArrayList of Part Surfaces. - * @param apc given ArrayList of Part Curves. - * @param vo given verbose option. False will not print anything. + * @param inputsPS given ArrayList of Part Surfaces. + * @param inputsPC given ArrayList of Part Curves. + * @param vo given verbose option. False will not print anything. */ - public void splitPartSurfacesByPartCurves(ArrayList aps, - ArrayList apc, boolean vo) { + public void splitPartSurfacesByPartCurves(ArrayList inputsPS, + ArrayList inputsPC, boolean vo) { _io.say.action("Splitting Part Surfaces by Part Curves", vo); - _io.say.objects(aps, "Part Surfaces", vo); - _io.say.objects(apc, "Part Curves", vo); - boolean pssSamePart = _chk.is.withinSamePart(new ArrayList<>(aps)); - boolean pcsSamePart = _chk.is.withinSamePart(new ArrayList<>(apc)); + _io.say.objects(inputsPS, "Part Surfaces", vo); + _io.say.objects(inputsPC, "Part Curves", vo); + boolean pssSamePart = _chk.is.withinSamePart(new ArrayList<>(inputsPS)); + boolean pcsSamePart = _chk.is.withinSamePart(new ArrayList<>(inputsPC)); if (!(pssSamePart && pcsSamePart)) { _io.say.msg(vo, "Objects do not share the same Geometry Part. Returning NULL!"); return; } - Vector inputsPC = apc.stream().collect(Collectors.toCollection(Vector::new)); - Vector inputsPS = aps.stream().collect(Collectors.toCollection(Vector::new)); - for (PartSurface ps : aps) { - _get.partSurfaces.manager(ps).splitPartSurfacesByPartCurves(inputsPS,inputsPC); + for (PartSurface ps : inputsPS) { + _get.partSurfaces.manager(ps).splitPartSurfacesByPartCurves(inputsPS, inputsPC); } _io.say.ok(vo); } diff --git a/tests/test/test_demo01.py b/tests/test/test_demo01.py index 18dc6ff..4143b49 100644 --- a/tests/test/test_demo01.py +++ b/tests/test/test_demo01.py @@ -18,7 +18,7 @@ def test_cell_count(): def test_solution(): - test_utils.assert_iteration(DEMO_ID, 100, tolerance=25, relative=False) + test_utils.assert_iteration(DEMO_ID, 110, tolerance=30, relative=False) def test_report(): diff --git a/tests/test/test_demo05.py b/tests/test/test_demo05.py index 85ae8d9..64c3db0 100644 --- a/tests/test/test_demo05.py +++ b/tests/test/test_demo05.py @@ -18,7 +18,7 @@ def test_kart_wrap_part_surfaces_count(): def test_cell_count(): - test_utils.assert_cell_count(DEMO_ID, 610000, tolerance=0.025) + test_utils.assert_cell_count(DEMO_ID, 630000, tolerance=0.025) def test_solution(): @@ -45,7 +45,7 @@ def test_scalar_pressure_kart_min(): def test_scalar_pressure_kart_max(): - test_utils.assert_scene_max(DEMO_ID, 'Pressure Kart', 'Scalar', 5.0, + test_utils.assert_scene_max(DEMO_ID, 'Pressure Kart', 'Scalar', 1.1, tolerance=1.0, relative=False) @@ -55,7 +55,7 @@ def test_scalar_pressure_section_min(): def test_scalar_pressure_section_max(): - test_utils.assert_scene_max(DEMO_ID, 'Pressure Section', 'Scalar', 5.0, + test_utils.assert_scene_max(DEMO_ID, 'Pressure Section', 'Scalar', 1.1, tolerance=1.0, relative=False) diff --git a/tests/test/test_demo11.py b/tests/test/test_demo11.py index 41e9233..1c5db6a 100644 --- a/tests/test/test_demo11.py +++ b/tests/test/test_demo11.py @@ -23,7 +23,7 @@ def test_subtract_part_surfaces_count(): def test_cell_count(): - test_utils.assert_cell_count(DEMO_ID, 165000, tolerance=0.025) + test_utils.assert_cell_count(DEMO_ID, 157000, tolerance=0.025) def test_scalar_min(): diff --git a/tests/test/test_demo15.py b/tests/test/test_demo15.py index e5bd1f3..cfbcdd6 100644 --- a/tests/test/test_demo15.py +++ b/tests/test/test_demo15.py @@ -46,8 +46,8 @@ def test_solution_ss(): def test_pressure_drop_report_ss(): - test_utils.assert_report(ss_sim(), 'Pressure Drop', 8.1, - tolerance=0.1, relative=False) + test_utils.assert_report(ss_sim(), 'Pressure Drop', 8.0, + tolerance=0.25, relative=False) def test_pressure_scalar_min_ss():