def add_to_Cfunc_dict_set_Nxx_dxx_invdx_params__and__xx(rel_path_to_Cparams=os.path.join('./'), NGHOSTS_is_a_param=False):
    gridsuffix = ''

    def set_xxmin_xxmax():
        outstr = ''
        for dirn in range(3):
            outstr += (((('        xxmin[' + str(dirn)) + '] = ') + str(xxmin[dirn])) + ';\n')
            outstr += (((('        xxmax[' + str(dirn)) + '] = ') + str(xxmax[dirn])) + ';\n')
        return outstr
    body = (((((('\n    // Override parameter defaults with values based on command line arguments and NGHOSTS.\n    params->Nxx0' + gridsuffix) + ' = Nxx[0];\n    params->Nxx1') + gridsuffix) + ' = Nxx[1];\n    params->Nxx2') + gridsuffix) + ' = Nxx[2];\n')
    NGHOSTS_prefix = ''
    if NGHOSTS_is_a_param:
        NGHOSTS_prefix = 'params->'
    body += (((((((((((((((('\n    params->Nxx_plus_2NGHOSTS0' + gridsuffix) + ' = Nxx[0] + 2*') + NGHOSTS_prefix) + 'NGHOSTS;\n    params->Nxx_plus_2NGHOSTS1') + gridsuffix) + ' = Nxx[1] + 2*') + NGHOSTS_prefix) + 'NGHOSTS;\n    params->Nxx_plus_2NGHOSTS2') + gridsuffix) + ' = Nxx[2] + 2*') + NGHOSTS_prefix) + 'NGHOSTS;\n    // Now that params->Nxx_plus_2NGHOSTS* has been set, and below we need e.g., Nxx_plus_2NGHOSTS*, we include set_Cparameters.h here:\n#include "') + os.path.join(rel_path_to_Cparams, 'set_Cparameters.h')) + '"\n    // Step 0d: Set up space and time coordinates\n    // Step 0d.i: Declare Delta x^i=dxx{0,1,2} and invdxx{0,1,2}, as well as xxmin[3] and xxmax[3]:\n    REAL xxmin[3],xxmax[3];\n    if(EigenCoord == 0) {\n') + set_xxmin_xxmax()) + '    } else { // if (EigenCoord == 1)\n')
    CoordSystem_orig = par.parval_from_str('reference_metric::CoordSystem')
    if ('Spherical' not in CoordSystem_orig):
        par.set_parval_from_str('reference_metric::CoordSystem', get_EigenCoord())
        reference_metric()
        body += set_xxmin_xxmax()
        par.set_parval_from_str('reference_metric::CoordSystem', CoordSystem_orig)
        reference_metric()
    else:
        body += set_xxmin_xxmax()
    body += '    }\n    // Step 0d.iii: Set params.dxx{0,1,2}, params.invdx{0,1,2}, and uniform coordinate grids xx[3][]\n'
    for dirn in ['0', '1', '2']:
        body += ((((((((('    params->dxx' + dirn) + gridsuffix) + ' = (xxmax[') + dirn) + '] - xxmin[') + dirn) + ']) / ((REAL)Nxx[') + dirn) + ']);\n')
        body += (((((('    params->invdx' + dirn) + gridsuffix) + ' = 1.0/params->dxx') + dirn) + gridsuffix) + ';\n')
        body += ((((((((((((((('    xx[' + dirn) + '] = (REAL *)malloc(sizeof(REAL)*Nxx_plus_2NGHOSTS') + dirn) + gridsuffix) + ');\n    for(int j=0;j<Nxx_plus_2NGHOSTS') + dirn) + gridsuffix) + ';j++)\n        xx[') + dirn) + '][j] = xxmin[') + dirn) + '] + ((REAL)(j-NGHOSTS) + (1.0/2.0))*params->dxx') + dirn) + gridsuffix) + '; // Cell-centered grid.\n')
        if (dirn != '2'):
            body += '\n'
    add_to_Cfunction_dict(includes=[os.path.join(rel_path_to_Cparams, 'NRPy_basic_defines.h')], desc='Override default values for Nxx{0,1,2}, Nxx_plus_2NGHOSTS{0,1,2}, dxx{0,1,2}, and invdx{0,1,2}; and set xx[3][]', c_type='void', name=('set_Nxx_dxx_invdx_params__and__xx' + gridsuffix), params='const int EigenCoord, const int Nxx[3],paramstruct *restrict params, REAL *restrict xx[3]', body=body, enableCparameters=False, uses_rfm=True)
