2323
2424from .basic import SplBasic
2525from .utilities import build_pythran_types_header , variables
26- from .utilities import filter_loops , filter_product
26+ from .utilities import filter_loops , filter_product , select_loops
2727from .utilities import rationalize_eval_mapping
2828from .utilities import compute_atoms_expr_mapping
2929from .utilities import compute_atoms_expr_field
3030
3131#==============================================================================
3232class EvalQuadratureMapping (SplBasic ):
3333
34- def __new__ (cls , space , mapping , discrete_boundary = None , name = None ,
34+ def __new__ (cls , space , mapping , boundary = None , name = None ,
3535 boundary_basis = None , nderiv = 1 , is_rational_mapping = None ,
3636 area = None , backend = None ):
3737
@@ -58,7 +58,7 @@ def __new__(cls, space, mapping, discrete_boundary=None, name=None,
5858 is_rational_mapping = is_rational_mapping )
5959
6060 obj ._space = space
61- obj ._discrete_boundary = discrete_boundary
61+ obj ._boundary = boundary
6262 obj ._boundary_basis = boundary_basis
6363 obj ._backend = backend
6464
@@ -254,9 +254,7 @@ def _initialize(self):
254254 # ...
255255
256256 # put the body in tests for loops
257- body = filter_loops (indices_basis , ranges_basis , body ,
258- self .discrete_boundary ,
259- boundary_basis = self .boundary_basis )
257+ body = select_loops (indices_basis , ranges_basis , body , boundary = None )
260258
261259 if self .is_rational_mapping :
262260 stmts = rationalize_eval_mapping (self .mapping , self .nderiv ,
@@ -266,7 +264,7 @@ def _initialize(self):
266264
267265 # ...
268266 if self .area :
269- weight = filter_product (indices_quad , weights , self .discrete_boundary )
267+ weight = filter_product (indices_quad , weights , self .boundary )
270268
271269 stmts = area_eval_mapping (self .mapping , self .area , dim , indices_quad , weight )
272270
@@ -275,7 +273,7 @@ def _initialize(self):
275273
276274 # put the body in for loops of quadrature points
277275 body = filter_loops (indices_quad , ranges_quad , body ,
278- self .discrete_boundary ,
276+ self .boundary ,
279277 boundary_basis = self .boundary_basis )
280278
281279 # initialization of the matrix
@@ -308,7 +306,7 @@ def _initialize(self):
308306#==============================================================================
309307class EvalQuadratureField (SplBasic ):
310308
311- def __new__ (cls , space , fields , discrete_boundary = None , name = None ,
309+ def __new__ (cls , space , fields , boundary = None , name = None ,
312310 boundary_basis = None , mapping = None , is_rational_mapping = None ,backend = None ):
313311
314312 if not isinstance (fields , (tuple , list , Tuple )):
@@ -320,7 +318,7 @@ def __new__(cls, space, fields, discrete_boundary=None, name=None,
320318
321319 obj ._space = space
322320 obj ._fields = Tuple (* fields )
323- obj ._discrete_boundary = discrete_boundary
321+ obj ._boundary = boundary
324322 obj ._boundary_basis = boundary_basis
325323 obj ._backend = backend
326324 obj ._func = obj ._initialize ()
@@ -412,13 +410,13 @@ def _initialize(self):
412410
413411 # put the body in tests for loops
414412 body = filter_loops (indices_basis , ranges_basis , body ,
415- self .discrete_boundary ,
413+ self .boundary ,
416414 boundary_basis = self .boundary_basis )
417415
418416
419417 # put the body in for loops of quadrature points
420418 body = filter_loops (indices_quad , ranges_quad , body ,
421- self .discrete_boundary ,
419+ self .boundary ,
422420 boundary_basis = self .boundary_basis )
423421
424422
@@ -446,7 +444,7 @@ def _initialize(self):
446444#==============================================================================
447445class EvalQuadratureVectorField (SplBasic ):
448446
449- def __new__ (cls , space , vector_fields , discrete_boundary = None , name = None ,
447+ def __new__ (cls , space , vector_fields , boundary = None , name = None ,
450448 boundary_basis = None , mapping = None , is_rational_mapping = None , backend = None ):
451449
452450 if not isinstance (vector_fields , (tuple , list , Tuple )):
@@ -458,7 +456,7 @@ def __new__(cls, space, vector_fields, discrete_boundary=None, name=None,
458456
459457 obj ._space = space
460458 obj ._vector_fields = Tuple (* vector_fields )
461- obj ._discrete_boundary = discrete_boundary
459+ obj ._boundary = boundary
462460 obj ._boundary_basis = boundary_basis
463461 obj ._backend = backend
464462 obj ._func = obj ._initialize ()
@@ -548,12 +546,12 @@ def _initialize(self):
548546
549547 # put the body in tests for loops
550548 body = filter_loops (indices_basis , ranges_basis , body ,
551- self .discrete_boundary ,
549+ self .boundary ,
552550 boundary_basis = self .boundary_basis )
553551
554552 # put the body in for loops of quadrature points
555553 body = filter_loops (indices_quad , ranges_quad , body ,
556- self .discrete_boundary ,
554+ self .boundary ,
557555 boundary_basis = self .boundary_basis )
558556
559557 # initialization of the matrix
@@ -597,7 +595,7 @@ def _create_loop(indices, ranges, body):
597595# NOTE: this is used in module 'psydac.api.ast.glt'
598596class EvalArrayField (SplBasic ):
599597
600- def __new__ (cls , space , fields , discrete_boundary = None , name = None ,
598+ def __new__ (cls , space , fields , boundary = None , name = None ,
601599 boundary_basis = None , mapping = None , is_rational_mapping = None ,backend = None ):
602600
603601 if not isinstance (fields , (tuple , list , Tuple )):
@@ -609,7 +607,7 @@ def __new__(cls, space, fields, discrete_boundary=None, name=None,
609607
610608 obj ._space = space
611609 obj ._fields = Tuple (* fields )
612- obj ._discrete_boundary = discrete_boundary
610+ obj ._boundary = boundary
613611 obj ._boundary_basis = boundary_basis
614612 obj ._backend = backend
615613 obj ._func = obj ._initialize ()
0 commit comments