Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NP_TMcode
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Giacomo Mulas
NP_TMcode
Commits
5a1fc42e
Commit
5a1fc42e
authored
1 year ago
by
Giovanni La Mura
Browse files
Options
Downloads
Patches
Plain Diff
Use dynamic memory in C++ porting of SPH subroutines
parent
ec5b9055
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/include/sph_subs.h
+7
-6
7 additions, 6 deletions
src/include/sph_subs.h
with
7 additions
and
6 deletions
src/include/sph_subs.h
+
7
−
6
View file @
5a1fc42e
...
@@ -1353,18 +1353,18 @@ void wmasp(
...
@@ -1353,18 +1353,18 @@ void wmasp(
void
dme
(
void
dme
(
int
li
,
int
i
,
int
npnt
,
int
npntts
,
double
vk
,
double
exdc
,
double
exri
,
int
li
,
int
i
,
int
npnt
,
int
npntts
,
double
vk
,
double
exdc
,
double
exri
,
C1
*
c1
,
C2
*
c2
,
int
&
jer
,
int
&
lcalc
,
std
::
complex
<
double
>
&
arg
)
{
C1
*
c1
,
C2
*
c2
,
int
&
jer
,
int
&
lcalc
,
std
::
complex
<
double
>
&
arg
)
{
double
*
rfj
=
new
double
[
42
];
const
int
lipo
=
li
+
1
;
double
*
rfn
=
new
double
[
42
];
const
int
lipt
=
li
+
2
;
std
::
complex
<
double
>
cfj
[
42
],
fbi
[
42
],
fb
[
42
],
fn
[
42
];
double
*
rfj
=
new
double
[
lipt
];
std
::
complex
<
double
>
rmf
[
40
],
drmf
[
40
],
ref
[
40
],
dref
[
40
];
double
*
rfn
=
new
double
[
lipt
];
std
::
complex
<
double
>
cfj
[
lipt
],
fbi
[
lipt
],
fb
[
lipt
],
fn
[
lipt
];
std
::
complex
<
double
>
rmf
[
li
],
drmf
[
li
],
ref
[
li
],
dref
[
li
];
std
::
complex
<
double
>
dfbi
,
dfb
,
dfn
,
ccna
,
ccnb
,
ccnc
,
ccnd
;
std
::
complex
<
double
>
dfbi
,
dfb
,
dfn
,
ccna
,
ccnb
,
ccnc
,
ccnd
;
std
::
complex
<
double
>
y1
,
dy1
,
y2
,
dy2
,
arin
,
cri
,
uim
;
std
::
complex
<
double
>
y1
,
dy1
,
y2
,
dy2
,
arin
,
cri
,
uim
;
jer
=
0
;
jer
=
0
;
uim
=
std
::
complex
<
double
>
(
0.0
,
1.0
);
uim
=
std
::
complex
<
double
>
(
0.0
,
1.0
);
int
nstp
=
npnt
-
1
;
int
nstp
=
npnt
-
1
;
int
nstpts
=
npntts
-
1
;
int
nstpts
=
npntts
-
1
;
int
lipo
=
li
+
1
;
int
lipt
=
li
+
2
;
double
sz
=
vk
*
c1
->
ros
[
i
-
1
];
double
sz
=
vk
*
c1
->
ros
[
i
-
1
];
c2
->
vsz
[
i
-
1
]
=
sz
;
c2
->
vsz
[
i
-
1
]
=
sz
;
double
vkr1
=
vk
*
c1
->
rc
[
i
-
1
][
0
];
double
vkr1
=
vk
*
c1
->
rc
[
i
-
1
][
0
];
...
@@ -1429,6 +1429,7 @@ void dme(
...
@@ -1429,6 +1429,7 @@ void dme(
ccnb
=
fn
[
lpo
-
1
]
*
dfbi
;
ccnb
=
fn
[
lpo
-
1
]
*
dfbi
;
ccnc
=
fbi
[
lpo
-
1
]
*
dfb
;
ccnc
=
fbi
[
lpo
-
1
]
*
dfb
;
ccnd
=
fb
[
lpo
-
1
]
*
dfbi
;
ccnd
=
fb
[
lpo
-
1
]
*
dfbi
;
// CLUSTER terminated in this loop with li = 8.
c1
->
rmi
[
l60
-
1
][
i
-
1
]
=
1.0
+
uim
*
(
ccna
-
ccnb
)
/
(
ccnc
-
ccnd
);
c1
->
rmi
[
l60
-
1
][
i
-
1
]
=
1.0
+
uim
*
(
ccna
-
ccnb
)
/
(
ccnc
-
ccnd
);
c1
->
rei
[
l60
-
1
][
i
-
1
]
=
1.0
+
uim
*
(
cri
*
ccna
-
ccnb
)
/
(
cri
*
ccnc
-
ccnd
);
c1
->
rei
[
l60
-
1
][
i
-
1
]
=
1.0
+
uim
*
(
cri
*
ccna
-
ccnb
)
/
(
cri
*
ccnc
-
ccnd
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment