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] Reformat directory custom_conditions using clang-format #12433

Merged
merged 2 commits into from
Jun 11, 2024

Conversation

avdg81
Copy link
Contributor

@avdg81 avdg81 commented Jun 6, 2024

📝 Description
Reformatted directory custom_conditions using the clang-format tool. Also added the previous format commit to .git-blame-ignore-revs.

@avdg81 avdg81 added the GeoMechanics Issues related to the GeoMechanicsApplication label Jun 6, 2024
@avdg81 avdg81 self-assigned this Jun 6, 2024
@markelov208
Copy link
Contributor

Hi Anne, I have not met anything strange or bad.

mnabideltares
mnabideltares previously approved these changes Jun 6, 2024
Copy link
Contributor

@mnabideltares mnabideltares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @avdg81
The code looks much cleaner and clear. I just have minor comments. But as they are repeated all over the code, I just mentioned few of them.
However, they are maybe not related to this PR as this PR focouses on clang-formatting, so they can be done in a another PR.

@@ -43,37 +42,35 @@ void PwCondition<TDim, TNumNodes>::GetDofList(DofsVectorType& rConditionDofList,
}

//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I totally agree. However, this will be addressed separately. See issue /~https://github.com/orgs/Deltares/projects/55/views/8?pane=issue&itemId=66505846.

KRATOS_CATCH( "" )

KRATOS_CATCH("")
}

//----------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.

@@ -83,23 +80,22 @@ void PwCondition<TDim,TNumNodes>::
}

//----------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.

KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION( PwCondition );

//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.


~PwCondition() override = default;

//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as comments before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.

for(unsigned int i = 0; i<NumGPoints; ++i)
(JContainer[i]).resize(TDim,LocalDim,false);
for (unsigned int i = 0; i < NumGPoints; ++i)
(JContainer[i]).resize(TDim, LocalDim, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this PR is focoused on clang-formatting, but as extra cleanup:
(JContainer[i]).resize does not need parantheses

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, but again, let's keep the scope of this PR clear and clean.

Variables.IntegrationCoefficient =
ConditionUtilities::CalculateIntegrationCoefficient<TDim, TNumNodes>(

// Obtain Np
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant comments. However a such clean up of comments can be done in another PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.

// Member Variables

//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous comments

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.

const Matrix& NContainer = Geom.ShapeFunctionsValues(this->GetIntegrationMethod());
GeometryType::JacobiansType JContainer(NumGPoints);
for(unsigned int i = 0; i<NumGPoints; ++i)
for (unsigned int i = 0; i < NumGPoints; ++i)
(JContainer[i]).resize(TDim, LocalDim, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(JContainer[i]) does not need parantheses

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.

for(unsigned int i = 0; i<NumGPoints; ++i)
(JContainer[i]).resize(TDim,LocalDim,false);
for (unsigned int i = 0; i < NumGPoints; ++i)
(JContainer[i]).resize(TDim, LocalDim, false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not need parantheses, however, it can be done in another cleaneup PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my earlier reply.

@avdg81 avdg81 dismissed stale reviews from mnabideltares and markelov208 via 07c3ef1 June 10, 2024 18:48
@avdg81 avdg81 force-pushed the geo/reformat-custom-conditions branch from 15ac075 to 07c3ef1 Compare June 10, 2024 18:48
@avdg81 avdg81 merged commit 597907c into master Jun 11, 2024
11 checks passed
@avdg81 avdg81 deleted the geo/reformat-custom-conditions branch June 11, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GeoMechanics Issues related to the GeoMechanicsApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GeoMechanicsApplication] Format GeoMechanics code base using clang-format
3 participants