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
56 changes: 56 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools",
"files.associations": {
"ZoneAux.C": "cpp",
"GardensnakeApp.C": "cpp",
"FVVacuumBC.C": "cpp",
"PenaltyBC.C": "cpp",
"FVNeutronDiffusion.C": "cpp",
"Absorption.C": "cpp",
"Fission.C": "cpp",
"Scattering.C": "cpp",
"cctype": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"exceptio": "cpp",
"fstream": "cpp",
"ios": "cpp",
"iostream": "cpp",
"istream": "cpp",
"iterator": "cpp",
"memory": "cpp",
"new": "cpp",
"ostream": "cpp",
"stdexcep": "cpp",
"streambu": "cpp",
"string": "cpp",
"typeinfo": "cpp",
"XSMaterial.C": "cpp",
"FissionSourceRMSFractionalChange.C": "cpp",
"SolutionNormalizer.C": "cpp",
"main.C": "cpp",
"bcs_Unity.C": "cpp",
"auxkernels_Unity.C": "cpp",
"array": "cpp",
"chrono": "cpp",
"compare": "cpp",
"functional": "cpp",
"ratio": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"IntegratedFissionRatePostprocessor.C": "cpp",
"KEigenvalue.C": "cpp",
"PeakFissionSource.C": "cpp",
"PostprocessorRelativeChange.C": "cpp",
"TotalFluxRMSFractionalChange.C": "cpp",
"ZoneElementAverageValue.C": "cpp",
"ZoneElementIntegralPostprocessor.C": "cpp"
}
}
55 changes: 53 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# ###############################################################################
# ################### MOOSE Application Standard Makefile #######################
# ###############################################################################
# #
# # Optional Environment variables
# # MOOSE_DIR - Root directory of the MOOSE project
# # MODULE_DIR - Location of the MOOSE modules directory
# # FRAMEWORK_DIR - Location of the MOOSE framework
# #
# ###############################################################################
# # Use the MOOSE submodule if it exists and MOOSE_DIR is not set
# ###############################################################################
# MODULE_DIR ?= $(shell dirname `pwd`)
# MOOSE_DIR ?= $(shell dirname $(MODULE_DIR))
# FRAMEWORK_DIR ?= $(MOOSE_DIR)/framework
# ADDITIONAL_CPPFLAGS += -Wall -Wextra
# ###############################################################################
# # framework
# include $(FRAMEWORK_DIR)/build.mk
# include $(FRAMEWORK_DIR)/moose.mk

# # Module
# MODULE_NAME := gardensnake
# include $(MODULE_DIR)/modules.mk

# # MOOSE_SUBMODULE := $(CURDIR)/moose
# # ifneq ($(wildcard $(MOOSE_SUBMODULE)/framework/Makefile),)
# # MOOSE_DIR ?= $(MOOSE_SUBMODULE)
# # else
# # MOOSE_DIR ?= $(shell dirname `pwd`)/moose
# # endif

# # # framework
# # FRAMEWORK_DIR := $(MOOSE_DIR)/framework
# # include $(FRAMEWORK_DIR)/build.mk
# # include $(FRAMEWORK_DIR)/moose.mk

# # ################################## MODULES ####################################
# # ALL_MODULES := no
# # include $(MOOSE_DIR)/modules/modules.mk
# ###############################################################################

# # dep apps
# APPLICATION_DIR := $(MODULE_DIR)/gardensnake
# APPLICATION_NAME := gardensnake
# BUILD_EXEC := yes
# DEP_APPS := $(shell $(FRAMEWORK_DIR)/scripts/find_dep_apps.py $(APPLICATION_NAME))
# include $(FRAMEWORK_DIR)/app.mk

# ###############################################################################
# # Additional special case targets should be added here
###############################################################################
################### MOOSE Application Standard Makefile #######################
###############################################################################
Expand All @@ -20,7 +71,7 @@ include $(FRAMEWORK_DIR)/build.mk
include $(FRAMEWORK_DIR)/moose.mk

################################## MODULES ####################################
ALL_MODULES := no
ALL_MODULES := yes
include $(MOOSE_DIR)/modules/modules.mk
###############################################################################

