Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
0c17cd94
Commit
0c17cd94
authored
Jun 01, 2013
by
Praetorius, Simon
Browse files
mini example added to main AMDiS dir
parent
b91cc94a
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/other/examples/CMakeLists.txt
0 → 100644
View file @
0c17cd94
project
(
"example"
)
cmake_minimum_required
(
VERSION 2.8
)
find_package
(
AMDIS REQUIRED
)
if
(
AMDIS_FOUND
)
message
(
STATUS
"AMDiS was found."
)
include
(
${
AMDIS_USE_FILE
}
)
SET
(
BASIS_LIBS
${
AMDIS_LIBRARIES
}
)
endif
(
AMDIS_FOUND
)
add_executable
(
"example"
example.cc
)
target_link_libraries
(
"example"
${
BASIS_LIBS
}
)
AMDiS/other/examples/example.cc
0 → 100644
View file @
0c17cd94
#include
"AMDiS.h"
using
AMDiS
::
Msg
;
int
main
(
int
argc
,
char
*
argv
[])
{
FUNCNAME
(
"main"
);
AMDiS
::
init
(
argc
,
argv
);
MSG
(
"Hello World!
\n
"
);
AMDiS
::
finalize
();
}
AMDiS/other/examples/initfile.dat.2d
0 → 100644
View file @
0c17cd94
dimension of world: 2 % dow = 1, 2, or 3
% include other init-files (remove % at the beginning of the line)
% #include <filename>
% #include "filename"
parameter1: value1
% using variable:
parameter2: $parameter1
parameter3: ${parameter1}
parameter4_${parameter1}: value2 % => parameter4_value1 = value2
% overwriting values
parameter1: value3
% value format
parameter1: 1.0 % double
parameter2: 1 % int
parameter3: Hello World! % std::string
parameter4: [1,2,3] % std::vector<int>
parameter5: [1,2,3; 4,5,6; 7,8,9] % std::vector<std::vector<int> >
parameter6: 1/2 % arithmetic expression => 0.5
parameter7: 2*${parameter6}+sin(0.5) % complex arithm. expression
parameter8: m_pi + m_e % some predefined constants: pi, e
parameter9: [2*m_pi, sin((${parameter7})*m_e)/2]
% substitution and evaluation
parameter1: 1/2 + 1/2
parameter2: Hello ${parameter1} World! % => "Hello 1/2 + 1/2 World!"
parameter3: Hello $(${parameter1}) World! % => "Hello 1 World!"
parameter4: Hello $(1/2 + 1/2) World! % => "Hello 1 World!"
Write
Preview
Supports
Markdown
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