16 #ifndef Intrepid2_DataDimensionInfo_hpp
17 #define Intrepid2_DataDimensionInfo_hpp
34 DataVariationType variationType;
37 int blockPlusDiagonalLastNonDiagonal = -1;
41 KOKKOS_INLINE_FUNCTION
44 const int myNominalExtent = myData.logicalExtent;
45 #ifdef HAVE_INTREPID2_DEBUG
48 const DataVariationType & myVariation = myData.variationType;
49 const DataVariationType & otherVariation = otherData.variationType;
51 const int & myVariationModulus = myData.variationModulus;
52 const int & otherVariationModulus = otherData.variationModulus;
54 int myDataExtent = myData.dataExtent;
55 int otherDataExtent = otherData.dataExtent;
58 combinedDimensionInfo.logicalExtent = myNominalExtent;
63 switch (otherVariation)
68 case BLOCK_PLUS_DIAGONAL:
69 combinedDimensionInfo = otherData;
73 switch (otherVariation)
76 combinedDimensionInfo = myData;
79 if (myVariationModulus == otherVariationModulus)
83 combinedDimensionInfo.variationType = MODULAR;
84 combinedDimensionInfo.dataExtent = myDataExtent;
85 combinedDimensionInfo.variationModulus = myVariationModulus;
92 combinedDimensionInfo.variationType = GENERAL;
93 combinedDimensionInfo.dataExtent = myNominalExtent;
94 combinedDimensionInfo.variationModulus = myNominalExtent;
97 case BLOCK_PLUS_DIAGONAL:
98 combinedDimensionInfo.variationType = GENERAL;
99 combinedDimensionInfo.dataExtent = myNominalExtent;
100 combinedDimensionInfo.variationModulus = myNominalExtent;
104 combinedDimensionInfo = otherData;
108 case BLOCK_PLUS_DIAGONAL:
109 switch (otherVariation)
112 combinedDimensionInfo = myData;
115 combinedDimensionInfo.variationType = GENERAL;
116 combinedDimensionInfo.dataExtent = myNominalExtent;
117 combinedDimensionInfo.variationModulus = myNominalExtent;
121 combinedDimensionInfo = otherData;
123 case BLOCK_PLUS_DIAGONAL:
124 combinedDimensionInfo.variationType = GENERAL;
125 combinedDimensionInfo.dataExtent = max(myDataExtent,otherDataExtent);
126 combinedDimensionInfo.variationModulus = combinedDimensionInfo.dataExtent;
128 combinedDimensionInfo.blockPlusDiagonalLastNonDiagonal = min(myData.blockPlusDiagonalLastNonDiagonal, otherData.blockPlusDiagonalLastNonDiagonal);
132 switch (otherVariation)
137 case BLOCK_PLUS_DIAGONAL:
138 combinedDimensionInfo = myData;
141 return combinedDimensionInfo;
#define INTREPID2_TEST_FOR_EXCEPTION_DEVICE_SAFE(test, x, msg)
Struct expressing all variation information about a Data object in a single dimension, including its logical extent and storage extent.
Defines DataVariationType enum that specifies the types of variation possible within a Data object...