From 5b6058b2e93afe048ad37b8a60090047d40f4e5c Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 13:17:07 -0600 Subject: [PATCH 1/9] Update makefile --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8f26ddc1..896398ef 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,11 @@ # MOOSE_DIR - Root directory of the MOOSE project # ############################################################################### +AURORA_DIR := $(abspath $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))) +CONTRIB_DIR := $(AURORA_DIR)/contrib +MOOSE_SUBMODULE ?= $(CONTRIB_DIR)/moose + # Use the MOOSE submodule if it exists and MOOSE_DIR is not set -MOOSE_SUBMODULE := $(CURDIR)/moose ifneq ($(wildcard $(MOOSE_SUBMODULE)/framework/Makefile),) MOOSE_DIR ?= $(MOOSE_SUBMODULE) else From 7ca320be7cb048559ad59b6e0aa3e089b6c227d1 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 15:40:47 -0600 Subject: [PATCH 2/9] Flatten input file hierarchy --- Makefile | 4 ++-- {openmc/include => include}/base/OpenMCApp.h | 0 {openmc/include => include}/executioners/OpenMCExecutioner.h | 0 {openmc/include => include}/materials/ADOpenMCDensity.h | 0 {openmc/include => include}/materials/OpenMCDensity.h | 0 {openmc/include => include}/problem/OpenMCProblem.h | 0 {openmc/include => include}/userobject/MoabUserObject.h | 0 {openmc/src => src}/base/OpenMCApp.C | 0 {openmc/src => src}/executioners/OpenMCExecutioner.C | 0 {openmc/src => src}/materials/ADOpenMCDensity.C | 0 {openmc/src => src}/materials/OpenMCDensity.C | 0 {openmc/src => src}/problem/OpenMCProblem.C | 0 {openmc/src => src}/userobject/MoabUserObject.C | 0 13 files changed, 2 insertions(+), 2 deletions(-) rename {openmc/include => include}/base/OpenMCApp.h (100%) rename {openmc/include => include}/executioners/OpenMCExecutioner.h (100%) rename {openmc/include => include}/materials/ADOpenMCDensity.h (100%) rename {openmc/include => include}/materials/OpenMCDensity.h (100%) rename {openmc/include => include}/problem/OpenMCProblem.h (100%) rename {openmc/include => include}/userobject/MoabUserObject.h (100%) rename {openmc/src => src}/base/OpenMCApp.C (100%) rename {openmc/src => src}/executioners/OpenMCExecutioner.C (100%) rename {openmc/src => src}/materials/ADOpenMCDensity.C (100%) rename {openmc/src => src}/materials/OpenMCDensity.C (100%) rename {openmc/src => src}/problem/OpenMCProblem.C (100%) rename {openmc/src => src}/userobject/MoabUserObject.C (100%) diff --git a/Makefile b/Makefile index 896398ef..a6c8e0df 100644 --- a/Makefile +++ b/Makefile @@ -58,8 +58,8 @@ OPENMC_APP_LIB = -Wl,-rpath,$(OPENMC_APP_DIR)/lib -L$(OPENMC_APP_DIR)/lib -l$(OP include $(OPENMC_APP_DIR)/config.inc -ADDITIONAL_INCLUDES += $(OPENMC_APP_INC) $(OPENMC_INC) $(MOAB_INC) -EXTERNAL_FLAGS += $(OPENMC_APP_LIB) $(OPENMC_LIB) $(MOAB_LIB) +ADDITIONAL_INCLUDES += $(OPENMC_APP_INC) $(OPENMC_INC) $(MOAB_INC) $(DAGMC_INC) +EXTERNAL_FLAGS += $(OPENMC_APP_LIB) $(OPENMC_LIB) $(MOAB_LIB) $(DAGMC_LIB) # dep apps APPLICATION_DIR := $(CURDIR) diff --git a/openmc/include/base/OpenMCApp.h b/include/base/OpenMCApp.h similarity index 100% rename from openmc/include/base/OpenMCApp.h rename to include/base/OpenMCApp.h diff --git a/openmc/include/executioners/OpenMCExecutioner.h b/include/executioners/OpenMCExecutioner.h similarity index 100% rename from openmc/include/executioners/OpenMCExecutioner.h rename to include/executioners/OpenMCExecutioner.h diff --git a/openmc/include/materials/ADOpenMCDensity.h b/include/materials/ADOpenMCDensity.h similarity index 100% rename from openmc/include/materials/ADOpenMCDensity.h rename to include/materials/ADOpenMCDensity.h diff --git a/openmc/include/materials/OpenMCDensity.h b/include/materials/OpenMCDensity.h similarity index 100% rename from openmc/include/materials/OpenMCDensity.h rename to include/materials/OpenMCDensity.h diff --git a/openmc/include/problem/OpenMCProblem.h b/include/problem/OpenMCProblem.h similarity index 100% rename from openmc/include/problem/OpenMCProblem.h rename to include/problem/OpenMCProblem.h diff --git a/openmc/include/userobject/MoabUserObject.h b/include/userobject/MoabUserObject.h similarity index 100% rename from openmc/include/userobject/MoabUserObject.h rename to include/userobject/MoabUserObject.h diff --git a/openmc/src/base/OpenMCApp.C b/src/base/OpenMCApp.C similarity index 100% rename from openmc/src/base/OpenMCApp.C rename to src/base/OpenMCApp.C diff --git a/openmc/src/executioners/OpenMCExecutioner.C b/src/executioners/OpenMCExecutioner.C similarity index 100% rename from openmc/src/executioners/OpenMCExecutioner.C rename to src/executioners/OpenMCExecutioner.C diff --git a/openmc/src/materials/ADOpenMCDensity.C b/src/materials/ADOpenMCDensity.C similarity index 100% rename from openmc/src/materials/ADOpenMCDensity.C rename to src/materials/ADOpenMCDensity.C diff --git a/openmc/src/materials/OpenMCDensity.C b/src/materials/OpenMCDensity.C similarity index 100% rename from openmc/src/materials/OpenMCDensity.C rename to src/materials/OpenMCDensity.C diff --git a/openmc/src/problem/OpenMCProblem.C b/src/problem/OpenMCProblem.C similarity index 100% rename from openmc/src/problem/OpenMCProblem.C rename to src/problem/OpenMCProblem.C diff --git a/openmc/src/userobject/MoabUserObject.C b/src/userobject/MoabUserObject.C similarity index 100% rename from openmc/src/userobject/MoabUserObject.C rename to src/userobject/MoabUserObject.C From a9e78e7517bfe1554c816b1a0ed79327e7d6c05a Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 15:47:46 -0600 Subject: [PATCH 3/9] Move OpenMC test. --- .../tests/standalone-run/copper_air_tetmesh.e | Bin .../test => test}/tests/standalone-run/dagmc.h5m | Bin .../test => test}/tests/standalone-run/geometry.xml | 0 .../tests/standalone-run/gold/openmc_example_out.e | Bin .../tests/standalone-run/materials.xml | 0 .../tests/standalone-run/openmc_example.i | 0 .../test => test}/tests/standalone-run/settings.xml | 0 {openmc/test => test}/tests/standalone-run/tests | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename {openmc/test => test}/tests/standalone-run/copper_air_tetmesh.e (100%) rename {openmc/test => test}/tests/standalone-run/dagmc.h5m (100%) rename {openmc/test => test}/tests/standalone-run/geometry.xml (100%) rename {openmc/test => test}/tests/standalone-run/gold/openmc_example_out.e (100%) rename {openmc/test => test}/tests/standalone-run/materials.xml (100%) rename {openmc/test => test}/tests/standalone-run/openmc_example.i (100%) rename {openmc/test => test}/tests/standalone-run/settings.xml (100%) rename {openmc/test => test}/tests/standalone-run/tests (100%) diff --git a/openmc/test/tests/standalone-run/copper_air_tetmesh.e b/test/tests/standalone-run/copper_air_tetmesh.e similarity index 100% rename from openmc/test/tests/standalone-run/copper_air_tetmesh.e rename to test/tests/standalone-run/copper_air_tetmesh.e diff --git a/openmc/test/tests/standalone-run/dagmc.h5m b/test/tests/standalone-run/dagmc.h5m similarity index 100% rename from openmc/test/tests/standalone-run/dagmc.h5m rename to test/tests/standalone-run/dagmc.h5m diff --git a/openmc/test/tests/standalone-run/geometry.xml b/test/tests/standalone-run/geometry.xml similarity index 100% rename from openmc/test/tests/standalone-run/geometry.xml rename to test/tests/standalone-run/geometry.xml diff --git a/openmc/test/tests/standalone-run/gold/openmc_example_out.e b/test/tests/standalone-run/gold/openmc_example_out.e similarity index 100% rename from openmc/test/tests/standalone-run/gold/openmc_example_out.e rename to test/tests/standalone-run/gold/openmc_example_out.e diff --git a/openmc/test/tests/standalone-run/materials.xml b/test/tests/standalone-run/materials.xml similarity index 100% rename from openmc/test/tests/standalone-run/materials.xml rename to test/tests/standalone-run/materials.xml diff --git a/openmc/test/tests/standalone-run/openmc_example.i b/test/tests/standalone-run/openmc_example.i similarity index 100% rename from openmc/test/tests/standalone-run/openmc_example.i rename to test/tests/standalone-run/openmc_example.i diff --git a/openmc/test/tests/standalone-run/settings.xml b/test/tests/standalone-run/settings.xml similarity index 100% rename from openmc/test/tests/standalone-run/settings.xml rename to test/tests/standalone-run/settings.xml diff --git a/openmc/test/tests/standalone-run/tests b/test/tests/standalone-run/tests similarity index 100% rename from openmc/test/tests/standalone-run/tests rename to test/tests/standalone-run/tests From 37dcd32f93f892f8b01518b73987d22a17c87fe7 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 15:56:34 -0600 Subject: [PATCH 4/9] Replace symlink with actual files --- unit/openmc_app_inputs | 1 - {openmc/unit => unit}/openmc_app_inputs/addensity.i | 0 .../openmc_app_inputs/badmoabuserobject.i | 0 .../openmc_app_inputs/copper_air_bcs_tetmesh.e | Bin .../openmc_app_inputs/dagmc_legacy.h5m | Bin .../unit => unit}/openmc_app_inputs/dagmc_uwuw.h5m | Bin {openmc/unit => unit}/openmc_app_inputs/density.i | 0 .../densitysurfstest-changeunits.i | 0 .../openmc_app_inputs/densitysurfstest.i | 0 .../openmc_app_inputs/executioner-many-scores.i | 0 .../openmc_app_inputs/executioner-second.i | 0 .../unit => unit}/openmc_app_inputs/executioner.i | 0 {openmc/unit => unit}/openmc_app_inputs/feproblem.i | 0 .../openmc_app_inputs/findsurfstest-logbins.i | 0 .../openmc_app_inputs/findsurfstest-second.i | 0 .../openmc_app_inputs/findsurfstest-singlemat.i | 0 .../unit => unit}/openmc_app_inputs/findsurfstest.i | 0 .../unit => unit}/openmc_app_inputs/geometry.xml | 0 .../unit => unit}/openmc_app_inputs/materials.xml | 0 {openmc/unit => unit}/openmc_app_inputs/minimal.i | 0 .../openmc_app_inputs/moabuserobject-changeunits.i | 0 .../openmc_app_inputs/moabuserobject.i | 0 .../openmc_app_inputs/nodal_temperature.i | 0 .../unit => unit}/openmc_app_inputs/offset-box.i | 0 .../openmc_app_inputs/secondordermesh.i | 0 .../unit => unit}/openmc_app_inputs/settings.xml | 0 .../openmc_app_inputs/thermal-expansion.i | 0 27 files changed, 1 deletion(-) delete mode 120000 unit/openmc_app_inputs rename {openmc/unit => unit}/openmc_app_inputs/addensity.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/badmoabuserobject.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/copper_air_bcs_tetmesh.e (100%) rename {openmc/unit => unit}/openmc_app_inputs/dagmc_legacy.h5m (100%) rename {openmc/unit => unit}/openmc_app_inputs/dagmc_uwuw.h5m (100%) rename {openmc/unit => unit}/openmc_app_inputs/density.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/densitysurfstest-changeunits.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/densitysurfstest.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/executioner-many-scores.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/executioner-second.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/executioner.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/feproblem.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/findsurfstest-logbins.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/findsurfstest-second.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/findsurfstest-singlemat.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/findsurfstest.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/geometry.xml (100%) rename {openmc/unit => unit}/openmc_app_inputs/materials.xml (100%) rename {openmc/unit => unit}/openmc_app_inputs/minimal.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/moabuserobject-changeunits.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/moabuserobject.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/nodal_temperature.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/offset-box.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/secondordermesh.i (100%) rename {openmc/unit => unit}/openmc_app_inputs/settings.xml (100%) rename {openmc/unit => unit}/openmc_app_inputs/thermal-expansion.i (100%) diff --git a/unit/openmc_app_inputs b/unit/openmc_app_inputs deleted file mode 120000 index dd7c53f8..00000000 --- a/unit/openmc_app_inputs +++ /dev/null @@ -1 +0,0 @@ -../openmc/unit/openmc_app_inputs/ \ No newline at end of file diff --git a/openmc/unit/openmc_app_inputs/addensity.i b/unit/openmc_app_inputs/addensity.i similarity index 100% rename from openmc/unit/openmc_app_inputs/addensity.i rename to unit/openmc_app_inputs/addensity.i diff --git a/openmc/unit/openmc_app_inputs/badmoabuserobject.i b/unit/openmc_app_inputs/badmoabuserobject.i similarity index 100% rename from openmc/unit/openmc_app_inputs/badmoabuserobject.i rename to unit/openmc_app_inputs/badmoabuserobject.i diff --git a/openmc/unit/openmc_app_inputs/copper_air_bcs_tetmesh.e b/unit/openmc_app_inputs/copper_air_bcs_tetmesh.e similarity index 100% rename from openmc/unit/openmc_app_inputs/copper_air_bcs_tetmesh.e rename to unit/openmc_app_inputs/copper_air_bcs_tetmesh.e diff --git a/openmc/unit/openmc_app_inputs/dagmc_legacy.h5m b/unit/openmc_app_inputs/dagmc_legacy.h5m similarity index 100% rename from openmc/unit/openmc_app_inputs/dagmc_legacy.h5m rename to unit/openmc_app_inputs/dagmc_legacy.h5m diff --git a/openmc/unit/openmc_app_inputs/dagmc_uwuw.h5m b/unit/openmc_app_inputs/dagmc_uwuw.h5m similarity index 100% rename from openmc/unit/openmc_app_inputs/dagmc_uwuw.h5m rename to unit/openmc_app_inputs/dagmc_uwuw.h5m diff --git a/openmc/unit/openmc_app_inputs/density.i b/unit/openmc_app_inputs/density.i similarity index 100% rename from openmc/unit/openmc_app_inputs/density.i rename to unit/openmc_app_inputs/density.i diff --git a/openmc/unit/openmc_app_inputs/densitysurfstest-changeunits.i b/unit/openmc_app_inputs/densitysurfstest-changeunits.i similarity index 100% rename from openmc/unit/openmc_app_inputs/densitysurfstest-changeunits.i rename to unit/openmc_app_inputs/densitysurfstest-changeunits.i diff --git a/openmc/unit/openmc_app_inputs/densitysurfstest.i b/unit/openmc_app_inputs/densitysurfstest.i similarity index 100% rename from openmc/unit/openmc_app_inputs/densitysurfstest.i rename to unit/openmc_app_inputs/densitysurfstest.i diff --git a/openmc/unit/openmc_app_inputs/executioner-many-scores.i b/unit/openmc_app_inputs/executioner-many-scores.i similarity index 100% rename from openmc/unit/openmc_app_inputs/executioner-many-scores.i rename to unit/openmc_app_inputs/executioner-many-scores.i diff --git a/openmc/unit/openmc_app_inputs/executioner-second.i b/unit/openmc_app_inputs/executioner-second.i similarity index 100% rename from openmc/unit/openmc_app_inputs/executioner-second.i rename to unit/openmc_app_inputs/executioner-second.i diff --git a/openmc/unit/openmc_app_inputs/executioner.i b/unit/openmc_app_inputs/executioner.i similarity index 100% rename from openmc/unit/openmc_app_inputs/executioner.i rename to unit/openmc_app_inputs/executioner.i diff --git a/openmc/unit/openmc_app_inputs/feproblem.i b/unit/openmc_app_inputs/feproblem.i similarity index 100% rename from openmc/unit/openmc_app_inputs/feproblem.i rename to unit/openmc_app_inputs/feproblem.i diff --git a/openmc/unit/openmc_app_inputs/findsurfstest-logbins.i b/unit/openmc_app_inputs/findsurfstest-logbins.i similarity index 100% rename from openmc/unit/openmc_app_inputs/findsurfstest-logbins.i rename to unit/openmc_app_inputs/findsurfstest-logbins.i diff --git a/openmc/unit/openmc_app_inputs/findsurfstest-second.i b/unit/openmc_app_inputs/findsurfstest-second.i similarity index 100% rename from openmc/unit/openmc_app_inputs/findsurfstest-second.i rename to unit/openmc_app_inputs/findsurfstest-second.i diff --git a/openmc/unit/openmc_app_inputs/findsurfstest-singlemat.i b/unit/openmc_app_inputs/findsurfstest-singlemat.i similarity index 100% rename from openmc/unit/openmc_app_inputs/findsurfstest-singlemat.i rename to unit/openmc_app_inputs/findsurfstest-singlemat.i diff --git a/openmc/unit/openmc_app_inputs/findsurfstest.i b/unit/openmc_app_inputs/findsurfstest.i similarity index 100% rename from openmc/unit/openmc_app_inputs/findsurfstest.i rename to unit/openmc_app_inputs/findsurfstest.i diff --git a/openmc/unit/openmc_app_inputs/geometry.xml b/unit/openmc_app_inputs/geometry.xml similarity index 100% rename from openmc/unit/openmc_app_inputs/geometry.xml rename to unit/openmc_app_inputs/geometry.xml diff --git a/openmc/unit/openmc_app_inputs/materials.xml b/unit/openmc_app_inputs/materials.xml similarity index 100% rename from openmc/unit/openmc_app_inputs/materials.xml rename to unit/openmc_app_inputs/materials.xml diff --git a/openmc/unit/openmc_app_inputs/minimal.i b/unit/openmc_app_inputs/minimal.i similarity index 100% rename from openmc/unit/openmc_app_inputs/minimal.i rename to unit/openmc_app_inputs/minimal.i diff --git a/openmc/unit/openmc_app_inputs/moabuserobject-changeunits.i b/unit/openmc_app_inputs/moabuserobject-changeunits.i similarity index 100% rename from openmc/unit/openmc_app_inputs/moabuserobject-changeunits.i rename to unit/openmc_app_inputs/moabuserobject-changeunits.i diff --git a/openmc/unit/openmc_app_inputs/moabuserobject.i b/unit/openmc_app_inputs/moabuserobject.i similarity index 100% rename from openmc/unit/openmc_app_inputs/moabuserobject.i rename to unit/openmc_app_inputs/moabuserobject.i diff --git a/openmc/unit/openmc_app_inputs/nodal_temperature.i b/unit/openmc_app_inputs/nodal_temperature.i similarity index 100% rename from openmc/unit/openmc_app_inputs/nodal_temperature.i rename to unit/openmc_app_inputs/nodal_temperature.i diff --git a/openmc/unit/openmc_app_inputs/offset-box.i b/unit/openmc_app_inputs/offset-box.i similarity index 100% rename from openmc/unit/openmc_app_inputs/offset-box.i rename to unit/openmc_app_inputs/offset-box.i diff --git a/openmc/unit/openmc_app_inputs/secondordermesh.i b/unit/openmc_app_inputs/secondordermesh.i similarity index 100% rename from openmc/unit/openmc_app_inputs/secondordermesh.i rename to unit/openmc_app_inputs/secondordermesh.i diff --git a/openmc/unit/openmc_app_inputs/settings.xml b/unit/openmc_app_inputs/settings.xml similarity index 100% rename from openmc/unit/openmc_app_inputs/settings.xml rename to unit/openmc_app_inputs/settings.xml diff --git a/openmc/unit/openmc_app_inputs/thermal-expansion.i b/unit/openmc_app_inputs/thermal-expansion.i similarity index 100% rename from openmc/unit/openmc_app_inputs/thermal-expansion.i rename to unit/openmc_app_inputs/thermal-expansion.i From 01e25d56d7a5222f83f71f74e274c6ecced3c264 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 16:00:22 -0600 Subject: [PATCH 5/9] Move all unit file tests --- openmc/unit/include/place_holder | 0 openmc/unit/src/main.C | 33 ------------------- {openmc/unit => unit}/include/BasicTest.h | 0 .../include/MoabUserObjectTest.h | 0 .../include/OpenMCAppLoadUnitTests.h | 0 {openmc/unit => unit}/include/OpenMCAppTest.h | 0 .../unit => unit}/src/MoabUserObjectTest.C | 0 .../src/OpenMCAppLoadUnitTests.C | 0 {openmc/unit => unit}/src/OpenMCAppTest.C | 0 {openmc/unit => unit}/src/OpenMCDensityTest.C | 0 .../unit => unit}/src/OpenMCExecutionerTest.C | 0 {openmc/unit => unit}/src/OpenMCProblemTest.C | 0 unit/src/main.C | 4 +-- 13 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 openmc/unit/include/place_holder delete mode 100644 openmc/unit/src/main.C rename {openmc/unit => unit}/include/BasicTest.h (100%) rename {openmc/unit => unit}/include/MoabUserObjectTest.h (100%) rename {openmc/unit => unit}/include/OpenMCAppLoadUnitTests.h (100%) rename {openmc/unit => unit}/include/OpenMCAppTest.h (100%) rename {openmc/unit => unit}/src/MoabUserObjectTest.C (100%) rename {openmc/unit => unit}/src/OpenMCAppLoadUnitTests.C (100%) rename {openmc/unit => unit}/src/OpenMCAppTest.C (100%) rename {openmc/unit => unit}/src/OpenMCDensityTest.C (100%) rename {openmc/unit => unit}/src/OpenMCExecutionerTest.C (100%) rename {openmc/unit => unit}/src/OpenMCProblemTest.C (100%) diff --git a/openmc/unit/include/place_holder b/openmc/unit/include/place_holder deleted file mode 100644 index e69de29b..00000000 diff --git a/openmc/unit/src/main.C b/openmc/unit/src/main.C deleted file mode 100644 index b7ba26d3..00000000 --- a/openmc/unit/src/main.C +++ /dev/null @@ -1,33 +0,0 @@ -//* This file is part of the MOOSE framework -//* https://www.mooseframework.org -//* -//* All rights reserved, see COPYRIGHT for full restrictions -//* https://github.com/idaholab/moose/blob/master/COPYRIGHT -//* -//* Licensed under LGPL 2.1, please see LICENSE for details -//* https://www.gnu.org/licenses/lgpl-2.1.html - -#include "OpenMCAppLoadUnitTests.h" -#include "gtest/gtest.h" -#include -#include - -PerfLog Moose::perf_log("gtest"); - -GTEST_API_ int -main(int argc, char ** argv) -{ - // gtest removes (only) its args from argc and argv - so this must be before moose init - testing::InitGoogleTest(&argc, argv); - - MooseInit init(argc, argv); - - // This line is annoyingly needed just to force load the shared library, - // otherwise gtest doesn't find the tests - // TODO: is there a way to get this to happen automatically? - if(!OpenMCAppUnitTestsLoaded()) return EXIT_FAILURE; - - Moose::_throw_on_error = true; - - return RUN_ALL_TESTS(); -} diff --git a/openmc/unit/include/BasicTest.h b/unit/include/BasicTest.h similarity index 100% rename from openmc/unit/include/BasicTest.h rename to unit/include/BasicTest.h diff --git a/openmc/unit/include/MoabUserObjectTest.h b/unit/include/MoabUserObjectTest.h similarity index 100% rename from openmc/unit/include/MoabUserObjectTest.h rename to unit/include/MoabUserObjectTest.h diff --git a/openmc/unit/include/OpenMCAppLoadUnitTests.h b/unit/include/OpenMCAppLoadUnitTests.h similarity index 100% rename from openmc/unit/include/OpenMCAppLoadUnitTests.h rename to unit/include/OpenMCAppLoadUnitTests.h diff --git a/openmc/unit/include/OpenMCAppTest.h b/unit/include/OpenMCAppTest.h similarity index 100% rename from openmc/unit/include/OpenMCAppTest.h rename to unit/include/OpenMCAppTest.h diff --git a/openmc/unit/src/MoabUserObjectTest.C b/unit/src/MoabUserObjectTest.C similarity index 100% rename from openmc/unit/src/MoabUserObjectTest.C rename to unit/src/MoabUserObjectTest.C diff --git a/openmc/unit/src/OpenMCAppLoadUnitTests.C b/unit/src/OpenMCAppLoadUnitTests.C similarity index 100% rename from openmc/unit/src/OpenMCAppLoadUnitTests.C rename to unit/src/OpenMCAppLoadUnitTests.C diff --git a/openmc/unit/src/OpenMCAppTest.C b/unit/src/OpenMCAppTest.C similarity index 100% rename from openmc/unit/src/OpenMCAppTest.C rename to unit/src/OpenMCAppTest.C diff --git a/openmc/unit/src/OpenMCDensityTest.C b/unit/src/OpenMCDensityTest.C similarity index 100% rename from openmc/unit/src/OpenMCDensityTest.C rename to unit/src/OpenMCDensityTest.C diff --git a/openmc/unit/src/OpenMCExecutionerTest.C b/unit/src/OpenMCExecutionerTest.C similarity index 100% rename from openmc/unit/src/OpenMCExecutionerTest.C rename to unit/src/OpenMCExecutionerTest.C diff --git a/openmc/unit/src/OpenMCProblemTest.C b/unit/src/OpenMCProblemTest.C similarity index 100% rename from openmc/unit/src/OpenMCProblemTest.C rename to unit/src/OpenMCProblemTest.C diff --git a/unit/src/main.C b/unit/src/main.C index dc4ec1ab..b7ba26d3 100644 --- a/unit/src/main.C +++ b/unit/src/main.C @@ -7,7 +7,7 @@ //* Licensed under LGPL 2.1, please see LICENSE for details //* https://www.gnu.org/licenses/lgpl-2.1.html -#include "AuroraLoadUnitTests.h" +#include "OpenMCAppLoadUnitTests.h" #include "gtest/gtest.h" #include #include @@ -25,7 +25,7 @@ main(int argc, char ** argv) // This line is annoyingly needed just to force load the shared library, // otherwise gtest doesn't find the tests // TODO: is there a way to get this to happen automatically? - if(!AuroraUnitTestsLoaded()) return EXIT_FAILURE; + if(!OpenMCAppUnitTestsLoaded()) return EXIT_FAILURE; Moose::_throw_on_error = true; From 5c5a2f4e5c1c1765f40486f2fcf8bed9017e7510 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 16:20:20 -0600 Subject: [PATCH 6/9] Move config file up --- openmc/config.inc => config.inc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename openmc/config.inc => config.inc (100%) diff --git a/openmc/config.inc b/config.inc similarity index 100% rename from openmc/config.inc rename to config.inc From e79eb1fe9f375b21b0a8adfa77d906306ac95c28 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 18:26:54 -0600 Subject: [PATCH 7/9] unit Makefile --- unit/Makefile | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/unit/Makefile b/unit/Makefile index 4884e59d..ee9f5dd2 100644 --- a/unit/Makefile +++ b/unit/Makefile @@ -11,7 +11,7 @@ # ############################################################################### # Use the MOOSE submodule if it exists and MOOSE_DIR is not set -MOOSE_SUBMODULE := $(CURDIR)/../moose +MOOSE_SUBMODULE := $(CURDIR)/../contrib/moose ifneq ($(wildcard $(MOOSE_SUBMODULE)/framework/Makefile),) MOOSE_DIR ?= $(MOOSE_SUBMODULE) else @@ -26,21 +26,9 @@ include $(FRAMEWORK_DIR)/moose.mk ################################## MODULES #################################### # set desired physics modules equal to 'yes' to enable them -CHEMICAL_REACTIONS := no -CONTACT := no -FLUID_PROPERTIES := no HEAT_CONDUCTION := yes -MISC := no -NAVIER_STOKES := no -PHASE_FIELD := no -RDG := no -RICHARDS := no -SOLID_MECHANICS := no -STOCHASTIC_TOOLS := no +MISC := yes TENSOR_MECHANICS := yes -XFEM := no -POROUS_FLOW := no -LEVEL_SET := no include $(MOOSE_DIR)/modules/modules.mk ############################################################################### @@ -60,24 +48,10 @@ BUILD_EXEC := yes DEP_APPS ?= $(shell $(FRAMEWORK_DIR)/scripts/find_dep_apps.py $(APPLICATION_NAME)) -# Link OpenMC standalone app -OPENMC_APP_NAME = open_mc -OPENMC_APP_LIB_NAME = $(OPENMC_APP_NAME)-$(METHOD) -OPENMC_APP_DIR = $(CURRENT_DIR)/../openmc -OPENMC_APP_INC = -I$(OPENMC_APP_DIR)/include -OPENMC_APP_LIB = -Wl,-rpath,$(OPENMC_APP_DIR)/lib -L$(OPENMC_APP_DIR)/lib -l$(OPENMC_APP_LIB_NAME) +include $(CURRENT_DIR)/../config.inc - -# Link OpenMC App tests -OPENMC_TEST_DIR = $(OPENMC_APP_DIR)/unit/ -OPENMC_TEST_INC = -I$(OPENMC_TEST_DIR)/include -OPENMC_TEST_LIB_NAME = $(OPENMC_APP_NAME)-unit-$(METHOD) -OPENMC_APP_LIB = -Wl,-rpath,$(OPENMC_TEST_DIR)/lib -L$(OPENMC_TEST_DIR)/lib -l$(OPENMC_TEST_LIB_NAME) - -include $(OPENMC_APP_DIR)/config.inc - -ADDITIONAL_INCLUDES += $(OPENMC_TEST_INC) $(OPENMC_APP_INC) $(OPENMC_INC) $(MOAB_INC) $(HDF5_INC) -ADDITIONAL_LIBS += $(OPENMC_TEST_LIB) $(OPENMC_APP_LIB) $(OPENMC_LIB) $(MOAB_LIB) +ADDITIONAL_INCLUDES += $(OPENMC_INC) $(MOAB_INC) $(DAGMC_INC) +ADDITIONAL_LIBS += $(OPENMC_LIB) $(MOAB_LIB) $(DAGMC_LIB) include $(FRAMEWORK_DIR)/app.mk From 0a18a9a2271dfc403d069670030d7bcffca97e2c Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Tue, 13 Dec 2022 18:33:02 -0600 Subject: [PATCH 8/9] Simplify Makefile --- Makefile | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index a6c8e0df..a065c66c 100644 --- a/Makefile +++ b/Makefile @@ -29,37 +29,17 @@ include $(FRAMEWORK_DIR)/moose.mk ALL_MODULES := no -CHEMICAL_REACTIONS := no -CONTACT := no -EXTERNAL_PETSC_SOLVER := no -FLUID_PROPERTIES := no -FUNCTIONAL_EXPANSION_TOOLS := no HEAT_CONDUCTION := yes -LEVEL_SET := no MISC := yes -NAVIER_STOKES := no -PHASE_FIELD := no -POROUS_FLOW := no -RDG := no -RICHARDS := no -SOLID_MECHANICS := no -STOCHASTIC_TOOLS := no TENSOR_MECHANICS := yes -XFEM := no include $(MOOSE_DIR)/modules/modules.mk ############################################################################### -OPENMC_APP_NAME = open_mc -OPENMC_APP_LIB_NAME = $(OPENMC_APP_NAME)-$(METHOD) -OPENMC_APP_DIR = $(CURDIR)/openmc -OPENMC_APP_INC = -I$(OPENMC_APP_DIR)/include -OPENMC_APP_LIB = -Wl,-rpath,$(OPENMC_APP_DIR)/lib -L$(OPENMC_APP_DIR)/lib -l$(OPENMC_APP_LIB_NAME) +include config.inc -include $(OPENMC_APP_DIR)/config.inc - -ADDITIONAL_INCLUDES += $(OPENMC_APP_INC) $(OPENMC_INC) $(MOAB_INC) $(DAGMC_INC) -EXTERNAL_FLAGS += $(OPENMC_APP_LIB) $(OPENMC_LIB) $(MOAB_LIB) $(DAGMC_LIB) +ADDITIONAL_INCLUDES += $(OPENMC_INC) $(MOAB_INC) $(DAGMC_INC) +EXTERNAL_FLAGS += $(OPENMC_LIB) $(MOAB_LIB) $(DAGMC_LIB) # dep apps APPLICATION_DIR := $(CURDIR) From 7f7671732026dec90a808cb329d755730526f192 Mon Sep 17 00:00:00 2001 From: aprilnovak Date: Thu, 15 Dec 2022 10:02:06 -0600 Subject: [PATCH 9/9] Try to simplify Apps --- src/main.C | 23 ++++++++++++++++++++--- src/transfers/MoabMeshTransfer.C | 2 +- test/tests/thermal-mech/main_temp_mech.i | 1 - test/tests/thermal/main.i | 1 - 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/main.C b/src/main.C index 06c86f85..8633547b 100644 --- a/src/main.C +++ b/src/main.C @@ -7,11 +7,12 @@ //* Licensed under LGPL 2.1, please see LICENSE for details //* https://www.gnu.org/licenses/lgpl-2.1.html -#include "AuroraTestApp.h" +#include "AuroraApp.h" #include "MooseInit.h" #include "Moose.h" #include "MooseApp.h" #include "AppFactory.h" +#include "CommandLine.h" // Create a performance log PerfLog Moose::perf_log("Aurora"); @@ -23,11 +24,27 @@ main(int argc, char * argv[]) // Initialize MPI, solvers and MOOSE MooseInit init(argc, argv); + // Get which app to run + CommandLine::Option app_opt = { + "which app to run", {"--app", "app_name"}, false, CommandLine::ARGUMENT::OPTIONAL, {}}; + + auto cmds = CommandLine(argc, argv); + cmds.addOption("which_app", app_opt); + + std::string which_app; + cmds.search("which_app", which_app); + // Register this application's MooseApp and any it depends on - AuroraTestApp::registerApps(); + AuroraApp::registerApps(); + + std::string app_class_name; + if (which_app == "openmc") + app_class_name = "OpenMCApp"; + else + app_class_name = "AuroraApp"; // Create an instance of the application and store it in a smart pointer for easy cleanup - std::shared_ptr app = AppFactory::createAppShared("AuroraTestApp", argc, argv); + std::shared_ptr app = AppFactory::createAppShared(app_class_name, argc, argv); // Execute the application app->run(); diff --git a/src/transfers/MoabMeshTransfer.C b/src/transfers/MoabMeshTransfer.C index 3c66fa3e..b56ee9c6 100644 --- a/src/transfers/MoabMeshTransfer.C +++ b/src/transfers/MoabMeshTransfer.C @@ -8,7 +8,7 @@ MoabMeshTransfer::validParams() { InputParameters params = MultiAppTransfer::validParams(); - params.addParam("apptype_from", "AuroraTestApp","Type of app from which we are taking mesh and systems."); + params.addParam("apptype_from", "AuroraApp","Type of app from which we are taking mesh and systems."); params.addParam("apptype_to", "OpenMCApp","Type of app to which we are sending mesh and systems."); params.addRequiredParam( "moabname", "Name of the MoabUserObject to which we are transferring the mesh and systems."); diff --git a/test/tests/thermal-mech/main_temp_mech.i b/test/tests/thermal-mech/main_temp_mech.i index c38e1c69..bf92e9c3 100644 --- a/test/tests/thermal-mech/main_temp_mech.i +++ b/test/tests/thermal-mech/main_temp_mech.i @@ -209,7 +209,6 @@ execute_on = "timestep_begin" input_files = "openmc_mech.i" positions = '0 0 0' - library_path = ../../../openmc/lib [] [] diff --git a/test/tests/thermal/main.i b/test/tests/thermal/main.i index 9d2e47da..7e07074c 100644 --- a/test/tests/thermal/main.i +++ b/test/tests/thermal/main.i @@ -114,7 +114,6 @@ execute_on = "timestep_begin" input_files = "openmc.i" positions = '0 0 0' - library_path = ../../../openmc/lib [] []