Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 7 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +9 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're not doing the submodule thing I don't think we need these lines?


# 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
Expand All @@ -26,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
Comment on lines -29 to -45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could leave the extra modules in the makefile? Someone might want to enable them for their own purposes.


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 $(OPENMC_APP_DIR)/config.inc
include config.inc

ADDITIONAL_INCLUDES += $(OPENMC_APP_INC) $(OPENMC_INC) $(MOAB_INC)
EXTERNAL_FLAGS += $(OPENMC_APP_LIB) $(OPENMC_LIB) $(MOAB_LIB)
ADDITIONAL_INCLUDES += $(OPENMC_INC) $(MOAB_INC) $(DAGMC_INC)
EXTERNAL_FLAGS += $(OPENMC_LIB) $(MOAB_LIB) $(DAGMC_LIB)

# dep apps
APPLICATION_DIR := $(CURDIR)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file removed openmc/unit/include/place_holder
Empty file.
33 changes: 0 additions & 33 deletions openmc/unit/src/main.C

This file was deleted.

File renamed without changes.
23 changes: 20 additions & 3 deletions src/main.C
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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<MooseApp> app = AppFactory::createAppShared("AuroraTestApp", argc, argv);
std::shared_ptr<MooseApp> app = AppFactory::createAppShared(app_class_name, argc, argv);

// Execute the application
app->run();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/transfers/MoabMeshTransfer.C
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MoabMeshTransfer::validParams()
{
InputParameters params = MultiAppTransfer::validParams();

params.addParam<std::string>("apptype_from", "AuroraTestApp","Type of app from which we are taking mesh and systems.");
params.addParam<std::string>("apptype_from", "AuroraApp","Type of app from which we are taking mesh and systems.");
params.addParam<std::string>("apptype_to", "OpenMCApp","Type of app to which we are sending mesh and systems.");
params.addRequiredParam<std::string>(
"moabname", "Name of the MoabUserObject to which we are transferring the mesh and systems.");
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion test/tests/thermal-mech/main_temp_mech.i
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@
execute_on = "timestep_begin"
input_files = "openmc_mech.i"
positions = '0 0 0'
library_path = ../../../openmc/lib
[]
[]

Expand Down
1 change: 0 additions & 1 deletion test/tests/thermal/main.i
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
execute_on = "timestep_begin"
input_files = "openmc.i"
positions = '0 0 0'
library_path = ../../../openmc/lib
[]
[]

Expand Down
36 changes: 5 additions & 31 deletions unit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Comment on lines -29 to -43
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to keep these options for now.

include $(MOOSE_DIR)/modules/modules.mk
###############################################################################

Expand All @@ -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

Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion unit/openmc_app_inputs

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions unit/src/main.C
Original file line number Diff line number Diff line change
Expand Up @@ -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 <fstream>
#include <string>
Expand All @@ -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;

Expand Down