Skip to content

Commit

Permalink
tsfc: rebase-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ksagiyam committed Dec 11, 2024
1 parent b341d70 commit cc971c1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
18 changes: 11 additions & 7 deletions tsfc/fem.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,17 @@ def translator(self):

@cached_property
def use_canonical_quadrature_point_ordering(self):
filtered_map = {domain: integral_type for domain, integral_type in self.domain_integral_type_map.items() if integral_type is not None}
cell_integral_type_map = {as_fiat_cell(domain.ufl_cell()): integral_type
for domain, integral_type in self.domain_integral_type_map.items()
if integral_type is not None}
if all(integral_type == 'cell' for integral_type in cell_integral_type_map.values()):
return False
elif all(integral_type in ['exterior_facet', 'interior_facet'] for integral_type in cell_integral_type_map.values()):
if all(isinstance(cell, UFCHexahedron) for cell in cell_integral_type_map):
return True
elif len(set(cell_integral_type_map)) > 1: # mixed cell types
return True
return False
import pdb;pdb.set_trace()
for domain, integral_type in filtered_map.items():
if domain.ufl_cell() == 999:
pass
return isinstance(self.fiat_cell, UFCHexahedron) and self.integral_type in ['exterior_facet', 'interior_facet']


class CoordinateMapping(PhysicalGeometry):
Expand Down Expand Up @@ -152,7 +156,7 @@ def preprocess(self, expr, context):
@property
def config(self):
config = {name: getattr(self.interface, name)
for name in ["ufl_cell", "index_cache", "scalar_type"]}
for name in ["ufl_cell", "index_cache", "scalar_type", "domain_integral_type_map"]}
config["interface"] = self.interface
return config

Expand Down
5 changes: 2 additions & 3 deletions tsfc/kernel_interface/firedrake_loopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import loopy as lp

from tsfc import kernel_args, fem
from tsfc import kernel_args
from tsfc.finatinterface import create_element
from tsfc.kernel_interface.common import KernelBuilderBase as _KernelBuilderBase, KernelBuilderMixin, get_index_names, check_requirements, prepare_coefficient, prepare_arguments, prepare_constant
from tsfc.loopy import generate as generate_loopy
Expand Down Expand Up @@ -504,8 +504,7 @@ def construct_kernel(self, name, ctx, log=False):
exterior_facets=tuple(active_domain_numbers_exterior_facets),
interior_facets=tuple(active_domain_numbers_interior_facets),
exterior_facet_orientations=tuple(active_domain_numbers_exterior_facet_orientations),
interior_facet_orientations=tuple(active_domain_numbers_interior_facet_orientations),
),
interior_facet_orientations=tuple(active_domain_numbers_interior_facet_orientations),),
coefficient_numbers=tuple(zip(info.coefficient_numbers, coefficient_indices)),
tabulations=tabulations,
flop_count=flop_count,
Expand Down

0 comments on commit cc971c1

Please sign in to comment.