def test_SinhSymTP():

    module = 'reference_metric'

    module_name = 'rfm_SinhSymTP'

    function_and_global_dict = {
        'reference_metric(True)': [
            'xxmin', 'xxmax', 'UnitVectors', 'ReU', 'ReDD', 'ghatDD', 'ghatUU',
            'detgammahat', 'detgammahatdD', 'detgammahatdDD', 'ReUdD',
            'ReUdDD', 'ReDDdD', 'ReDDdDD', 'ghatDDdD', 'ghatDDdDD',
            'GammahatUDD', 'GammahatUDDdD', 'Cart_to_xx', 'xx_to_Cart',
            'xxSph', 'scalefactor_orthog'
        ]
    }

    initialization_string_dict = {
        'reference_metric(True)':
        '''
import NRPy_param_funcs as par
par.set_parval_from_str("reference_metric::CoordSystem", "SinhSymTP")
'''
    }

    create_test(module,
                module_name,
                function_and_global_dict,
                initialization_string_dict=initialization_string_dict)
def test_NobleSphericalThetaOptionOne():

    module = 'reference_metric'

    module_name = 'rfm_NobleSphericalThetaOptionOne'

    function_and_global_dict = {
        'reference_metric(False)': [
            'UnitVectors', 'ReU', 'ReDD', 'ghatDD', 'ghatUU', 'detgammahat',
            'detgammahatdD', 'detgammahatdDD', 'ReUdD', 'ReUdDD', 'ReDDdD',
            'ReDDdDD', 'ghatDDdD', 'ghatDDdDD', 'GammahatUDD', 'GammahatUDDdD',
            'Cart_to_xx', 'xx_to_Cart', 'xxSph', 'scalefactor_orthog'
        ]
    }

    initialization_string_dict = {
        'reference_metric(False)':
        '''
import NRPy_param_funcs as par
par.set_parval_from_str("reference_metric::CoordSystem", "NobleSphericalThetaOptionOne")
'''
    }

    create_test(module,
                module_name,
                function_and_global_dict,
                initialization_string_dict=initialization_string_dict)
Exemplo n.º 3
0
def test_ADMBSSN_tofrom_4metric_BSSN():

    module = 'BSSN.ADMBSSN_tofrom_4metric'

    module_name = 'ADMBSSN_tofrom_4metric'

    function_and_global_dict = {
        'g4DD_ito_BSSN_or_ADM(\"BSSN\")': ['g4DD'],
        'g4UU_ito_BSSN_or_ADM(\"BSSN\")': ['g4UU'],
        'BSSN_or_ADM_ito_g4DD(\"BSSN\")': ['hDD', 'cf', 'vetU', 'alpha']
    }
    rfm_init_string = '''
import BSSN.BSSN_quantities as Bq
import reference_metric as rfm
rfm.reference_metric()
rfm.ref_metric__hatted_quantities()'''

    initialization_string_dict = {
        'g4DD_ito_BSSN_or_ADM(\"BSSN\")': rfm_init_string,
        'g4UU_ito_BSSN_or_ADM(\"BSSN\")': rfm_init_string,
        'BSSN_or_ADM_ito_g4DD(\"BSSN\")': rfm_init_string
    }

    create_test(module,
                module_name,
                function_and_global_dict,
                logging_level='INFO',
                initialization_string_dict=initialization_string_dict)
Exemplo n.º 4
0
def test_BSSN_in_terms_of_ADM():
    module = 'BSSN.BSSN_in_terms_of_ADM'

    module_name = 'BSSN_in_terms_of_ADM'

    function_and_global_dict = {
        'gammabarDD_hDD(gammaDD=None)': ['gammabarDD', 'hDD'],
        'trK_AbarDD_aDD(gammaDD=None,KDD=None)': ['trK', 'AbarDD', 'aDD'],
        'LambdabarU_lambdaU__exact_gammaDD(gammaDD=None)':
        ['LambdabarU', 'lambdaU'],
        'cf_from_gammaDD(gammaDD=None)': ['cf'],
        'betU_vetU(betaU=None,BU=None)': ['vetU', 'betU']
    }

    rfm_init_string = '''
import BSSN.BSSN_quantities as Bq
import reference_metric as rfm
rfm.reference_metric()
rfm.ref_metric__hatted_quantities()'''

    initialization_string_dict = {
        'gammabarDD_hDD(gammaDD=None)': rfm_init_string,
        'trK_AbarDD_aDD(gammaDD=None,KDD=None)': rfm_init_string,
        'LambdabarU_lambdaU__exact_gammaDD(gammaDD=None)': rfm_init_string,
        'cf_from_gammaDD(gammaDD=None)': rfm_init_string,
        'betU_vetU(betaU=None,BU=None)': rfm_init_string
    }

    create_test(module,
                module_name,
                function_and_global_dict,
                logging_level='INFO',
                initialization_string_dict=initialization_string_dict)
