Skip to content

Commit

Permalink
chore: add a few comments and small code fixes in addTransmissibility…
Browse files Browse the repository at this point in the history
…CouplingPattern for poromechanics with conforming fractures (#3250)

---------

Co-authored-by: Ryan ARONSON (X) <[email protected]>
  • Loading branch information
2 people authored and rrsettgast committed Sep 17, 2024
1 parent 29fa16c commit 782ac88
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand All @@ -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 )
{
Expand All @@ -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] );
Expand Down

0 comments on commit 782ac88

Please sign in to comment.