Skip to content

Commit

Permalink
Increased Intrepid2::MaxOrder from 8 to 10.
Browse files Browse the repository at this point in the history
Modified StructuredIntegrationPerformance to allow saving calibrations to file, and reading calibrations from file.
  • Loading branch information
CamelliaDPG committed May 20, 2024
1 parent 573fbbd commit 1f22c13
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/intrepid2/src/Shared/Intrepid2_Polylib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ namespace Intrepid2 {
static constexpr ordinal_type MaxPolylibOrder =
(Parameters::MaxOrder > Parameters::MaxCubatureDegreeEdge) ? Parameters::MaxOrder :
Parameters::MaxCubatureDegreeEdge;
static constexpr ordinal_type MaxPolylibPoint = MaxPolylibOrder/2+2;
// NVR: HVOL bases on tri/tet use Polylib with order + spaceDim + 2 points; in 3D this can be up to Parameters::MaxOrder + 5.
static constexpr ordinal_type MaxPolylibPoint = (MaxPolylibOrder/2+2 > Parameters::MaxOrder + 5) ? MaxPolylibOrder/2+2 : Parameters::MaxOrder + 5;

struct Serial {

Expand Down
2 changes: 1 addition & 1 deletion packages/intrepid2/src/Shared/Intrepid2_Types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ namespace Intrepid2 {
/// The maximum number of points to eval in serial mode.
static constexpr ordinal_type MaxNumPtsPerBasisEval= 1;
/// The maximum reconstruction order.
static constexpr ordinal_type MaxOrder = 8;
static constexpr ordinal_type MaxOrder = 10;
/// The maximum number of integration points for direct cubature rules.
static constexpr ordinal_type MaxIntegrationPoints = 4893;
/// The maximum degree of the polynomial that can be integrated exactly by a direct edge rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,14 @@ int main( int argc, char* argv[] )
return -1;
}

if (mode == Test)
{
// then overwrite poly orders to match the test cases we define in getWorksetSizeMap
polyOrderFixed = -1;
polyOrderMin = 1;
polyOrderMax = 3;
}

using Scalar = double;
using ExecutionSpace = Kokkos::DefaultExecutionSpace;
using DeviceType = Kokkos::DefaultExecutionSpace::device_type;
Expand Down Expand Up @@ -1284,16 +1292,31 @@ int main( int argc, char* argv[] )
map<int, Kokkos::Array<int,spaceDim> > gridCellCountsForPolyOrder;
for (int p=polyOrderMin; p<=polyOrderMax; p++)
{
int maxBasisCardinality = 1;
for (auto formulationChoice : formulationChoices)
if (mode != Test)
{
int maxBasisCardinality = 1;
for (auto formulationChoice : formulationChoices)
{
for (auto basisFamilyChoice : basisFamilyChoices)
{
auto basis = getHypercubeBasisForFormulation<Scalar, Scalar, DeviceType, spaceDim>(formulationChoice, basisFamilyChoice, p);
maxBasisCardinality = std::max(basis->getCardinality(), maxBasisCardinality);
}
}
gridCellCountsForPolyOrder[p] = getMeshWidths<spaceDim>(maxBasisCardinality, maxEntryCount, maxCellCount);
}
else // mode == Test; set the gridCellCounts according to mesh widths indicated in getWorksetSizes above.
{
for (auto basisFamilyChoice : basisFamilyChoices)
Kokkos::Array<int,spaceDim> meshWidths_8, meshWidths_4;
for (int d=0; d<spaceDim; d++)
{
auto basis = getHypercubeBasisForFormulation<Scalar, Scalar, DeviceType, spaceDim>(formulationChoice, basisFamilyChoice, p);
maxBasisCardinality = std::max(basis->getCardinality(), maxBasisCardinality);
meshWidths_4[d] = 4;
meshWidths_8[d] = 8;
}
gridCellCountsForPolyOrder[1] = meshWidths_8;
gridCellCountsForPolyOrder[2] = meshWidths_8;
gridCellCountsForPolyOrder[3] = meshWidths_4;
}
gridCellCountsForPolyOrder[p] = getMeshWidths<spaceDim>(maxBasisCardinality, maxEntryCount, maxCellCount);

int cellCount = 1;
for (int d=0; d<spaceDim; d++)
Expand Down

0 comments on commit 1f22c13

Please sign in to comment.