Exemplo n.º 5
0
def test_RHSs():

    module = 'BSSN.BSSN_RHSs'

    module_name = 'BSSN_RHSs'
    
    function_and_global_dict = {'BSSN_RHSs()': ['cf_rhs', 'trK_rhs', 'lambda_rhsU', 'a_rhsDD', 'h_rhsDD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 6
0
def test_constraints():

    module = 'BSSN.BSSN_constraints'

    module_name = 'BSSN_constraints'
    
    function_and_global_dict = {'BSSN_constraints()': ['H', 'MU']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 7
0
def test_equations():

    module = 'GRFFE.equations'

    module_name = 'GRFFE'

    function_and_global_dict = {'generate_everything_for_UnitTesting()': ['B_notildeU','smallb4U','smallbsquared','TEM4UU','TEM4UD','S_tildeD','S_tilde_fluxUD','S_tilde_source_termD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 8
0
def test_T4UUmunu_vars():

    module = 'BSSN.BSSN_T4UUmunu_vars'

    module_name = 'T4UUmunu_vars'
    
    function_and_global_dict = {'define_BSSN_T4UUmunu_rescaled_source_terms()': ['rho', 'S', 'sD', 'sDD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 9
0
def test_GiRaFFEfood_HO():

    module = 'GiRaFFEfood_HO.GiRaFFEfood_HO'

    module_name = 'GiRaFFEfood_HO'

    function_and_global_dict = {'GiRaFFEfood_HO()': ['AD', 'ValenciavU']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 10
0
def test_Psi4():

    module = 'BSSN.Psi4'

    module_name = 'Psi4'
    
    function_and_global_dict = {'Psi4(specify_tetrad=False)': ['psi4_re_pt', 'psi4_im_pt']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 11
0
def test_FishboneMoncriefID():

    module = 'FishboneMoncriefID.FishboneMoncriefID'

    module_name = 'FishBoneMoncriefID'

    function_and_global_dict = {'FishboneMoncriefID()': ['hm1', 'rho_initial', 'uBL4D', 'uBL4U', 'uKS4U', 'IDalpha', 'IDgammaDD', 'IDKDD', 'IDbetaU', 'IDValencia3velocityU']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 12
0
def test_InitialData_PlaneWave():

    module = 'ScalarWave.InitialData_PlaneWave'

    module_name = 'InitialData_PlaneWave'

    function_and_global_dict = {'InitialData_PlaneWave()': ['uu_ID', 'vv_ID']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 13
0
def test_gauge_RHSs():

    module = 'BSSN.BSSN_gauge_RHSs'

    module_name = 'gauge_RHSs'
    
    function_and_global_dict = {'BSSN_gauge_RHSs()': ['alpha_rhs', 'bet_rhsU', 'vet_rhsU']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 14
0
def test_Psi4_tetrads():

    module = 'BSSN.Psi4_tetrads'

    module_name = 'Psi4_tetrads'
    
    function_and_global_dict = {'Psi4_tetrads()': ['l4U', 'n4U', 'mre4U', 'mim4U']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 15
0
def test_ShiftedKerrSchild():

    module = 'BSSN.ShiftedKerrSchild'

    module_name = 'ShiftedKerrSchild'
    
    function_and_global_dict = {'ShiftedKerrSchild(ComputeADMGlobalsOnly=True)': ['alphaSph', 'betaSphU', 'BSphU',
                                                                                    'gammaSphDD', 'KSphDD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 16
0
def test_GiRaFFE_HO_v2():

    module = 'GiRaFFE_HO.GiRaFFE_Higher_Order_v2'

    module_name = 'GiRaFFE_HO_v2'

    function_and_global_dict = {'GiRaFFE_Higher_Order_v2()': ['gammaUU', 'gammadet', 'SevolParenUD', 'Stilde_rhsD',
                                                              'AevolParen', 'PevolParenU', 'A_rhsD', 'psi6Phi_rhs']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 17
0
def test_StaticTrumpet():

    module = 'BSSN.StaticTrumpet'

    module_name = 'StaticTrumpet'
    
    function_and_global_dict = {'StaticTrumpet(ComputeADMGlobalsOnly=True)': ['alphaSph', 'betaSphU', 'BSphU',
                                                                                'gammaSphDD', 'KSphDD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 18
0
def test_ADM_in_terms_of_BSSN():

    module = 'BSSN.ADM_in_terms_of_BSSN'

    module_name = 'ADM_in_terms_of_BSSN'

    function_and_global_dict = {'ADM_in_terms_of_BSSN()': ['gammaDD', 'gammaDDdD', 'gammaDDdDD', 'gammaUU', 'detgamma', 
                                                           'GammaUDD', 'KDD', 'KDDdD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 19
0
def test_UIUCBlackHole():

    module = 'BSSN.UIUCBlackHole'

    module_name = 'UIUCBlackHole'
    
    function_and_global_dict = {'UIUCBlackHole(ComputeADMGlobalsOnly=True)': ['alphaSph', 'betaSphU', 'BSphU',
                                                                                'gammaSphDD', 'KSphDD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 20
0
def test_BrillLindquist():

    module = 'BSSN.BrillLindquist'

    module_name = 'BrillLindquist'

    function_and_global_dict = {'BrillLindquist(ComputeADMGlobalsOnly=True)': ['alphaCart', 'betaCartU', 'BCartU',
                                                                               'gammaCartDD', 'KCartDD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 21
0
def test_ScalarWave_RHSs():

    module = 'ScalarWave.ScalarWave_RHSs'

    module_name = 'ScalarWave_RHSs'

    function_and_global_dict = {
        'ScalarWave_RHSs()': ['wavespeed', 'uu_rhs', 'vv_rhs']
    }

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 22
0
def test_InitialData_SphericalGaussian():

    module = 'ScalarWave.InitialData'

    module_name = 'InitialData'

    function_and_global_dict = {
        'InitialData(Type="SphericalGaussian")': ['uu_ID', 'vv_ID']
    }

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 23
0
def test_GiRaFFE_HO():

    module = 'GiRaFFE_HO.GiRaFFE_Higher_Order'

    module_name = 'GiRaFFE_HO'

    function_and_global_dict = {'GiRaFFE_Higher_Order()': ['uD', 'uU', 'gammaUU', 'gammadet', 'u0alpha', 'alpsqrtgam',
                                                             'Stilde_rhsD', 'AevolParen', 'PevolParenU', 'A_rhsD',
                                                             'psi6Phi_rhs']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 24
0
def test_ScalarWaveCurvilinear_RHSs():

    module = 'ScalarWaveCurvilinear.ScalarWaveCurvilinear_RHSs'

    module_name = 'ScalarWaveCurvilinear_RHSs'

    function_and_global_dict = {
        'ScalarWaveCurvilinear_RHSs()': ['uu_rhs', 'vv_rhs']
    }

    create_test(module, module_name, function_and_global_dict)
def test_u0_smallb_Poynting__Cartesian():

    module = 'u0_smallb_Poynting__Cartesian.u0_smallb_Poynting__Cartesian'

    module_name = 'u0sbPoyn'

    function_and_global_dict = {'compute_u0_smallb_Poynting__Cartesian()': ['g4DD', 'u0', 'uD', 'uBcontraction', 'uU',
                                                                            'smallb4U', 'g4UU', 'smallb4D',
                                                                            'smallb2etk', 'PoynSU']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 26
0
def test_your_module():

    module = 'your_module_location.your_module'

    module_name = 'name_of_your_module'

    function_and_global_dict = {
        'function_call':
        ['your global', 'your next global', 'your next next global', 'etc']
    }

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 27
0
def test_MaxwellCartesian_Evol_System_II():

    module = 'Maxwell.MaxwellCartesian_Evol'

    module_name = 'MaxwellCartesian_Evol_System_II'

    function_and_global_dict = {
        'MaxwellCartesian_Evol()':
        ['ArhsD', 'ErhsD', 'psi_rhs', 'Gamma_rhs', 'Cviola']
    }

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 28
0
def test_ADMBSSN_tofrom_4metric():

    module = 'BSSN.ADMBSSN_tofrom_4metric'

    module_name = 'ADMBSSN_tofrom_4metric'

    function_and_global_dict = {
        'g4DD_ito_BSSN_or_ADM(\"ADM\")': ['g4DD'],
        'g4UU_ito_BSSN_or_ADM(\"ADM\")': ['g4UU'],
        'BSSN_or_ADM_ito_g4DD(\"ADM\")': ['gammaDD', 'betaU', 'alpha']
    }

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 29
0
def test_equations():

    module = 'GRMHD.equations'

    module_name = 'GRMHD'

    function_and_global_dict = {'generate_everything_for_UnitTesting()':
                                    ['GRHDT4UU','GRFFET4UU','T4UU','T4UD',
                                     'rho_star','tau_tilde','S_tildeD',
                                     'rho_star_fluxU','tau_tilde_fluxU','S_tilde_fluxUD',
                                     's_source_term','S_tilde_source_termD']}

    create_test(module, module_name, function_and_global_dict)
Exemplo n.º 30
0
def test_GiRaFFEfood_HO_1D_tests():

    module = 'GiRaFFEfood_HO.GiRaFFEfood_HO_1D_tests'

    module_name = 'GiRaFFEfood_HO_1D_tests'

    function_and_global_dict = {
        'GiRaFFEfood_HO_1D_tests()': [
            'AleftD', 'AcenterD', 'ArightD', 'ValenciavleftU',
            'ValenciavcenterU', 'ValenciavrightU'
        ]
    }

    create_test(module, module_name, function_and_global_dict)