Expand All @@ -32,4 +83,4 @@ DEP_APPS := $(shell $(FRAMEWORK_DIR)/scripts/find_dep_apps.py $(APPLIC
include $(FRAMEWORK_DIR)/app.mk

###############################################################################
# Additional special case targets should be added here
# Additional special case targets should be added here
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@ Gardensnake
=====

Simple neutron diffusion solver.

To install, put the gardensnake module inside the modules directory. Then compile by using make.

To test, assuming you compiled an optimized executable, run the follwoing inside the gardensnake drietory after successful compilation:

**./gardensnake-opt -i problems/problem1/problem1.i**

You can test different problems inside the problems directory.
1 change: 1 addition & 0 deletions build/header_symlinks/Absorption.h
1 change: 1 addition & 0 deletions build/header_symlinks/FVNeutronDiffusion.h
1 change: 1 addition & 0 deletions build/header_symlinks/FVVacuumBC.h
1 change: 1 addition & 0 deletions build/header_symlinks/Fission.h
1 change: 1 addition & 0 deletions build/header_symlinks/FissionSourceRMSFractionalChange.h
1 change: 1 addition & 0 deletions build/header_symlinks/GardensnakeApp.h
1 change: 1 addition & 0 deletions build/header_symlinks/GardensnakeRevision.h
1 change: 1 addition & 0 deletions build/header_symlinks/IntegratedFissionRatePostprocessor.h
1 change: 1 addition & 0 deletions build/header_symlinks/KEigenvalue.h
1 change: 1 addition & 0 deletions build/header_symlinks/PeakFissionSource.h
1 change: 1 addition & 0 deletions build/header_symlinks/PenaltyBC.h
1 change: 1 addition & 0 deletions build/header_symlinks/PostprocessorRelativeChange.h
1 change: 1 addition & 0 deletions build/header_symlinks/Scattering.h
1 change: 1 addition & 0 deletions build/header_symlinks/SolutionNormalizer.h
1 change: 1 addition & 0 deletions build/header_symlinks/TotalFluxRMSFractionalChange.h
1 change: 1 addition & 0 deletions build/header_symlinks/XSMaterial.h
1 change: 1 addition & 0 deletions build/header_symlinks/ZoneAux.h
1 change: 1 addition & 0 deletions build/header_symlinks/ZoneElementAverageValue.h
1 change: 1 addition & 0 deletions build/header_symlinks/ZoneElementIntegralPostprocessor.h
2 changes: 2 additions & 0 deletions build/unity_src/auxkernels_Unity.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

#include"/home/ramzy/projects/gardensnake/src/auxkernels/ZoneAux.C"
3 changes: 3 additions & 0 deletions build/unity_src/bcs_Unity.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

#include"/home/ramzy/projects/gardensnake/src/bcs/FVVacuumBC.C"
#include"/home/ramzy/projects/gardensnake/src/bcs/PenaltyBC.C"
2 changes: 2 additions & 0 deletions build/unity_src/dgkernels_Unity.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

#include"/home/ramzy/projects/gardensnake/src/dgkernels/FVNeutronDiffusion.C"
4 changes: 4 additions & 0 deletions build/unity_src/kernels_Unity.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

#include"/home/ramzy/projects/gardensnake/src/kernels/Absorption.C"
#include"/home/ramzy/projects/gardensnake/src/kernels/Fission.C"
#include"/home/ramzy/projects/gardensnake/src/kernels/Scattering.C"
2 changes: 2 additions & 0 deletions build/unity_src/materials_Unity.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

#include"/home/ramzy/projects/gardensnake/src/materials/XSMaterial.C"
9 changes: 9 additions & 0 deletions build/unity_src/postprocessors_Unity.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

#include"/home/ramzy/projects/gardensnake/src/postprocessors/FissionSourceRMSFractionalChange.C"
#include"/home/ramzy/projects/gardensnake/src/postprocessors/IntegratedFissionRatePostprocessor.C"
#include"/home/ramzy/projects/gardensnake/src/postprocessors/KEigenvalue.C"
#include"/home/ramzy/projects/gardensnake/src/postprocessors/PeakFissionSource.C"
#include"/home/ramzy/projects/gardensnake/src/postprocessors/PostprocessorRelativeChange.C"
#include"/home/ramzy/projects/gardensnake/src/postprocessors/TotalFluxRMSFractionalChange.C"
#include"/home/ramzy/projects/gardensnake/src/postprocessors/ZoneElementAverageValue.C"
#include"/home/ramzy/projects/gardensnake/src/postprocessors/ZoneElementIntegralPostprocessor.C"
2 changes: 2 additions & 0 deletions build/unity_src/userobjects_Unity.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

#include"/home/ramzy/projects/gardensnake/src/userobjects/SolutionNormalizer.C"
19 changes: 10 additions & 9 deletions include/auxkernels/ZoneAux.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,34 @@
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#pragma once

#ifndef ZONEAUX_H
#define ZONEAUX_H
// #ifndef ZONEAUX_H
// #define ZONEAUX_H

#include "AuxKernel.h"

// Forward Declarations
// class ZoneAux;

//Forward Declarations
class ZoneAux;

template<>
InputParameters validParams<ZoneAux>();
// template <>
// InputParameters validParams<ZoneAux>();

/**
* Constant auxiliary value
*/
class ZoneAux : public AuxKernel
{
public:
static InputParameters validParams();

/**
* Factory constructor, takes parameters so that all derived classes can be built using the same
* constructor.
*/
ZoneAux(const InputParameters & parameters);

virtual ~ZoneAux() {}
// virtual ~ZoneAux() {}

protected:
virtual Real computeValue();
Expand All @@ -49,4 +50,4 @@ class ZoneAux : public AuxKernel
const std::vector<Real> & _zone_numbers;
};

#endif //ZONEAUX_H
// #endif // ZONEAUX_H
27 changes: 16 additions & 11 deletions include/base/GardensnakeApp.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
#ifndef GARDENSNAKEAPP_H
#define GARDENSNAKEAPP_H
//* This file is part of GardenSnake, an open-source
//* application for the simulation of plasmas
//* https://github.com/friedmud/gardensnake
//*
//* GardenSnake is powered by the MOOSE Framework
//* https://www.mooseframework.org
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html

#include "MooseApp.h"

class GardensnakeApp;
#pragma once

template<>
InputParameters validParams<GardensnakeApp>();
#include "MooseApp.h"

class GardensnakeApp : public MooseApp
{
public:
static InputParameters validParams();

GardensnakeApp(InputParameters parameters);

virtual ~GardensnakeApp();

static void registerApps();
static void registerObjects(Factory & factory);
static void associateSyntax(Syntax & syntax, ActionFactory & action_factory);
};
static void registerAll(Factory & f, ActionFactory & af, Syntax & s);

#endif /* GARDENSNAKEAPP_H */
};
7 changes: 7 additions & 0 deletions include/base/GardensnakeRevision.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */

#pragma once

#define GARDENSNAKE_REVISION "git commit 9f0b7b9 on 2023-07-15"
#define GARDENSNAKE_VERSION "9f0b7b9"
#define GARDENSNAKE_INSTALLABLE_DIRS "tests"
18 changes: 8 additions & 10 deletions include/bcs/FVVacuumBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,23 @@
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#pragma once

#ifndef FVVACUUMBC_H
#define FVVACUUMBC_H
// #ifndef FVVACUUMBC_H
// #define FVVACUUMBC_H

#include "IntegratedBC.h"


//Forward Declarations
class FVVacuumBC;

template<>
InputParameters validParams<FVVacuumBC>();
// Forward Declarations
// class FVVacuumBC;

/**
* Applies a DirichletBC using integral(penalty*(u - value))
*/
class FVVacuumBC : public IntegratedBC
{
public:
static InputParameters validParams();

FVVacuumBC(const InputParameters & parameters);

Expand All @@ -39,7 +37,7 @@ class FVVacuumBC : public IntegratedBC

const unsigned int _group;

const MaterialProperty<std::vector<Real> > & _diffusivity;
const MaterialProperty<std::vector<Real>> & _diffusivity;
};

#endif //FVVACUUMBC_H
// #endif // FVVACUUMBC_H
Loading