Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
111d2439
Commit
111d2439
authored
Oct 22, 2018
by
Praetorius, Simon
Browse files
remove necessity to always have an initfile
parent
c27b2e73
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/amdis/AMDiS.cpp
View file @
111d2439
...
...
@@ -9,15 +9,16 @@ namespace AMDiS
Dune
::
MPIHelper
&
init
(
int
&
argc
,
char
**&
argv
,
std
::
string
const
&
initFileName
)
{
// Maybe initialize MPI
Dune
::
MPIHelper
&
mpiHelper
=
Dune
::
MPIHelper
::
instance
(
argc
,
argv
);
static
Dune
::
MPIHelper
&
mpiHelper
=
Dune
::
MPIHelper
::
instance
(
argc
,
argv
);
Parameters
::
clearData
();
if
(
initFileName
==
""
)
{
test_exit
(
argc
>
1
,
"No init file specified!
\n
"
);
if
(
initFileName
.
empty
()
&&
argc
>
1
)
{
Parameters
::
init
(
argv
[
1
]);
}
else
{
}
else
if
(
!
initFileName
.
empty
())
{
Parameters
::
init
(
initFileName
);
}
else
{
warning
(
"No initfile specified. Using default values for all parameters."
);
}
return
mpiHelper
;
...
...
src/amdis/ProblemStat.hpp
View file @
111d2439
...
...
@@ -280,10 +280,7 @@ namespace AMDiS
void
createGrid
()
{
gridName_
=
""
;
Parameters
::
get
(
name_
+
"->mesh"
,
gridName_
);
test_exit
(
!
gridName_
.
empty
(),
"No grid name specified for '{}->mesh'!"
,
name_
);
grid_
=
MeshCreator
<
Grid
>::
create
(
gridName_
);
msg
(
"Create grid:"
);
...
...
@@ -367,7 +364,7 @@ namespace AMDiS
int
nGrids
=
1
;
/// Name of the grid
std
::
string
gridName_
=
"
none
"
;
std
::
string
gridName_
=
"
mesh
"
;
/// FE spaces of this problem.
std
::
shared_ptr
<
GlobalBasis
>
globalBasis_
;
...
...
test/CMakeLists.txt
View file @
111d2439
...
...
@@ -12,8 +12,7 @@ dune_add_test(SOURCES DOFVectorTest.cpp
LINK_LIBRARIES amdis
)
dune_add_test
(
SOURCES ExpressionsTest.cpp
LINK_LIBRARIES amdis
CMD_ARGS
"
${
CMAKE_SOURCE_DIR
}
/examples/init/ellipt.dat.2d"
)
LINK_LIBRARIES amdis
)
dune_add_test
(
SOURCES FieldMatVecTest.cpp
LINK_LIBRARIES amdis
)
...
...
@@ -25,8 +24,7 @@ dune_add_test(SOURCES FilesystemTest.cpp
LINK_LIBRARIES amdis
)
dune_add_test
(
SOURCES MarkerTest.cpp
LINK_LIBRARIES amdis
CMD_ARGS
"
${
CMAKE_SOURCE_DIR
}
/examples/init/marker.dat.2d"
)
LINK_LIBRARIES amdis
)
dune_add_test
(
SOURCES MultiTypeVectorTest.cpp
LINK_LIBRARIES amdis
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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