示例#1
0
class Meson2ptParser(ObjectParser):
    """
    Test meson two point correlator table.
    The source and sink interpolating operators are not checked to be the same on purpose.
    """

    model = Meson2pt
    _tree = {
        "propagator0": "OneToAll",
        **{
            f"propagator0.{key}": OneToAllDWParser.get_tree()[key]
            for key in OneToAllDWParser.get_tree()
        },
        "propagator1": "OneToAll",
        **{
            f"propagator1.{key}": OneToAllDWParser.get_tree()[key]
            for key in OneToAllDWParser.get_tree()
        },
        "sourcewave": "Hadron",
        "sinkwave": "Hadron",
    }
    _parameters = {
        "propagator0": OneToAllDWssParser.get_parameters(),
        "propagator1": OneToAllDWssParser.get_parameters(),
        "sourcewave": MesonParser.get_parameters(),
        "sinkwave": MesonParser.get_parameters(),
    }
    _consistency_check_changes = []
示例#2
0
    def test_sinksmear_id_consistency(self):
        prop0 = OneToAllDWParser.create_instance()
        prop1 = OneToAllDWssParser.create_instance()
        sourcewave = MesonParser.create_instance()
        sinkwave = MesonParser.create_instance(fail_if_exists=False)

        parameters = dict()
        parameters["propagator0"] = prop0
        parameters["propagator1"] = prop1
        parameters["sourcewave"] = sourcewave
        parameters["sinkwave"] = sinkwave

        with self.assertRaises(ConsistencyError) as context:
            self.model.objects.create(**parameters)
        print(context.exception.error)
示例#3
0
    def test_gaugeconfig_id_consistency(self):
        prop0 = OneToAllDWParser.create_instance()
        clsparameters = OneToAllDWParser.get_parameters()
        clsparameters["gaugeconfig"]["config"] = (
            int(clsparameters["gaugeconfig"]["config"]) + 10)
        prop1 = OneToAllDWParser.create_instance(
            parameters=clsparameters, tree=OneToAllDWParser.get_tree())
        sourcewave = MesonParser.create_instance()
        sinkwave = MesonParser.create_instance(fail_if_exists=False)

        parameters = dict()
        parameters["propagator0"] = prop0
        parameters["propagator1"] = prop1
        parameters["sourcewave"] = sourcewave
        parameters["sinkwave"] = sinkwave

        with self.assertRaises(ConsistencyError) as context:
            self.model.objects.create(**parameters)
        print(context.exception.error)
示例#4
0
    def test_fermionaction_type_consistency(self):
        """Test that fermion action is domain wall type
        """
        propagator = OneToAllHisqParser.create_instance()
        wave = MesonParser.create_instance()

        parameters = dict(self.get_parameters())
        parameters["propagator"] = propagator
        parameters["wave"] = wave

        with self.assertRaises(ConsistencyError) as context:
            self.model.objects.create(**parameters)
        print(context.exception.error)
示例#5
0
class DWFTuningParser(ObjectParser):
    """Tests creation of the Unsmeared link smear.
    """

    model = DWFTuning
    _tree = {
        "propagator": "OneToAll",
        **{
            f"propagator.{key}": OneToAllDWssParser.get_tree()[key]
            for key in OneToAllDWssParser.get_tree()
        },
        "wave": "Hadron",
    }
    _parameters = {
        "propagator": OneToAllDWssParser.get_parameters(),
        "wave": MesonParser.get_parameters(),
        "sink5": "False",
    }

    _consistency_check_changes = []