def out_default_free_parameters_for_rfm(free_parameters_file, domain_size=1.0, sinh_width=0.4, sinhv2_const_dr=0.05, SymTP_bScale=0.5):
    CoordSystem = par.parval_from_str('reference_metric::CoordSystem')
    with open(free_parameters_file, 'a') as file:
        file.write((((((((('\n// Set free-parameter values.\n\nconst REAL domain_size    = ' + str(domain_size)) + ';\nconst REAL sinh_width     = ') + str(sinh_width)) + ';\nconst REAL sinhv2_const_dr= ') + str(sinhv2_const_dr)) + ';\nconst REAL SymTP_bScale   = ') + str(SymTP_bScale)) + ';\n'))
        coordparams = ''
        if (CoordSystem == 'Spherical'):
            coordparams += '\nparams.RMAX = domain_size;\n'
        elif ('SinhSpherical' in CoordSystem):
            coordparams += '\nparams.AMPL = domain_size;\nparams.SINHW=  sinh_width;\n'
            if (CoordSystem == 'SinhSphericalv2'):
                coordparams += '        params.const_dr = sinhv2_const_dr;\n'
        elif ('SymTP' in CoordSystem):
            coordparams += '\nparams.bScale =  SymTP_bScale;\nparams.AMAX   =  domain_size;\n'
            if (CoordSystem == 'SinhSymTP'):
                coordparams += '        params.SINHWAA = sinh_width;\n'
        elif (CoordSystem == 'Cartesian'):
            coordparams += '\nparams.xmin = -domain_size, params.xmax = domain_size;\nparams.ymin = -domain_size, params.ymax = domain_size;\nparams.zmin = -domain_size, params.zmax = domain_size;\n'
        elif (CoordSystem == 'SinhCartesian'):
            coordparams += '\nparams.AMPLX  = domain_size;\nparams.SINHWX = sinh_width;\nparams.AMPLY  = domain_size;\nparams.SINHWY = sinh_width;\nparams.AMPLZ  = domain_size;\nparams.SINHWZ = sinh_width;\n'
        elif (CoordSystem == 'Cylindrical'):
            coordparams += '\nparams.ZMIN   = -domain_size;\nparams.ZMAX   =  domain_size;\nparams.RHOMAX =  domain_size;\n'
        elif ('SinhCylindrical' in CoordSystem):
            coordparams += '\nparams.AMPLRHO = domain_size;\nparams.SINHWRHO= sinh_width;\nparams.AMPLZ   = domain_size;\nparams.SINHWZ  = sinh_width;\n'
            if (CoordSystem == 'SinhCylindricalv2'):
                coordparams += '\nparams.const_drho = sinhv2_const_dr;\nparams.const_dz   = sinhv2_const_dr;\n'
        file.write((coordparams + '\n'))
def out_default_free_parameters_for_rfm(free_parameters_file, domain_size=1.0, sinh_width=0.4, sinhv2_const_dr=0.05, SymTP_bScale=0.5):
    CoordSystem = par.parval_from_str('reference_metric::CoordSystem')
    with open(free_parameters_file, 'a') as file:
        file.write((((((((('\n// Set free-parameter values.\n\nconst REAL domain_size    = ' + str(domain_size)) + ';\nconst REAL sinh_width     = ') + str(sinh_width)) + ';\nconst REAL sinhv2_const_dr= ') + str(sinhv2_const_dr)) + ';\nconst REAL SymTP_bScale   = ') + str(SymTP_bScale)) + ';\n'))
        coordparams = 
        if (CoordSystem == 'Spherical'):
            coordparams += '\nparams.RMAX = domain_size;\n'
        elif ('SinhSpherical' in CoordSystem):
            coordparams += '\nparams.AMPL = domain_size;\nparams.SINHW=  sinh_width;\n'
            if (CoordSystem == 'SinhSphericalv2'):
                coordparams += '        params.const_dr = sinhv2_const_dr;\n'
        elif ('SymTP' in CoordSystem):
            coordparams += '\nparams.bScale =  SymTP_bScale;\nparams.AMAX   =  domain_size;\n'
            if (CoordSystem == 'SinhSymTP'):
                coordparams += '        params.SINHWAA = sinh_width;\n'
        elif (CoordSystem == 'Cartesian'):
            coordparams += '\nparams.xmin = -domain_size, params.xmax = domain_size;\nparams.ymin = -domain_size, params.ymax = domain_size;\nparams.zmin = -domain_size, params.zmax = domain_size;\n'
        elif (CoordSystem == 'SinhCartesian'):
            coordparams += '\nparams.AMPLX  = domain_size;\nparams.SINHWX = sinh_width;\nparams.AMPLY  = domain_size;\nparams.SINHWY = sinh_width;\nparams.AMPLZ  = domain_size;\nparams.SINHWZ = sinh_width;\n'
        elif (CoordSystem == 'Cylindrical'):
            coordparams += '\nparams.ZMIN   = -domain_size;\nparams.ZMAX   =  domain_size;\nparams.RHOMAX =  domain_size;\n'
        elif ('SinhCylindrical' in CoordSystem):
            coordparams += '\nparams.AMPLRHO = domain_size;\nparams.SINHWRHO= sinh_width;\nparams.AMPLZ   = domain_size;\nparams.SINHWZ  = sinh_width;\n'
            if (CoordSystem == 'SinhCylindricalv2'):
                coordparams += '\nparams.const_drho = sinhv2_const_dr;\nparams.const_dz   = sinhv2_const_dr;\n'
        file.write((coordparams + '\n'))