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
85b6142e
Commit
85b6142e
authored
Dec 16, 2010
by
Naumann, Andreas
Browse files
updated meshtest with dofadmins and checking the functionname pointer in addGlobalParameter now
parent
a0c32c71
Changes
2
Show whitespace changes
Inline
Side-by-side
AMDiS/src/Parameters.cc
View file @
85b6142e
...
...
@@ -691,7 +691,13 @@ namespace AMDiS {
if
(
key
.
size
()
==
0
||
par
.
size
()
==
0
)
return
;
singlett
->
addParam
(
key
,
par
,
std
::
string
(
file
),
line
,
fname
);
std
::
string
file_str
;
if
(
file
!=
NULL
)
file_str
=
std
::
string
(
file
);
std
::
string
fname_str
;
if
(
fname
!=
NULL
)
fname_str
=
std
::
string
(
fname
);
singlett
->
addParam
(
key
,
par
,
file_str
,
line
,
fname_str
);
int
val
=
10
;
// defualt for level of information
getGlobalParameter
(
0
,
"level of information"
,
"%d"
,
&
val
);
...
...
AMDiS/test/Meshtest/src/Meshtest.cpp
View file @
85b6142e
#include
"Mesh.h"
#include
"Parameters.h"
#include
"ProblemScal.h"
#include
<sstream>
using
namespace
AMDiS
;
void
testMesh
(
int
dim
)
{
std
::
stringstream
ss
;
ss
<<
dim
;
Parameters
::
addGlobalParameter
(
0
,
"dimension of world"
,
ss
.
str
());
Global
::
init
();
Mesh
mesh
(
"testMesh"
,
dim
);
DimVec
<
int
>
ln_dof
(
dim
,
DEFAULT_VALUE
,
0
);
ln_dof
[
VERTEX
]
=
1
;
mesh
.
createDOFAdmin
(
"vertex_dofs"
,
ln_dof
);
mesh
.
initialize
();
}
int
main
(
int
argc
,
char
**
argv
)
{
FUNCNAME
(
"no function"
);
//cannot use Parameters::addGlobalParameter(...) because of some string errors
// ADD_PARAMETER(1,"dimension of world","1");
// ADD_PARAMETER(1,"testMesh1->macro file name","macro/macro.stand.1d");
// ADD_PARAMETER(1,"testMesh2->macro file name","macro/macro.stand.2d");
// ADD_PARAMETER(1,"testMesh3->macro file name","macro/macro.stand.3d");
Parameters
::
init
(
1
,
"init/ball.dat.2d"
);
Global
::
init
();
Parameters
::
addGlobalParameter
(
0
,
"testMesh1->macro file name"
,
"macro/macro.stand.1d"
);
Parameters
::
addGlobalParameter
(
0
,
"testMesh2->macro file name"
,
"macro/macro.stand.2d"
);
Parameters
::
addGlobalParameter
(
0
,
"testMesh3->macro file name"
,
"macro/macro.stand.3d"
);
M
es
h
mesh1
(
"ballMesh"
,
2
);
Mesh
mesh2
(
"
testMesh
1"
,
2
);
Mesh
mesh3
(
"
testMesh
1"
,
3
);
t
es
tMesh
(
1
);
testMesh
(
2
);
testMesh
(
3
);
mesh1
.
initialize
();
mesh2
.
initialize
();
mesh3
.
initialize
();
return
0
;
}
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