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
d6bd7df2
Commit
d6bd7df2
authored
Jul 27, 2017
by
Praetorius, Simon
Browse files
small corrections in various files
parent
66ece375
Changes
4
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/AMDiS.cc
View file @
d6bd7df2
...
...
@@ -115,7 +115,7 @@ namespace AMDiS {
Parameters
::
init
(
initFileName
);
}
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP)
#if defined(HAVE_PARALLEL_DOMAIN_AMDIS) || defined(HAVE_OPENMP)
|| defined(HAVE_MPI)
Parameters
::
get
(
"parallel->log main rank"
,
Msg
::
outputMainRank
);
#endif
...
...
AMDiS/src/DOFVector.hh
View file @
d6bd7df2
...
...
@@ -143,7 +143,9 @@ namespace AMDiS {
Parallel
::
MeshDistributor
::
globalMeshDistributor
->
removeInterchangeVector
(
this
);
#endif
#ifdef _OPENMP
#pragma omp critical
#endif
if
(
this
->
feSpace
&&
this
->
feSpace
->
getAdmin
())
(
this
->
feSpace
->
getAdmin
())
->
removeDOFIndexed
(
this
);
...
...
AMDiS/src/Initfile.h
View file @
d6bd7df2
...
...
@@ -131,7 +131,7 @@ namespace AMDiS {
/// convert string to string
inline
void
convert
(
const
std
::
string
valStr
,
std
::
string
&
value
)
inline
void
convert
(
const
std
::
string
&
valStr
,
std
::
string
&
value
)
{
value
=
trim
(
valStr
);
}
...
...
@@ -145,7 +145,7 @@ namespace AMDiS {
boost
::
mpl
::
not_
<
boost
::
is_enum
<
T
>
>
>
,
void
>::
type
convert
(
const
std
::
string
valStr
,
T
&
value
)
convert
(
const
std
::
string
&
valStr
,
T
&
value
)
{
using
boost
::
lexical_cast
;
using
boost
::
numeric_cast
;
...
...
@@ -166,7 +166,7 @@ namespace AMDiS {
<
boost
::
is_enum
<
T
>
,
void
>::
type
convert
(
const
std
::
string
valStr
,
T
&
value
)
convert
(
const
std
::
string
&
valStr
,
T
&
value
)
{
int
swap
=
0
;
// try {
...
...
@@ -179,7 +179,7 @@ namespace AMDiS {
/// convert special enums
inline
void
convert
(
const
std
::
string
valStr
,
Norm
&
value
)
inline
void
convert
(
const
std
::
string
&
valStr
,
Norm
&
value
)
{
std
::
string
swapStr
=
boost
::
to_upper_copy
(
valStr
);
...
...
@@ -200,7 +200,7 @@ namespace AMDiS {
/// convert value of arbitrary type to string using stringstream and
/// operator<< for type
template
<
typename
T
>
inline
void
convert
(
const
T
value
,
std
::
string
&
valStr
)
inline
void
convert
(
const
T
&
value
,
std
::
string
&
valStr
)
{
std
::
stringstream
ss
;
ss
.
precision
(
6
);
...
...
@@ -223,20 +223,20 @@ namespace AMDiS {
// forward declarations
template
<
typename
T
>
inline
void
convert
(
const
std
::
string
valStr
,
WorldVector
<
T
>&
c
);
inline
void
convert
(
const
std
::
string
&
valStr
,
WorldVector
<
T
>&
c
);
template
<
typename
T
>
inline
void
convert
(
const
std
::
string
valStr
,
std
::
list
<
T
>&
value
);
inline
void
convert
(
const
std
::
string
&
valStr
,
std
::
list
<
T
>&
value
);
template
<
typename
T
>
inline
void
convert
(
const
std
::
string
valStr
,
std
::
vector
<
T
>&
value
);
inline
void
convert
(
const
std
::
string
&
valStr
,
std
::
vector
<
T
>&
value
);
/** parse an container from tag tag. The Container must have the properties:
* - type value_type
* - member function push_back
*/
template
<
typename
Container
>
inline
void
getContainer
(
const
std
::
string
val_
,
Container
&
c
)
inline
void
getContainer
(
const
std
::
string
&
val_
,
Container
&
c
)
{
// accepted brackets and delimiters for vector input
std
::
string
begBrackets
=
"{[("
;
...
...
@@ -286,7 +286,7 @@ namespace AMDiS {
/// convert string to WorldVector
template
<
typename
T
>
inline
void
convert
(
const
std
::
string
valStr
,
WorldVector
<
T
>&
c
)
inline
void
convert
(
const
std
::
string
&
valStr
,
WorldVector
<
T
>&
c
)
{
std
::
vector
<
T
>
temp_vec
;
getContainer
(
valStr
,
temp_vec
);
...
...
@@ -299,7 +299,7 @@ namespace AMDiS {
/// convert string to std::list using begBrackets, endBrackets and delims
template
<
typename
T
>
inline
void
convert
(
const
std
::
string
valStr
,
std
::
list
<
T
>&
value
)
inline
void
convert
(
const
std
::
string
&
valStr
,
std
::
list
<
T
>&
value
)
{
getContainer
(
valStr
,
value
);
}
...
...
@@ -307,7 +307,7 @@ namespace AMDiS {
/// convert string to std::vector using begBrackets, endBrackets and delims
template
<
typename
T
>
inline
void
convert
(
const
std
::
string
valStr
,
std
::
vector
<
T
>&
value
)
inline
void
convert
(
const
std
::
string
&
valStr
,
std
::
vector
<
T
>&
value
)
{
getContainer
(
valStr
,
value
);
}
...
...
@@ -525,7 +525,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
/// update map tag->value_old to tag->value in singleton
template
<
typename
T
>
static
void
set
(
const
std
::
string
tag
,
T
&
value
,
int
debugInfo
=
-
1
)
static
void
set
(
const
std
::
string
tag
,
T
const
&
value
,
int
debugInfo
=
-
1
)
{
// boost::unique_lock<boost::shared_mutex> lock(singlett().mutex_);
...
...
@@ -545,7 +545,7 @@ else if(error_code == TAG_NOT_FOUND_BREAK)
/// add map tag->value to data in singleton
template
<
typename
T
>
static
void
add
(
const
std
::
string
tag
,
T
&
value
,
int
debugInfo
=
-
1
)
static
void
add
(
const
std
::
string
tag
,
T
const
&
value
,
int
debugInfo
=
-
1
)
{
set
(
tag
,
value
,
debugInfo
);
}
...
...
AMDiS/src/io/ElementFileWriter.cc
View file @
d6bd7df2
...
...
@@ -192,7 +192,7 @@ namespace AMDiS { namespace io {
//boost::iostreams seems not to truncate the file
ofstream
swapfile
(
filename
.
c_str
(),
ios
::
out
|
ios
::
trunc
);
TEST_EXIT
(
swapfile
.
is_open
())
(
"Cannot open file %s for writing!
\n
"
,
name
.
c_str
());
(
"Cannot open file %s for writing!
\n
"
,
file
name
.
c_str
());
swapfile
.
close
();
}
file
.
push
(
boost
::
iostreams
::
file_descriptor_sink
(
filename
,
ios
::
trunc
));
...
...
@@ -311,7 +311,7 @@ namespace AMDiS { namespace io {
//boost::iostreams seems not to truncate the file
ofstream
swapfile
(
filename
.
c_str
(),
ios
::
out
|
ios
::
trunc
);
TEST_EXIT
(
swapfile
.
is_open
())
(
"Cannot open file %s for writing!
\n
"
,
name
.
c_str
());
(
"Cannot open file %s for writing!
\n
"
,
file
name
.
c_str
());
swapfile
.
close
();
}
file
.
push
(
boost
::
iostreams
::
file_descriptor_sink
(
filename
,
ios
::
trunc
));
...
...
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