Skip to content
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

[GeoMechanicsApplication] Addressed a number of code smells #11544

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ void UPwBaseElement<TDim,TNumNodes>::
Initialize(const ProcessInfo& rCurrentProcessInfo)
{
KRATOS_TRY
// KRATOS_INFO("0-UPwBaseElement::Initialize()") << this->Id() << std::endl;

const PropertiesType &rProp = this->GetProperties();
const GeometryType &rGeom = this->GetGeometry();
Expand Down Expand Up @@ -190,8 +189,6 @@ void UPwBaseElement<TDim,TNumNodes>::
mIsInitialised = true;

KRATOS_CATCH( "" )

// KRATOS_INFO("1-UPwBaseElement::Initialize()") << std::endl;
}

//----------------------------------------------------------------------------------------
Expand All @@ -200,7 +197,6 @@ void UPwBaseElement<TDim,TNumNodes>::
ResetConstitutiveLaw()
{
KRATOS_TRY
// KRATOS_INFO("0-UPwBaseElement::ResetConstitutiveLaw()") << this->Id() << std::endl;

// erasing stress vectors
for (unsigned int i=0; i < mStressVector.size(); ++i) {
Expand All @@ -213,10 +209,7 @@ void UPwBaseElement<TDim,TNumNodes>::
}
mStateVariablesFinalized.clear();


KRATOS_CATCH( "" )

// KRATOS_INFO("1-UPwBaseElement::ResetConstitutiveLaw()") << this->Id() << std::endl;
}

//----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -682,7 +675,7 @@ CalculateOnIntegrationPoints(const Variable<double>& rVariable,

KRATOS_CATCH("")
}
//-------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
template< unsigned int TDim, unsigned int TNumNodes >
void UPwBaseElement<TDim,TNumNodes>::
CalculateMaterialStiffnessMatrix( MatrixType& rStiffnessMatrix,
Expand Down Expand Up @@ -733,7 +726,6 @@ void UPwBaseElement<TDim,TNumNodes>::
unsigned int GPoint) const
{
KRATOS_TRY
// KRATOS_INFO("0-UPwBaseElement::CalculateDerivativesOnInitialConfiguration()") << std::endl;

const GeometryType& rGeom = this->GetGeometry();
const GeometryType::IntegrationPointsArrayType& IntegrationPoints = rGeom.IntegrationPoints( mThisIntegrationMethod );
Expand All @@ -743,7 +735,6 @@ void UPwBaseElement<TDim,TNumNodes>::
MathUtils<double>::InvertMatrix( J0, InvJ0, detJ );
GeometryUtils::ShapeFunctionsGradients(DN_De, InvJ0, DNu_DX0);

// KRATOS_INFO("1-UPwBaseElement::CalculateDerivativesOnInitialConfiguration()") << std::endl;
KRATOS_CATCH( "" )
}

Expand All @@ -756,14 +747,11 @@ void UPwBaseElement<TDim,TNumNodes>::
unsigned int GPoint) const
{
KRATOS_TRY
// KRATOS_INFO("0-UPwBaseElement::CalculateJacobianOnCurrentConfiguration()") << std::endl;

const GeometryType& rGeom = this->GetGeometry();

rJ = rGeom.Jacobian( rJ, GPoint, mThisIntegrationMethod );
MathUtils<double>::InvertMatrix( rJ, rInvJ, detJ );

// KRATOS_INFO("1-UPwBaseElement::CalculateJacobianOnCurrentConfiguration()") << std::endl;
KRATOS_CATCH( "" )
}

Expand Down Expand Up @@ -818,8 +806,7 @@ unsigned int UPwBaseElement<TDim,TNumNodes>::GetNumberOfDOF() const
return TNumNodes * (TDim + 1);
}

