Skip to content

Commit

Permalink
Initial files
Browse files Browse the repository at this point in the history
  • Loading branch information
lindsayad authored and cticenhour committed Oct 24, 2018
1 parent 1879fb9 commit 654bbb8
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/include/base/ArticunoTestApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//* 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 ARTICUNOTESTAPP_H
#define ARTICUNOTESTAPP_H

#include "MooseApp.h"

class ArticunoTestApp;

template <>
InputParameters validParams<ArticunoTestApp>();

class ArticunoTestApp : public MooseApp
{
public:
ArticunoTestApp(InputParameters parameters);
virtual ~ArticunoTestApp();

static void registerApps();
static void registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs = false);
};

#endif /* ARTICUNOTESTAPP_H */
63 changes: 63 additions & 0 deletions test/src/base/ArticunoTestApp.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//* 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 "ArticunoTestApp.h"
#include "ArticunoApp.h"
#include "Moose.h"
#include "AppFactory.h"
#include "MooseSyntax.h"
#include "ModulesApp.h"

template <>
InputParameters
validParams<ArticunoTestApp>()
{
InputParameters params = validParams<ArticunoApp>();
return params;
}

ArticunoTestApp::ArticunoTestApp(InputParameters parameters) : MooseApp(parameters)
{
ArticunoTestApp::registerAll(
_factory, _action_factory, _syntax, getParam<bool>("allow_test_objects"));
}

ArticunoTestApp::~ArticunoTestApp() {}

void
ArticunoTestApp::registerAll(Factory & f, ActionFactory & af, Syntax & s, bool use_test_objs)
{
ArticunoApp::registerAll(f, af, s);
if (use_test_objs)
{
Registry::registerObjectsTo(f, {"ArticunoTestApp"});
Registry::registerActionsTo(af, {"ArticunoTestApp"});
}
}

void
ArticunoTestApp::registerApps()
{
registerApp(ArticunoApp);
registerApp(ArticunoTestApp);
}

/***************************************************************************************************
*********************** Dynamic Library Entry Points - DO NOT MODIFY ******************************
**************************************************************************************************/
// External entry point for dynamic application loading
extern "C" void
ArticunoTestApp__registerAll(Factory & f, ActionFactory & af, Syntax & s)
{
ArticunoTestApp::registerAll(f, af, s);
}
extern "C" void
ArticunoTestApp__registerApps()
{
ArticunoTestApp::registerApps();
}
Binary file not shown.
44 changes: 44 additions & 0 deletions test/tests/kernels/simple_diffusion/simple_diffusion.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]

[Variables]
[./u]
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]

[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]

[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]

[Outputs]
exodus = true
[]
7 changes: 7 additions & 0 deletions test/tests/kernels/simple_diffusion/tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Tests]
[./test]
type = 'Exodiff'
input = 'simple_diffusion.i'
exodiff = 'simple_diffusion_out.e'
[../]
[]

0 comments on commit 654bbb8

Please sign in to comment.