Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Alexander Lapshin
common
Commits
831edfb3
Commit
831edfb3
authored
Jul 30, 2021
by
Alexander Lapshin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hermite now in critical section to avoid segfault, that should be fixed in future
parent
423b9aeb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
TextFunctions.h
utils/TextFunctions.h
+2
-2
ephinterp.cpp
utils/ephinterp.cpp
+3
-0
No files found.
utils/TextFunctions.h
View file @
831edfb3
...
...
@@ -344,7 +344,7 @@ static void parseStrA(const std::string& data, int pos1, int pos2, int& ret, int
try
{
checkBounds
(
ret
,
min
,
max
,
strict
);
}
catch
(
Exp
&
e
)
{
catch
(
const
std
::
exception
&
e
)
{
const
std
::
string
errstr
=
pos2
?
(
ToStr
(
pos1
)
+
":"
+
ToStr
(
pos2
))
:
(
ToStr
(
pos1
)
+
":-"
);
throw
Exp
()
<<
"bad substr format in line ["
+
data
+
"] at position"
<<
errstr
<<
" "
<<
part
<<
". "
<<
e
.
what
();
}
...
...
@@ -370,7 +370,7 @@ static void parseStrA(const std::string& data, int pos1, int pos2, double& ret,
try
{
checkBounds
(
ret
,
(
double
*
)
min
,
(
double
*
)
max
,
strict
);
}
catch
(
Exp
&
e
)
{
catch
(
const
std
::
exception
&
e
)
{
const
std
::
string
errstr
=
pos2
?
(
ToStr
(
pos1
)
+
":"
+
ToStr
(
pos2
))
:
(
ToStr
(
pos1
)
+
":-"
);
throw
Exp
()
<<
"bad substr format in line ["
+
data
+
"] at position"
<<
errstr
<<
" "
<<
part
<<
". "
<<
e
.
what
();
}
...
...
utils/ephinterp.cpp
View file @
831edfb3
...
...
@@ -87,16 +87,19 @@ int cinterp_pvac(
if
(
j
<
3
)
{
if
(
fabs
(
ephi
.
outv
[
j
+
3
][
0
])
>
1.e-10
)
{
/* Use velocities if they exists (hermite) */
#pragma omp critical (pos)
hermite
(
pindex
,
2
,
ephi
.
jds
,
&
ephi
.
outv
[
j
][
0
],
&
ephi
.
outv
[
j
+
3
][
0
],
ephi
.
nv
,
10
,
itime
,
&
outvec
[
j
],
&
vz
,
ircode
);
}
else
{
/* Otherwise, ignore them (fvel = -1) or create them (fvel = 1) */
#pragma omp critical (pos)
hermite
(
pindex
,
-
fvel
,
ephi
.
jds
,
&
ephi
.
outv
[
j
][
0
],
&
z
,
ephi
.
nv
,
10
,
itime
,
&
outvec
[
j
],
&
outvec
[
j
+
3
],
ircode
);
}
}
/* Velocity */
/* Interpolate if they exists */
else
if
(
fabs
(
ephi
.
outv
[
j
][
0
])
>
1.e-10
)
{
#pragma omp critical (pos)
hermite
(
pindex
,
1
,
ephi
.
jds
,
&
ephi
.
outv
[
j
][
0
],
&
z
,
ephi
.
nv
,
10
,
itime
,
&
outvec
[
j
],
&
vz
,
ircode
);
}
...
...
Write
Preview
Markdown
is supported
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