@@ -50,6 +50,7 @@ CollectionOptimisation::CollectionOptimisation(
5050{
5151 int i;
5252 map<ElmtOrder, ImplementationType> defaults;
53+ map<ElmtOrder, ImplementationType> defaultsPhysDeriv;
5354 map<ElmtOrder, ImplementationType>::iterator it;
5455 bool verbose = (pSession.get ()) &&
5556 (pSession->DefinesCmdLineArgument (" verbose" )) &&
@@ -73,25 +74,38 @@ CollectionOptimisation::CollectionOptimisation(
7374 // Set defaults for all element types.
7475 for (it2 = elTypes.begin (); it2 != elTypes.end (); ++it2)
7576 {
76- defaults[ElmtOrder (it2->second , -1 )] = m_defaultType;
77+ defaults [ElmtOrder (it2->second , -1 )] = m_defaultType;
78+ defaultsPhysDeriv [ElmtOrder (it2->second , -1 )] = m_defaultType;
7779 }
7880
7981 if (defaultType == eNoImpType)
8082 {
8183 for (it2 = elTypes.begin (); it2 != elTypes.end (); ++it2)
8284 {
85+ defaultsPhysDeriv [ElmtOrder (it2->second , -1 )] = eNoCollection;
8386 for (int i = 1 ; i < 5 ; ++i)
8487 {
8588 defaults[ElmtOrder (it2->second , i)] = eStdMat;
8689 }
90+ for (int i = 1 ; i < 3 ; ++i)
91+ {
92+ defaultsPhysDeriv[ElmtOrder (it2->second , i)] = eSumFac;
93+ }
8794 }
8895 }
8996
9097 map<string, OperatorType> opTypes;
9198 for (i = 0 ; i < SIZE_OperatorType; ++i)
9299 {
93100 opTypes[OperatorTypeMap[i]] = (OperatorType)i;
94- m_global[(OperatorType)i] = defaults;
101+ switch ((OperatorType)i)
102+ {
103+ case ePhysDeriv:
104+ m_global[(OperatorType)i] = defaultsPhysDeriv;
105+ break ;
106+ default :
107+ m_global[(OperatorType)i] = defaults;
108+ }
95109 }
96110
97111 map<string, ImplementationType> impTypes;
0 commit comments