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
iwr
amdis
Commits
8cb3442e
Commit
8cb3442e
authored
Aug 07, 2014
by
Praetorius, Simon
Browse files
Initfile and LinearSolver corrected
parent
d8bef5fa
Changes
3
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/Initfile.h
View file @
8cb3442e
...
...
@@ -254,9 +254,9 @@ namespace AMDiS {
size_t
pos
=
begBrackets
.
find
(
val
[
0
]);
if
(
pos
==
std
::
string
::
npos
)
hasBrackets
=
false
;
/*
if (hasBrackets && val[val.length() - 1] != endBrackets[pos])
*/
/*
throw WrongVectorFormat("begin and end bracket are different in"
*/
/*
" value '" + val + "'");
*/
if
(
hasBrackets
&&
val
[
val
.
length
()
-
1
]
!=
endBrackets
[
pos
])
throw
WrongVectorFormat
(
"begin and end bracket are different in"
" value '"
+
val
+
"'"
);
size_t
oldPos
=
(
hasBrackets
?
1
:
0
);
size_t
curDelim
=
0
;
typedef
typename
Container
::
value_type
ValueType
;
...
...
@@ -295,8 +295,8 @@ namespace AMDiS {
{
std
::
vector
<
T
>
temp_vec
;
getContainer
(
valStr
,
temp_vec
);
/*
if (static_cast<int>(temp_vec.size()) != c.getSize())
*/
/*
throw WrongVectorSize("wrong number of entries for WorldVector");
*/
if
(
static_cast
<
int
>
(
temp_vec
.
size
())
!=
c
.
getSize
())
throw
WrongVectorSize
(
"wrong number of entries for WorldVector"
);
for
(
size_t
i
=
0
;
i
<
temp_vec
.
size
();
i
++
)
c
[
i
]
=
temp_vec
[
i
];
...
...
AMDiS/src/solver/LinearSolver.h
View file @
8cb3442e
...
...
@@ -120,6 +120,7 @@ namespace AMDiS {
MSG
(
"LinearSolver::solveSystem()
\n
"
);
residual
=
-
1.0
;
rel_residual
=
-
1.0
;
int
error_code
=
solveLinearSystem
(
A
,
x
,
b
,
createMatrixData
,
storeMatrixData
);
TEST_EXIT
(
error_code
==
0
)
...
...
@@ -140,7 +141,7 @@ namespace AMDiS {
// test for relative tolerance
TEST_EXIT
((
isNumber
(
rel_residual
)
&&
(
rel_residual
<
0.0
||
relative
<
1.e-30
||
rel_residual
<=
relative
))
||
!
breakTolNotReached
)
||
(
residual
<
1.e-30
)
||
!
breakTolNotReached
)
(
"Relative tolerance rtol = %e could not be reached!
\n
Set tolerance by '->solver->relative tolerance:'
\n
"
,
relative
);
}
return
error_code
;
...
...
demo/init/ellipt.dat.3d
View file @
8cb3442e
dimension of world: 3
elliptMesh->macro file name: ./macro/macro.stand.3d
elliptMesh->global refinements:
0
elliptMesh->global refinements:
1
ellipt->mesh: elliptMesh
ellipt->dim: 3
...
...
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