Ejemplo n.º 1
0
parameters.add(Parameters("assembly_cache",
                          enabled=True,
                          eviction=True,
                          max_bytes=float("Inf"),
                          max_factor=0.6,
                          max_misses=3))

parameters.add(Parameters("coffee",
                          O2=True))

# Default to the values of PyOP2 configuration dictionary
pyop2_opts = Parameters("pyop2_options",
                        **configuration)

pyop2_opts.set_update_function(lambda k, v: configuration.unsafe_reconfigure(**{k: v}))

# Override values
pyop2_opts["type_check"] = True
pyop2_opts["log_level"] = "INFO"

parameters.add(pyop2_opts)

ffc_parameters = default_parameters()
ffc_parameters['write_file'] = False
ffc_parameters['format'] = 'pyop2'
ffc_parameters['representation'] = 'quadrature'
ffc_parameters['pyop2-ir'] = True
parameters.add(Parameters("form_compiler", **ffc_parameters))

parameters["reorder_meshes"] = True
Ejemplo n.º 2
0
               eviction=True,
               max_bytes=float("Inf"),
               max_factor=0.6,
               max_misses=3))

parameters.add(Parameters("coffee", O2=True))

# Spew citation for coffee paper if user modifies coffee options.
parameters["coffee"].set_update_function(
    lambda k, v: Citations().register("Luporini2015"))

# Default to the values of PyOP2 configuration dictionary
pyop2_opts = Parameters("pyop2_options", **configuration)

pyop2_opts.set_update_function(
    lambda k, v: configuration.unsafe_reconfigure(**{k: v}))

# Override values
pyop2_opts["type_check"] = True
pyop2_opts["log_level"] = "INFO"

parameters.add(pyop2_opts)

ffc_parameters = default_parameters()
ffc_parameters['write_file'] = False
ffc_parameters['format'] = 'pyop2'
ffc_parameters['representation'] = 'quadrature'
ffc_parameters['pyop2-ir'] = True
parameters.add(Parameters("form_compiler", **ffc_parameters))

parameters["reorder_meshes"] = True
Ejemplo n.º 3
0

parameters = Parameters()
"""A nested dictionary of parameters used by Firedrake"""

# The COFFEE default optimization level is O2
coffee_default_optlevel = "Ov"
coffee_opts = Parameters("coffee", optlevel=coffee_default_optlevel)
coffee_opts.set_update_function(lambda k, v: coffee_reconfigure(**{k: v}))
parameters.add(coffee_opts)

# Default to the values of PyOP2 configuration dictionary
pyop2_opts = Parameters("pyop2_options",
                        **configuration)

pyop2_opts.set_update_function(lambda k, v: configuration.unsafe_reconfigure(**{k: v}))

# Override values
pyop2_opts["type_check"] = True

# PyOP2 must know about the COFFEE optimization level chosen by Firedrake
pyop2_opts["opt_level"] = coffee_default_optlevel

parameters.add(pyop2_opts)

parameters.add(Parameters("form_compiler", **default_parameters()))
parameters["form_compiler"]['scalar_type'] = ScalarType
parameters["form_compiler"]['scalar_type_c'] = ScalarType_c

parameters["reorder_meshes"] = True