Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LAMBERT Jean-charles
unsio
Commits
d8ce4670
Commit
d8ce4670
authored
Jun 15, 2016
by
LAMBERT Jean-charles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugging ramses gravity
parent
8c896c93
Pipeline
#284
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
src/camr.cc
src/camr.cc
+9
-5
No files found.
src/camr.cc
View file @
d8ce4670
...
...
@@ -288,7 +288,7 @@ template <class T> int CAmr::loadData(uns::CParticles<T> * particles,
// Read grid center
//
for
(
int
idim
=
0
;
idim
<
ndim
;
idim
++
)
{
if
(
j
==
icpu
)
{
if
(
j
==
icpu
&&
ngrida
>
0
)
{
amr
.
readDataBlock
((
char
*
)
&
xg
[
idim
*
ngrida
]);
}
else
amr
.
skipBlock
();
...
...
@@ -299,7 +299,7 @@ template <class T> int CAmr::loadData(uns::CParticles<T> * particles,
// Read son index
//
for
(
int
ind
=
0
;
ind
<
twotondim
;
ind
++
)
{
if
(
j
==
icpu
)
{
if
(
j
==
icpu
&&
ngrida
>
0
)
{
amr
.
readDataBlock
((
char
*
)
&
son
[
ind
*
ngrida
]);
}
else
amr
.
skipBlock
();
...
...
@@ -315,7 +315,7 @@ template <class T> int CAmr::loadData(uns::CParticles<T> * particles,
// Read hydro variables
for
(
int
ind
=
0
;
ind
<
twotondim
;
ind
++
)
{
for
(
int
ivar
=
0
;
ivar
<
nvarh
;
ivar
++
)
{
if
(
j
==
icpu
)
{
if
(
j
==
icpu
&&
ngrida
>
0
)
{
hydro
.
readDataBlock
((
char
*
)
&
var
[
ivar
*
ngrida
*
twotondim
+
ind
*
ngrida
]);
}
else
hydro
.
skipBlock
();
...
...
@@ -331,7 +331,7 @@ template <class T> int CAmr::loadData(uns::CParticles<T> * particles,
// Read grav variables
for
(
int
ind
=
0
;
ind
<
twotondim
;
ind
++
)
{
for
(
int
ivar
=
0
;
ivar
<
nvarg
;
ivar
++
)
{
if
(
j
==
icpu
)
{
if
(
j
==
icpu
&&
ngrida
>
0
)
{
grav
.
readDataBlock
((
char
*
)
&
varg
[
ivar
*
ngrida
*
twotondim
+
ind
*
ngrida
]);
}
else
grav
.
skipBlock
();
...
...
@@ -473,8 +473,12 @@ template <class T> int CAmr::loadData(uns::CParticles<T> * particles,
delete
[]
xg
;
//delete [] x;
delete
[]
son
;
if
(
!
count_only
)
if
(
!
count_only
)
{
delete
[]
var
;
if
(
is_gravity
&&
(
req_bits
&
POT_BIT
||
req_bits
&
ACC_BIT
))
{
delete
[]
varg
;
}
}
}
}
}
// ilevel
...
...
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