Skip to content

Commit

Permalink
fix and remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertbk committed Jun 10, 2024
1 parent b4d9fd3 commit bae56a7
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ computeStiffnessxyTerm( localIndex const q,
GL_BASIS::TensorProduct3D::multiIndex( q, qa, qb, qc );
real64 B[6] = {0};
real64 J[3][3] = {{0}};
computeBxyMatrix( qa, qb, qc, X, J, B ); // The only change!
computeBxyMatrix( qa, qb, qc, X, J, B );
computeGradPhiBGradPhi( qa, qb, qc, B, func );
}

Expand All @@ -1252,7 +1252,7 @@ computeStiffnesszTerm( localIndex const q,
GL_BASIS::TensorProduct3D::multiIndex( q, qa, qb, qc );
real64 B[6] = {0};
real64 J[3][3] = {{0}};
computeBzMatrix( qa, qb, qc, X, J, B ); // The only change!
computeBzMatrix( qa, qb, qc, X, J, B );
computeGradPhiBGradPhi( qa, qb, qc, B, func );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "AcousticVTIFletcherWaveEquationSEM.hpp"
#include "AcousticVTIFletcherWaveEquationSEMKernel.hpp"
#include "AcousticVTIFletcherAdjointWaveEquationSEMKernel.hpp"

#include "finiteElement/FiniteElementDiscretization.hpp"
#include "fieldSpecification/FieldSpecificationManager.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "AcousticVTIZhangWaveEquationSEM.hpp"
#include "AcousticVTIZhangWaveEquationSEMKernel.hpp"
#include "AcousticVTIZhangAdjointWaveEquationSEMKernel.hpp"

#include "finiteElement/FiniteElementDiscretization.hpp"
#include "fieldSpecification/FieldSpecificationManager.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,23 @@ struct AcousticMatricesSEM
}
}
constexpr localIndex numNodesPerFace = FE_TYPE::numNodesPerFace;
real32 epsi = std::fabs( vti_epsilon[e] );
if( std::fabs( epsi ) < 1e-5 )
epsi = 0;
real32 delt = std::fabs( vti_delta[e] );
if( std::fabs( delt ) < 1e-5 )
delt = 0;
if( delt > epsi )
delt = epsi;
real32 sqrtEpsi = sqrt( 1 + 2 * epsi );
real32 sqrtDelta = sqrt( 1 + 2 * vti_delta[e] );
if( lateralSurfaceFaceIndicator[f] == 1 )
{
// ABC coefficients updated to fit horizontal velocity
real32 alpha = 1.0 / (velocity[e] * density[e] * sqrt( 1+2*vti_epsilon[e] ));
real32 alpha = 1.0 / (velocity[e] * density[e] * sqrtEpsi);
// VTI coefficients
real32 vti_p_xy = (1+2*vti_epsilon[e]);
real32 vti_qp_xy = sqrt( 1+2*vti_delta[e] );
real32 vti_p_xy = 1 + 2 * epsi;
real32 vti_qp_xy = sqrtDelta;

for( localIndex q = 0; q < numNodesPerFace; ++q )
{
Expand All @@ -344,7 +354,7 @@ struct AcousticMatricesSEM
// ABC coefficients updated to fit horizontal velocity
real32 alpha = 1.0 / (velocity[e] * density[e]);
// VTI coefficients
real32 vti_pq_z = sqrt( 1+2*vti_delta[e] );
real32 vti_pq_z = sqrtDelta;
real32 vti_q_z = 1;
for( localIndex q = 0; q < numNodesPerFace; ++q )
{
Expand Down

0 comments on commit bae56a7

Please sign in to comment.