From e6815cae5644d5ff355c5b66a76bd56aaa619685 Mon Sep 17 00:00:00 2001 From: dkachuma Date: Thu, 22 Jan 2026 11:13:02 -0600 Subject: [PATCH] Fix transmissibility calculation --- .../finiteVolume/FaceElementToCellStencil.hpp | 10 +++++++++- .../mesh/generators/VTKFaceBlockUtilities.cpp | 5 +++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp b/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp index 3b970bd8b2b..67548b49597 100644 --- a/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp +++ b/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp @@ -271,7 +271,15 @@ inline void FaceElementToCellStencilWrapper:: // Will change when implementing collocation points. LvArray::tensorOps::hadamardProduct< 3 >( faceConormal, coefficient[er0][esr0][ei0][0], m_faceNormal[iconn] ); - real64 const t0 = m_weights[iconn][0] * LvArray::tensorOps::AiBi< 3 >( m_cellToFaceVec[iconn], faceConormal ); + real64 t0 = m_weights[iconn][0] * LvArray::tensorOps::AiBi< 3 >( m_cellToFaceVec[iconn], faceConormal ); + if( t0 < 0.0 ) + { + LvArray::tensorOps::hadamardProduct< 3 >( faceConormal, + coefficient[er0][esr0][ei0][0], + m_cellToFaceVec[iconn] ); + t0 = m_weights[iconn][0] * LvArray::tensorOps::AiBi< 3 >( m_cellToFaceVec[iconn], faceConormal ); + } + // We consider the 3rd component of the permeability which is the normal one. real64 const t1 = m_weights[iconn][1] * coefficient[er1][esr1][ei1][0][2]; diff --git a/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp b/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp index 7b540945686..46eff42dfd2 100644 --- a/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp +++ b/src/coreComponents/mesh/generators/VTKFaceBlockUtilities.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -624,11 +625,15 @@ void importFractureNetwork( string const & faceBlockName, CollocatedNodes const collocatedNodes( faceBlockName, faceMesh ); // Add the appropriate validations (only 2d cells...) + // Only log warnings and more critical messages from the edge extractor + vtkLogger::SetStderrVerbosity( vtkLogger::VERBOSITY_WARNING ); auto edgesExtractor = vtkSmartPointer< vtkExtractEdges >::New(); edgesExtractor->SetInputData( faceMesh ); edgesExtractor->UseAllPointsOn(); // Important: we want to prevent any node renumbering. edgesExtractor->Update(); vtkPolyData * edges = edgesExtractor->GetOutput(); + // Reset logging to default + vtkLogger::SetStderrVerbosity( vtkLogger::VERBOSITY_INFO ); vtkIdType const num2dFaces = edges->GetNumberOfCells(); vtkIdType const num2dElements = faceMesh->GetNumberOfCells();