diff --git a/packages/intrepid2/src/Cell/Intrepid2_CellTools.hpp b/packages/intrepid2/src/Cell/Intrepid2_CellTools.hpp index dcca7b849c1d..6ae3423d3bf3 100644 --- a/packages/intrepid2/src/Cell/Intrepid2_CellTools.hpp +++ b/packages/intrepid2/src/Cell/Intrepid2_CellTools.hpp @@ -301,24 +301,6 @@ namespace Intrepid2 { */ static void setSubcellParametrization(); - /** \brief Returns array with the coefficients of the parametrization maps for the edges or faces - of a reference cell topology. - - See Intrepid2::CellTools::setSubcellParametrization and Section \ref sec_cell_topology_subcell_map - more information about parametrization maps. - - \param subcellParam [out] - coefficients of the parameterization map for all subcells of - the specified dimension - \param subcellDim [in] - dimension of subcells whose parametrization map is returned - \param parentCell [in] - topology of the reference cell owning the subcells - - */ - static void - getSubcellParametrization( subcellParamViewType &subcellParam, - const ordinal_type subcellDim, - const shards::CellTopology parentCell ); - - /** \brief Sets orientation-preserving parametrizations of reference edges and faces of cell topologies with reference cells. Used to populate Intrepid2::CellTools::SubcellParamData. @@ -1078,6 +1060,27 @@ namespace Intrepid2 { basis); } + + + + /** \brief Returns array with the coefficients of the parametrization maps for the edges or faces + of a reference cell topology. + + See Intrepid2::CellTools::setSubcellParametrization and Section \ref sec_cell_topology_subcell_map + more information about parametrization maps. + + \param subcellParam [out] - coefficients of the parameterization map for all subcells of + the specified dimension + \param subcellDim [in] - dimension of subcells whose parametrization map is returned + \param parentCell [in] - topology of the reference cell owning the subcells + + */ + static void + getSubcellParametrization( subcellParamViewType &subcellParam, + const ordinal_type subcellDim, + const shards::CellTopology parentCell ); + + /** \brief Computes parameterization maps of 1- and 2-subcells of reference cells. Applies \f$\hat{\Phi}_i\f$, the parametrization map of a subcell \f$\hat{\mathcal{S}}_i\f$ diff --git a/packages/intrepid2/src/Cell/Intrepid2_CellToolsDefNodeInfo.hpp b/packages/intrepid2/src/Cell/Intrepid2_CellToolsDefNodeInfo.hpp index b0f24222ce6a..a6a2959f0658 100644 --- a/packages/intrepid2/src/Cell/Intrepid2_CellToolsDefNodeInfo.hpp +++ b/packages/intrepid2/src/Cell/Intrepid2_CellToolsDefNodeInfo.hpp @@ -394,17 +394,17 @@ namespace Intrepid2 { #ifdef HAVE_INTREPID2_DEBUG INTREPID2_TEST_FOR_EXCEPTION( parentCell.getDimension() != 2 && parentCell.getDimension() != 3, std::invalid_argument, - ">>> ERROR (Intrepid2::CellTools::getReferenceFaceTangents): two or three-dimensional parent cell required"); + ">>> ERROR (Intrepid2::CellTools::getReferenceEdgeTangent): two or three-dimensional parent cell required"); INTREPID2_TEST_FOR_EXCEPTION( refEdgeTangent.rank() != 1, std::invalid_argument, - ">>> ERROR (Intrepid2::CellTools::getReferenceFaceTangents): rank = 1 required for output arrays"); + ">>> ERROR (Intrepid2::CellTools::getReferenceEdgeTangent): rank = 1 required for output arrays"); INTREPID2_TEST_FOR_EXCEPTION( refEdgeTangent.extent(0) != parentCell.getDimension(), std::invalid_argument, - ">>> ERROR (Intrepid2::CellTools::getReferenceFaceTangents): output array size is required to match space dimension"); + ">>> ERROR (Intrepid2::CellTools::getReferenceEdgeTangent): output array size is required to match space dimension"); INTREPID2_TEST_FOR_EXCEPTION( edgeOrd < 0 || edgeOrd >= static_cast(parentCell.getSubcellCount(1)), std::invalid_argument, - ">>> ERROR (Intrepid2::CellTools::getReferenceFaceTangents): edge ordinal out of bounds"); + ">>> ERROR (Intrepid2::CellTools::getReferenceEdgeTangent): edge ordinal out of bounds"); #endif // Edge parametrizations are computed in setSubcellParametrization and stored in rank-3 array diff --git a/packages/intrepid2/src/Orientation/Intrepid2_OrientationTools.hpp b/packages/intrepid2/src/Orientation/Intrepid2_OrientationTools.hpp index 2f1cec532aea..381bf3fbca81 100644 --- a/packages/intrepid2/src/Orientation/Intrepid2_OrientationTools.hpp +++ b/packages/intrepid2/src/Orientation/Intrepid2_OrientationTools.hpp @@ -188,7 +188,7 @@ namespace Intrepid2 { */ template - inline + KOKKOS_INLINE_FUNCTION static void mapToModifiedReference(outPointViewType outPoints, const refPointViewType refPoints, @@ -247,7 +247,7 @@ namespace Intrepid2 { \param cellOrt [in] - cell orientation number (zero is aligned with shards default configuration */ template - inline + KOKKOS_INLINE_FUNCTION static void getJacobianOfOrientationMap(JacobianViewType jacobian, const unsigned cellTopoKey, diff --git a/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyBasis.hpp b/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyBasis.hpp index eaf9a57677ee..ecf9ca852eb8 100644 --- a/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyBasis.hpp +++ b/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyBasis.hpp @@ -286,7 +286,6 @@ namespace Intrepid2 { ">>> ERROR (OrientationTools::modifyBasisByOrientation): Field dimension of input/output does not match to basis cardinality."); } #endif - typedef typename decltype(input)::non_const_value_type input_value_type; if (basis->requireOrientation()) { auto ordinalToTag = Kokkos::create_mirror_view(typename SpT::memory_space(), basis->getAllDofTags()); diff --git a/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyPoints.hpp b/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyPoints.hpp index 1e16bc7075be..e89027b40095 100644 --- a/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyPoints.hpp +++ b/packages/intrepid2/src/Orientation/Intrepid2_OrientationToolsDefModifyPoints.hpp @@ -274,7 +274,7 @@ namespace Intrepid2 { template - inline + KOKKOS_INLINE_FUNCTION void OrientationTools:: mapToModifiedReference(outPointViewType outPoints, @@ -343,7 +343,7 @@ namespace Intrepid2 { } template - inline + KOKKOS_INLINE_FUNCTION void OrientationTools:: getJacobianOfOrientationMap(outPointViewType jacobian, diff --git a/packages/intrepid2/src/Projection/Intrepid2_LagrangianInterpolationDef.hpp b/packages/intrepid2/src/Projection/Intrepid2_LagrangianInterpolationDef.hpp index e67e33596c85..b83133b34155 100644 --- a/packages/intrepid2/src/Projection/Intrepid2_LagrangianInterpolationDef.hpp +++ b/packages/intrepid2/src/Projection/Intrepid2_LagrangianInterpolationDef.hpp @@ -56,6 +56,217 @@ namespace Intrepid2 { namespace Experimental { + + +template +struct computeDofCoordsAndCoeffs { + typedef typename scalarViewType::value_type value_type; + + scalarViewType dofCoords_, dofCoeffs_; + const ortViewType orts_; + const t2oViewType tagToOrdinal_; + const subcellParamViewType edgeParam_, faceParam_; + const intViewType edgeInternalDofOrdinals_, facesInternalDofOrdinals_; + const scalarViewType edgeInternalDofCoords_, edgeDofCoeffs_, ortJacobianEdge_, refEdgesTan_, refEdgesNormal_; + const scalarViewType facesInternalDofCoords_, faceDofCoeffs_, ortJacobianFace_, refFaceTangents_, refFacesNormal_; + scalarViewType edgeWorkView_, faceWorkView_; + const ordinal_type cellDim_, numEdges_, numFaces_; + const ordinal_type edgeTopoKey_, numEdgeInternalDofs_; + const intViewType faceTopoKey_, numFacesInternalDofs_; + const value_type edgeScale_, faceScale_; + const bool isBasisHCURL_, isBasisHDIV_; + + computeDofCoordsAndCoeffs( scalarViewType dofCoords, + scalarViewType dofCoeffs, + const ortViewType orts, + const t2oViewType tagToOrdinal, + const subcellParamViewType edgeParam, + const subcellParamViewType faceParam, + const intViewType edgeInternalDofOrdinals, + const intViewType facesInternalDofOrdinals, + const scalarViewType edgeInternalDofCoords, + const scalarViewType edgeDofCoeffs, + const scalarViewType refEdgesTan, + const scalarViewType refEdgesNormal, + const scalarViewType facesInternalDofCoords, + const scalarViewType faceDofCoeffs, + const scalarViewType refFaceTangents, + const scalarViewType refFacesNormal, + const ordinal_type cellDim, + const ordinal_type numEdges, + const ordinal_type numFaces, + const ordinal_type edgeTopoKey, + const ordinal_type numEdgeInternalDofs, + const intViewType faceTopoKey, + const intViewType numFacesInternalDofs, + const value_type edgeScale, + const value_type faceScale, + const bool isBasisHCURL, + const bool isBasisHDIV + ) + : dofCoords_(dofCoords), + dofCoeffs_(dofCoeffs), + orts_(orts), + tagToOrdinal_(tagToOrdinal), + edgeParam_(edgeParam), + faceParam_(faceParam), + edgeInternalDofOrdinals_(edgeInternalDofOrdinals), + facesInternalDofOrdinals_(facesInternalDofOrdinals), + edgeInternalDofCoords_(edgeInternalDofCoords), + edgeDofCoeffs_(edgeDofCoeffs), + refEdgesTan_(refEdgesTan), + refEdgesNormal_(refEdgesNormal), + facesInternalDofCoords_(facesInternalDofCoords), + faceDofCoeffs_(faceDofCoeffs), + refFaceTangents_(refFaceTangents), + refFacesNormal_(refFacesNormal), + cellDim_(cellDim), + numEdges_(numEdges), + numFaces_(numFaces), + edgeTopoKey_(edgeTopoKey), + numEdgeInternalDofs_(numEdgeInternalDofs), + faceTopoKey_(faceTopoKey), + numFacesInternalDofs_(numFacesInternalDofs), + edgeScale_(edgeScale), + faceScale_(faceScale), + isBasisHCURL_(isBasisHCURL), + isBasisHDIV_(isBasisHDIV) + { + if(numEdges > 0) + edgeWorkView_ = scalarViewType("edgeWorkView", dofCoords.extent(0), numEdgeInternalDofs, 1); + if(numFaces > 0) + faceWorkView_ = scalarViewType("faceWorkView", dofCoords.extent(0), facesInternalDofCoords.extent(1), 2); + } + + KOKKOS_INLINE_FUNCTION + void operator()(const ordinal_type cell) const { + typedef Kokkos::pair range_type; + + + if(numEdges_ > 0) { + //compute coordinates associated to edge DoFs + ordinal_type eOrt[12]; + value_type ortJac; + scalarViewType ortJacobianEdge(&ortJac, 1, 1); + orts_(cell).getEdgeOrientation(eOrt, numEdges_); + auto edgeInternalDofCoordsOriented = Kokkos::subview(edgeWorkView_,cell, Kokkos::ALL(), Kokkos::ALL()); + //map edge DoFs coords into parent element coords + for (ordinal_type iedge=0; iedge < numEdges_; ++iedge) { + Impl::OrientationTools::mapToModifiedReference(edgeInternalDofCoordsOriented,edgeInternalDofCoords_,edgeTopoKey_, eOrt[iedge]); + + for (ordinal_type j=0;j 0) { + //compute coordinates associated to face DoFs + ordinal_type fOrt[12]; + value_type ortJac[4]; + scalarViewType ortJacobianFace(ortJac, 2, 2); + orts_(cell).getFaceOrientation(fOrt, numFaces_); + //map face dofs coords into parent element coords + for (ordinal_type iface=0; iface < numFaces_; ++iface) { + ordinal_type ort = fOrt[iface]; + ordinal_type numInternalDofs = numFacesInternalDofs_(iface); + auto dofRange = range_type(0, numInternalDofs); + auto faceInternalDofCoords = Kokkos::subview(facesInternalDofCoords_, iface, dofRange, Kokkos::ALL()); + auto faceInternalDofCoordsOriented = Kokkos::subview(faceWorkView_,cell, dofRange, Kokkos::ALL()); + Impl::OrientationTools::mapToModifiedReference(faceInternalDofCoordsOriented,faceInternalDofCoords,faceTopoKey_(iface),ort); + + for (ordinal_type j=0;j template::getDofCoordsAndCoeffs( typedef typename BasisType::scalarType scalarType; typedef Kokkos::DynRankView scalarViewType; typedef Kokkos::DynRankView intViewType; + typedef Kokkos::pair range_type; const auto topo = basis->getBaseCellTopology(); const std::string name(basis->getName()); @@ -133,23 +345,13 @@ LagrangianInterpolation::getDofCoordsAndCoeffs( "method not implemented for this basis function"); } + auto tagToOrdinal = Kokkos::create_mirror_view(typename SpT::memory_space(), basis->getAllDofOrdinal()); + Kokkos::deep_copy(tagToOrdinal, basis->getAllDofOrdinal()); - auto ordinalToTag = basis->getAllDofTags(); - auto tagToOrdinal = basis->getAllDofOrdinal(); - - const ordinal_type dim = basis->getBaseCellTopology().getDimension(); + const ordinal_type dim = topo.getDimension(); const ordinal_type numCells = dofCoeffs.extent(0); - intViewType eOrt("eOrt", numEdges); - intViewType fOrt("fOrt", numFaces); - scalarViewType refEdgeTan("refEdgeTan", dim); - scalarViewType refFaceTangents("refFaceTangents", dim, 2); - auto refFaceTanU = Kokkos::subview(refFaceTangents, Kokkos::ALL, 0); - auto refFaceTanV = Kokkos::subview(refFaceTangents, Kokkos::ALL, 1); - scalarViewType refNormal("refNormal", dim); - - scalarViewType refDofCoords("refDofCoords", dofCoords.extent(1), dofCoords.extent(2)), refDofCoeffs; basis->getDofCoords(refDofCoords); RealSpaceTools::clone(dofCoords,refDofCoords); @@ -161,169 +363,140 @@ LagrangianInterpolation::getDofCoordsAndCoeffs( basis->getDofCoeffs(refDofCoeffs); RealSpaceTools::clone(dofCoeffs,refDofCoeffs); + //*** Pre-compute needed quantities related to edge DoFs that do not depend on the cell *** - //compute DofCoords Oriented - for (ordinal_type iedge=0; iedge < numEdges; ++iedge) { - scalarViewType ortJacobian("ortJacobian", 1, 1); - ordinal_type edgeBasisCardinality = edgeBasis->getCardinality(); - ordinal_type numInternalDofs = edgeBasis->getDofCount(1,0); - scalarViewType edgeDofCoords("edgeDofCoords", edgeBasisCardinality, 1); - scalarViewType edgeInternalDofCoords("edgeInternalDofCoords", numInternalDofs, 1); + ordinal_type edgeTopoKey = Teuchos::nonnull(edgeBasis) ? edgeBasis->getBaseCellTopology().getBaseKey() : 0; + intViewType eOrt("eOrt", numEdges); + scalarViewType refEdgesTan("refEdgesTan", numEdges, dim); + scalarViewType refEdgesNormal("refEdgesNormal", numEdges, dim); + scalarViewType edgeParam; + ordinal_type edgeBasisCardinality = Teuchos::nonnull(edgeBasis) ? edgeBasis->getCardinality() : ordinal_type(0); + ordinal_type numEdgeInternalDofs = Teuchos::nonnull(edgeBasis) ? edgeBasis->getDofCount(1,0) : ordinal_type(0); + scalarViewType edgeDofCoords("edgeDofCoords", edgeBasisCardinality, 1); + scalarViewType edgeDofCoeffs("edgeDofCoeffs", edgeBasisCardinality); + scalarViewType edgeInternalDofCoords("edgeInternalDofCoords", numEdgeInternalDofs, 1); + intViewType edgeInternalDofOrdinals("edgeInternalDofOrdinals", numEdgeInternalDofs); + //depending on how the reference basis is defined, the edges are scaled differently + auto edgeScale = (isBasisTriOrTet||isBasisI1) ? 2.0 :1.0; + + if(Teuchos::nonnull(edgeBasis)) { edgeBasis->getDofCoords(edgeDofCoords); - for(ordinal_type i=0; igetDofOrdinal(1, 0, i),0); - - scalarViewType edgeInternalDofCoordsOriented("edgeInternalDofCoordsOriented", numInternalDofs, 1); - scalarViewType edgeDofCoordsOriented3d("edgeDofCoordsOriented3d", numInternalDofs, dim); - // auto numEdgeDOFs = basis->getDofCount(1,iedge); - for(ordinal_type i=0; igetBaseCellTopology(),eOrt(iedge)); - CellTools::mapToReferenceSubcell(edgeDofCoordsOriented3d, edgeInternalDofCoordsOriented, 1, iedge, topo); - - for(ordinal_type j=0; jgetDofOrdinal(1, iedge, j); - for(ordinal_type d=0; d getDofCoeffs(edgeDofCoeffs); + } - //depending on how the reference basis is defined, the edges are scaled differently - auto edgeScale = (isBasisTriOrTet||isBasisI1) ? 2.0 :1.0; + for (ordinal_type iedge=0; iedge < numEdges; ++iedge) { if(isBasisHCURL) { - - scalarViewType edgeDofCoeffs("edgeDofCoeffs", edgeBasisCardinality); - edgeBasis->getDofCoeffs(edgeDofCoeffs); - CellTools::getReferenceEdgeTangent(refEdgeTan, iedge, topo); - for(ordinal_type i=0; igetBaseCellTopology(), eOrt(iedge)); - for(ordinal_type j=0; jgetDofOrdinal(1, iedge, j); - auto jdof = edgeBasis->getDofOrdinal(1, 0, j); - for(ordinal_type d=0; d ::getReferenceSideNormal(refNormal, iedge, topo); - scalarViewType edgeDofCoeffs("edgeDofCoeffs", edgeBasisCardinality); - edgeBasis->getDofCoeffs(edgeDofCoeffs); - for(ordinal_type i=0; igetBaseCellTopology(), eOrt(iedge)); - auto ortJacobianDet = ortJacobian(0,0); - for(ordinal_type j=0; jgetDofOrdinal(1, iedge, j); - auto jdof = edgeBasis->getDofOrdinal(1, 0, j); - for(ordinal_type d=0; d getDofCoeffs(edgeDofCoeffs); - for(ordinal_type i=0; igetDofOrdinal(1, iedge, j); - auto jdof = edgeBasis->getDofOrdinal(1, 0, j); - dofCoeffs(i,idof,0) = edgeDofCoeffs(jdof); - } - } + auto edgeTan = Kokkos::subview(refEdgesTan, iedge, Kokkos::ALL); + auto edgeTanHost = Kokkos::create_mirror_view(edgeTan); + CellTools::getReferenceEdgeTangent(edgeTanHost, iedge, topo); + Kokkos::deep_copy(edgeTan,edgeTanHost); + } + else if(isBasisHDIV) { + auto edgeNormal = Kokkos::subview(refEdgesNormal, iedge, Kokkos::ALL); + auto edgeNormalHost = Kokkos::create_mirror_view(edgeNormal); + CellTools::getReferenceSideNormal(edgeNormalHost, iedge, topo); + Kokkos::deep_copy(edgeNormal,edgeNormalHost); } } + //compute DofCoords Oriented + for(ordinal_type i=0; igetDofOrdinal(1, 0, i); + edgeInternalDofCoords(i,0) = edgeDofCoords(edgeInternalDofOrdinals(i), 0); + CellTools::getSubcellParametrization(edgeParam, 1, topo); + } + + + //*** Pre-compute needed quantities related to face DoFs that do not depend on the cell *** + + intViewType faceTopoKey("faceTopoKey",numFaces); + intViewType fOrt("fOrt", numFaces); + scalarViewType refFaceTangents("refFaceTangents", numFaces, dim, 2); + scalarViewType refFacesNormal("refFacesNormal", numFaces, dim); + scalarViewType faceParam; + intViewType numFacesInternalDofs("numFacesInternalDofs", numFaces); + scalarViewType facesInternalDofCoords; + intViewType facesInternalDofOrdinals; + scalarViewType faceDofCoeffs; + //depending on how the reference basis is defined, the faces are scaled differently + auto faceScale = (isBasisHEXI1) ? 4.0 : + (isBasisTETI1) ? 0.5 : 1.0; + + + ordinal_type maxNumFacesInternalDofs=0; + ordinal_type faceBasisMaxCardinality=0; + + for (ordinal_type iface=0; iface < numFaces; ++iface) { + ordinal_type numInternalDofs = faceBases[iface]->getDofCount(2,0); + numFacesInternalDofs(iface) = numInternalDofs; + maxNumFacesInternalDofs = std::max(maxNumFacesInternalDofs,numInternalDofs); + ordinal_type faceBasisCardinality = faceBases[iface]->getCardinality(); + faceBasisMaxCardinality = std::max(faceBasisMaxCardinality, faceBasisCardinality); + } + + facesInternalDofCoords = scalarViewType("faceInternalDofCoords", numFaces, maxNumFacesInternalDofs, 2); + facesInternalDofOrdinals = intViewType("faceInternalDofCoords", numFaces, maxNumFacesInternalDofs); + + if(isBasisHCURL) + faceDofCoeffs = scalarViewType("faceDofCoeffs", numFaces, faceBasisMaxCardinality,2); + else + faceDofCoeffs = scalarViewType("faceDofCoeffs", numFaces, faceBasisMaxCardinality); + for (ordinal_type iface=0; iface < numFaces; ++iface) { - scalarViewType ortJacobian("ortJacobian", 2, 2); auto faceBasis = faceBases[iface]; + faceTopoKey(iface) = faceBasis->getBaseCellTopology().getBaseKey(); ordinal_type faceBasisCardinality = faceBasis->getCardinality(); - ordinal_type numInternalDofs = faceBasis->getDofCount(2,0); scalarViewType faceDofCoords("faceDofCoords", faceBasisCardinality, 2); - scalarViewType faceInternalDofCoords("faceInternalDofCoords", numInternalDofs, 2); faceBasis->getDofCoords(faceDofCoords); - for(ordinal_type i=0; igetDofOrdinal(2, 0, i); for(ordinal_type d=0; d <2; ++d) - faceInternalDofCoords(i,d) = faceDofCoords(faceBasis->getDofOrdinal(2, 0, i),d); - - scalarViewType faceInternalDofCoordsOriented("faceInternalDofCoordsOriented", numInternalDofs, 2); - scalarViewType faceDofCoordsOriented3d("faceDofCoordsOriented3d", numInternalDofs, dim); - for(ordinal_type i=0; igetBaseCellTopology(),ort); - CellTools::mapToReferenceSubcell(faceDofCoordsOriented3d, faceInternalDofCoordsOriented, 2, iface, topo); - - for(ordinal_type j=0; jgetDofOrdinal(2, iface, j); - for(ordinal_type d=0; d getCardinality()); + faceBasis->getDofCoeffs(Kokkos::subview(faceDofCoeffs, iface, dofRange, Kokkos::ALL())); + if(isBasisHCURL) { - scalarViewType faceDofCoeffs("faceDofCoeffs", faceBasisCardinality, 2); - faceBasis->getDofCoeffs(faceDofCoeffs); - CellTools::getReferenceFaceTangents(refFaceTanU, refFaceTanV, iface, topo); - for(ordinal_type i=0; igetBaseCellTopology(), fOrt(iface)); - for(ordinal_type j=0; jgetDofOrdinal(2, iface, j); - auto jdof = faceBasis->getDofOrdinal(2, 0, j); - for(ordinal_type d=0; d ::getReferenceFaceTangents(refFaceTanUHost, refFaceTanVHost, iface, topo); + Kokkos::deep_copy(refFaceTanU, refFaceTanUHost); + Kokkos::deep_copy(refFaceTanV, refFaceTanVHost); } else if(isBasisHDIV) { - //depending on how the reference basis is defined, the faces are scaled differently - auto faceScale = (isBasisHEXI1) ? 4.0 : - (isBasisTETI1) ? 0.5 : 1.0; - CellTools::getReferenceFaceNormal(refNormal, iface, topo); - scalarViewType faceDofCoeffs("faceDofCoeffs", faceBasisCardinality); - faceBasis->getDofCoeffs(faceDofCoeffs); - for(ordinal_type i=0; igetBaseCellTopology(), fOrt(iface)); - auto ortJacobianDet = ortJacobian(0,0)*ortJacobian(1,1)-ortJacobian(1,0)*ortJacobian(0,1); - for(ordinal_type j=0; jgetDofOrdinal(2, iface, j); - auto jdof = faceBasis->getDofOrdinal(2, 0, j); - for(ordinal_type d=0; d getDofCoeffs(faceDofCoeffs); - for(ordinal_type i=0; igetDofOrdinal(2, iface, j); - auto jdof = faceBasis->getDofOrdinal(2, 0, j); - dofCoeffs(i,idof,0) = faceDofCoeffs(jdof); - } - } + auto faceNormal = Kokkos::subview(refFacesNormal,iface,Kokkos::ALL()); + auto faceNormalHost = Kokkos::create_mirror_view(faceNormal); + CellTools::getReferenceFaceNormal(faceNormalHost, iface, topo); + Kokkos::deep_copy(faceNormal, faceNormalHost); } } - auto numElemDOFs = basis->getDofCount(dim,0); - for(ordinal_type j=0; jgetDofOrdinal(dim, 0, j); - for(ordinal_type d=0; d 2) + CellTools::getSubcellParametrization(faceParam, 2, topo); + + + //*** Loop over cells *** + + const Kokkos::RangePolicy policy(0, numCells); + typedef computeDofCoordsAndCoeffs + FunctorType; + Kokkos::parallel_for(policy, + FunctorType(dofCoords, dofCoeffs, + orts, tagToOrdinal, edgeParam, faceParam, + edgeInternalDofOrdinals, facesInternalDofOrdinals, + edgeInternalDofCoords, edgeDofCoeffs, refEdgesTan, refEdgesNormal, + facesInternalDofCoords, faceDofCoeffs, refFaceTangents, refFacesNormal, + dim, numEdges, numFaces, + edgeTopoKey, numEdgeInternalDofs, + faceTopoKey, numFacesInternalDofs, + edgeScale, faceScale, + isBasisHCURL, isBasisHDIV)); } diff --git a/packages/intrepid2/unit-test/Projection/CMakeLists.txt b/packages/intrepid2/unit-test/Projection/CMakeLists.txt index 9938dbcc5692..decfba6fc1ba 100644 --- a/packages/intrepid2/unit-test/Projection/CMakeLists.txt +++ b/packages/intrepid2/unit-test/Projection/CMakeLists.txt @@ -4,4 +4,11 @@ IF(Kokkos_ENABLE_Serial) ADD_SUBDIRECTORY(Serial) ENDIF() +IF(Kokkos_ENABLE_OpenMP) + ADD_SUBDIRECTORY(OpenMP) +ENDIF() + +IF(Kokkos_ENABLE_Cuda AND Kokkos_ENABLE_Cuda_UVM) + ADD_SUBDIRECTORY(Cuda) +ENDIF() diff --git a/packages/intrepid2/unit-test/Projection/Cuda/CMakeLists.txt b/packages/intrepid2/unit-test/Projection/Cuda/CMakeLists.txt new file mode 100644 index 000000000000..c2e08f7f117b --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/CMakeLists.txt @@ -0,0 +1,35 @@ +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_HEX + SOURCES test_interpolation_projection_HEX.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) + +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_TET + SOURCES test_interpolation_projection_TET.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) + +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_QUAD + SOURCES test_interpolation_projection_QUAD.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) + +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_TRI + SOURCES test_interpolation_projection_TRI.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) \ No newline at end of file diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_HEX.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_HEX.cpp new file mode 100644 index 000000000000..7509f5eae136 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_HEX.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_HEX.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityHex(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_QUAD.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_QUAD.cpp new file mode 100644 index 000000000000..e36eaaaba4dc --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_QUAD.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_QUAD.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityQuad(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_TET.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_TET.cpp new file mode 100644 index 000000000000..5db74d4f06b0 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_TET.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_TET.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityTet(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_TRI.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_TRI.cpp new file mode 100644 index 000000000000..0a10f618396c --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_DeRham_commutativity_TRI.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_TRI.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityTri(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_HEX.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_HEX.cpp new file mode 100644 index 000000000000..73c7375f8fc2 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_HEX.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_HEX.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceHex(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_QUAD.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_QUAD.cpp new file mode 100644 index 000000000000..cbb98a182fd3 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_QUAD.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_QUAD.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceQuad(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_TET.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_TET.cpp new file mode 100644 index 000000000000..f847ce283c8b --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_TET.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_TET.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceTet(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_TRI.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_TRI.cpp new file mode 100644 index 000000000000..43d8fb34f25d --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_convergence_TRI.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_TRI.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceTri(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_HEX.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_HEX.cpp new file mode 100644 index 000000000000..be6ae26718e0 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_HEX.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_HEX.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionHex(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_QUAD.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_QUAD.cpp new file mode 100644 index 000000000000..32b4b3673fe8 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_QUAD.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_QUAD.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionQuad(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_TET.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_TET.cpp new file mode 100644 index 000000000000..2549fb5d55c0 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_TET.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_TET.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionTet(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_TRI.cpp b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_TRI.cpp new file mode 100644 index 000000000000..46e43bbe455d --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/Cuda/test_interpolation_projection_TRI.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_TRI.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionTri(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/CMakeLists.txt b/packages/intrepid2/unit-test/Projection/OpenMP/CMakeLists.txt new file mode 100644 index 000000000000..c2e08f7f117b --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/CMakeLists.txt @@ -0,0 +1,35 @@ +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_HEX + SOURCES test_interpolation_projection_HEX.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) + +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_TET + SOURCES test_interpolation_projection_TET.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) + +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_QUAD + SOURCES test_interpolation_projection_QUAD.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) + +TRIBITS_ADD_EXECUTABLE_AND_TEST( + Test_InterpolationProjection_TRI + SOURCES test_interpolation_projection_TRI.cpp + ARGS PrintItAll + NUM_MPI_PROCS 1 + PASS_REGULAR_EXPRESSION "TEST PASSED" + ADD_DIR_TO_NAME + ) \ No newline at end of file diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_HEX.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_HEX.cpp new file mode 100644 index 000000000000..7509f5eae136 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_HEX.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_HEX.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityHex(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_QUAD.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_QUAD.cpp new file mode 100644 index 000000000000..e36eaaaba4dc --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_QUAD.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_QUAD.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityQuad(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_TET.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_TET.cpp new file mode 100644 index 000000000000..5db74d4f06b0 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_TET.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_TET.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityTet(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_TRI.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_TRI.cpp new file mode 100644 index 000000000000..0a10f618396c --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_DeRham_commutativity_TRI.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_DeRham_commutativity_TRI.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::DeRhamCommutativityTri(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_HEX.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_HEX.cpp new file mode 100644 index 000000000000..73c7375f8fc2 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_HEX.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_HEX.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceHex(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_QUAD.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_QUAD.cpp new file mode 100644 index 000000000000..cbb98a182fd3 --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_QUAD.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_QUAD.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceQuad(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_TET.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_TET.cpp new file mode 100644 index 000000000000..f847ce283c8b --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_TET.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_TET.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceTet(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_TRI.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_TRI.cpp new file mode 100644 index 000000000000..43d8fb34f25d --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_convergence_TRI.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for hexahedral elements. + \author Created by Mauro Perego +*/ + +#include "../test_convergence_TRI.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::ConvergenceTri(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_HEX.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_HEX.cpp new file mode 100644 index 000000000000..227736ca40eb --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_HEX.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_HEX.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionHex(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_QUAD.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_QUAD.cpp new file mode 100644 index 000000000000..9cb29ae56d3d --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_QUAD.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_QUAD.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionQuad(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_TET.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_TET.cpp new file mode 100644 index 000000000000..825d48fe7dca --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_TET.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_TET.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionTet(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_TRI.cpp b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_TRI.cpp new file mode 100644 index 000000000000..aa88f3f27e1e --- /dev/null +++ b/packages/intrepid2/unit-test/Projection/OpenMP/test_interpolation_projection_TRI.cpp @@ -0,0 +1,62 @@ +// @HEADER +// ************************************************************************ +// +// Intrepid2 Package +// Copyright (2007) Sandia Corporation +// +// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive +// license for use of this work by or on behalf of the U.S. Government. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Kyungjoo Kim (kyukim@sandia.gov), or +// Mauro Perego (mperego@sandia.gov) +// +// ************************************************************************ +// @HEADER + +/** \file test_01.cpp + \brief Test for checking orientation tools for tetrahedral elements. + \author Created by Mauro Perego +*/ + +#include "test_interpolation_projection_TRI.hpp" +#include "Kokkos_Core.hpp" + + +int main(int argc, char *argv[]) { + + const bool verbose = (argc-1) > 0; + Kokkos::initialize(); + + const int r_val = Intrepid2::Test::InterpolationProjectionTri(verbose); + + Kokkos::finalize(); + return r_val; +} + diff --git a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_HEX.hpp b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_HEX.hpp index 28197623e5a8..e5c7714e4135 100644 --- a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_HEX.hpp +++ b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_HEX.hpp @@ -128,6 +128,7 @@ int InterpolationProjectionHex(const bool verbose) { typedef typename Kokkos::Impl::is_space::host_mirror_space::execution_space HostSpaceType ; + typedef Kokkos::DynRankView DynRankViewIntHost; *outStream << "DeviceSpace:: "; DeviceSpaceType::print_configuration(*outStream, false); *outStream << "HostSpace:: "; HostSpaceType::print_configuration(*outStream, false); @@ -322,7 +323,7 @@ int InterpolationProjectionHex(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&hexas[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&hexas[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, hex); @@ -504,6 +505,7 @@ int InterpolationProjectionHex(const bool verbose) { } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHGrad, numCells, basisCardinality); { @@ -646,6 +648,7 @@ int InterpolationProjectionHex(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -765,7 +768,7 @@ int InterpolationProjectionHex(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&hexas[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&hexas[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, hex); @@ -955,6 +958,7 @@ int InterpolationProjectionHex(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHCurl, numCells, basisCardinality); { @@ -1098,6 +1102,7 @@ int InterpolationProjectionHex(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1200,7 +1205,7 @@ int InterpolationProjectionHex(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&hexas[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&hexas[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, hex); @@ -1399,6 +1404,7 @@ int InterpolationProjectionHex(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHDiv, numCells, basisCardinality); { @@ -1543,6 +1549,7 @@ int InterpolationProjectionHex(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1596,7 +1603,7 @@ int InterpolationProjectionHex(const bool verbose) { physVertexes(i,j,k) = vertices[hexas[i][j]][k]; // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&hexas[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&hexas[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, hex); @@ -1734,6 +1741,7 @@ int InterpolationProjectionHex(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHVol, numCells, basisCardinality); { @@ -1854,6 +1862,7 @@ int InterpolationProjectionHex(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } catch (std::exception err) { std::cout << " Exeption\n"; diff --git a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_QUAD.hpp b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_QUAD.hpp index d7ee6f7bf6bb..129c3e66d122 100644 --- a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_QUAD.hpp +++ b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_QUAD.hpp @@ -128,6 +128,7 @@ int InterpolationProjectionQuad(const bool verbose) { typedef typename Kokkos::Impl::is_space::host_mirror_space::execution_space HostSpaceType ; + typedef Kokkos::DynRankView DynRankViewIntHost; *outStream << "DeviceSpace:: "; DeviceSpaceType::print_configuration(*outStream, false); *outStream << "HostSpace:: "; HostSpaceType::print_configuration(*outStream, false); @@ -271,7 +272,7 @@ int InterpolationProjectionQuad(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&quads[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&quads[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, quad); @@ -428,6 +429,7 @@ int InterpolationProjectionQuad(const bool verbose) { } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHGrad, numCells, basisCardinality); { @@ -569,6 +571,7 @@ int InterpolationProjectionQuad(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -650,7 +653,7 @@ int InterpolationProjectionQuad(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&quads[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&quads[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, quad); @@ -816,6 +819,7 @@ int InterpolationProjectionQuad(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHCurl, numCells, basisCardinality); { @@ -956,6 +960,7 @@ int InterpolationProjectionQuad(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1033,7 +1038,7 @@ int InterpolationProjectionQuad(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&quads[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&quads[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, quad); @@ -1209,6 +1214,7 @@ int InterpolationProjectionQuad(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHDiv, numCells, basisCardinality); { @@ -1352,6 +1358,7 @@ int InterpolationProjectionQuad(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1404,7 +1411,7 @@ int InterpolationProjectionQuad(const bool verbose) { physVertexes(i,j,k) = vertices[quads[i][j]][k]; // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&quads[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&quads[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, quad); @@ -1540,6 +1547,7 @@ int InterpolationProjectionQuad(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHVol, numCells, basisCardinality); { @@ -1659,6 +1667,7 @@ int InterpolationProjectionQuad(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } catch (std::exception err) { std::cout << " Exeption\n"; diff --git a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TET.hpp b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TET.hpp index f7bb465f7b9a..362fd28b1929 100644 --- a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TET.hpp +++ b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TET.hpp @@ -128,6 +128,7 @@ int InterpolationProjectionTet(const bool verbose) { typedef typename Kokkos::Impl::is_space::host_mirror_space::execution_space HostSpaceType ; + typedef Kokkos::DynRankView DynRankViewIntHost; *outStream << "DeviceSpace:: "; DeviceSpaceType::print_configuration(*outStream, false); *outStream << "HostSpace:: "; HostSpaceType::print_configuration(*outStream, false); @@ -297,7 +298,7 @@ int InterpolationProjectionTet(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&tets[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tets[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tet); @@ -322,7 +323,13 @@ int InterpolationProjectionTet(const bool verbose) { //compute Lagrangian Interpolation of fun { li::getDofCoordsAndCoeffs(dofCoordsOriented, dofCoeffsPhys, basisPtr.get(), POINTTYPE_EQUISPACED, elemOrts); - + Kokkos::fence(); + *outStream << "\n\nFunction DOFs for Tet 0 are:"; + for(ordinal_type j=0;j tetLinearBasis; //used for computing physical coordinates @@ -347,6 +354,7 @@ int InterpolationProjectionTet(const bool verbose) { } li::getBasisCoeffs(basisCoeffsLI, funAtDofCoords, dofCoeffsPhys); + Kokkos::fence(); } //Testing Kronecker property of basis functions @@ -420,17 +428,18 @@ int InterpolationProjectionTet(const bool verbose) { areDifferent = std::abs(basisCoeffsLI(0,basisPtr->getDofOrdinal(1,edgeIndexes[0][iEdge],j)) - basisCoeffsLI(1,basisPtr->getDofOrdinal(1,edgeIndexes[1][iEdge],j))) > 10*tol; } - if(areDifferent) { + if(areDifferent) + { errorFlag++; *outStream << std::setw(70) << "^^^^----FAILURE!" << "\n"; - *outStream << "Function DOFs on common edge " << iEdge << " computed using Tet 0 basis functions are not consistent with those computed using Tet 1\n"; - *outStream << "Function DOFs for Tet 0 are:"; - for(ordinal_type j=0;jgetDofOrdinal(1,edgeIndexes[0][iEdge],j)); - *outStream << "\nFunction DOFs for Tet 1 are:"; - for(ordinal_type j=0;jgetDofOrdinal(1,edgeIndexes[1][iEdge],j)); - *outStream << std::endl; + //*outStream << "Function DOFs on common edge " << iEdge << " computed using Tet 0 basis functions are not consistent with those computed using Tet 1\n"; + //*outStream << "Function DOFs for Tet 0 are:"; + //for(ordinal_type j=0;jgetDofOrdinal(1,edgeIndexes[0][iEdge],j)); + //*outStream << "\nFunction DOFs for Tet 1 are:"; + //for(ordinal_type j=0;jgetDofOrdinal(1,edgeIndexes[1][iEdge],j)); + //*outStream << std::endl; } } } @@ -479,6 +488,7 @@ int InterpolationProjectionTet(const bool verbose) { } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHGrad, numCells, basisCardinality); { @@ -620,6 +630,7 @@ int InterpolationProjectionTet(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -724,7 +735,7 @@ int InterpolationProjectionTet(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&tets[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tets[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tet); @@ -914,6 +925,7 @@ int InterpolationProjectionTet(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHCurl, numCells, basisCardinality); { @@ -1056,6 +1068,7 @@ int InterpolationProjectionTet(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1137,7 +1150,7 @@ int InterpolationProjectionTet(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&tets[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tets[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tet); @@ -1336,6 +1349,7 @@ int InterpolationProjectionTet(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHDiv, numCells, basisCardinality); { @@ -1480,6 +1494,7 @@ int InterpolationProjectionTet(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1534,7 +1549,7 @@ int InterpolationProjectionTet(const bool verbose) { physVertexes(i,j,k) = vertices[tets[i][j]][k]; // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&tets[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tets[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tet); @@ -1672,6 +1687,7 @@ int InterpolationProjectionTet(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHVol, numCells, basisCardinality); { @@ -1792,6 +1808,7 @@ int InterpolationProjectionTet(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } catch (std::exception err) { std::cout << " Exeption\n"; diff --git a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TRI.hpp b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TRI.hpp index 787381a009e3..b132a6466b4e 100644 --- a/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TRI.hpp +++ b/packages/intrepid2/unit-test/Projection/test_interpolation_projection_TRI.hpp @@ -128,6 +128,7 @@ int InterpolationProjectionTri(const bool verbose) { typedef typename Kokkos::Impl::is_space::host_mirror_space::execution_space HostSpaceType ; + typedef Kokkos::DynRankView DynRankViewIntHost; *outStream << "DeviceSpace:: "; DeviceSpaceType::print_configuration(*outStream, false); *outStream << "HostSpace:: "; HostSpaceType::print_configuration(*outStream, false); @@ -270,7 +271,7 @@ int InterpolationProjectionTri(const bool verbose) { } // compute orientations for cells - DynRankViewInt elemNodes(&tris[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tris[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tri); @@ -428,7 +429,7 @@ int InterpolationProjectionTri(const bool verbose) { } } - +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHGrad, numCells, basisCardinality); { @@ -570,6 +571,7 @@ int InterpolationProjectionTri(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -650,7 +652,7 @@ int InterpolationProjectionTri(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&tris[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tris[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tri); @@ -815,6 +817,7 @@ int InterpolationProjectionTri(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHCurl, numCells, basisCardinality); { @@ -955,6 +958,7 @@ int InterpolationProjectionTri(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1032,7 +1036,7 @@ int InterpolationProjectionTri(const bool verbose) { } // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&tris[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tris[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tri); @@ -1207,6 +1211,7 @@ int InterpolationProjectionTri(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHDiv, numCells, basisCardinality); { @@ -1350,6 +1355,7 @@ int InterpolationProjectionTri(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } } while(std::next_permutation(&reorder[0]+1, &reorder[0]+4)); //reorder vertices of common face @@ -1402,7 +1408,7 @@ int InterpolationProjectionTri(const bool verbose) { physVertexes(i,j,k) = vertices[tris[i][j]][k]; // compute orientations for cells (one time computation) - DynRankViewInt elemNodes(&tris[0][0], numCells, numElemVertexes); + DynRankViewIntHost elemNodes(&tris[0][0], numCells, numElemVertexes); Kokkos::DynRankView elemOrts("elemOrts", numCells); ots::getOrientation(elemOrts, elemNodes, tri); @@ -1540,6 +1546,7 @@ int InterpolationProjectionTri(const bool verbose) { } } +#ifndef KOKKOS_ENABLE_CUDA //compute projection-based interpolation of the Lagrangian interpolation DynRankView ConstructWithLabel(basisCoeffsHVol, numCells, basisCardinality); { @@ -1659,6 +1666,7 @@ int InterpolationProjectionTri(const bool verbose) { "\nThe max The infinite norm of the difference between the weights is: " << diffErr << std::endl; } } +#endif } } catch (std::exception err) { std::cout << " Exeption\n";