Example #1
0
 def __init__(self, call, parent_call):
     if False:
         self._0_to_n = DynKernelArgument(None, None, None)  # for pyreverse
     Arguments.__init__(self, parent_call)
     self._args = []
     for (idx, arg) in enumerate(call.ktype.arg_descriptors):
         self._args.append(
             DynKernelArgument(arg, call.args[idx], parent_call))
     self._dofs = []
Example #2
0
 def __init__(self, call, parent_call):
     # pylint: disable=using-constant-test
     if False:
         self._0_to_n = GOKernelArgument(None, None, None)  # for pyreverse
     Arguments.__init__(self, parent_call)
     self._args = []
     for (idx, arg) in enumerate(call.ktype.arg_descriptors):
         self._args.append(GOKernelArgument(arg, call.args[idx],
                                            parent_call))
     self._dofs = []
Example #3
0
    def __init__(self, call, parent_call):
        if False:  # pylint: disable=using-constant-test
            self._0_to_n = GOKernelArgument(None, None, None)  # for pyreverse
        Arguments.__init__(self, parent_call)

        self._args = []
        # Loop over the kernel arguments obtained from the meta data
        for (idx, arg) in enumerate(call.ktype.arg_descriptors):
            # arg is a GO1p0Descriptor object
            if arg.type == "grid_property":
                # This is an argument supplied by the psy layer
                self._args.append(GOKernelGridArgument(arg))
            elif arg.type == "scalar" or arg.type == "field":
                # This is a kernel argument supplied by the Algorithm layer
                self._args.append(
                    GOKernelArgument(arg, call.args[idx], parent_call))
            else:
                raise ParseError("Invalid kernel argument type. Found '{0}' "
                                 "but must be one of {1}".format(
                                     arg.type,
                                     ["grid_property", "scalar", "field"]))
        self._dofs = []