From 4d4eb350017c3eae53f28361bfb24b8b995848e1 Mon Sep 17 00:00:00 2001 From: Ryan Aronson Date: Fri, 16 Aug 2024 12:25:31 -0700 Subject: [PATCH] chore: add a few comments and small code fixes in addTransmissibilityCouplingPattern for poromechanics with conforming fractures (#3250) --------- Co-authored-by: Ryan ARONSON (X) --- .../SinglePhasePoromechanicsConformingFractures.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp index 2f0a16dc9ef..5d84d5f205d 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp @@ -371,7 +371,7 @@ addTransmissibilityCouplingPattern( DomainPartition const & domain, // Get the finite volume method used to compute the stabilization NumericalMethodsManager const & numericalMethodManager = domain.getNumericalMethodManager(); FiniteVolumeManager const & fvManager = numericalMethodManager.getFiniteVolumeManager(); - FluxApproximationBase const & stabilizationMethod = fvManager.getFluxApproximation( this->solidMechanicsSolver()->getStabilizationName() ); + FluxApproximationBase const & fvDiscretization = fvManager.getFluxApproximation( this->flowSolver()->getDiscretizationName() ); SurfaceElementRegion const & fractureRegion = elemManager.getRegion< SurfaceElementRegion >( this->solidMechanicsSolver()->getUniqueFractureRegionName() ); @@ -390,7 +390,7 @@ addTransmissibilityCouplingPattern( DomainPartition const & domain, ArrayOfArraysView< localIndex const > const & elemsToFaces = fractureSubRegion.faceList().toViewConst(); - stabilizationMethod.forStencils< SurfaceElementStencil >( mesh, [&]( SurfaceElementStencil const & stencil ) + fvDiscretization.forStencils< SurfaceElementStencil >( mesh, [&]( SurfaceElementStencil const & stencil ) { forAll< serialPolicy >( stencil.size(), [=] ( localIndex const iconn ) { @@ -405,13 +405,15 @@ addTransmissibilityCouplingPattern( DomainPartition const & domain, for( localIndex kf = 0; kf < 2; ++kf ) { // Set row DOF index - globalIndex const rowIndex = presDofNumber[sei[iconn][1-kf]] - rankOffset; + // Note that the 1-kf index is intentional, as this is coupling the pressure of one face cell + // to the nodes of the adjacent cell + localIndex const rowIndex = presDofNumber[sei[iconn][1-kf]] - rankOffset; if( rowIndex > 0 && rowIndex < pattern.numRows() ) { // Get fracture, face and region/subregion/element indices (for elements on both sides) - localIndex fractureIndex = sei[iconn][kf]; + localIndex const fractureIndex = sei[iconn][kf]; // Get the number of nodes localIndex const numNodesPerFace = faceToNodeMap.sizeOfArray( elemsToFaces[fractureIndex][0] );