52#include "Shards_CellTopology.hpp"
54#include "Teuchos_oblackholestream.hpp"
55#include "Teuchos_RCP.hpp"
56#include "Teuchos_GlobalMPISession.hpp"
57#include "Teuchos_ScalarTraits.hpp"
60using namespace Intrepid;
61using namespace shards;
63#define INTREPID_TEST_COMMAND( S , throwCounter, nException ) \
69 catch (const std::logic_error & err) { \
71 *outStream << "Expected Error " << nException << " -------------------------------------------------------------\n"; \
72 *outStream << err.what() << '\n'; \
73 *outStream << "-------------------------------------------------------------------------------" << "\n\n"; \
79int main(
int argc,
char *argv[]) {
81 Teuchos::GlobalMPISession mpiSession(&argc, &argv);
87 int iprint = argc - 1;
89 Teuchos::RCP<std::ostream> outStream;
90 Teuchos::oblackholestream bhs;
93 outStream = Teuchos::rcp(&std::cout,
false);
95 outStream = Teuchos::rcp(&bhs,
false);
98 Teuchos::oblackholestream oldFormatState;
99 oldFormatState.copyfmt(std::cout);
102 <<
"===============================================================================\n" \
104 <<
"| Unit Test CellTools |\n" \
106 <<
"| 1) Mapping to and from reference cells with base and extended topologies|\n" \
107 <<
"| using default initial guesses when computing the inverse F^{-1} |\n" \
108 <<
"| 2) Repeat all tests from 1) using user-defined initial guess for F^{-1} |\n" \
109 <<
"| 3) Exception testing |\n" \
111 <<
"| Questions? Contact Pavel Bochev (pbboche@sandia.gov) |\n" \
112 <<
"| Denis Ridzal (dridzal@sandia.gov), or |\n" \
113 <<
"| Kara Peterson (kjpeter@sandia.gov) |\n" \
115 <<
"| Intrepid's website: http://trilinos.sandia.gov/packages/intrepid |\n" \
116 <<
"| Trilinos website: http://trilinos.sandia.gov |\n" \
118 <<
"===============================================================================\n";
123 std::vector<shards::CellTopology> supportedTopologies;
124 supportedTopologies.push_back(shards::getCellTopologyData<Triangle<3> >() );
125 supportedTopologies.push_back(shards::getCellTopologyData<Triangle<6> >() );
126 supportedTopologies.push_back(shards::getCellTopologyData<Quadrilateral<4> >() );
127 supportedTopologies.push_back(shards::getCellTopologyData<Quadrilateral<9> >() );
128 supportedTopologies.push_back(shards::getCellTopologyData<Tetrahedron<4> >() );
129 supportedTopologies.push_back(shards::getCellTopologyData<Tetrahedron<10> >() );
130 supportedTopologies.push_back(shards::getCellTopologyData<Hexahedron<8> >() );
131 supportedTopologies.push_back(shards::getCellTopologyData<Hexahedron<20> >() );
132 supportedTopologies.push_back(shards::getCellTopologyData<Hexahedron<27> >() );
133 supportedTopologies.push_back(shards::getCellTopologyData<Wedge<6> >() );
134 supportedTopologies.push_back(shards::getCellTopologyData<Wedge<15> >() );
135 supportedTopologies.push_back(shards::getCellTopologyData<Wedge<18> >() );
136 supportedTopologies.push_back(shards::getCellTopologyData<Pyramid<5> >() );
137 supportedTopologies.push_back(shards::getCellTopologyData<Pyramid<13> >() );
140 std::vector<shards::CellTopology>::iterator topo_iterator;
147 <<
"===============================================================================\n"\
148 <<
"| Test 1: computing F(x) and F^{-1}(x) using default initial guesses. |\n"\
149 <<
"===============================================================================\n\n";
160 FieldContainer<double> cellWorkset;
161 FieldContainer<double> refPoints;
162 FieldContainer<double> physPoints;
163 FieldContainer<double> controlPoints;
166 DefaultCubatureFactory<double> cubFactory;
167 FieldContainer<double> cubPoints;
168 FieldContainer<double> cubWeights;
175 for(topo_iterator = supportedTopologies.begin(); topo_iterator != supportedTopologies.end(); ++topo_iterator){
178 Teuchos::RCP<Cubature<double> > cellCubature = cubFactory.create( (*topo_iterator), 4);
179 int cubDim = cellCubature -> getDimension();
180 int numPts = cellCubature -> getNumPoints();
181 cubPoints.resize(numPts, cubDim);
182 cubWeights.resize(numPts);
183 cellCubature -> getCubature(cubPoints, cubWeights);
187 int numNodes = (*topo_iterator).getNodeCount();
188 int cellDim = (*topo_iterator).getDimension();
189 cellWorkset.resize(numCells, numNodes, cellDim);
192 FieldContainer<double> refCellNodes(numNodes, cellDim );
196 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
199 for(
int nodeOrd = 0; nodeOrd < numNodes; nodeOrd++){
200 for(
int d = 0; d < cellDim; d++){
201 double delta = Teuchos::ScalarTraits<double>::random()/16.0;
202 cellWorkset(cellOrd, nodeOrd, d) = refCellNodes(nodeOrd, d) + delta;
211 physPoints.resize(numPts, cubDim);
212 controlPoints.resize(numPts, cubDim);
215 <<
" Mapping a set of " << numPts <<
" points to one cell in a workset of " << numCells <<
" "
216 << (*topo_iterator).getName() <<
" cells. \n";
218 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
226 for(
int pt = 0; pt < numPts; pt++){
227 for(
int d = 0; d < cellDim; d++){
229 if( abs( controlPoints(pt, d) - cubPoints(pt, d) ) > 100.0*INTREPID_TOL ){
232 << std::setw(70) <<
"^^^^----FAILURE!" <<
"\n"
233 <<
" Mapping a single point set to a single physical cell in a workset failed for: \n"
234 <<
" Cell Topology = " << (*topo_iterator).getName() <<
"\n"
235 <<
" Physical cell ordinal in workset = " << cellOrd <<
"\n"
236 <<
" Reference point ordinal = " << setprecision(12) << pt <<
"\n"
237 <<
" At reference point coordinate = " << setprecision(12) << d <<
"\n"
238 <<
" Original value = " << cubPoints(pt, d) <<
"\n"
239 <<
" F^{-1}F(P_d) = " << controlPoints(pt, d) <<
"\n";
250 controlPoints.clear();
251 physPoints.resize(numCells, numPts, cubDim);
252 controlPoints.resize(numCells, numPts, cubDim);
255 <<
" Mapping a set of " << numPts <<
" points to all cells in workset of " << numCells <<
" "
256 << (*topo_iterator).getName() <<
" cells. \n";
264 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
265 for(
int pt = 0; pt < numPts; pt++){
266 for(
int d = 0; d < cellDim; d++){
268 if( abs( controlPoints(cellOrd, pt, d) - cubPoints(pt, d) ) > 100.0*INTREPID_TOL ){
271 << std::setw(70) <<
"^^^^----FAILURE!" <<
"\n"
272 <<
" Mapping a single point set to all physical cells in a workset failed for: \n"
273 <<
" Cell Topology = " << (*topo_iterator).getName() <<
"\n"
274 <<
" Physical cell ordinal in workset = " << cellOrd <<
"\n"
275 <<
" Reference point ordinal = " << setprecision(12) << pt <<
"\n"
276 <<
" At reference point coordinate = " << setprecision(12) << d <<
"\n"
277 <<
" Original value = " << cubPoints(pt, d) <<
"\n"
278 <<
" F^{-1}F(P_d) = " << controlPoints(cellOrd, pt, d) <<
"\n";
289 controlPoints.clear();
290 refPoints.resize(numCells, numPts, cubDim);
291 physPoints.resize(numCells, numPts, cubDim);
292 controlPoints.resize(numCells, numPts, cubDim);
295 for(
int c = 0; c < numCells; c++){
296 for(
int pt = 0; pt < numPts; pt++){
297 for(
int d = 0; d < cellDim; d++){
298 refPoints(c, pt, d) = cubPoints(pt, d);
304 <<
" Mapping " << numCells <<
" sets of " << numPts <<
" points to corresponding cells in workset of " << numCells <<
" "
305 << (*topo_iterator).getName() <<
" cells. \n";
313 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
314 for(
int pt = 0; pt < numPts; pt++){
315 for(
int d = 0; d < cellDim; d++){
317 if( abs( controlPoints(cellOrd, pt, d) - cubPoints(pt, d) ) > 100.0*INTREPID_TOL ){
320 << std::setw(70) <<
"^^^^----FAILURE!" <<
"\n"
321 <<
" Mapping multiple point sets to corresponding physical cells in a workset failed for: \n"
322 <<
" Cell Topology = " << (*topo_iterator).getName() <<
"\n"
323 <<
" Physical cell ordinal in workset = " << cellOrd <<
"\n"
324 <<
" Reference point ordinal = " << setprecision(12) << pt <<
"\n"
325 <<
" At reference point coordinate = " << setprecision(12) << d <<
"\n"
326 <<
" Original value = " << refPoints(cellOrd, pt, d) <<
"\n"
327 <<
" F^{-1}F(P_d) = " << controlPoints(cellOrd, pt, d) <<
"\n";
339 catch (
const std::logic_error & err) {
340 *outStream << err.what() <<
"\n";
350 <<
"===============================================================================\n"\
351 <<
"| Test 2: computing F(x) and F^{-1}(x) using user-defined initial guess. |\n"\
352 <<
"===============================================================================\n\n";
363 FieldContainer<double> cellWorkset;
364 FieldContainer<double> physPoints;
365 FieldContainer<double> controlPoints;
366 FieldContainer<double> initialGuess;
369 DefaultCubatureFactory<double> cubFactory;
370 FieldContainer<double> cubPoints;
371 FieldContainer<double> cubWeights;
378 for(topo_iterator = supportedTopologies.begin(); topo_iterator != supportedTopologies.end(); ++topo_iterator){
381 Teuchos::RCP<Cubature<double> > cellCubature = cubFactory.create( (*topo_iterator), 4);
382 int cubDim = cellCubature -> getDimension();
383 int numPts = cellCubature -> getNumPoints();
384 cubPoints.resize(numPts, cubDim);
385 cubWeights.resize(numPts);
386 cellCubature -> getCubature(cubPoints, cubWeights);
390 int numNodes = (*topo_iterator).getNodeCount();
391 int cellDim = (*topo_iterator).getDimension();
392 cellWorkset.resize(numCells, numNodes, cellDim);
395 FieldContainer<double> refCellNodes(numNodes, cellDim );
399 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
402 for(
int nodeOrd = 0; nodeOrd < numNodes; nodeOrd++){
403 for(
int d = 0; d < cellDim; d++){
404 double delta = Teuchos::ScalarTraits<double>::random()/16.0;
405 cellWorkset(cellOrd, nodeOrd, d) = refCellNodes(nodeOrd, d) + delta;
414 physPoints.resize(numPts, cubDim);
415 controlPoints.resize(numPts, cubDim);
418 <<
" Mapping a set of " << numPts <<
" points to one cell in a workset of " << numCells <<
" "
419 << (*topo_iterator).getName() <<
" cells. \n";
421 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
429 for(
int pt = 0; pt < numPts; pt++){
430 for(
int d = 0; d < cellDim; d++){
432 if( abs( controlPoints(pt, d) - cubPoints(pt, d) ) > 100.0*INTREPID_TOL ){
435 << std::setw(70) <<
"^^^^----FAILURE!" <<
"\n"
436 <<
" Mapping a single point set to a single physical cell in a workset failed for: \n"
437 <<
" Cell Topology = " << (*topo_iterator).getName() <<
"\n"
438 <<
" Physical cell ordinal in workset = " << cellOrd <<
"\n"
439 <<
" Reference point ordinal = " << setprecision(12) << pt <<
"\n"
440 <<
" At reference point coordinate = " << setprecision(12) << d <<
"\n"
441 <<
" Original value = " << cubPoints(pt, d) <<
"\n"
442 <<
" F^{-1}F(P_d) = " << controlPoints(pt, d) <<
"\n";
453 controlPoints.clear();
454 physPoints.resize(numCells, numPts, cubDim);
455 controlPoints.resize(numCells, numPts, cubDim);
458 initialGuess.resize(numCells, numPts, cubDim);
459 for(
int c = 0; c < numCells; c++){
460 for(
int pt = 0; pt < numPts; pt++){
461 for(
int d = 0; d < cellDim; d++){
462 initialGuess(c, pt, d) = cubPoints(pt, d);
468 <<
" Mapping a set of " << numPts <<
" points to all cells in workset of " << numCells <<
" "
469 << (*topo_iterator).getName() <<
" cells. \n";
477 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
478 for(
int pt = 0; pt < numPts; pt++){
479 for(
int d = 0; d < cellDim; d++){
481 if( abs( controlPoints(cellOrd, pt, d) - cubPoints(pt, d) ) > 100.0*INTREPID_TOL ){
484 << std::setw(70) <<
"^^^^----FAILURE!" <<
"\n"
485 <<
" Mapping a single point set to all physical cells in a workset failed for: \n"
486 <<
" Cell Topology = " << (*topo_iterator).getName() <<
"\n"
487 <<
" Physical cell ordinal in workset = " << cellOrd <<
"\n"
488 <<
" Reference point ordinal = " << setprecision(12) << pt <<
"\n"
489 <<
" At reference point coordinate = " << setprecision(12) << d <<
"\n"
490 <<
" Original value = " << cubPoints(pt, d) <<
"\n"
491 <<
" F^{-1}F(P_d) = " << controlPoints(cellOrd, pt, d) <<
"\n";
503 controlPoints.clear();
504 physPoints.resize(numCells, numPts, cubDim);
505 controlPoints.resize(numCells, numPts, cubDim);
508 <<
" Mapping " << numCells <<
" sets of " << numPts <<
" points to corresponding cells in workset of " << numCells <<
" "
509 << (*topo_iterator).getName() <<
" cells. \n";
517 for(
int cellOrd = 0; cellOrd < numCells; cellOrd++){
518 for(
int pt = 0; pt < numPts; pt++){
519 for(
int d = 0; d < cellDim; d++){
521 if( abs( controlPoints(cellOrd, pt, d) - cubPoints(pt, d) ) > 100.0*INTREPID_TOL ){
524 << std::setw(70) <<
"^^^^----FAILURE!" <<
"\n"
525 <<
" Mapping multiple point sets to corresponding physical cells in a workset failed for: \n"
526 <<
" Cell Topology = " << (*topo_iterator).getName() <<
"\n"
527 <<
" Physical cell ordinal in workset = " << cellOrd <<
"\n"
528 <<
" Reference point ordinal = " << setprecision(12) << pt <<
"\n"
529 <<
" At reference point coordinate = " << setprecision(12) << d <<
"\n"
530 <<
" Original value = " << initialGuess(cellOrd, pt, d) <<
"\n"
531 <<
" F^{-1}F(P_d) = " << controlPoints(cellOrd, pt, d) <<
"\n";
543 catch (
const std::logic_error & err) {
544 *outStream << err.what() <<
"\n";
550 <<
"===============================================================================\n"\
551 <<
"| Test 3: Exception testing - only when HAVE_INTREPID_DEBUG is defined. |\n"\
552 <<
"===============================================================================\n\n";
562 int throwCounter = 0;
566#ifdef HAVE_INTREPID_DEBUG
575 FieldContainer<double> jacobian;
576 FieldContainer<double> jacobianInv;
577 FieldContainer<double> jacobianDet;
578 FieldContainer<double> points;
579 FieldContainer<double> cellWorkset;
580 FieldContainer<double> physPoints;
581 FieldContainer<double> refPoints;
582 FieldContainer<double> initGuess;
589 topo_iterator = supportedTopologies.begin() + 1;
590 D = (*topo_iterator).getDimension();
591 N = (*topo_iterator).getNodeCount();
592 V = (*topo_iterator).getVertexCount();
595 jacobian.resize(C, P, D);
597 cellWorkset.resize(C, N, D);
598 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
599 throwCounter, nException );
602 cellWorkset.resize(C, D);
603 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
604 throwCounter, nException );
607 cellWorkset.resize(C, N, D);
609 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
610 throwCounter, nException );
613 points.resize(C, P, D);
614 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator), 0 ),
615 throwCounter, nException );
618 jacobian.resize(C, P, D, D);
619 points.resize(C, P, D - 1);
620 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
621 throwCounter, nException );
624 jacobian.resize(C, P, D, D);
625 points.resize(C, P - 1, D);
626 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
627 throwCounter, nException );
630 jacobian.resize(C, P, D, D);
631 points.resize(C - 1, P, D);
632 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
633 throwCounter, nException );
636 jacobian.resize(C, P, D, D);
637 points.resize(C, P, D);
638 cellWorkset.resize(C, N, D - 1);
639 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
640 throwCounter, nException );
643 jacobian.resize(C, P, D, D);
644 points.resize(C, P, D);
645 cellWorkset.resize(C - 1, N, D);
646 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
647 throwCounter, nException );
650 jacobian.resize(C, D, D);
651 points.resize(C, P, D);
652 cellWorkset.resize(C, N, D);
653 INTREPID_TEST_COMMAND( CellTools::setJacobian(jacobian, points, cellWorkset, (*topo_iterator) ),
654 throwCounter, nException );
661 jacobian.resize(C, P, D, D);
662 jacobianInv.resize(P, D, D);
664 throwCounter, nException );
667 jacobian.resize(D, D);
668 jacobianInv.resize(D, D);
670 throwCounter, nException );
673 jacobian.resize(C, P, D, D - 1);
674 jacobianInv.resize(C, P, D, D);
676 throwCounter, nException );
679 jacobian.resize(C, P, D - 1, D);
680 jacobianInv.resize(C, P, D, D);
682 throwCounter, nException );
685 jacobian.resize(C, P - 1, D, D);
686 jacobianInv.resize(C, P, D, D);
688 throwCounter, nException );
691 jacobian.resize(C - 1, P, D, D);
692 jacobianInv.resize(C, P, D, D);
694 throwCounter, nException );
701 jacobian.resize(C, P, D, D);
702 jacobianDet.resize(C, P, D);
704 throwCounter, nException );
707 jacobian.resize(P, D, D);
708 jacobianDet.resize(C, P);
710 throwCounter, nException );
713 jacobian.resize(D, D);
714 jacobianDet.resize(C, P);
716 throwCounter, nException );
719 jacobian.resize(C, P, D, D);
720 jacobianDet.resize(C);
722 throwCounter, nException );
725 jacobian.resize(C, P, D, D);
726 jacobianDet.resize(C, P-1);
728 throwCounter, nException );
731 jacobian.resize(C - 1, P, D, D);
732 jacobianDet.resize(C, P);
734 throwCounter, nException );
742 physPoints.resize(P, D);
743 cellWorkset.resize(C, N, D);
745 throwCounter, nException );
747 cellWorkset.resize(P, D);
748 refPoints.resize(P, D);
749 physPoints.resize(C, P, D);
751 throwCounter, nException );
754 refPoints.resize(C, P, D);
755 physPoints.resize(P, D);
756 cellWorkset.resize(C, N, D);
758 throwCounter, nException );
761 refPoints.resize(C, P, D);
762 physPoints.resize(C, P, D - 1);
764 throwCounter, nException );
767 refPoints.resize(C, P, D);
768 physPoints.resize(C, P - 1, D);
770 throwCounter, nException );
773 refPoints.resize(C, P, D);
774 physPoints.resize(C - 1, P, D);
776 throwCounter, nException );
779 refPoints.resize(P, D);
780 physPoints.resize(C, P, D);
782 throwCounter, nException );
789 refPoints.resize(C, P, D);
790 physPoints.resize(P, D);
791 cellWorkset.resize(C, N, D);
793 throwCounter, nException );
796 refPoints.resize(C, P, D);
797 physPoints.resize(C, P, D);
799 throwCounter, nException );
802 refPoints.resize(P, D);
803 physPoints.resize(P, D);
805 throwCounter, nException );
808 refPoints.resize(C, P, D - 1);
809 physPoints.resize(C, P, D);
811 throwCounter, nException );
814 refPoints.resize(C, P - 1, D);
815 physPoints.resize(C, P, D);
817 throwCounter, nException );
820 refPoints.resize(C - 1, P, D);
821 physPoints.resize(C, P, D);
823 throwCounter, nException );
826 refPoints.resize(C, P, D);
827 physPoints.resize(C, P, D);
828 cellWorkset.resize(C, N);
830 throwCounter, nException );
837 refPoints.resize(C, P, D);
838 physPoints.resize(C, P, D);
839 initGuess.resize(P, D);
840 cellWorkset.resize(C, N, D);
842 throwCounter, nException );
845 refPoints.resize(P, D);
846 physPoints.resize(P, D);
847 initGuess.resize(C, P, D);
849 throwCounter, nException );
852 refPoints.resize(C, P, D);
853 physPoints.resize(C, P, D);
854 initGuess.resize(C, P, D - 1);
856 throwCounter, nException );
859 initGuess.resize(C, P - 1, D);
861 throwCounter, nException );
864 initGuess.resize(C - 1, P, D);
866 throwCounter, nException );
872 FieldContainer<double> refSubcellPoints;
873 FieldContainer<double> paramPoints;
879 D = (*topo_iterator).getDimension();
882 refSubcellPoints.resize(P,3);
883 paramPoints.resize(P);
885 throwCounter, nException );
888 refSubcellPoints.resize(P);
889 paramPoints.resize(P, 2);
891 throwCounter, nException );
894 refSubcellPoints.resize(P, 2);
895 paramPoints.resize(P, 2);
897 throwCounter, nException );
900 refSubcellPoints.resize(P, 3);
901 paramPoints.resize(P, 3);
903 throwCounter, nException );
909 FieldContainer<double> refEdgeTangent;
912 refEdgeTangent.resize(C,P,D);
914 throwCounter, nException );
917 refEdgeTangent.resize(2);
919 throwCounter, nException );
922 refEdgeTangent.resize(C,P,D);
924 throwCounter, nException );
930 FieldContainer<double> refFaceTanU;
931 FieldContainer<double> refFaceTanV;
934 refFaceTanU.resize(P, D);
935 refFaceTanV.resize(D);
937 throwCounter, nException );
940 refFaceTanU.resize(D);
941 refFaceTanV.resize(P, D);
943 throwCounter, nException );
946 refFaceTanU.resize(D - 1);
947 refFaceTanV.resize(D);
949 throwCounter, nException );
952 refFaceTanU.resize(D);
953 refFaceTanV.resize(D - 1);
955 throwCounter, nException );
958 refFaceTanU.resize(D);
959 refFaceTanV.resize(D);
961 throwCounter, nException );
967 FieldContainer<double> refSideNormal;
970 refSideNormal.resize(C,P);
972 throwCounter, nException );
974 throwCounter, nException );
977 refSideNormal.resize(D - 1);
979 throwCounter, nException );
981 throwCounter, nException );
984 refSideNormal.resize(D);
986 throwCounter, nException );
988 throwCounter, nException );
991 topo_iterator = supportedTopologies.begin();
992 D = (*topo_iterator).getDimension();
993 refSideNormal.resize(D - 1);
995 throwCounter, nException );
998 refSideNormal.resize(D);
1000 throwCounter, nException );
1003 refSideNormal.resize(D);
1005 throwCounter, nException );
1010 points.resize(2,3,3,4);
1011 FieldContainer<int> inCell;
1016 throwCounter, nException );
1019 CellTopology pentagon_5(shards::getCellTopologyData<shards::Pentagon<> >() );
1021 throwCounter, nException );
1024 points.resize(10, 10, (*topo_iterator).getDimension() + 1);
1026 throwCounter, nException );
1029 points.resize(10,10,10,3);
1031 throwCounter, nException );
1034 points.resize(10,10,(*topo_iterator).getDimension() );
1037 throwCounter, nException );
1040 points.resize(10, (*topo_iterator).getDimension() );
1041 inCell.resize(10, 10);
1043 throwCounter, nException );
1046 points.resize((*topo_iterator).getDimension() );
1047 inCell.resize(10, 10);
1049 throwCounter, nException );
1052 points.resize(10, 10, (*topo_iterator).getDimension() );
1053 inCell.resize(10, 9);
1055 throwCounter, nException );
1058 points.resize(10, 10, (*topo_iterator).getDimension() );
1059 inCell.resize(9, 10);
1061 throwCounter, nException );
1064 points.resize(10, (*topo_iterator).getDimension() );
1067 throwCounter, nException );
1070 points.resize(10, 10, (*topo_iterator).getDimension() + 1);
1071 inCell.resize(10, 10);
1073 throwCounter, nException );
1076 points.resize(10,10,10,3);
1078 throwCounter, nException );
1081 physPoints.resize(C, P, D);
1082 inCell.resize(C, P);
1084 cellWorkset.resize(C, N, D, D);
1086 throwCounter, nException );
1089 cellWorkset.resize(C, N + 1, D);
1091 throwCounter, nException );
1094 cellWorkset.resize(C, N, D + 1);
1096 throwCounter, nException );
1099 cellWorkset.resize(C, N, D);
1101 throwCounter, nException );
1105 throwCounter, nException );
1108 physPoints.resize(P, D);
1111 throwCounter, nException );
1114 physPoints.resize(C, P, D);
1117 throwCounter, nException );
1120 physPoints.resize(P, D);
1121 inCell.resize(C, P);
1123 throwCounter, nException );
1126 physPoints.resize(C, P, D);
1127 inCell.resize(C, P + 1);
1129 throwCounter, nException );
1132 physPoints.resize(C + 1, P, D);
1133 inCell.resize(C, P);
1135 throwCounter, nException );
1138 physPoints.resize(P, D);
1139 inCell.resize(P + 1);
1141 throwCounter, nException );
1148 FieldContainer<double> subcellNodes;
1157 topo_iterator = supportedTopologies.end() - 1;
1158 D = (*topo_iterator).getDimension();
1159 int subcDim = D - 1;
1160 int S = (*topo_iterator).getSubcellCount(subcDim);
1161 V = (*topo_iterator).getVertexCount(subcDim, S - 1);
1162 subcellNodes.resize(V, D);
1165 throwCounter, nException);
1169 throwCounter, nException);
1172 subcellNodes.resize(V, D, D);
1174 throwCounter, nException);
1177 subcellNodes.resize(V - 1, D);
1179 throwCounter, nException);
1182 subcellNodes.resize(V, D - 1);
1184 throwCounter, nException);
1187 N = (*topo_iterator).getNodeCount(subcDim, S - 1);
1188 subcellNodes.resize(N, D);
1191 throwCounter, nException);
1195 throwCounter, nException);
1198 subcellNodes.resize(N, D, D);
1200 throwCounter, nException);
1203 subcellNodes.resize(N - 1, D);
1205 throwCounter, nException);
1208 subcellNodes.resize(N, D - 1);
1210 throwCounter, nException);
1219 catch (
const std::logic_error & err) {
1220 *outStream << err.what() <<
"\n";
1225 if (throwCounter != nException) {
1227 *outStream << std::setw(70) <<
"^^^^----FAILURE!" <<
"\n";
1232 std::cout <<
"End Result: TEST FAILED\n";
1234 std::cout <<
"End Result: TEST PASSED\n";
1237 std::cout.copyfmt(oldFormatState);
Header file for the abstract base class Intrepid::DefaultCubatureFactory.
Header file for utility class to provide multidimensional containers.