Skip to content

Commit

Permalink
Add print of MOOSE modules
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilnovak committed Nov 18, 2023
1 parent 0bc9c35 commit a42da39
Show file tree
Hide file tree
Showing 10 changed files with 857 additions and 10 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Optional environment variables:
#
# To control where various third-party dependencies are. You don't need to set
# any of these unless you want to use non-submodule third-party dependencies:
# any of these unless you want to use non-submodule third-party dependencies.
# NOTE: If you change any of these partway through a build, you will need to
# clear out the build/ and install/ directories to be sure the proper build
# flags are used.

# * CONTRIB_DIR : Dir with third-party dependencies (default: contrib)
# * MOOSE_DIR : Top-level MOOSE dir (default: $(CONTRIB_DIR)/moose)
Expand Down Expand Up @@ -115,7 +118,7 @@ endif

ifeq ($(ENABLE_OPENMC), yes)
# HDF5 is only needed to be linked if using OpenMC
$(info Cardinal is using HDF5 from $(HDF5_ROOT))
$(info Cardinal is using HDF5 from $(HDF5_ROOT))
else
ifeq ($(ENABLE_DAGMC), yes)
$(info Ignoring ENABLE_DAGMC because OpenMC is not enabled.)
Expand All @@ -131,18 +134,18 @@ endif
ALL_MODULES := no

FLUID_PROPERTIES := yes
HEAT_CONDUCTION := yes
HEAT_TRANSFER := yes
NAVIER_STOKES := yes
REACTOR := yes
SOLID_PROPERTIES := yes
STOCHASTIC_TOOLS := yes
TENSOR_MECHANICS := yes
THERMAL_HYDRAULICS := yes

# Perform various checks on the dependencies: (i) error if dependencies are
# missing or conflict with one another; (ii) warn if not using a paired
# submodule hash; (iii) check that NEKRS_HOME points to the correct location
# Perform various checks on the dependencies
include config/check_deps.mk
include config/check_modules.mk


# BUILD_TYPE will be passed to CMake via CMAKE_BUILD_TYPE
ifeq ($(METHOD),dbg)
Expand Down
8 changes: 4 additions & 4 deletions config/check_deps.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SAM_CONTENT := $(shell ls $(SAM_DIR) 2> /dev/null)
SOCKEYE_CONTENT := $(shell ls $(SOCKEYE_DIR) 2> /dev/null)

ifneq ($(BISON_CONTENT),)
$(info Cardinal is using BISON from $(BISON_DIR))
$(info Cardinal is using BISON from $(BISON_DIR))
CONTACT := yes
MISC := yes
PHASE_FIELD := yes
Expand All @@ -39,7 +39,7 @@ IAPWS95_CONTENT := $(shell ls $(IAPWS95_DIR) 2> /dev/null)
ifeq ($(MOOSE_CONTENT),)
$(error $n"MOOSE framework does not seem to be available. Make sure that either the submodule is checked out$nor that MOOSE_DIR points to a location with the MOOSE source.$n$nTo fetch the MOOSE submodule, use ./scripts/get-dependencies.sh")
else
$(info Cardinal is using MOOSE from $(MOOSE_DIR))
$(info Cardinal is using MOOSE from $(MOOSE_DIR))
endif

moose_status := $(shell git -C $(CONTRIB_DIR) submodule status 2>/dev/null | grep moose | cut -c1)
Expand All @@ -51,7 +51,7 @@ ifeq ($(ENABLE_NEK), yes)
ifeq ($(NEKRS_CONTENT),)
$(error $n"NekRS does not seem to be available, but ENABLE_NEK is enabled. Make sure that the submodule is checked out.$n$nTo fetch the NekRS submodule, use ./scripts/get-dependencies.sh")
else
$(info Cardinal is using NekRS from $(NEKRS_DIR))
$(info Cardinal is using NekRS from $(NEKRS_DIR))
endif

nek_status := $(shell git -C $(CONTRIB_DIR) submodule status 2>/dev/null | grep nekRS | cut -c1)
Expand All @@ -64,7 +64,7 @@ ifeq ($(ENABLE_OPENMC), yes)
ifeq ($(OPENMC_CONTENT),)
$(error $n"OpenMC does not seem to be available, but ENABLE_OPENMC is enabled. Make sure that the submodule is checked out.$n$nTo fetch the OpenMC submodule, use ./scripts/get-dependencies.sh")
else
$(info Cardinal is using OpenMC from $(OPENMC_DIR))
$(info Cardinal is using OpenMC from $(OPENMC_DIR))
endif

openmc_status := $(shell git -C $(CONTRIB_DIR) submodule status 2>/dev/null | grep openmc | cut -c1)
Expand Down
83 changes: 83 additions & 0 deletions config/check_modules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
define n


