Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
16105211
Commit
16105211
authored
7 years ago
by
lhausamm
Browse files
Options
Downloads
Patches
Plain Diff
Remove printf and deal correclty with config.h
parent
77abccd6
No related branches found
No related tags found
1 merge request
!469
Update cooling grackle
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Makefile.am
+0
-2
0 additions, 2 deletions
src/Makefile.am
src/cooling/grackle/grackle_wrapper.c
+8
-8
8 additions, 8 deletions
src/cooling/grackle/grackle_wrapper.c
src/cooling/grackle/grackle_wrapper.h
+1
-0
1 addition, 0 deletions
src/cooling/grackle/grackle_wrapper.h
with
9 additions
and
10 deletions
src/Makefile.am
+
0
−
2
View file @
16105211
...
...
@@ -15,8 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
AUTOMAKE_OPTIONS
=
subdir-objects
# Add the debug flag to the whole thing
AM_CFLAGS
=
$(
HDF5_CPPFLAGS
)
...
...
This diff is collapsed.
Click to expand it.
src/cooling/grackle/grackle_wrapper.c
+
8
−
8
View file @
16105211
...
...
@@ -56,8 +56,7 @@ int wrap_init_cooling(char *CloudyTable, int UVbackground, double udensity,
// Second, create a chemistry object for parameters and rate data.
if
(
set_default_chemistry_parameters
()
==
0
)
{
fprintf
(
stderr
,
"Error in set_default_chemistry_parameters.
\n
"
);
return
0
;
error
(
"Error in set_default_chemistry_parameters."
);
}
// Set parameter values for chemistry.
...
...
@@ -77,8 +76,7 @@ int wrap_init_cooling(char *CloudyTable, int UVbackground, double udensity,
// Finally, initialize the chemistry object.
if
(
initialize_chemistry_data
(
&
my_units
,
a_value
)
==
0
)
{
fprintf
(
stderr
,
"Error in initialize_chemistry_data.
\n
"
);
return
0
;
error
(
"Error in initialize_chemistry_data."
);
}
return
1
;
...
...
@@ -116,8 +114,7 @@ int wrap_get_cooling_time(double rho, double u, double Z, double a_now,
int
grid_end
[
3
]
=
{
0
,
0
,
0
};
if
(
FIELD_SIZE
!=
1
)
{
fprintf
(
stderr
,
"field_size must currently be set to 1.
\n
"
);
return
0
;
error
(
"field_size must currently be set to 1."
);
}
// passed density and energy are proper
...
...
@@ -135,8 +132,7 @@ int wrap_get_cooling_time(double rho, double u, double Z, double a_now,
grid_start
,
grid_end
,
density
,
energy
,
x_velocity
,
y_velocity
,
z_velocity
,
metal_density
,
cooling_time
)
==
0
)
{
fprintf
(
stderr
,
"Error in calculate_cooling_time.
\n
"
);
return
0
;
error
(
"Error in calculate_cooling_time."
);
}
// return updated chemistry and energy
...
...
@@ -169,13 +165,17 @@ int wrap_do_cooling(double rho, double *u, double dt, double Z, double a_now) {
#ifdef SWIFT_DEBUG_CHECKS
double
old_value
=
energy
[
0
];
#endif
message
(
"dt = %f"
,
dt
);
if
(
solve_chemistry_table
(
&
my_units
,
a_now
,
dt
,
grid_rank
,
grid_dimension
,
grid_start
,
grid_end
,
density
,
energy
,
x_velocity
,
y_velocity
,
z_velocity
,
metal_density
)
==
0
)
{
error
(
"Error in solve_chemistry."
);
return
0
;
}
#ifdef SWIFT_DEBUG_CHECKS
GRACKLE_ASSERT
(
old_value
!=
energy
[
0
]);
#endif
// return updated chemistry and energy
for
(
int
i
=
0
;
i
<
FIELD_SIZE
;
i
++
)
{
...
...
This diff is collapsed.
Click to expand it.
src/cooling/grackle/grackle_wrapper.h
+
1
−
0
View file @
16105211
...
...
@@ -13,6 +13,7 @@
#ifndef SWIFT_COOLING_GRACKLE_WRAPPER_H
#define SWIFT_COOLING_GRACKLE_WRAPPER_H
#include
"../../../config.h"
#include
<grackle.h>
#include
<math.h>
#include
<stdio.h>
...
...
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