//-------------------------------------------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------
template class UPwBaseElement<2,3>;
template class UPwBaseElement<2,4>;
template class UPwBaseElement<3,4>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ int UPwSmallStrainFICElement<TDim,TNumNodes>::
Check( const ProcessInfo& rCurrentProcessInfo ) const
{
KRATOS_TRY
// KRATOS_INFO("0-UPwSmallStrainFICElement::Check()") << this->Id() << std::endl;

// Verify generic variables
int ierr = UPwSmallStrainElement<TDim, TNumNodes>::Check(rCurrentProcessInfo);
Expand All @@ -80,8 +79,6 @@ int UPwSmallStrainFICElement<TDim,TNumNodes>::
if (Prop[IGNORE_UNDRAINED])
KRATOS_ERROR << "IGNORE_UNDRAINED cannot be used in FIC elements. Use Non FIC elements instead" << this->Id() << std::endl;

// KRATOS_INFO("1-UPwSmallStrainElement::Check()") << std::endl;

return ierr;

KRATOS_CATCH( "" );
Expand Down Expand Up @@ -117,7 +114,7 @@ void UPwSmallStrainFICElement<TDim,TNumNodes>::
InitializeNonLinearIteration(const ProcessInfo& rCurrentProcessInfo)
{
KRATOS_TRY;
// KRATOS_INFO("0-UPwSmallStrainFICElement::InitializeNonLinearIteration()") << this->Id() << std::endl;

//Defining necessary variables
const GeometryType& Geom = this->GetGeometry();
const SizeType NumGPoints = Geom.IntegrationPointsNumber( mThisIntegrationMethod );
Expand Down Expand Up @@ -168,8 +165,7 @@ void UPwSmallStrainFICElement<TDim,TNumNodes>::

this->ExtrapolateGPConstitutiveTensor(ConstitutiveTensorContainer);
this->ExtrapolateGPDtStress(DtStressContainer);

// KRATOS_INFO("1-UPwSmallStrainFICElement::InitializeNonLinearIteration()") << this->Id() << std::endl;

KRATOS_CATCH("")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void UPwSmallStrainAxisymmetricFICElement<TDim,TNumNodes>::
const Vector& Np)
{
KRATOS_TRY
// KRATOS_INFO("0-UPwSmallStrainAxisymmetricFICElement::CalculateBMatrix()") << std::endl;

const double radius = GeoElementUtilities::CalculateRadius(Np, this->GetGeometry());

Expand All @@ -60,7 +59,6 @@ void UPwSmallStrainAxisymmetricFICElement<TDim,TNumNodes>::
rB( INDEX_2D_PLANE_STRAIN_XY, index + INDEX_Y ) = GradNpT( i, INDEX_X );
}

// KRATOS_INFO("1-UPwSmallStrainAxisymmetricFICElement::CalculateBMatrix()") << std::endl;
KRATOS_CATCH( "" )
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ void UPwSmallStrainAxisymmetricElement<TDim,TNumNodes>::
const Vector& Np)
{
KRATOS_TRY
// KRATOS_INFO("0-UPwSmallStrainAxisymmetricElement::CalculateBMatrix()") << std::endl;

const double radius = GeoElementUtilities::CalculateRadius(Np, this->GetGeometry());

Expand All @@ -61,7 +60,6 @@ void UPwSmallStrainAxisymmetricElement<TDim,TNumNodes>::
rB( INDEX_2D_PLANE_STRAIN_XY, index + INDEX_Y ) = GradNpT( i, INDEX_X );
}

// KRATOS_INFO("1-UPwSmallStrainAxisymmetricElement::CalculateBMatrix()") << std::endl;
KRATOS_CATCH( "" )
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ void UPwUpdatedLagrangianFICElement<TDim,TNumNodes>::
{
KRATOS_TRY;

// KRATOS_INFO("0-UPwUpdatedLagrangianFICElement::CalculateAll()") << CalculateStiffnessMatrixFlag << " " << CalculateStiffnessMatrixFlag << std::endl;

const PropertiesType& Prop = this->GetProperties();
const GeometryType& Geom = this->GetGeometry();
const GeometryType::IntegrationPointsArrayType& IntegrationPoints = Geom.IntegrationPoints( mThisIntegrationMethod );
Expand Down Expand Up @@ -143,8 +141,6 @@ void UPwUpdatedLagrangianFICElement<TDim,TNumNodes>::
}
}

// KRATOS_INFO("1-UPwUpdatedLagrangianFICElement::CalculateAll()") << std::endl;

KRATOS_CATCH( "" )
}

Expand Down
Loading