endef

$(info $nCardinal is compiled with the following MOOSE modules)

ifeq ($(CHEMICAL_REACTIONS), yes)
$(info CHEMICAL_REACTIONS)
endif
ifeq ($(COMBINED), yes)
$(info COMBINED)
endif
ifeq ($(CONTACT), yes)
$(info CONTACT)
endif
ifeq ($(ELECTROMAGNETICS), yes)
$(info ELECTROMAGNETICS)
endif
ifeq ($(FLUID_PROPERTIES), yes)
$(info FLUID_PROPERTIES)
endif
ifeq ($(FSI), yes)
$(info FSI)
endif
ifeq ($(FUNCTIONAL_EXPANSION_TOOLS), yes)
$(info FUNCTIONAL_EXPANSION_TOOLS)
endif
ifeq ($(GEOMCHEMISTRY), yes)
$(info GEOCHEMISTRY)
endif
ifeq ($(HEAT_TRANSFER), yes)
$(info HEAT_TRANSFER)
endif
ifeq ($(LEVEL_SET), yes)
$(info LEVEL_SET)
endif
ifeq ($(MISC), yes)
$(info MISC)
endif
ifeq ($(NAVIER_STOKES), yes)
$(info NAVIER_STOKES)
endif
ifeq ($(OPTIMIZATION), yes)
$(info OPTIMIZATION)
endif
ifeq ($(PERIDYNAMICS), yes)
$(info PERIDYNAMICS)
endif
ifeq ($(PHASE_FIELD), yes)
$(info PHASE_FIELD)
endif
ifeq ($(POROUS_FLOW), yes)
$(info POROUS_FLOW)
endif
ifeq ($(RAY_TRACING), yes)
$(info RAY_TRACING)
endif
ifeq ($(REACTOR), yes)
$(info REACTOR)
endif
ifeq ($(RDG), yes)
$(info RDG)
endif
ifeq ($(RICHARDS), yes)
$(info RICHARDS)
endif
ifeq ($(SOLID_PROPERTIES), yes)
$(info SOLID_PROPERTIES)
endif
ifeq ($(STOCHASTIC_TOOLS), yes)
$(info STOCHASTIC_TOOLS)
endif
ifeq ($(TENSOR_MECHANICS), yes)
$(info TENSOR_MECHANICS)
endif
ifeq ($(THERMAL_HYDRAULICS), yes)
$(info THERMAL_HYDRAULICS)
endif
ifeq ($(XFEM), yes)
$(info XFEM)
endif
$(info $n)
177 changes: 177 additions & 0 deletions test/tests/griffin_coupling/AO_pps.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4 #3
ny = 4 #3
elem_type = QUAD9
[]
[]

[Variables]
active = 'u v w'

[u]
order = SECOND
family = LAGRANGE
initial_condition = 2.8
[]

[v]
order = SECOND
family = LAGRANGE
initial_condition = 5.4
[]

[w]
order = FIRST
family = LAGRANGE
[]
[]

[Functions]
[force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[]

[exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[]

[left_bc]
type = ParsedFunction
expression = t
[]
[]

[Kernels]
[time_u]
type = TimeDerivative
variable = u
[]

[diff_u]
type = Diffusion
variable = u
[]

[ffn_u]
type = BodyForce
variable = u
function = force_fn
[]

[time_v]
type = TimeDerivative
variable = v
[]

[diff_v]
type = Diffusion
variable = v
[]

[diff_w]
type = Diffusion
variable = w
[]
[]

[BCs]
[all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]

[left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[]

[right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[]

[left_w]
type = DirichletBC
variable = w
boundary = '3'
value = 0
[]

[right_w]
type = DirichletBC
variable = w
boundary = '1'
value = 1
[]
[]

[Postprocessors]
[initial_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = initial
[]

[initial_v]
type = ElementIntegralVariablePostprocessor
variable = v
execute_on = initial
[]

[AxialOffset_u_x]
type = AxialOffsetPostprocessor
variable = u
axial_direction = x
midpoint = 0.5
[]

[AxialOffset_u_y]
type = AxialOffsetPostprocessor
variable = u
axial_direction = y
midpoint = 0.5
[]

[AxialOffset_w]
type = AxialOffsetPostprocessor
variable = w
axial_direction = x
midpoint = 0.5
[]
[]

[Executioner]
type = Transient

dt = 0.1
num_steps = 5
[]

[MultiApps]
[cardinal]
type = TransientMultiApp
app_type = CardinalApp
input_files = moose.i
[]
[]

[Outputs]
file_base = out_AO_pps
exodus = true
csv = true
[]
Loading

0 comments on commit a42da39

Please sign in to comment.