Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
giraffe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nek5000
giraffe
Commits
16c7fbf9
Commit
16c7fbf9
authored
Sep 28, 2016
by
Ron Rahaman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ex01_inputfile to top-level examples
parent
96eb53be
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
291 additions
and
0 deletions
+291
-0
examples/ex01_inputfile/Makefile
examples/ex01_inputfile/Makefile
+40
-0
examples/ex01_inputfile/diffusion_pathological.i
examples/ex01_inputfile/diffusion_pathological.i
+55
-0
examples/ex01_inputfile/ex01.i
examples/ex01_inputfile/ex01.i
+43
-0
examples/ex01_inputfile/gold/ex01_out.e
examples/ex01_inputfile/gold/ex01_out.e
+0
-0
examples/ex01_inputfile/include/README
examples/ex01_inputfile/include/README
+3
-0
examples/ex01_inputfile/include/base/ExampleApp.h
examples/ex01_inputfile/include/base/ExampleApp.h
+35
-0
examples/ex01_inputfile/src/base/ExampleApp.C
examples/ex01_inputfile/src/base/ExampleApp.C
+60
-0
examples/ex01_inputfile/src/main.C
examples/ex01_inputfile/src/main.C
+50
-0
examples/test.mk
examples/test.mk
+5
-0
No files found.
examples/ex01_inputfile/Makefile
0 → 100644
View file @
16c7fbf9
###############################################################################
################### MOOSE Application Standard Makefile #######################
###############################################################################
#
# Optional Environment variables
# MOOSE_DIR - Root directory of the MOOSE project
# FRAMEWORK_DIR - Location of the MOOSE framework
#
###############################################################################
EXAMPLE_DIR
?=
$(
shell
dirname
`
pwd
`
)
MOOSE_DIR
?=
$(
shell
dirname
$(EXAMPLE_DIR)
)
/src/moose
FRAMEWORK_DIR
?=
$(MOOSE_DIR)
/framework
###############################################################################
TEST
:=
test_ignore
# framework
include
$(FRAMEWORK_DIR)/build.mk
include
$(FRAMEWORK_DIR)/moose.mk
APPLICATION_NAME
:=
ex01
# dep apps
APPLICATION_DIR
:=
$(
shell
pwd
)
APPLICATION_NAME
:=
ex01
BUILD_EXEC
:=
yes
DEP_APPS
:=
$(
shell
$(FRAMEWORK_DIR)
/scripts/find_dep_apps.py
$(APPLICATION_NAME)
)
include
$(FRAMEWORK_DIR)/app.mk
include
../test.mk
# Include dependency files for this example
ex_srcfiles
:=
$(
shell
find
$(APPLICATION_DIR)
-name
"*.C"
)
ex_deps
:=
$(
patsubst
%.C, %.
$
(
obj-suffix
)
.d,
$(ex_srcfiles)
)
-include
$(ex_deps)
###############################################################################
# Additional special case targets should be added here
test
:
all
$(
call
TEST_exodiff,ex01.i,ex01_out.e
)
examples/ex01_inputfile/diffusion_pathological.i
0 → 100644
View file @
16c7fbf9
[
Mesh
]
file
=
square
.
e
uniform_refine
=
4
[]
#
Note
:
This
output
block
is
out
of
its
normal
place
(
should
be
at
the
bottom
)
[
Outputs
]
execute_on
=
'
timestep_end
'
exodus
=
true
[]
#
Note
:
The
executioner
is
out
of
its
normal
place
(
should
be
just
about
the
output
block
)
[
Executioner
]
type
=
Steady
solve_type
=
'
PJFNK
'
[]
[
Variables
]
active
=
'
diffused
'
#
Note
the
active
list
here
[
.
/
diffused
]
order
=
FIRST
family
=
LAGRANGE
[
..
/
]
#
This
variable
is
not
active
in
the
list
above
#
therefore
it
is
not
used
in
the
simulation
[
.
/
convected
]
order
=
FIRST
family
=
LAGRANGE
[
..
/
]
[]
[
Kernels
]
[
.
/
diff
]
type
=
Diffusion
variable
=
diffused
[
..
/
]
[]
#
This
example
applies
DirichletBCs
to
all
four
sides
of
our
square
domain
[
BCs
]
[
.
/
left
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'1'
value
=
0
[
..
/
]
[
.
/
right
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'2'
value
=
1
[
..
/
]
[]
examples/ex01_inputfile/ex01.i
0 → 100644
View file @
16c7fbf9
[
Mesh
]
file
=
mug
.
e
[]
[
Variables
]
[
.
/
diffused
]
order
=
FIRST
family
=
LAGRANGE
[
..
/
]
[]
[
Kernels
]
[
.
/
diff
]
type
=
Diffusion
variable
=
diffused
[
..
/
]
[]
[
BCs
]
[
.
/
bottom
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'
bottom
'
value
=
1
[
..
/
]
[
.
/
top
]
type
=
DirichletBC
variable
=
diffused
boundary
=
'
top
'
value
=
0
[
..
/
]
[]
[
Executioner
]
type
=
Steady
solve_type
=
'
PJFNK
'
[]
[
Outputs
]
execute_on
=
'
timestep_end
'
exodus
=
true
[]
examples/ex01_inputfile/gold/ex01_out.e
0 → 100644
View file @
16c7fbf9
File added
examples/ex01_inputfile/include/README
0 → 100644
View file @
16c7fbf9
This example has no header files. This directory
is just included for consistency with the other
examples.
\ No newline at end of file
examples/ex01_inputfile/include/base/ExampleApp.h
0 → 100644
View file @
16c7fbf9
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#ifndef EXAMPLEAPP_H
#define EXAMPLEAPP_H
#include "MooseApp.h"
class
ExampleApp
;
template
<
>
InputParameters
validParams
<
ExampleApp
>
();
class
ExampleApp
:
public
MooseApp
{
public:
ExampleApp
(
InputParameters
parameters
);
virtual
~
ExampleApp
();
static
void
registerApps
();
static
void
registerObjects
(
Factory
&
factory
);
static
void
associateSyntax
(
Syntax
&
syntax
,
ActionFactory
&
action_factory
);
};
#endif
/* EXAMPLEAPP_H */
examples/ex01_inputfile/src/base/ExampleApp.C
0 → 100644
View file @
16c7fbf9
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
#include "ExampleApp.h"
#include "Moose.h"
#include "Factory.h"
#include "AppFactory.h"
#include "MooseSyntax.h"
template
<>
InputParameters
validParams
<
ExampleApp
>
()
{
InputParameters
params
=
validParams
<
MooseApp
>
();
params
.
set
<
bool
>
(
"use_legacy_uo_initialization"
)
=
false
;
params
.
set
<
bool
>
(
"use_legacy_uo_aux_computation"
)
=
false
;
return
params
;
}
ExampleApp
::
ExampleApp
(
InputParameters
parameters
)
:
MooseApp
(
parameters
)
{
srand
(
processor_id
());
Moose
::
registerObjects
(
_factory
);
ExampleApp
::
registerObjects
(
_factory
);
Moose
::
associateSyntax
(
_syntax
,
_action_factory
);
ExampleApp
::
associateSyntax
(
_syntax
,
_action_factory
);
}
ExampleApp
::~
ExampleApp
()
{
}
void
ExampleApp
::
registerObjects
(
Factory
&
/*factory*/
)
{
}
void
ExampleApp
::
registerApps
()
{
registerApp
(
ExampleApp
);
}
void
ExampleApp
::
associateSyntax
(
Syntax
&
/*syntax*/
,
ActionFactory
&
/*action_factory*/
)
{
}
examples/ex01_inputfile/src/main.C
0 → 100644
View file @
16c7fbf9
/****************************************************************/
/* DO NOT MODIFY THIS HEADER */
/* MOOSE - Multiphysics Object Oriented Simulation Environment */
/* */
/* (c) 2010 Battelle Energy Alliance, LLC */
/* ALL RIGHTS RESERVED */
/* */
/* Prepared by Battelle Energy Alliance, LLC */
/* Under Contract No. DE-AC07-05ID14517 */
/* With the U. S. Department of Energy */
/* */
/* See COPYRIGHT for full restrictions */
/****************************************************************/
/**
* Example 1: Input File - The smallest MOOSE based application possible. It solves
* a simple 2D diffusion problem with Dirichlet boundary conditions using built-in
* objects from MOOSE.
*/
#include "ExampleApp.h"
//Moose Includes
#include "MooseInit.h"
#include "Moose.h"
#include "MooseApp.h"
#include "AppFactory.h"
// Create a performance log
PerfLog
Moose
::
perf_log
(
"Example"
);
// 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
ExampleApp
::
registerApps
();
// This creates dynamic memory that we're responsible for deleting
MooseApp
*
app
=
AppFactory
::
createApp
(
"ExampleApp"
,
argc
,
argv
);
// Execute the application
app
->
run
();
// Free up the memory we created earlier
delete
app
;
return
0
;
}
examples/test.mk
0 → 100644
View file @
16c7fbf9
TEST_exodiff
=
\
@./
$(APPLICATION_NAME)
-
$(METHOD)
-i
$(1)
>
/dev/null 2>&1
&&
\
$(FRAMEWORK_DIR)
/contrib/exodiff/exodiff
-quiet
-F
1e-8
-t
5.5E-6
$(2)
gold/
$(2)
|
grep
-qi
"files are the same"
&&
\
echo
$(APPLICATION_NAME)
... OK
||
\
(
echo
$(APPLICATION_NAME)
... FAILED
&&
exit
1
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment