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

Add option to generate quadrilateral UG Grid

Note: This is still structured for now
parent d145e4c6
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ class PerftoolGlobalOptionsArray(ImmutableRecord):
project_basedir = PerftoolOption(helpstr="The base (build) directory of the dune-perftool project")
architecture = PerftoolOption(default="haswell", helpstr="The architecture to optimize for. Possible values: haswell|knl|skylake")
yaspgrid_offset = PerftoolOption(default=False, helpstr="Set to true if you want a yasp grid where the lower left corner is not in the origin.")
grid_unstructured = PerftoolOption(default=False, helpstr="Set to true if you want to use an unstructured grid.")
precision_bits = PerftoolOption(default=64, helpstr="The number of bits for the floating point type")
overlapping = PerftoolOption(default=False, helpstr="Use an overlapping solver and constraints. You still need to make sure to construct a grid with overlap! The parallel option will be set automatically.")
operators = PerftoolOption(default="r", helpstr="A comma separated list of operators, each name will be interpreted as a subsection name within the formcompiler section")
......
......@@ -51,7 +51,10 @@ def typedef_grid(name):
dim = get_dimension()
if isQuadrilateral(get_trial_element().cell()):
range_type = type_range()
if get_option("yaspgrid_offset"):
if get_option("grid_unstructured"):
gridt = "Dune::UGGrid<{}>".format(dim)
include_file("dune/grid/uggrid.hh", filetag="driver")
elif get_option("yaspgrid_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)
......
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