Skip to content
Snippets Groups Projects
Commit 7d57386a authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Optimize FacetNomral in the axiparallel case

parent ebdb2769
No related branches found
No related tags found
No related merge requests found
......@@ -362,6 +362,15 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker):
# The normal must be restricted to be well-defined
assert self.restriction is not Restriction.NONE
# Optimize facet normal on axiparallel grids
from dune.perftool.options import get_option
if get_option("diagonal_transformation_matrix"):
index, = self.indices
from dune.perftool.sumfact.switch import get_facedir
if isinstance(index, int) and index != get_facedir(self.restriction):
self.indices = None
return 0
if self.restriction == Restriction.POSITIVE:
return Variable(self.interface.name_unit_outer_normal())
if self.restriction == Restriction.NEGATIVE:
......
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