diff --git a/src/PYB11/FieldList/ArithmeticFieldList.py b/src/PYB11/FieldList/ArithmeticFieldList.py index 06a07b16d..865a6022e 100644 --- a/src/PYB11/FieldList/ArithmeticFieldList.py +++ b/src/PYB11/FieldList/ArithmeticFieldList.py @@ -1,12 +1,13 @@ from PYB11Generator import * -from FieldList import * +import FieldList +import FieldListBase #------------------------------------------------------------------------------- # FieldList with numeric operations #------------------------------------------------------------------------------- @PYB11template("Dimension", "Value") @PYB11pycppname("FieldList") -class ArithmeticFieldList(FieldListBase): +class ArithmeticFieldList(FieldListBase.FieldListBase): PYB11typedefs = """ typedef FieldList<%(Dimension)s, %(Value)s> FieldListType; @@ -138,4 +139,4 @@ def localMax(self): #------------------------------------------------------------------------------- # Inject FieldList #------------------------------------------------------------------------------- -PYB11inject(FieldList, ArithmeticFieldList) +PYB11inject(FieldList.FieldList, ArithmeticFieldList) diff --git a/src/PYB11/FieldList/ArithmeticFieldList_PYB11.py b/src/PYB11/FieldList/ArithmeticFieldList_PYB11.py index b64c47229..fb6b7e4f9 100644 --- a/src/PYB11/FieldList/ArithmeticFieldList_PYB11.py +++ b/src/PYB11/FieldList/ArithmeticFieldList_PYB11.py @@ -10,6 +10,7 @@ dims = spheralDimensions() from ArithmeticFieldList import * +from MinMaxFieldList import * #------------------------------------------------------------------------------- # Includes @@ -46,6 +47,16 @@ ("Dim<%i>::FifthRankTensor" % ndim, "FifthRankTensor")): exec(''' %(label)sFieldList%(ndim)sd = PYB11TemplateClass(ArithmeticFieldList, template_parameters=("Dim<%(ndim)i>", "%(value)s")) +''' % {"ndim" : ndim, + "value" : value, + "label" : label}) + + #........................................................................... + # A few fields can apply the min/max with a scalar additionally + for (value, label) in (("double", "Scalar"), + ("Dim<%i>::SymTensor" % ndim, "SymTensor")): + exec(''' +%(label)sFieldList%(ndim)sd = PYB11TemplateClass(MinMaxFieldList, template_parameters=("Dim<%(ndim)i>", "%(value)s")) ''' % {"ndim" : ndim, "value" : value, "label" : label}) diff --git a/src/PYB11/FieldList/FieldList_PYB11.py b/src/PYB11/FieldList/FieldList_PYB11.py index a5aef6175..919977646 100644 --- a/src/PYB11/FieldList/FieldList_PYB11.py +++ b/src/PYB11/FieldList/FieldList_PYB11.py @@ -11,7 +11,6 @@ from FieldListBase import * from FieldList import * -from MinMaxFieldList import * from FieldListSet import * #------------------------------------------------------------------------------- @@ -57,16 +56,6 @@ ("RKCoefficients>" % ndim, "RKCoefficients")): exec(''' %(label)sFieldList%(ndim)sd = PYB11TemplateClass(FieldList, template_parameters=("Dim<%(ndim)i>", "%(value)s")) -''' % {"ndim" : ndim, - "value" : value, - "label" : label}) - - #........................................................................... - # A few fields can apply the min/max with a scalar additionally - for (value, label) in (("double", "Scalar"), - ("Dim<%i>::SymTensor" % ndim, "SymTensor")): - exec(''' -%(label)sFieldList%(ndim)sd = PYB11TemplateClass(MinMaxFieldList, template_parameters=("Dim<%(ndim)i>", "%(value)s")) ''' % {"ndim" : ndim, "value" : value, "label" : label}) diff --git a/src/PYB11/FieldList/MinMaxFieldList.py b/src/PYB11/FieldList/MinMaxFieldList.py index ba7f3b81b..e07d6cba5 100644 --- a/src/PYB11/FieldList/MinMaxFieldList.py +++ b/src/PYB11/FieldList/MinMaxFieldList.py @@ -1,4 +1,6 @@ from PYB11Generator import * +import FieldList +import FieldListBase from ArithmeticFieldList import * #------------------------------------------------------------------------------- @@ -6,7 +8,7 @@ #------------------------------------------------------------------------------- @PYB11template("Dimension", "Value") @PYB11pycppname("FieldList") -class MinMaxFieldList(FieldListBase): +class MinMaxFieldList(FieldListBase.FieldListBase): PYB11typedefs = """ typedef FieldList<%(Dimension)s, %(Value)s> FieldListType;