diff --git a/CHANGELOG.md b/CHANGELOG.md index 40ba79164d2602656fcacb50cf50690060420ed2..39b31739797ecbfd2ccc783ccb22937e436b73d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ Changelog v4.4.0 ------ +**Library:** +- Add support for variable polynomial order for 3D simulations with continuous + Galerkin discretisation (!604) + **IncNavierStokesSolver:** - Add ability to simulate additional scalar fields (!624) diff --git a/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp b/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp index 71cff2ba2128532595547f225388dad577a0e6cd..62e71867aab01003ba0f0b2928fe8a8406d1dc34 100644 --- a/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp +++ b/library/MultiRegions/AssemblyMap/AssemblyMapCG.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include @@ -832,8 +833,8 @@ namespace Nektar for(j = 0; j < nEdges; ++j) { - nEdgeIntCoeffs = exp->GetEdgeNcoeffs(j) - 2; meshEdgeId = exp->GetGeom()->GetEid(j); + nEdgeIntCoeffs = EdgeSize[meshEdgeId]; if(graph[1].count(meshEdgeId) == 0) { if(tempGraph[1].count(meshEdgeId) == 0) @@ -1301,12 +1302,12 @@ namespace Nektar : AssemblyMap(pSession, variable) { int i, j, k, l; + int p, q, numModes0, numModes1; int cnt = 0; int intDofCnt; int meshVertId, meshEdgeId, meshFaceId; int globalId; int nEdgeInteriorCoeffs; - int nFaceInteriorCoeffs; int firstNonDirGraphVertId; LibUtilities::CommSharedPtr vComm = m_comm->GetRowComm(); LocalRegions::ExpansionSharedPtr exp, bndExp; @@ -1326,6 +1327,8 @@ namespace Nektar // Stores vertex, edge and face reordered vertices. DofGraph graph(3); DofGraph dofs(3); + vector > faceModes(2); + map faceType; set extraDirVerts, extraDirEdges; BottomUpSubStructuredGraphSharedPtr bottomUpGraph; @@ -1336,25 +1339,26 @@ namespace Nektar { exp = locExpVector[i]; - for(j = 0; j < locExpVector[i]->GetNverts(); ++j) + for(j = 0; j < exp->GetNverts(); ++j) { dofs[0][exp->GetGeom()->GetVid(j)] = 1; } - for(j = 0; j < locExpVector[i]->GetNedges(); ++j) + for(j = 0; j < exp->GetNedges(); ++j) { if (dofs[1].count(exp->GetGeom()->GetEid(j)) > 0) { if (dofs[1][exp->GetGeom()->GetEid(j)] != - locExpVector[i]->GetEdgeNcoeffs(j)-2) + exp->GetEdgeNcoeffs(j)-2) { ASSERTL0( (exp->GetEdgeBasisType(j) == LibUtilities::eModified_A) || - (exp->GetEdgeBasisType(j) == LibUtilities::eModified_B), + (exp->GetEdgeBasisType(j) == LibUtilities::eModified_B) || + (exp->GetEdgeBasisType(j) == LibUtilities::eModified_C), "CG with variable order only available with modal expansion"); } dofs[1][exp->GetGeom()->GetEid(j)] = min(dofs[1][exp->GetGeom()->GetEid(j)], - locExpVector[i]->GetEdgeNcoeffs(j)-2); + exp->GetEdgeNcoeffs(j)-2); } else { @@ -1363,30 +1367,37 @@ namespace Nektar } } - for(j = 0; j < locExpVector[i]->GetNfaces(); ++j) + for(j = 0; j < exp->GetNfaces(); ++j) { - if (dofs[2].count(exp->GetGeom()->GetFid(j)) > 0) + faceOrient = exp->GetGeom()->GetForient(j); + meshFaceId = exp->GetGeom()->GetFid(j); + exp->GetFaceNumModes(j, faceOrient, numModes0, numModes1); + + if (faceModes[0].count(meshFaceId) > 0) { - if (dofs[2][exp->GetGeom()->GetFid(j)] != - exp->GetFaceIntNcoeffs(j)) - { - ASSERTL0( false, - "CG with variable order not available in 3D"); - } - dofs[2][exp->GetGeom()->GetFid(j)] = - min(dofs[2][exp->GetGeom()->GetFid(j)], - exp->GetFaceIntNcoeffs(j)); + faceModes[0][meshFaceId] = + min(faceModes[0][meshFaceId], numModes0); + + faceModes[1][meshFaceId] = + min(faceModes[1][meshFaceId], numModes1); } else { - dofs[2][exp->GetGeom()->GetFid(j)] = - exp->GetFaceIntNcoeffs(j); + faceModes[0][meshFaceId] = numModes0; + faceModes[1][meshFaceId] = numModes1; + + // Get shape of this face + SpatialDomains::Geometry3DSharedPtr geom; + geom = boost::dynamic_pointer_cast (exp->GetGeom()); + faceType[meshFaceId] = + geom->GetFace(j)->GetShapeType(); } } } // Now use information from all partitions to determine // the correct size - map::iterator dofIt; + map::iterator dofIt, dofIt2; // edges Array edgeId (dofs[1].size()); Array edgeDof (dofs[1].size()); @@ -1403,19 +1414,41 @@ namespace Nektar dofs[1][edgeId[i]] = (int) (edgeDof[i]+0.5); } // faces - Array faceId (dofs[2].size()); - Array faceDof (dofs[2].size()); - for(dofIt = dofs[2].begin(), i=0; dofIt != dofs[2].end(); dofIt++, i++) + Array faceId (faceModes[0].size()); + Array faceP (faceModes[0].size()); + Array faceQ (faceModes[0].size()); + for(dofIt = faceModes[0].begin(), dofIt2 = faceModes[1].begin(),i=0; + dofIt != faceModes[0].end(); dofIt++, dofIt2++, i++) { faceId[i] = dofIt->first; - faceDof[i] = (NekDouble) dofIt->second; + faceP[i] = (NekDouble) dofIt->second; + faceQ[i] = (NekDouble) dofIt2->second; } Gs::gs_data *tmp2 = Gs::Init(faceId, vComm); - Gs::Gather(faceDof, Gs::gs_min, tmp2); + Gs::Gather(faceP, Gs::gs_min, tmp2); + Gs::Gather(faceQ, Gs::gs_min, tmp2); Gs::Finalise(tmp2); - for (i=0; i < dofs[2].size(); i++) + int P, Q; + for (i=0; i < faceModes[0].size(); i++) { - dofs[2][faceId[i]] = (int) (faceDof[i]+0.5); + faceModes[0][faceId[i]] = (int) (faceP[i]+0.5); + faceModes[1][faceId[i]] = (int) (faceQ[i]+0.5); + P = faceModes[0][faceId[i]]; + Q = faceModes[1][faceId[i]]; + if (faceType[faceId[i]] == LibUtilities::eQuadrilateral) + { + // Quad face + dofs[2][faceId[i]] = + LibUtilities::StdQuadData::getNumberOfCoefficients(P,Q) - + LibUtilities::StdQuadData::getNumberOfBndCoefficients(P,Q); + } + else + { + // Tri face + dofs[2][faceId[i]] = + LibUtilities::StdTriData::getNumberOfCoefficients(P,Q) - + LibUtilities::StdTriData::getNumberOfBndCoefficients(P,Q); + } } Array bndCondVec(1, bndConditions); @@ -1478,7 +1511,6 @@ namespace Nektar for(j = 0; j < exp->GetNfaces(); ++j) { - nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j); meshFaceId = exp->GetGeom()->GetFid(j); graphVertOffset[graph[2][meshFaceId]+1] = dofs[2][meshFaceId]; } @@ -1590,7 +1622,6 @@ namespace Nektar for(j = 0; j < exp->GetNfaces(); ++j) { - nFaceInteriorCoeffs = exp->GetFaceIntNcoeffs(j); faceOrient = exp->GetGeom()->GetForient(j); meshFaceId = exp->GetGeom()->GetFid(j); @@ -1605,29 +1636,81 @@ namespace Nektar exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign); // Set the global DOF's for the interior modes of face j - for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k) - { - m_localToGlobalMap[cnt+faceInteriorMap[k]] = - graphVertOffset[graph[2][meshFaceId]]+k; - } - for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k) + exp->GetFaceNumModes(j, faceOrient, numModes0, numModes1); + switch(faceType[meshFaceId]) { - m_localToGlobalMap[cnt+faceInteriorMap[k]] = - graphVertOffset[graph[2][meshFaceId]]; - } - - if(m_signChange) + case LibUtilities::eQuadrilateral: { - for(k = 0; k < dofs[2][exp->GetGeom()->GetFid(j)]; ++k) + int kLoc=0; + k = 0; + for( q = 2; q < numModes1; q++) { - m_localToGlobalSign[cnt+faceInteriorMap[k]] = (NekDouble) faceInteriorSign[k]; + for( p = 2; p < numModes0; p++) + { + if( (p < faceModes[0][meshFaceId]) && + (q < faceModes[1][meshFaceId])) + { + m_localToGlobalMap[cnt+faceInteriorMap[kLoc]] = + graphVertOffset[graph[2][meshFaceId]]+k; + if(m_signChange) + { + m_localToGlobalSign[cnt+faceInteriorMap[kLoc]] = + (NekDouble) faceInteriorSign[kLoc]; + } + k++; + } + else + { + m_localToGlobalMap[cnt+faceInteriorMap[kLoc]] = + graphVertOffset[graph[2][meshFaceId]]; + if(m_signChange) + { + m_localToGlobalSign[cnt+faceInteriorMap[kLoc]] = 0.0; + } + } + kLoc++; + } } - for(k = dofs[2][exp->GetGeom()->GetFid(j)]; k < nFaceInteriorCoeffs; ++k) + } + break; + case LibUtilities::eTriangle: + { + int kLoc=0; + k = 0; + for( p = 2; p < numModes0; p++) { - m_localToGlobalSign[cnt+faceInteriorMap[k]] = 0; + for( q = 1; q < numModes1-p; q++) + { + if( (p < faceModes[0][meshFaceId]) && + (p+q < faceModes[1][meshFaceId])) + { + m_localToGlobalMap[cnt+faceInteriorMap[kLoc]] = + graphVertOffset[graph[2][meshFaceId]]+k; + if(m_signChange) + { + m_localToGlobalSign[cnt+faceInteriorMap[kLoc]] = + (NekDouble) faceInteriorSign[kLoc]; + } + k++; + } + else + { + m_localToGlobalMap[cnt+faceInteriorMap[kLoc]] = + graphVertOffset[graph[2][meshFaceId]]; + if(m_signChange) + { + m_localToGlobalSign[cnt+faceInteriorMap[kLoc]] = 0.0; + } + } + kLoc++; + } } } - + break; + default: + ASSERTL0(false,"Shape not recognised"); + break; + } } } @@ -1688,19 +1771,28 @@ namespace Nektar bndExp->GetEdgeInteriorMap( k,edgeOrient,edgeInteriorMap,edgeInteriorSign); - for(l = 0; l < nEdgeInteriorCoeffs; ++l) + for(l = 0; l < dofs[1][meshEdgeId]; ++l) { m_bndCondCoeffsToGlobalCoeffsMap[cnt+edgeInteriorMap[l]] = graphVertOffset[graph[1][meshEdgeId]]+l; } + for(l = dofs[1][meshEdgeId]; l < nEdgeInteriorCoeffs; ++l) + { + m_bndCondCoeffsToGlobalCoeffsMap[cnt+edgeInteriorMap[l]] = + graphVertOffset[graph[1][meshEdgeId]]; + } // Fill the sign vector if required if(m_signChange) { - for(l = 0; l < nEdgeInteriorCoeffs; ++l) + for(l = 0; l < dofs[1][meshEdgeId]; ++l) { m_bndCondCoeffsToGlobalCoeffsSign[cnt+edgeInteriorMap[l]] = (NekDouble) edgeInteriorSign[l]; } + for(l = dofs[1][meshEdgeId]; l < nEdgeInteriorCoeffs; ++l) + { + m_bndCondCoeffsToGlobalCoeffsSign[cnt+edgeInteriorMap[l]] = 0.0; + } } if (bndConditions[i]->GetBoundaryConditionType() != @@ -1714,7 +1806,7 @@ namespace Nektar foundExtraEdges.count(meshEdgeId) == 0 && nEdgeInteriorCoeffs > 0) { - for(l = 0; l < nEdgeInteriorCoeffs; ++l) + for(l = 0; l < dofs[1][meshEdgeId]; ++l) { int loc = bndCondExp[i]->GetCoeff_Offset(j) + edgeInteriorMap[l]; @@ -1723,6 +1815,15 @@ namespace Nektar ExtraDirDof t(loc, gid, edgeInteriorSign[l]); m_extraDirDofs[i].push_back(t); } + for(l = dofs[1][meshEdgeId]; l < nEdgeInteriorCoeffs; ++l) + { + int loc = bndCondExp[i]->GetCoeff_Offset(j) + + edgeInteriorMap[l]; + int gid = graphVertOffset[ + graph[1][meshEdgeId]]; + ExtraDirDof t(loc, gid, 0.0); + m_extraDirDofs[i].push_back(t); + } foundExtraEdges.insert(meshEdgeId); } } @@ -2007,7 +2108,7 @@ namespace Nektar int maxIntDof = 0; int dof = 0; int cnt; - int i,j,k; + int i,j,k,l; int meshVertId; int meshEdgeId; int meshFaceId; @@ -2108,14 +2209,22 @@ namespace Nektar dof = exp->GetEdgeNcoeffs(j)-2; // Set the global DOF's for the interior modes of edge j - // run backwards because of variable P case "ghost" modes - for(k = dof-1; k >= 0; --k) + // for varP, ignore modes with sign == 0 + for(k = 0, l = 0; k < dof; ++k) { + if (m_signChange) + { + if (m_localToGlobalSign[cnt+edgeInteriorMap[k]]==0) + { + continue; + } + } vGlobalId = m_localToGlobalMap[cnt+edgeInteriorMap[k]]; m_globalToUniversalMap[vGlobalId] - = nVert + meshEdgeId * maxEdgeDof + k + 1; + = nVert + meshEdgeId * maxEdgeDof + l + 1; m_globalToUniversalBndMap[vGlobalId]=m_globalToUniversalMap[vGlobalId]; maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId); + l++; } } @@ -2140,16 +2249,23 @@ namespace Nektar exp->GetFaceInteriorMap(j,faceOrient,faceInteriorMap,faceInteriorSign); dof = exp->GetFaceIntNcoeffs(j); - - for(k = dof-1; k >= 0; --k) + for(k = 0, l = 0; k < dof; ++k) { + if (m_signChange) + { + if (m_localToGlobalSign[cnt+faceInteriorMap[k]]==0) + { + continue; + } + } vGlobalId = m_localToGlobalMap[cnt+faceInteriorMap[k]]; m_globalToUniversalMap[vGlobalId] = nVert + nEdge*maxEdgeDof + meshFaceId * maxFaceDof - + k + 1; + + l + 1; m_globalToUniversalBndMap[vGlobalId]=m_globalToUniversalMap[vGlobalId]; maxBndGlobalId = (vGlobalId > maxBndGlobalId ? vGlobalId : maxBndGlobalId); + l++; } } diff --git a/library/MultiRegions/ContField3D.cpp b/library/MultiRegions/ContField3D.cpp index 556f775688bd20d0fee8c0404d401b5738d6f05b..9dfd300af9b946ce5b986280ad3949af5780670b 100644 --- a/library/MultiRegions/ContField3D.cpp +++ b/library/MultiRegions/ContField3D.cpp @@ -339,7 +339,14 @@ namespace Nektar for(int j = 0; j < (m_bndCondExpansions[i])->GetNcoeffs(); ++j) { sign = m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsSign(bndcnt); - inout[map[bndcnt++]] = sign * coeffs[j]; + if(sign) + { + inout[map[bndcnt++]] = sign * coeffs[j]; + } + else + { + bndcnt++; + } } } else @@ -465,7 +472,14 @@ namespace Nektar { sign = m_locToGloMap->GetBndCondCoeffsToGlobalCoeffsSign( bndcnt); - tmp[bndMap[bndcnt++]] = sign * coeffs[j]; + if (sign) + { + tmp[bndMap[bndcnt++]] = sign * coeffs[j]; + } + else + { + bndcnt++; + } } } else diff --git a/library/SolverUtils/DriverAdaptive.cpp b/library/SolverUtils/DriverAdaptive.cpp index 8b922ef16eb50e4492c202ba4d4c521910b82e99..b7d42e3dd7d04b93741004c56c020b1ea3ec4c57 100644 --- a/library/SolverUtils/DriverAdaptive.cpp +++ b/library/SolverUtils/DriverAdaptive.cpp @@ -38,6 +38,10 @@ #include #include #include +#include +#include +#include +#include #include using namespace std; @@ -115,6 +119,7 @@ void DriverAdaptive::v_Execute(ostream &out) nExp = m_equ[0]->UpdateFields()[0]->GetExpSize(); nPlanes = 1; } + int expdim = m_equ[0]->UpdateFields()[0]->GetGraph()->GetMeshDimension(); int nFields = m_equ[0]->UpdateFields().num_elements(); int numSteps = m_session->GetParameter("NumSteps"); @@ -128,6 +133,9 @@ void DriverAdaptive::v_Execute(ostream &out) m_equ[0]->UpdateFields()); // Adaptive loop + Array P(expdim); + Array numPoints(expdim); + Array ptsKey(expdim); LocalRegions::ExpansionSharedPtr Exp; for (int i = 1; i < nRuns; i++) { @@ -143,39 +151,91 @@ void DriverAdaptive::v_Execute(ostream &out) offset = fields[sensorVar]->GetPhys_Offset(n); Exp = fields[sensorVar]->GetExp(n); - int P = Exp->GetBasis(0)->GetNumModes(); - int Q = Exp->GetBasis(1)->GetNumModes(); - int qa = Exp->GetBasis(0)->GetNumPoints(); - int qb = Exp->GetBasis(1)->GetNumPoints(); + for( int k = 0; k < expdim; ++k) + { + P[k] = Exp->GetBasis(k)->GetNumModes(); + numPoints[k] = Exp->GetBasis(k)->GetNumPoints(); + ptsKey[k] = LibUtilities::PointsKey (numPoints[k], + Exp->GetBasis(k)->GetPointsType()); + } // Declare orthogonal basis. - LibUtilities::PointsKey pa(qa, Exp->GetBasis(0)->GetPointsType()); - LibUtilities::PointsKey pb(qb, Exp->GetBasis(1)->GetPointsType()); - StdRegions::StdExpansionSharedPtr OrthoExp; switch (Exp->GetGeom()->GetShapeType()) { case LibUtilities::eQuadrilateral: { - LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P - 1, - pa); - LibUtilities::BasisKey Bb(LibUtilities::eOrtho_A, Q - 1, - pb); + LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P[0] - 1, + ptsKey[0]); + LibUtilities::BasisKey Bb(LibUtilities::eOrtho_A, P[1] - 1, + ptsKey[1]); OrthoExp = MemoryManager< StdRegions::StdQuadExp>::AllocateSharedPtr(Ba, Bb); break; } case LibUtilities::eTriangle: { - LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P - 1, - pa); - LibUtilities::BasisKey Bb(LibUtilities::eOrtho_B, Q - 1, - pb); + LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P[0] - 1, + ptsKey[0]); + LibUtilities::BasisKey Bb(LibUtilities::eOrtho_B, P[1] - 1, + ptsKey[1]); OrthoExp = MemoryManager::AllocateSharedPtr( Ba, Bb); break; } + case LibUtilities::eTetrahedron: + { + LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P[0] - 1, + ptsKey[0]); + LibUtilities::BasisKey Bb(LibUtilities::eOrtho_B, P[1] - 1, + ptsKey[1]); + LibUtilities::BasisKey Bc(LibUtilities::eOrtho_C, P[2] - 1, + ptsKey[2]); + OrthoExp = + MemoryManager::AllocateSharedPtr( + Ba, Bb, Bc); + break; + } + case LibUtilities::ePyramid: + { + LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P[0] - 1, + ptsKey[0]); + LibUtilities::BasisKey Bb(LibUtilities::eOrtho_A, P[1] - 1, + ptsKey[1]); + LibUtilities::BasisKey Bc(LibUtilities::eOrtho_C, P[2] - 1, + ptsKey[2]); + OrthoExp = + MemoryManager::AllocateSharedPtr( + Ba, Bb, Bc); + break; + } + case LibUtilities::ePrism: + { + LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P[0] - 1, + ptsKey[0]); + LibUtilities::BasisKey Bb(LibUtilities::eOrtho_A, P[1] - 1, + ptsKey[1]); + LibUtilities::BasisKey Bc(LibUtilities::eOrtho_B, P[2] - 1, + ptsKey[2]); + OrthoExp = + MemoryManager::AllocateSharedPtr( + Ba, Bb, Bc); + break; + } + case LibUtilities::eHexahedron: + { + LibUtilities::BasisKey Ba(LibUtilities::eOrtho_A, P[0] - 1, + ptsKey[0]); + LibUtilities::BasisKey Bb(LibUtilities::eOrtho_A, P[1] - 1, + ptsKey[1]); + LibUtilities::BasisKey Bc(LibUtilities::eOrtho_A, P[2] - 1, + ptsKey[2]); + OrthoExp = + MemoryManager::AllocateSharedPtr( + Ba, Bb, Bc); + break; + } default: ASSERTL0(false, "Shape not supported."); break; @@ -272,11 +332,11 @@ void DriverAdaptive::v_Execute(ostream &out) } // Determine what to do with the polynomial order - if ((error > upperTol) && (P < maxP)) + if ((error > upperTol) && (P[0] < maxP)) { deltaP[Exp->GetGeom()->GetGlobalID()] = 1; } - else if ((error < lowerTol) && P > minP) + else if ((error < lowerTol) && P[0] > minP) { deltaP[Exp->GetGeom()->GetGlobalID()] = -1; } @@ -387,20 +447,19 @@ void DriverAdaptive::ReplaceExpansion( map deltaP) { int nExp, nDim; + int expdim = m_equ[0]->UpdateFields()[0]->GetGraph()->GetMeshDimension(); // Get field definitions std::vector fielddefs = fields[0]->GetFieldDefinitions(); - int expDim = 2; - if (fielddefs[0]->m_numHomogeneousDir == 1) { - nDim = 3; + nDim = expdim+1; } else { - nDim = 2; + nDim = expdim; } // Add variables to field definition @@ -569,7 +628,7 @@ void DriverAdaptive::ReplaceExpansion( { eId = fielddefs[f]->m_elementIDs[n]; - for (int i = 0; i < expDim; i++) + for (int i = 0; i < expdim; i++) { order[i] = deltaP[eId]; } diff --git a/library/StdRegions/StdExpansion.cpp b/library/StdRegions/StdExpansion.cpp index 322946a5b7554d7a5e8eb5621cda862e6e53f130..2bcd02c9774fdd4081ed84cd656c9078f9d734b9 100644 --- a/library/StdRegions/StdExpansion.cpp +++ b/library/StdRegions/StdExpansion.cpp @@ -1414,7 +1414,7 @@ namespace Nektar NEKERROR(ErrorUtil::efatal,"Method does not exist for this shape" ); } - int StdExpansion::v_GetVertexMap(const int localVertexId, + int StdExpansion::v_GetVertexMap(const int localVertexId, bool useCoeffPacking) { NEKERROR(ErrorUtil::efatal,"Method does not exist for this shape" ); @@ -1428,6 +1428,15 @@ namespace Nektar NEKERROR(ErrorUtil::efatal,"Method does not exist for this shape" ); } + void StdExpansion::v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1) + { + NEKERROR(ErrorUtil::efatal,"Method does not exist for this shape" ); + } + void StdExpansion::v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array &maparray, Array &signarray) diff --git a/library/StdRegions/StdExpansion.h b/library/StdRegions/StdExpansion.h index 9e12fc32a84a9d91564dd81ba1287c27e4ff0cc3..f23a6bb46d62a2e85b7fd6f87d991d5492849ab9 100644 --- a/library/StdRegions/StdExpansion.h +++ b/library/StdRegions/StdExpansion.h @@ -836,6 +836,13 @@ namespace Nektar v_GetEdgeInteriorMap(eid,edgeOrient,maparray,signarray); } + void GetFaceNumModes(const int fid, const Orientation faceOrient, + int &numModes0, + int &numModes1) + { + v_GetFaceNumModes(fid,faceOrient,numModes0,numModes1); + } + void GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array &maparray, Array &signarray) @@ -1706,6 +1713,12 @@ namespace Nektar Array &maparray, Array &signarray); + STD_REGIONS_EXPORT virtual void v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1); + STD_REGIONS_EXPORT virtual void v_GetFaceInteriorMap(const int fid, const Orientation faceOrient, Array &maparray, Array &signarray); diff --git a/library/StdRegions/StdHexExp.cpp b/library/StdRegions/StdHexExp.cpp index 92ad7df22b9907cfa8ba149bc11e57209c527010..44338018c1a85dd75d154bf99f221e898fa9f663 100644 --- a/library/StdRegions/StdHexExp.cpp +++ b/library/StdRegions/StdHexExp.cpp @@ -927,6 +927,50 @@ namespace Nektar } } + void StdHexExp::v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1) + { + int nummodes [3] = {m_base[0]->GetNumModes(), + m_base[1]->GetNumModes(), + m_base[2]->GetNumModes()}; + switch(fid) + { + case 0: + case 5: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[1]; + } + break; + case 1: + case 3: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[2]; + } + break; + case 2: + case 4: + { + numModes0 = nummodes[1]; + numModes1 = nummodes[2]; + } + break; + default: + { + ASSERTL0(false,"fid out of range"); + } + break; + } + + if ( faceOrient >= 9 ) + { + std::swap(numModes0, numModes1); + } + } /** * Only for basis type Modified_A or GLL_LAGRANGE in all directions. diff --git a/library/StdRegions/StdHexExp.h b/library/StdRegions/StdHexExp.h index df3baf52a65f082d4eab6fdbfaa062b378ca7f1d..8e31434548a758a855a76bc37f8e0c92af4bfdd9 100644 --- a/library/StdRegions/StdHexExp.h +++ b/library/StdRegions/StdHexExp.h @@ -199,7 +199,11 @@ namespace Nektar Array &coords_x, Array &coords_y, Array &coords_z); - + STD_REGIONS_EXPORT virtual void v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1); //-------------------------- // Mappings diff --git a/library/StdRegions/StdPrismExp.cpp b/library/StdRegions/StdPrismExp.cpp index 90f19e3f0e033d34eceba3555c21908e37b31c97..a05328731a93c43342efc8cfd3c8e0fff70dfdde 100644 --- a/library/StdRegions/StdPrismExp.cpp +++ b/library/StdRegions/StdPrismExp.cpp @@ -728,6 +728,47 @@ namespace Nektar StdPrismExp::v_BwdTrans(tmp, outarray); } + void StdPrismExp::v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1) + { + int nummodes [3] = {m_base[0]->GetNumModes(), + m_base[1]->GetNumModes(), + m_base[2]->GetNumModes()}; + switch(fid) + { + // base quad + case 0: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[1]; + } + break; + // front and back quad + case 2: + case 4: + { + numModes0 = nummodes[1]; + numModes1 = nummodes[2]; + } + break; + // triangles + case 1: + case 3: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[2]; + } + break; + } + + if ( faceOrient >= 9 ) + { + std::swap(numModes0, numModes1); + } + } //--------------------------------------- // Helper functions diff --git a/library/StdRegions/StdPrismExp.h b/library/StdRegions/StdPrismExp.h index 9b82bc8993a40bf4065d4625b1f67ee1e1b41f37..31ac7b45b78e084769d69d212fe5da8131a3ff38 100644 --- a/library/StdRegions/StdPrismExp.h +++ b/library/StdRegions/StdPrismExp.h @@ -165,6 +165,11 @@ namespace Nektar STD_REGIONS_EXPORT virtual void v_FillMode( const int mode, Array &outarray); + STD_REGIONS_EXPORT virtual void v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1); //--------------------------------------- // Helper functions diff --git a/library/StdRegions/StdPyrExp.cpp b/library/StdRegions/StdPyrExp.cpp index b2325c51aeb9146cf0610ef66c51e551667a8e52..911eaed77a761156a7e9c3c21e64bd454ea50363 100644 --- a/library/StdRegions/StdPyrExp.cpp +++ b/library/StdRegions/StdPyrExp.cpp @@ -867,8 +867,47 @@ namespace Nektar tmp[mode] = 1.0; v_BwdTrans(tmp, outarray); } - - + + void StdPyrExp::v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1) + { + int nummodes [3] = {m_base[0]->GetNumModes(), + m_base[1]->GetNumModes(), + m_base[2]->GetNumModes()}; + switch(fid) + { + // quad + case 0: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[1]; + } + break; + case 1: + case 3: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[2]; + } + break; + case 2: + case 4: + { + numModes0 = nummodes[1]; + numModes1 = nummodes[2]; + } + break; + } + + if ( faceOrient >= 9 ) + { + std::swap(numModes0, numModes1); + } + } + //--------------------------------------- // Helper functions //--------------------------------------- diff --git a/library/StdRegions/StdPyrExp.h b/library/StdRegions/StdPyrExp.h index 63683694aa36641c6e91066927ca91ecc9b265f5..4b93af8efac1e659b1c9499b34448fbd79b83021 100644 --- a/library/StdRegions/StdPyrExp.h +++ b/library/StdRegions/StdPyrExp.h @@ -191,6 +191,11 @@ namespace Nektar STD_REGIONS_EXPORT virtual void v_FillMode( const int mode, Array &outarray); + STD_REGIONS_EXPORT virtual void v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1); //--------------------------------------- // Helper functions diff --git a/library/StdRegions/StdTetExp.cpp b/library/StdRegions/StdTetExp.cpp index 8a402c7a3cd9b2244370e403f6e92c44f0e2ca32..98d5dce106529a78c81ee89d5bc8a8e7044d2296 100644 --- a/library/StdRegions/StdTetExp.cpp +++ b/library/StdRegions/StdTetExp.cpp @@ -906,6 +906,38 @@ namespace Nektar StdTetExp::v_BwdTrans(tmp, outarray); } + void StdTetExp::v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1) + { + int nummodes [3] = {m_base[0]->GetNumModes(), + m_base[1]->GetNumModes(), + m_base[2]->GetNumModes()}; + switch(fid) + { + case 0: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[1]; + } + break; + case 1: + { + numModes0 = nummodes[0]; + numModes1 = nummodes[2]; + } + break; + case 2: + case 3: + { + numModes0 = nummodes[1]; + numModes1 = nummodes[2]; + } + break; + } + } //--------------------------- // Helper functions diff --git a/library/StdRegions/StdTetExp.h b/library/StdRegions/StdTetExp.h index 224329c2e8ea9c85a362ae00e918d7204a6f236f..9c6d2d44955ff5070b181ad9c90b001be1e60206 100644 --- a/library/StdRegions/StdTetExp.h +++ b/library/StdRegions/StdTetExp.h @@ -173,7 +173,11 @@ namespace Nektar STD_REGIONS_EXPORT virtual void v_FillMode( const int mode, Array& outarray); - + STD_REGIONS_EXPORT virtual void v_GetFaceNumModes( + const int fid, + const Orientation faceOrient, + int &numModes0, + int &numModes1); //--------------------------- // Helper functions diff --git a/solvers/IncNavierStokesSolver/CMakeLists.txt b/solvers/IncNavierStokesSolver/CMakeLists.txt index 657474305f550f94e049c5a83666d0d64b8438f6..423da621a8895ba23919c3f164776c2f5045a05f 100644 --- a/solvers/IncNavierStokesSolver/CMakeLists.txt +++ b/solvers/IncNavierStokesSolver/CMakeLists.txt @@ -49,7 +49,9 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES ) ADD_NEKTAR_TEST(Channel_Flow_3modes_rad) ADD_NEKTAR_TEST(Couette_3DH2D_MVM) ADD_NEKTAR_TEST(Hex_channel_m3) + ADD_NEKTAR_TEST(Hex_channel_varP) ADD_NEKTAR_TEST(Pyr_channel_m3) + ADD_NEKTAR_TEST(Pyr_channel_varP) ADD_NEKTAR_TEST_LENGTHY(Hex_channel_m8) ADD_NEKTAR_TEST_LENGTHY(Hex_channel_m8_srhs) ADD_NEKTAR_TEST(Hex_Kovasnay_SubStep) @@ -79,10 +81,12 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES ) ADD_NEKTAR_TEST(Tet_channel_m3_dealiasing) ADD_NEKTAR_TEST(Tet_channel_robin_m3) ADD_NEKTAR_TEST(Tet_channel_m4_per) + ADD_NEKTAR_TEST(Tet_channel_varP) ADD_NEKTAR_TEST_LENGTHY(Tet_prism_channel_rad) ADD_NEKTAR_TEST_LENGTHY(Tet_equitri) ADD_NEKTAR_TEST_LENGTHY(Prism_channel_m6) ADD_NEKTAR_TEST_LENGTHY(Prism_channel_m6_dealiasing) + ADD_NEKTAR_TEST(Prism_channel_varP) ADD_NEKTAR_TEST(ChannelSpongeNSE) ADD_NEKTAR_TEST(ChannelSpongeLNSE) ADD_NEKTAR_TEST(ChanFlow_Standard_BodyForce) @@ -119,6 +123,7 @@ IF( NEKTAR_SOLVER_INCNAVIERSTOKES ) ADD_NEKTAR_TEST(ChanFlow_m3_par) ADD_NEKTAR_TEST_LENGTHY(ChanFlow_m8_BodyForce_par) ADD_NEKTAR_TEST_LENGTHY(Hex_channel_m8_par) + ADD_NEKTAR_TEST(Hex_channel_varP_par) ADD_NEKTAR_TEST_LENGTHY(Pyr_channel_m6_par) ADD_NEKTAR_TEST_LENGTHY(Hex_channel_m8_srhs_par) ADD_NEKTAR_TEST(Tet_channel_m4_per_xxt_ml_par) diff --git a/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP.tst b/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP.tst new file mode 100644 index 0000000000000000000000000000000000000000..16f0efd017ca63752824cc07d3565f1e7f9c1e58 --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP.tst @@ -0,0 +1,24 @@ + + + 3D channel flow, Hexahedral elements, variable P + IncNavierStokesSolver + Hex_channel_varP.xml + + Hex_channel_varP.xml + + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + + diff --git a/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP.xml b/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP.xml new file mode 100644 index 0000000000000000000000000000000000000000..04361fab01ab61581dc85dae14328f8c5f3e1864 --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP.xml @@ -0,0 +1,242 @@ + + + + + 0.00000000e+00 0.00000000e+00 0.00000000e+00 + 5.00000000e-01 0.00000000e+00 0.00000000e+00 + 5.00000000e-01 5.00000000e-01 0.00000000e+00 + 0.00000000e+00 5.00000000e-01 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 5.00000000e-01 + 5.00000000e-01 0.00000000e+00 5.00000000e-01 + 5.00000000e-01 5.00000000e-01 5.00000000e-01 + 0.00000000e+00 5.00000000e-01 5.00000000e-01 + 0.00000000e+00 0.00000000e+00 1.00000000e+00 + 5.00000000e-01 0.00000000e+00 1.00000000e+00 + 5.00000000e-01 5.00000000e-01 1.00000000e+00 + 0.00000000e+00 5.00000000e-01 1.00000000e+00 + 5.00000000e-01 1.00000000e+00 0.00000000e+00 + 0.00000000e+00 1.00000000e+00 0.00000000e+00 + 5.00000000e-01 1.00000000e+00 5.00000000e-01 + 0.00000000e+00 1.00000000e+00 5.00000000e-01 + 5.00000000e-01 1.00000000e+00 1.00000000e+00 + 0.00000000e+00 1.00000000e+00 1.00000000e+00 + 1.00000000e+00 0.00000000e+00 0.00000000e+00 + 1.00000000e+00 5.00000000e-01 0.00000000e+00 + 1.00000000e+00 0.00000000e+00 5.00000000e-01 + 1.00000000e+00 5.00000000e-01 5.00000000e-01 + 1.00000000e+00 0.00000000e+00 1.00000000e+00 + 1.00000000e+00 5.00000000e-01 1.00000000e+00 + 1.00000000e+00 1.00000000e+00 0.00000000e+00 + 1.00000000e+00 1.00000000e+00 5.00000000e-01 + 1.00000000e+00 1.00000000e+00 1.00000000e+00 + + + 0 1 + 0 3 + 0 4 + 1 2 + 1 5 + 2 3 + 2 6 + 3 7 + 4 5 + 4 7 + 5 6 + 6 7 + 4 8 + 5 9 + 6 10 + 7 11 + 8 9 + 8 11 + 9 10 + 10 11 + 3 13 + 2 12 + 12 13 + 12 14 + 13 15 + 7 15 + 6 14 + 14 15 + 14 16 + 15 17 + 11 17 + 10 16 + 16 17 + 1 18 + 18 19 + 18 20 + 19 2 + 19 21 + 5 20 + 20 21 + 21 6 + 20 22 + 21 23 + 9 22 + 22 23 + 23 10 + 19 24 + 24 12 + 24 25 + 21 25 + 25 14 + 25 26 + 23 26 + 26 16 + + + 0 3 5 1 + 0 4 8 2 + 3 6 10 4 + 5 7 11 6 + 1 2 9 7 + 8 10 11 9 + 8 13 16 12 + 10 14 18 13 + 11 15 19 14 + 9 12 17 15 + 16 18 19 17 + 5 21 22 20 + 21 23 26 6 + 22 24 27 23 + 20 7 25 24 + 11 26 27 25 + 26 28 31 14 + 27 29 32 28 + 25 15 30 29 + 19 31 32 30 + 33 34 36 3 + 33 35 38 4 + 34 37 39 35 + 36 6 40 37 + 38 39 40 10 + 38 41 43 13 + 39 42 44 41 + 40 14 45 42 + 43 44 45 18 + 36 46 47 21 + 46 48 49 37 + 47 23 50 48 + 40 49 50 26 + 49 51 52 42 + 50 28 53 51 + 45 52 53 31 + + + 0 1 2 3 4 5 + 5 6 7 8 9 10 + 11 3 12 13 14 15 + 15 8 16 17 18 19 + 20 21 22 23 2 24 + 24 25 26 27 7 28 + 29 23 30 31 12 32 + 32 27 33 34 16 35 + + + H[0-2] + H[3-4] + H[5-6] + H[7] + F[0,11,20,29] + F[1,6,21,25] + F[22,26,30,33] + F[13,17,31,34] + F[4,9,14,18] + F[10,19,28,35] + + C[10-13] + + + + + + + + + + + + + + + + + +

TimeStep = 0.001

+

NumSteps = 10

+

IO_CheckSteps = 10

+

IO_InfoSteps = 10

+

Kinvis = 1

+
+ + + u + v + w + p + + + + C[1] + C[6] + C[2] + C[3] + C[4] + C[5] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP_par.tst b/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP_par.tst new file mode 100644 index 0000000000000000000000000000000000000000..4a60f5498737c6117e98d6cef874f53d958249e0 --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Hex_channel_varP_par.tst @@ -0,0 +1,24 @@ + + + 3D channel flow, Hex elements, par(2), varP + IncNavierStokesSolver + -I GlobalSysSoln=XxtMultiLevelStaticCond Hex_channel_varP.xml + 2 + + Hex_channel_varP.xml + + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + diff --git a/solvers/IncNavierStokesSolver/Tests/Prism_channel_varP.tst b/solvers/IncNavierStokesSolver/Tests/Prism_channel_varP.tst new file mode 100644 index 0000000000000000000000000000000000000000..928b5bb151ba60094b6a2fc362b5ad7e887df2cd --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Prism_channel_varP.tst @@ -0,0 +1,23 @@ + + + 3D channel flow, Prismatic elements, variable P + IncNavierStokesSolver + Prism_channel_varP.xml + + Prism_channel_varP.xml + + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + diff --git a/solvers/IncNavierStokesSolver/Tests/Prism_channel_varP.xml b/solvers/IncNavierStokesSolver/Tests/Prism_channel_varP.xml new file mode 100644 index 0000000000000000000000000000000000000000..05a2df29be074dec13c6674aa85719790d8ef19e --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Prism_channel_varP.xml @@ -0,0 +1,280 @@ + + + + + 0.00000000e+00 0.00000000e+00 5.00000000e-01 + 5.00000000e-01 0.00000000e+00 5.00000000e-01 + 5.00000000e-01 0.00000000e+00 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 0.00000000e+00 + 5.00000000e-01 5.00000000e-01 5.00000000e-01 + 5.00000000e-01 5.00000000e-01 0.00000000e+00 + 0.00000000e+00 0.00000000e+00 1.00000000e+00 + 5.00000000e-01 0.00000000e+00 1.00000000e+00 + 5.00000000e-01 5.00000000e-01 1.00000000e+00 + 0.00000000e+00 5.00000000e-01 5.00000000e-01 + 0.00000000e+00 5.00000000e-01 0.00000000e+00 + 0.00000000e+00 5.00000000e-01 1.00000000e+00 + 5.00000000e-01 1.00000000e+00 5.00000000e-01 + 5.00000000e-01 1.00000000e+00 0.00000000e+00 + 5.00000000e-01 1.00000000e+00 1.00000000e+00 + 0.00000000e+00 1.00000000e+00 5.00000000e-01 + 0.00000000e+00 1.00000000e+00 0.00000000e+00 + 0.00000000e+00 1.00000000e+00 1.00000000e+00 + 1.00000000e+00 0.00000000e+00 5.00000000e-01 + 1.00000000e+00 0.00000000e+00 0.00000000e+00 + 1.00000000e+00 5.00000000e-01 5.00000000e-01 + 1.00000000e+00 5.00000000e-01 0.00000000e+00 + 1.00000000e+00 0.00000000e+00 1.00000000e+00 + 1.00000000e+00 5.00000000e-01 1.00000000e+00 + 1.00000000e+00 1.00000000e+00 5.00000000e-01 + 1.00000000e+00 1.00000000e+00 0.00000000e+00 + 1.00000000e+00 1.00000000e+00 1.00000000e+00 + + + 0 1 + 0 3 + 0 4 + 1 2 + 1 4 + 2 5 + 3 2 + 3 5 + 4 5 + 6 7 + 6 0 + 6 8 + 7 1 + 7 8 + 8 4 + 0 9 + 4 9 + 5 10 + 3 10 + 9 10 + 6 11 + 8 11 + 11 9 + 9 12 + 4 12 + 5 13 + 10 13 + 12 13 + 11 14 + 8 14 + 14 12 + 9 15 + 12 15 + 13 16 + 10 16 + 15 16 + 11 17 + 14 17 + 17 15 + 1 18 + 1 20 + 18 19 + 18 20 + 19 21 + 2 19 + 2 21 + 20 21 + 7 22 + 7 23 + 22 18 + 22 23 + 23 20 + 20 4 + 21 5 + 23 8 + 4 24 + 20 24 + 21 25 + 5 25 + 24 25 + 8 26 + 23 26 + 26 24 + 24 12 + 25 13 + 26 14 + + + 0 3 6 1 + 0 4 2 + 3 5 8 4 + 6 5 7 + 1 7 8 2 + 9 12 0 10 + 9 13 11 + 12 4 14 13 + 10 2 14 11 + 15 1 18 19 + 15 2 16 + 18 7 17 + 19 17 8 16 + 20 10 15 22 + 20 11 21 + 22 16 14 21 + 23 19 26 27 + 23 16 24 + 26 17 25 + 27 25 8 24 + 28 22 23 30 + 28 21 29 + 30 24 14 29 + 32 35 33 27 + 32 31 23 + 35 34 19 31 + 33 34 26 + 37 38 32 30 + 37 36 28 + 38 31 22 36 + 39 41 44 3 + 39 42 40 + 41 43 46 42 + 44 43 45 + 3 45 46 40 + 47 49 39 12 + 47 50 48 + 49 42 51 50 + 12 40 51 48 + 40 52 4 + 46 53 8 52 + 45 53 5 + 48 54 13 + 51 52 14 54 + 56 59 57 46 + 56 55 52 + 59 58 8 55 + 57 58 53 + 61 62 56 51 + 61 60 54 + 62 55 14 60 + 63 27 64 59 + 63 24 55 + 64 25 58 + 65 30 63 62 + 65 29 60 + + + 0 1 2 3 4 + 5 6 7 1 8 + 9 10 4 11 12 + 13 14 8 10 15 + 16 17 12 18 19 + 20 21 15 17 22 + 23 24 25 26 16 + 27 28 29 24 20 + 30 31 32 33 34 + 35 36 37 31 38 + 34 39 40 41 2 + 38 42 43 39 7 + 44 45 46 47 40 + 48 49 50 45 43 + 51 52 19 53 46 + 54 55 22 52 50 + + + R[0-5] + R[6-10] + R[11-15] + F[3,11,18,26,33,41,47,53] + F[0,5,30,35] + F[32,37,44,48] + F[23,27,51,54] + F[9,13,25,29] + F[6,14,21,28,36,42,49,55] + + C[10-12] + + + + + + + + + + + + + + + + +

TimeStep = 0.001

+

NumSteps = 10

+

IO_CheckSteps = 10

+

IO_InfoSteps = 10

+

Kinvis = 1

+
+ + + u + v + w + p + + + + C[1] + C[6] + C[2] + C[3] + C[4] + C[5] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/solvers/IncNavierStokesSolver/Tests/Pyr_channel_varP.tst b/solvers/IncNavierStokesSolver/Tests/Pyr_channel_varP.tst new file mode 100644 index 0000000000000000000000000000000000000000..4cdc04b9d8afc900d20b1dabfec1aabdfa6b7b48 --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Pyr_channel_varP.tst @@ -0,0 +1,23 @@ + + + 3D channel flow, Pyramidic elements, variable P + IncNavierStokesSolver + Pyr_channel_varP.xml + + Pyr_channel_varP.xml + + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + diff --git a/solvers/IncNavierStokesSolver/Tests/Pyr_channel_varP.xml b/solvers/IncNavierStokesSolver/Tests/Pyr_channel_varP.xml new file mode 100644 index 0000000000000000000000000000000000000000..25b08d337fb096b0d8dc5ee3781ca9725f3a609c --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Pyr_channel_varP.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + +

TimeStep = 0.001

+

NumSteps = 100

+

IO_InfoSteps = 100

+

Kinvis = 1

+
+ + + u + v + w + p + + + + C[1] + C[6] + C[2] + C[3] + C[4] + C[5] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + 0.00000000e+00 0.00000000e+00 0.00000000e+00 + 1.00000000e+00 0.00000000e+00 0.00000000e+00 + 1.00000000e+00 1.00000000e+00 0.00000000e+00 + 0.00000000e+00 1.00000000e+00 0.00000000e+00 + 5.00000000e-01 5.00000000e-01 5.00000000e-01 + 0.00000000e+00 0.00000000e+00 1.00000000e+00 + 1.00000000e+00 0.00000000e+00 1.00000000e+00 + 1.00000000e+00 1.00000000e+00 1.00000000e+00 + 0.00000000e+00 1.00000000e+00 1.00000000e+00 + + + 0 1 + 1 2 + 3 2 + 0 3 + 0 4 + 1 4 + 2 4 + 3 4 + 0 5 + 5 6 + 1 6 + 5 4 + 6 4 + 6 7 + 2 7 + 7 4 + 7 8 + 3 8 + 8 4 + 8 5 + + + 0 1 2 3 + 0 5 4 + 1 6 5 + 2 6 7 + 3 7 4 + 8 9 10 0 + 8 11 4 + 9 12 11 + 10 12 5 + 10 13 14 1 + 13 15 12 + 14 15 6 + 14 16 17 2 + 16 18 15 + 17 18 7 + 17 19 8 3 + 19 11 18 + 19 16 13 9 + + +

0 1 2 3 4

+

5 6 7 8 1

+

9 8 10 11 2

+

12 11 13 14 3

+

15 14 16 6 4

+

17 16 13 10 7

+
+ + P[0-2] + P[3-4] + P[5] + F[0] + F[5] + F[9] + F[12] + F[15] + F[17] + + C[10-12] +
+
diff --git a/solvers/IncNavierStokesSolver/Tests/Tet_channel_varP.tst b/solvers/IncNavierStokesSolver/Tests/Tet_channel_varP.tst new file mode 100644 index 0000000000000000000000000000000000000000..edb538e003081216d889dc4283bd64b94ddbf6d2 --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Tet_channel_varP.tst @@ -0,0 +1,24 @@ + + + 3D channel flow, Tetrahedral elements, variable P + IncNavierStokesSolver + Tet_channel_varP.xml + + Tet_channel_varP.xml + + + + 0 + 0 + 0 + 0 + + + 0 + 0 + 0 + 0 + + + + diff --git a/solvers/IncNavierStokesSolver/Tests/Tet_channel_varP.xml b/solvers/IncNavierStokesSolver/Tests/Tet_channel_varP.xml new file mode 100644 index 0000000000000000000000000000000000000000..c3d55e4f44d38bdb3e09daba6978c817ddaa1202 --- /dev/null +++ b/solvers/IncNavierStokesSolver/Tests/Tet_channel_varP.xml @@ -0,0 +1,411 @@ + + + + + 0.00000000e+00 0.00000000e+00 0.00000000e+00 + 5.00000000e-01 0.00000000e+00 0.00000000e+00 + 5.00000000e-01 5.00000000e-01 0.00000000e+00 + 5.00000000e-01 0.00000000e+00 5.00000000e-01 + 0.00000000e+00 0.00000000e+00 5.00000000e-01 + 5.00000000e-01 5.00000000e-01 5.00000000e-01 + 0.00000000e+00 0.00000000e+00 1.00000000e+00 + 5.00000000e-01 0.00000000e+00 1.00000000e+00 + 5.00000000e-01 5.00000000e-01 1.00000000e+00 + 0.00000000e+00 5.00000000e-01 0.00000000e+00 + 0.00000000e+00 5.00000000e-01 5.00000000e-01 + 0.00000000e+00 5.00000000e-01 1.00000000e+00 + 5.00000000e-01 1.00000000e+00 0.00000000e+00 + 5.00000000e-01 1.00000000e+00 5.00000000e-01 + 5.00000000e-01 1.00000000e+00 1.00000000e+00 + 0.00000000e+00 1.00000000e+00 0.00000000e+00 + 0.00000000e+00 1.00000000e+00 5.00000000e-01 + 0.00000000e+00 1.00000000e+00 1.00000000e+00 + 1.00000000e+00 0.00000000e+00 0.00000000e+00 + 1.00000000e+00 5.00000000e-01 0.00000000e+00 + 1.00000000e+00 0.00000000e+00 5.00000000e-01 + 1.00000000e+00 5.00000000e-01 5.00000000e-01 + 1.00000000e+00 0.00000000e+00 1.00000000e+00 + 1.00000000e+00 5.00000000e-01 1.00000000e+00 + 1.00000000e+00 1.00000000e+00 0.00000000e+00 + 1.00000000e+00 1.00000000e+00 5.00000000e-01 + 1.00000000e+00 1.00000000e+00 1.00000000e+00 + + + 0 1 + 0 2 + 0 3 + 1 2 + 1 3 + 2 3 + 3 4 + 3 5 + 4 5 + 4 0 + 5 0 + 2 5 + 4 6 + 3 6 + 5 6 + 7 6 + 7 8 + 7 3 + 6 8 + 8 3 + 8 5 + 0 9 + 0 10 + 2 9 + 2 10 + 9 10 + 5 10 + 4 10 + 10 6 + 8 11 + 8 10 + 6 11 + 11 10 + 9 12 + 9 13 + 2 12 + 2 13 + 12 13 + 5 13 + 10 13 + 13 8 + 8 14 + 11 14 + 11 13 + 14 13 + 9 15 + 12 15 + 15 13 + 13 16 + 10 16 + 10 15 + 16 15 + 10 17 + 13 17 + 16 17 + 14 17 + 11 17 + 1 18 + 1 19 + 18 19 + 18 3 + 19 3 + 20 3 + 20 21 + 20 18 + 3 21 + 21 18 + 21 19 + 3 22 + 20 22 + 21 22 + 22 7 + 22 23 + 7 23 + 23 3 + 21 23 + 19 2 + 21 5 + 21 2 + 21 8 + 23 8 + 2 24 + 19 24 + 24 21 + 21 25 + 5 25 + 5 24 + 25 24 + 5 26 + 21 26 + 25 26 + 23 26 + 8 26 + 24 12 + 24 13 + 25 13 + 13 26 + 26 14 + + + 0 3 1 + 0 4 2 + 3 5 4 + 1 5 2 + 9 6 2 + 9 8 10 + 6 7 8 + 2 7 10 + 1 10 11 + 5 7 11 + 12 13 6 + 12 14 8 + 13 7 14 + 15 17 13 + 15 16 18 + 17 19 16 + 13 19 18 + 18 20 14 + 19 20 7 + 21 1 23 + 21 22 25 + 1 24 22 + 23 24 25 + 9 22 27 + 22 26 10 + 27 26 8 + 24 26 11 + 12 27 28 + 28 26 14 + 31 28 32 + 31 18 29 + 28 30 18 + 32 30 29 + 30 20 26 + 33 23 35 + 33 34 37 + 23 36 34 + 35 36 37 + 36 39 24 + 36 38 11 + 39 26 38 + 34 39 25 + 39 40 30 + 40 20 38 + 42 43 44 + 42 29 41 + 43 40 29 + 44 40 41 + 43 32 39 + 46 45 33 + 46 47 37 + 45 34 47 + 51 47 48 + 51 50 49 + 47 39 50 + 48 39 49 + 45 25 50 + 54 48 53 + 54 49 52 + 53 39 52 + 55 42 56 + 55 44 53 + 56 43 53 + 56 52 32 + 57 59 58 + 57 60 4 + 59 61 60 + 58 61 4 + 64 60 62 + 64 66 63 + 60 65 66 + 62 65 63 + 59 67 66 + 61 65 67 + 69 62 68 + 69 63 70 + 68 65 70 + 71 73 72 + 71 17 68 + 73 74 17 + 72 74 68 + 72 70 75 + 74 65 75 + 58 76 3 + 76 5 61 + 5 65 78 + 65 77 7 + 78 77 11 + 76 78 67 + 65 19 79 + 79 20 77 + 73 80 16 + 74 19 80 + 75 79 80 + 82 81 76 + 82 83 67 + 81 78 83 + 87 83 84 + 87 86 85 + 83 77 86 + 84 77 85 + 81 11 86 + 90 84 89 + 90 85 88 + 89 77 88 + 91 89 75 + 91 92 80 + 89 79 92 + 92 20 88 + 93 35 81 + 93 37 94 + 81 36 94 + 87 95 94 + 95 38 85 + 94 38 86 + 90 96 95 + 96 38 88 + 97 44 96 + 97 41 92 + 96 40 92 + + + 0 1 2 3 + 4 5 6 7 + 3 8 7 9 + 10 11 12 6 + 13 14 15 16 + 16 12 17 18 + 19 20 21 22 + 23 5 24 25 + 21 8 26 24 + 27 11 25 28 + 29 30 31 32 + 31 28 33 17 + 34 35 36 37 + 38 39 40 26 + 36 22 38 41 + 42 40 43 33 + 44 45 46 47 + 48 46 32 42 + 49 50 51 35 + 52 53 54 55 + 51 56 41 54 + 57 58 55 59 + 60 61 44 62 + 62 63 59 48 + 64 65 66 67 + 68 69 70 71 + 66 72 73 70 + 74 75 71 76 + 77 78 79 80 + 80 81 76 82 + 83 67 84 2 + 85 9 86 87 + 84 88 85 73 + 89 86 18 90 + 79 91 92 15 + 82 92 93 89 + 94 95 96 88 + 97 98 99 100 + 96 101 87 99 + 102 103 100 104 + 105 106 107 93 + 107 104 90 108 + 109 110 37 111 + 112 98 113 114 + 111 101 114 39 + 115 103 116 113 + 117 118 47 119 + 119 116 108 43 + + + A[0-10] + A[11-25] + A[26-40] + A[41-47] + F[0,19,34,49,64,83,94,109] + F[1,4,10,13,65,68,74,78] + F[69,72,75,81,95,97,102,105] + F[50,52,57,61,110,112,115,117] + F[20,23,27,29,53,56,58,63] + F[14,30,45,60,77,91,106,118] + + C[10-13] + + + + + + + + + + + + + + + + + +

TimeStep = 0.001

+

NumSteps = 10

+

IO_CheckSteps = 10

+

IO_InfoSteps = 10

+

Kinvis = 1

+
+ + + u + v + w + p + + + + C[1] + C[6] + C[2] + C[3] + C[4] + C[5] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+