def add_to_Cfunc_dict_set_Nxx_dxx_invdx_params__and__xx(rel_path_to_Cparams=os.path.join('./'), NGHOSTS_is_a_param=False):
    gridsuffix = 

    def set_xxmin_xxmax():
        outstr = 
        for dirn in range(3):
            outstr += (((('        xxmin[' + str(dirn)) + '] = ') + str(xxmin[dirn])) + ';\n')
            outstr += (((('        xxmax[' + str(dirn)) + '] = ') + str(xxmax[dirn])) + ';\n')
        return outstr
    body = (((((('\n    // Override parameter defaults with values based on command line arguments and NGHOSTS.\n    params->Nxx0' + gridsuffix) + ' = Nxx[0];\n    params->Nxx1') + gridsuffix) + ' = Nxx[1];\n    params->Nxx2') + gridsuffix) + ' = Nxx[2];\n')
    NGHOSTS_prefix = 
    if NGHOSTS_is_a_param:
        NGHOSTS_prefix = 'params->'
    body += (((((((((((((((('\n    params->Nxx_plus_2NGHOSTS0' + gridsuffix) + ' = Nxx[0] + 2*') + NGHOSTS_prefix) + 'NGHOSTS;\n    params->Nxx_plus_2NGHOSTS1') + gridsuffix) + ' = Nxx[1] + 2*') + NGHOSTS_prefix) + 'NGHOSTS;\n    params->Nxx_plus_2NGHOSTS2') + gridsuffix) + ' = Nxx[2] + 2*') + NGHOSTS_prefix) + 'NGHOSTS;\n    // Now that params->Nxx_plus_2NGHOSTS* has been set, and below we need e.g., Nxx_plus_2NGHOSTS*, we include set_Cparameters.h here:\n#include "') + os.path.join(rel_path_to_Cparams, 'set_Cparameters.h')) + '"\n    // Step 0d: Set up space and time coordinates\n    // Step 0d.i: Declare Delta x^i=dxx{0,1,2} and invdxx{0,1,2}, as well as xxmin[3] and xxmax[3]:\n    REAL xxmin[3],xxmax[3];\n    if(EigenCoord == 0) {\n') + set_xxmin_xxmax()) + '    } else { // if (EigenCoord == 1)\n')
    CoordSystem_orig = par.parval_from_str('reference_metric::CoordSystem')
    if ('Spherical' not in CoordSystem_orig):
        par.set_parval_from_str('reference_metric::CoordSystem', get_EigenCoord())
        reference_metric()
        body += set_xxmin_xxmax()
        par.set_parval_from_str('reference_metric::CoordSystem', CoordSystem_orig)
        reference_metric()
    else:
        body += set_xxmin_xxmax()
    body += '    }\n    // Step 0d.iii: Set params.dxx{0,1,2}, params.invdx{0,1,2}, and uniform coordinate grids xx[3][]\n'
    for dirn in ['0', '1', '2']:
        body += ((((((((('    params->dxx' + dirn) + gridsuffix) + ' = (xxmax[') + dirn) + '] - xxmin[') + dirn) + ']) / ((REAL)Nxx[') + dirn) + ']);\n')
        body += (((((('    params->invdx' + dirn) + gridsuffix) + ' = 1.0/params->dxx') + dirn) + gridsuffix) + ';\n')
        body += ((((((((((((((('    xx[' + dirn) + '] = (REAL *)malloc(sizeof(REAL)*Nxx_plus_2NGHOSTS') + dirn) + gridsuffix) + ');\n    for(int j=0;j<Nxx_plus_2NGHOSTS') + dirn) + gridsuffix) + ';j++)\n        xx[') + dirn) + '][j] = xxmin[') + dirn) + '] + ((REAL)(j-NGHOSTS) + (1.0/2.0))*params->dxx') + dirn) + gridsuffix) + '; // Cell-centered grid.\n')
        if (dirn != '2'):
            body += '\n'
    add_to_Cfunction_dict(includes=[os.path.join(rel_path_to_Cparams, 'NRPy_basic_defines.h')], desc='Override default values for Nxx{0,1,2}, Nxx_plus_2NGHOSTS{0,1,2}, dxx{0,1,2}, and invdx{0,1,2}; and set xx[3][]', c_type='void', name=('set_Nxx_dxx_invdx_params__and__xx' + gridsuffix), params='const int EigenCoord, const int Nxx[3],paramstruct *restrict params, REAL *restrict xx[3]', body=body, enableCparameters=False, uses_rfm=True)