-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: MGR Strategy for ALM - Face Bubble Functions for Wedge Elements - Multipoint Integration Rules for Tetrahedra and Triangles #3395
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few questions
tractionTrial[ 0 ] = traction[0] + penalty[0] * dispJump[0] * faceArea; | ||
tractionTrial[ 1 ] = traction[1] + penalty[1] * (dispJump[1] - oldDispJump[1]) * faceArea; | ||
tractionTrial[ 2 ] = traction[2] + penalty[1] * (dispJump[2] - oldDispJump[2]) * faceArea; | ||
tractionTrial[ 0 ] = traction[0] + penalty[0] * dispJump[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this "traction" is now a "traction"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is . Actually, it has always been a "traction". In the previous implementation, dispJump
was multiplied by faceArea
. Now that dispJump
is as it should be, it is used in its original form.
@@ -134,7 +133,7 @@ class FrictionBaseUpdates | |||
real64 ( & tractionNew )[3], | |||
integer & fractureState ) const | |||
{ | |||
GEOS_UNUSED_VAR( oldDispJump, dispJump, penalty, traction, faceArea, symmetric, fixedLimitTau, | |||
GEOS_UNUSED_VAR( oldDispJump, dispJump, penalty, traction, symmetric, fixedLimitTau, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this function defined?
arraySlice1d< real64 > const & tractionNew ) const | ||
{ GEOS_UNUSED_VAR( dispJump, deltaDispJump, penalty, traction, faceArea, tractionNew ); } | ||
{ GEOS_UNUSED_VAR( dispJump, deltaDispJump, penalty, traction, tractionNew ); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or this one? why not a pure virtual?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because these are device functions. I am pretty sure that nvcc throws an error if we use a pure virtual. We do this a lot in our kernelWrapper
objects (probably with the idea of getting nicer compilation errors) but, tbh, I start thinking that it would be better not to use virtual
at all for these.
#if TETRAHEDRON_QUADRATURE_POINTS == 14 | ||
constexpr static localIndex numQuadraturePoints = 14; | ||
#elif TETRAHEDRON_QUADRATURE_POINTS == 5 | ||
constexpr static localIndex numQuadraturePoints = 5; | ||
#elif TETRAHEDRON_QUADRATURE_POINTS == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty clunky. There should be separate class for the different integration rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. It was just a temporary implementation before discussing the creation of a separate class. Would you like to implement it in this PR, or should we open a specific one for this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should redefine this class
template< int NUM_Q_POINTS >
class H1_Tetrahedron_Lagrange1_Gauss final : public FiniteElementBase
{
...
};
using H1_Tetrahedron_Lagrange1_Gauss1 = H1_Tetrahedron_Lagrange1_Gauss<1>;
...
using H1_Tetrahedron_Lagrange1_Gauss14 = H1_Tetrahedron_Lagrange1_Gauss<14>;
@@ -29,6 +29,8 @@ namespace geos | |||
namespace finiteElement | |||
{ | |||
|
|||
#define TRIANGLE_QUADRATURE_POINTS 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment here about a separate class.
WRITE_AND_READ, | ||
"Slip" ); | ||
|
||
DECLARE_FIELD( tangentialTraction, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we storing a "traction" and a "tangentialTraction"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was just for output purposes. Having the absolute value of tangential traction is convenient without needing two separate tangential components.
|
||
constexpr static char const * iterativePenaltyTFacString() { return "iterPenaltyT"; } | ||
|
||
constexpr static char const * tolJumpDispNFacString() { return "tolJumpN"; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should these be dependent on the contact parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as the default values are concerned, I would say yes. However, it is convenient to have these tolerances to fine-tune the physics solver for the specific problem.
|
||
for( int i=0; i<numTdofs; ++i ) | ||
{ | ||
stack.tLocal[i] = m_traction( k, i ); | ||
stack.dispJumpLocal[i] = m_dispJump( k, i ); | ||
stack.oldDispJumpLocal[i] = m_oldDispJump( k, i ); | ||
stack.dispJumpLocal[i] = m_dispJump( k, i )*m_faceArea[k]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems odd to me that you would need to multiply by an area here.
dispJump[0] = stack.dispJumpLocal[0] * m_faceArea[k]; | ||
dispJump[1] = ( stack.dispJumpLocal[1] - stack.oldDispJumpLocal[1] ) * m_faceArea[k]; | ||
dispJump[2] = ( stack.dispJumpLocal[2] - stack.oldDispJumpLocal[2] ) * m_faceArea[k]; | ||
dispJump[0] = stack.dispJumpLocal[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment below.
src/coreComponents/physicsSolvers/contact/kernels/SolidMechanicsALMSimultaneousKernels.hpp
Show resolved
Hide resolved
* | +__ \_ | s 2 0 1 0 | ||
* | /2 \__ \_ | / 3 0 0 1 | ||
* |/ \__\ | / ===== == == == | ||
* +------------+ *------r | ||
* 0 1 | ||
* | ||
*/ | ||
class H1_Tetrahedron_Lagrange1_Gauss1 final : public FiniteElementBase | ||
template< int NUM_Q_POINTS > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
template< int NUM_Q_POINTS > | |
template< typename NUM_Q_POINTS > |
and then NUM_Q_POINTS::value
to use it andH1_Tetrahedron_Lagrange1_Gauss< std::integral_constant< int, 1 > >
else | ||
{ | ||
GEOS_UNUSED_VAR( q ); | ||
GEOS_ERROR( "NUM_Q_POINTS not available for this element type" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if we need this. I guess ideally we would like it not to compile at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add at the top of the class:
static_assert(NUM_Q_POINTS::value == 1 || NUM_Q_POINTS::value == 5 |NUM_Q_POINTS::value == 14,
"NUM_Q_POINTS::value must be 1, 5, or 14!");
registerWrapper( viewKeyStruct::useHighOrderQuadratureRuleString(), &m_useHighOrderQuadratureRule ). | ||
setInputFlag( InputFlags::OPTIONAL ). | ||
setApplyDefaultValue( 0 ). | ||
setDescription( "Specifier to indicate whether to use a high order quadrature rule" ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setDescription( "Specifier to indicate whether to use a high order quadrature rule" ); | |
setDescription( "Flag to indicate whether to use a high order quadrature rule or not." ); |
This PR introduces the following enhancements: