Skip to content
Snippets Groups Projects
Commit 02971c74 authored by René Heß's avatar René Heß
Browse files

Make it possible to create yasp grids with offset

parent c9770ac1
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@ class PerftoolOptionsArray(ImmutableRecord):
vectorize_greedy = PerftoolOption(default=False, helpstr="the heuristic currently in use (to produce paper numbers)")
turn_off_diagonal_jacobian = PerftoolOption(default=False, helpstr="Do not use diagonal_jacobian transformation on the ufl tree and cast result of jacobianInverseTransposed into a FieldMatrix.")
architecture = PerftoolOption(default="haswell", helpstr="The architecture to optimize for. Possible values: haswell|knl")
grid_offset = PerftoolOption(default=False, helpstr="Set to true if you want a yasp grid where the lower left corner is not in the origin.")
# Arguments that are mainly to be set by logic depending on other options
max_vector_width = PerftoolOption(default=256, helpstr=None)
......
......@@ -60,7 +60,10 @@ def typedef_grid(name):
set_option('constant_transformation_matrix', True)
range_type = type_range()
gridt = "Dune::YaspGrid<{0}, Dune::EquidistantCoordinates<{1}, {0}>>".format(dim, range_type)
if get_option("grid_offset"):
gridt = "Dune::YaspGrid<{0}, Dune::EquidistantOffsetCoordinates<{1}, {0}>>".format(dim, range_type)
else:
gridt = "Dune::YaspGrid<{0}, Dune::EquidistantCoordinates<{1}, {0}>>".format(dim, range_type)
include_file("dune/grid/yaspgrid.hh", filetag="driver")
else:
if isSimplical(get_trial_element().cell()):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment