Skip to content

Commit

Permalink
This commit contains the following updates:
Browse files Browse the repository at this point in the history
  - diagnostics_generic/output_yz_or_xy_plane.py: extended plane diagnostics
    function to accept a file pointer;
  - Tutorial-Start_to_Finish-BSSNCurvilinear-TOV_Initial_Data.ipynb: modified to
    reflect the first change;
  - Tutorial-Start_to_Finish-BSSNCurvilinear-Exact_Initial_Data.ipynb: modified
    to reflect the first change;
  - Tutorial-Start_to_Finish-BSSNCurvilinear-Neutron_Star-Hydro_without_Hydro.ipynb:
    minor modernizations to the main function; notebook now works in coordinates
    other than Spherical-like.
  • Loading branch information
leowerneck committed Oct 11, 2023
1 parent a4c6210 commit 015d9b9
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@
" Ricci_eval(&griddata.params, griddata.xx, griddata.gridfuncs.y_n_gfs, griddata.gridfuncs.auxevol_gfs);\n",
" BSSN_constraints(&griddata.params, griddata.xx, griddata.gridfuncs.y_n_gfs, griddata.gridfuncs.auxevol_gfs, aux_gfs);\n",
"\n",
" xy_plane_diagnostics(&griddata, griddata.gridfuncs.y_n_gfs, aux_gfs);\n",
" xy_plane_diagnostics(stdout, &griddata, griddata.gridfuncs.y_n_gfs, aux_gfs);\n",
"\n",
" // Step 4: Free all allocated memory\n",
" free(griddata.gridfuncs.y_n_gfs);\n",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
" Ricci_eval(&griddata.params, griddata.xx, griddata.gridfuncs.y_n_gfs, griddata.gridfuncs.auxevol_gfs);\n",
" BSSN_constraints(&griddata.params, griddata.xx, griddata.gridfuncs.y_n_gfs, griddata.gridfuncs.auxevol_gfs, aux_gfs);\n",
"\n",
" yz_plane_diagnostics(&griddata, griddata.gridfuncs.y_n_gfs, aux_gfs);\n",
" yz_plane_diagnostics(stdout, &griddata, griddata.gridfuncs.y_n_gfs, aux_gfs);\n",
"\n",
" // Step 4: Free all allocated memory\n",
" free(griddata.gridfuncs.y_n_gfs);\n",
Expand Down Expand Up @@ -1007,7 +1007,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.1"
"version": "3.10.6"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions diagnostics_generic/output_yz_or_xy_plane.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def add_to_Cfunction_dict__plane_diagnostics(plane="xy", include_ghosts=False,
"""
c_type = "void"
name = plane + "_plane_diagnostics"
params = """const griddata_struct *restrict griddata,
params = """FILE *fp, const griddata_struct *restrict griddata,
const REAL *restrict y_n_gfs, const REAL *restrict diagnostic_output_gfs"""
body = output_plane_yz_or_xy_body(plane=plane, include_ghosts=include_ghosts)
printf_char_string = "\"%e %e %e"
Expand All @@ -130,7 +130,7 @@ def add_to_Cfunction_dict__plane_diagnostics(plane="xy", include_ghosts=False,
REAL xCart[3];
xx_to_Cart(&params, xx, i0,i1,i2, xCart);
int idx = IDX3S(i0,i1,i2);
printf("""+printf_char_string+output_quantities+r""");
fprintf(fp, """+printf_char_string+output_quantities+r""");
}
"""
outC.add_to_Cfunction_dict(
Expand Down

0 comments on commit 015d9b9

Please sign in to comment.