Commit 746ff954 authored by Antoine Jacquey's avatar Antoine Jacquey

Initial files

parents
BasedOnStyle: LLVM
TabWidth: 2
ColumnLimit: 100
UseTab: Never
CommentPragmas: '^/'
ReflowComments: true
AlignTrailingComments: true
SpacesBeforeTrailingComments: 1
SpaceBeforeParens: ControlStatements
SpacesInSquareBrackets: false
BreakBeforeBraces: Allman
PointerAlignment: Middle
BinPackParameters: false
BinPackArguments: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
SortIncludes: false
IndentCaseLabels: true
ConstructorInitializerIndentWidth: 2
AlwaysBreakAfterDefinitionReturnType: TopLevel
AlwaysBreakTemplateDeclarations: true
FixNamespaceComments: false
.libs
*.la
*.lo
*.d
*.o
*.a
*-opt
*-dbg
*-oprof
*-prof
*-devel
*.e
*.nav
*.log
*.aux
*.toc
*.snm
*.csv
*.dylib
*.so
*.so.*
*.vrb
*.jou
*.pyc
*.mod
*.e.*
*.e-s*
*.cfg
*.lbd.*
*.nem
*.spd
*.pex
*.pdf
*.plist*
*.bbl
*.blg
*.spl
*.idx
traceout*.txt
temp_print_trace.*
*.xda
*.xda.*
*.xdr
*.xdr.*
*.mps
*.msmp
*.msmp-*
*.muds
# Latex garbage
*.lot
*.lof
*.poly
*.mpx
*.btr
*.xml
*.gmv
*.plt
*.slh
*.eps
*.dat
*.gp
*.plugin
*.outp
*.patch
*.txt
*.bib.bak
*.out
*.vtk
*.vtu
*.pvtu
.depend
*.png
*.gif
*.tif
*.jpg
*.tiff
*.ps
*.bmp
*.html
*.xyz
*Revision.h
*.json
*.bak
*.processor.*
.clang_complete
.failed_tests
compile_commands.json
build
# Allow certain files in gold directories
!**/gold/*.e
!**/gold/*.e-s*
!**/gold/*.csv
!**/gold/*.vtk
!**/gold/*.vtu
!**/gold/*.pvtu
peacock_run_tmp.i
yaml_dump*
test/tests/outputs/format/dump.i
# Generated header file
MooseRevision.h
# Precompiled headers
moose/include/base/Precompiled.h.gch
# test garbagge
*.FAILED.txt
# eclipse garbage
.project
.cproject
.metadata
.settings
.pydevproject
# vim garbage
*~
.*.swp
.*.swo
framework/contrib/exodiff/exodiff
# Mac garbage
.DS_Store
*.dSYM
# Unit testing stuffbmoose_unit/test_results.xml
!unit/data/csv/*.csv
# gcov code coverage files
*.gcno
*.gcda
*.gcov
# paraview state files
*.pvsm
#Peacock generated files
peacock_*.i
peacock_*.e
# On linux, shared libs end in .0 sometimes
libpcre-opt*
libpcre-dbg*
libmoose-opt*
libmoose-dbg*
#doxygen generated
*/doc/doxygen/html/*
*/doc/doxygen/**/*
moose/doc/doxygen/html/*
modules/*/doc/doxygen/html/*
tutorials/*/*/doc/doxygen/html/*
ICE/
framework/contrib/asio/
# Restartable Data
*.rd
*.rd-*
# Checkpoint Files
*.cpa
*.cpr
*.cpa-*
*.cpr-*
# Ignore petsc arch
petsc/arch-*/*
# phase_field/tests/solution_rasterizer
out.xyz
# JIT and automatic differentiation cache files
.jitcache/
.jitdir/
tmp_jit_*
# Do not store ipython notebook checkpoints
*-checkpoint.ipynb*
# MooseDocs
site
python/MooseDocs/test/output
!**/doc/content/**/*.md
!**/doc/content/**/*.jpg
!**/doc/content/**/*.jpeg
!**/doc/content/**/*.gif
!**/doc/content/**/*.png
!**/doc/content/**/*.svg
!**/doc/content/**/*.ogg
!**/doc/content/**/*.webm
!**/doc/content/**/*.mp4
!**/doc/content/**/*.css
!**/doc/content/**/*.js
!**/doc/content/**/*.bib
!**/doc/content/**/*.woff
!**/doc/content/**/*.woff2
!python/MooseDocs/test/gold/**/*.json
!python/MooseDocs/test/gold/**/*.html
!python/MooseDocs/test/gold/**/*.tex
# Chigger
!python/chigger/tests/**/gold/*.png
!python/chigger/tests/input/*.e*
!python/chigger/logos/*.png
!python/chigger/contrib/*.xml
# Peacock
python/peacock/tests/exodus_tab/TestOutputPlugin_repr.py
python/peacock/tests/exodus_tab/TestExodusPluginManager_repr.py
python/peacock/tests/input_tab/InputFileEditor/fsp_test.i
python/peacock/tests/postprocessor_tab/TestPostprocessorPluginManager_test_script.py
!python/peacock/tests/**/gold/*.png
!python/peacock/icons/**/*.*
!python/peacock/tests/**/input/*.*
peacock_tmp_diff.exo
*.e.diff
This diff is collapsed.
###############################################################################
################### MOOSE Application Standard Makefile #######################
###############################################################################
#
# Optional Environment variables
# MOOSE_DIR - Root directory of the MOOSE project
#
###############################################################################
# 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
MOOSE_DIR ?= $(shell dirname `pwd`)/moose
endif
# framework
FRAMEWORK_DIR := $(MOOSE_DIR)/framework
include $(FRAMEWORK_DIR)/build.mk
include $(FRAMEWORK_DIR)/moose.mk
################################## MODULES ####################################
# To use certain physics included with MOOSE, set variables below to
# yes as needed. Or set ALL_MODULES to yes to turn on everything (overrides
# other set variables).
ALL_MODULES := no
CHEMICAL_REACTIONS := no
CONTACT := no
FLUID_PROPERTIES := no
HEAT_CONDUCTION := no
MISC := no
NAVIER_STOKES := no
PHASE_FIELD := no
RDG := no
RICHARDS := no
SOLID_MECHANICS := no
STOCHASTIC_TOOLS := no
TENSOR_MECHANICS := no
XFEM := no
POROUS_FLOW := no
include $(MOOSE_DIR)/modules/modules.mk
###############################################################################
# dep apps
APPLICATION_DIR := $(CURDIR)
APPLICATION_NAME := lynx
BUILD_EXEC := yes
GEN_REVISION := no
include $(FRAMEWORK_DIR)/app.mk
###############################################################################
# Additional special case targets should be added here
Lynx
=====
"Fork Lynx" to create a new MOOSE-based application.
For more information see: [http://mooseframework.org/create-an-app/](http://mooseframework.org/create-an-app/)
Content:
Lynx:
root_dir: ${ROOT_DIR}/doc/content
moose:
root_dir: ${MOOSE_DIR}/framework/doc/content
content:
- js/*
- css/*
- contrib/**
- media/**
Renderer:
type: MooseDocs.base.MaterializeRenderer
name: Lynx
Extensions:
MooseDocs.extensions.appsyntax:
executable: ${ROOT_DIR}
includes:
- include
!config navigation breadcrumbs=False scrollspy=False
# LynxApp
#!/usr/bin/env python
#* 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
import sys
import os
# Locate MOOSE directory
MOOSE_DIR = os.getenv('MOOSE_DIR', os.path.abspath(os.path.join(os.path.dirname(__name__), '..', 'moose')))
if not os.path.exists(MOOSE_DIR):
MOOSE_DIR = os.path.abspath(os.path.join(os.path.dirname(__name__), '..', '..', 'moose'))
if not os.path.exists(MOOSE_DIR):
raise Exception('Failed to locate MOOSE, specify the MOOSE_DIR environment variable.')
os.environ['MOOSE_DIR'] = MOOSE_DIR
# Append MOOSE python directory
MOOSE_PYTHON_DIR = os.path.join(MOOSE_DIR, 'python')
if MOOSE_PYTHON_DIR not in sys.path:
sys.path.append(MOOSE_PYTHON_DIR)
from MooseDocs import main
if __name__ == '__main__':
sys.exit(main.run())
//* 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
#ifndef LYNXAPP_H
#define LYNXAPP_H
#include "MooseApp.h"
class LynxApp;
template <>
InputParameters validParams<LynxApp>();
class LynxApp : public MooseApp
{
public:
LynxApp(InputParameters parameters);
virtual ~LynxApp();
static void registerApps();
static void registerAll(Factory & f, ActionFactory & af, Syntax & s);
};
#endif /* LYNXAPP_H */
#!/usr/bin/env python
import sys, os
MOOSE_DIR = os.path.abspath(os.environ.get('MOOSE_DIR', os.path.join(os.path.dirname(__file__), '..', 'moose')))
if os.path.exists(os.path.abspath(os.path.join('moose', 'framework', 'Makefile'))):
MOOSE_DIR = os.path.abspath('moose')
MOOSE_DIR = os.environ.get('MOOSE_DIR', MOOSE_DIR)
sys.path.append(os.path.join(MOOSE_DIR, 'python'))
from TestHarness import TestHarness
TestHarness.buildAndRun(sys.argv, None, MOOSE_DIR)
#!/bin/bash
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../"
hookfile="$REPO_DIR/.git/hooks/pre-commit"
if [[ -f $hookfile ]]; then
echo "'$hookfile' already exists - aborting" 1>&2
exit 1
fi
echo '#!/bin/bash
patch=$(git clang-format --diff -- $(git diff --staged --name-only -- src include tests unit))
if [[ "$patch" =~ "no modified files to format" || "$patch" =~ "clang-format did not modify any files" ]]; then
echo "" > /dev/null
else
echo ""
echo "Your code is not properly formatted." >&2
echo "Run 'git clang-format' to resolve the following issues:" >&2
echo ""
echo "$patch"
exit 1
fi
' > $hookfile
chmod a+x $hookfile
#include "LynxApp.h"
#include "Moose.h"
#include "AppFactory.h"
#include "ModulesApp.h"
#include "MooseSyntax.h"
template <>
InputParameters
validParams<LynxApp>()
{
InputParameters params = validParams<MooseApp>();
return params;
}
LynxApp::LynxApp(InputParameters parameters) : MooseApp(parameters)
{
LynxApp::registerAll(_factory, _action_factory, _syntax);
}
LynxApp::~LynxApp() {}
void
LynxApp::registerAll(Factory & f, ActionFactory & af, Syntax & s)
{
ModulesApp::registerAll(f, af, s);
Registry::registerObjectsTo(f, {"LynxApp"});
Registry::registerActionsTo(af, {"LynxApp"});
/* register custom execute flags, action syntax, etc. here */
}
void
LynxApp::registerApps()
{
registerApp(LynxApp);
}
/***************************************************************************************************
*********************** Dynamic Library Entry Points - DO NOT MODIFY ******************************
**************************************************************************************************/
extern "C" void
LynxApp__registerAll(Factory & f, ActionFactory & af, Syntax & s)
{
LynxApp::registerAll(f, af, s);
}
extern "C" void
LynxApp__registerApps()
{
LynxApp::registerApps();
}
//* 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 "LynxTestApp.h"
#include "MooseInit.h"
#include "Moose.h"
#include "MooseApp.h"
#include "AppFactory.h"
// Create a performance log
PerfLog Moose::perf_log("Lynx");
// Begin the main program.
int
main(int argc, char * argv[])
{
// Initialize MPI, solvers and MOOSE
MooseInit init(argc, argv);
// Register this application's MooseApp and any it depends on
LynxTestApp::registerApps();
// Create an instance of the application and store it in a smart pointer for easy cleanup
std::shared_ptr<MooseApp> app = AppFactory::createAppShared("LynxTestApp", argc, argv);
// Execute the application
app->run();
return 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
#ifndef LYNXTESTAPP_H
#define LYNXTESTAPP_H
#include "MooseApp.h"
class LynxTestApp;
template <>
InputParameters validParams<LynxTestApp>();
class LynxTestApp : public MooseApp
{
public:
LynxTestApp(InputParameters parameters);
virtual ~LynxTestApp();
static void registerApps();
static void registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs = false);
};
#endif /* LYNXTESTAPP_H */
//* 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 "LynxTestApp.h"
#include "LynxApp.h"
#include "Moose.h"
#include "AppFactory.h"
#include "MooseSyntax.h"
#include "ModulesApp.h"
template <>
InputParameters
validParams<LynxTestApp>()
{
InputParameters params = validParams<LynxApp>();
return params;
}
LynxTestApp::LynxTestApp(InputParameters parameters) : MooseApp(parameters)
{
LynxTestApp::registerAll(
_factory, _action_factory, _syntax, getParam<bool>("allow_test_objects"));
}
LynxTestApp::~LynxTestApp() {}
void
LynxTestApp::registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs)
{
LynxApp::registerAll(f, af, s);
if (use_test_objs)
{
Registry::registerObjectsTo(f, {"LynxTestApp"});
Registry::registerActionsTo(af, {"LynxTestApp"});
}
}
void
LynxTestApp::registerApps()
{
registerApp(LynxApp);
registerApp(LynxTestApp);
}
/***************************************************************************************************
*********************** Dynamic Library Entry Points - DO NOT MODIFY ******************************
**************************************************************************************************/
// External entry point for dynamic application loading
extern "C" void
LynxTestApp__registerAll(Factory & f, ActionFactory & af, Syntax & s)
{
LynxTestApp::registerAll(f, af, s);
}
extern "C" void
LynxTestApp__registerApps()
{
LynxTestApp::registerApps();
}
//* 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 "LynxTestApp.h"
#include "LynxApp.h"
#include "Moose.h"
#include "AppFactory.h"
#include "MooseSyntax.h"
template <>
InputParameters
validParams<LynxTestApp>()
{
InputParameters params = validParams<LynxApp>();
return params;
}
LynxTestApp::LynxTestApp(InputParameters parameters) : MooseApp(parameters)
{
LynxTestApp::registerAll(
_factory, _action_factory, _syntax, getParam<bool>("allow_test_objects"));
}
LynxTestApp::~LynxTestApp() {}
void
LynxTestApp::registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs)
{
LynxApp::registerAll(f, af, s);
if (use_test_objs)
{
Registry::registerObjectsTo(f, {"LynxTestApp"});
Registry::registerActionsTo(af, {"LynxTestApp"});
}
}
void
LynxTestApp::registerApps()
{
registerApp(LynxApp);
registerApp(LynxTestApp);
}
/***************************************************************************************************
*********************** Dynamic Library Entry Points - DO NOT MODIFY ******************************
**************************************************************************************************/
// External entry point for dynamic application loading
extern "C" void