feat: inner products for mixed method - #3994
Conversation
bd713
left a comment
There was a problem hiding this comment.
Let's update the PR description to clearly explain that the change in centroid computation is the reason a rebaseline is needed.
jafranc
left a comment
There was a problem hiding this comment.
Great work on rewriting as inner products rather than transmissivities.
Although I am unclear on why it is not called in compute replacing the old way and just duplicated from it up to the transposition.
| { | ||
| LvArray::tensorOps::normalize< 3 >( normal ); | ||
| area *= 0.5; | ||
|
|
There was a problem hiding this comment.
Can you refactor that above, that would avoid duplication as you used almost the same steps.
|
|
||
| LvArray::tensorOps::copy< 3 >( cellToFaceVec, faceCenter ); | ||
| LvArray::tensorOps::subtract< 3 >( cellToFaceVec, elemCenter ); | ||
| MimeticInnerProductHelpers::computeCellToFacetVector( cellToFaceVec, faceCenter, elemCenter ); |
There was a problem hiding this comment.
Maybe those two should be moved in ComputationalGeometry header so we can factorize use later
| template< localIndex NF > | ||
| GEOS_HOST_DEVICE | ||
| void | ||
| QuasiTPFAInnerProduct::computeM( arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const & nodePosition, |
There was a problem hiding this comment.
Looks like a great refactor, I am unclear on why it is not called in compute and mostly duplicated from it.
This PR adds the implementation of$M$ used in the MFD mixed method formulation.
computeM, which computes the inner product matrixTPFAInnerProductBdVLMInnerProductQuasiTPFAInnerProductSimpleInnerProductEach class now includes a
computeMroutine that construct the inner product matrixTesting
Unit tests were added in
testMimeticInnerProductsto verify the correctness of the newly implementedcomputeMfunctions. All tests currently pass.The centroid computation has been updated to evaluate the exact volume of a polyhedron with planar polygonal facets. This property is verified by a unit test. This induces a rebaseline.
+) Minor variable naming updates were applied in
SimpleInnerProductto keep the geometry nomenclature consistent with the other inner product implemenations.