Skip to content

Commit

Permalink
Deprecated: Move deprecated functionality from grid.py to Deprectated…
Browse files Browse the repository at this point in the history
…/deprecated_grid.py
  • Loading branch information
zachetienne committed Jun 5, 2023
1 parent f028b76 commit 654da0f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import NRPy_param_funcs as par # NRPy+: Parameter interface
import sympy as sp # SymPy: The Python computer algebra package upon which NRPy+ depends
import grid as gri # NRPy+: Functions having to do with numerical grids
import deprecated_grid as evil_gri # NRPy+: Functions having to do with numerical grids
import indexedexp as ixp # NRPy+: Symbolic indexed expression (e.g., tensors, vectors, etc.) support
import reference_metric as rfm # NRPy+: Reference metric support
import cmdline_helper as cmd # NRPy+: Multi-platform Python command-line interface
Expand Down Expand Up @@ -117,7 +118,7 @@ def Set_up_CurviBoundaryConditions(Ccodesdir,verbose=True,Cparamspath=os.path.jo

# Step 2.a: Generate Ccodesdir/gridfunction_defines.h file,
# containing human-readable gridfunction aliases
evolved_variables_list, auxiliary_variables_list, auxevol_variables_list = gri.output__gridfunction_defines_h__return_gf_lists(Ccodesdir)[0:3]
evolved_variables_list, auxiliary_variables_list, auxevol_variables_list = evil_gri.output__gridfunction_defines_h__return_gf_lists(Ccodesdir)[0:3]

# Step 2.b: set the parity conditions on all gridfunctions in gf_list,
# based on how many digits are at the end of their names
Expand Down
17 changes: 17 additions & 0 deletions Deprecated/deprecated_grid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# grid.py: functions & parameters related to numerical grids
# functions: Automatic loop output, output C code needed for gridfunction memory I/O, gridfunction registration

# Author: Zachariah B. Etienne
# zachetie **at** gmail **dot* com

import grid as gri # NRPy+: gridding
import os

####################
# TO BE DEPRECATED
def output__gridfunction_defines_h__return_gf_lists(outdir):
with open(os.path.join(outdir, "gridfunction_defines.h"), "w") as file:
file.write("/* This file is automatically generated by NRPy+. Do not edit. */\n\n")
file.write(gri.gridfunction_defines())
return gri.gridfunction_lists()
####################

0 comments on commit 654da0f

Please sign in to comment.