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

refactor: address some code analysis issues #3456

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

paveltomin
Copy link
Contributor

No description provided.

@paveltomin paveltomin self-assigned this Nov 20, 2024
@@ -337,7 +337,7 @@ void ElasticIsotropicPressureDependentUpdates::smallStrainUpdate( localIndex con
real64 eps_v_elastic;
real64 oldElasticStrainVol;
real64 oldElasticStrainDev;
real64 bulkModulus = -p0/Cr;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

reassigned below, down in the code

@paveltomin paveltomin added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Nov 20, 2024
@paveltomin paveltomin added type: cleanup / refactor Non-functional change (NFC) flag: ready for review flag: no rebaseline Does not require rebaseline labels Nov 20, 2024
@paveltomin paveltomin changed the title fix: address some code analysis issues refactor: fix address some code analysis issues Nov 20, 2024
@@ -429,7 +429,6 @@ size_t findAttribute( string const & attName, string const & xmlBuffer, size_t c
{
return candidatePos;
}
searchStart = candidatePos + attName.size();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not used

@@ -189,9 +189,6 @@ dataRepository::Group const * HistoryCollectionBase::getTargetObject( DomainPart
}
else
{
string const targetTokensStr = stringutilities::join( targetTokens.begin(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not used

@paveltomin paveltomin changed the title refactor: fix address some code analysis issues refactor: address some code analysis issues Nov 21, 2024
@paveltomin paveltomin removed the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Nov 21, 2024
Copy link
Contributor

@MelReyCG MelReyCG left a comment

Choose a reason for hiding this comment

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

Nice!

@@ -84,6 +84,7 @@ class SolutionScalingAndCheckingKernelBase

StackVariables( real64 _localMinVal )
:
localRow( -1 ),
Copy link
Contributor

@MelReyCG MelReyCG Nov 26, 2024

Choose a reason for hiding this comment

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

Just a question: why -1 instead of 0? (=> localRow())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-1 to force it to crash when something goes wrong

Comment on lines +406 to +407
dispMeshTargets[std::make_pair( meshBodyName, solidDiscretizationName )] = regions;
presMeshTargets[std::make_pair( meshBodyName, flowDiscretizationName )] = regions;
Copy link
Contributor

Choose a reason for hiding this comment

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

How did the previous code worked?? Good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i don't think using moved is a big deal here but better not to use it

@paveltomin
Copy link
Contributor Author

@paveltomin
Copy link
Contributor Author

@@ -421,19 +421,19 @@ class ExponentialRelation
private:

/// variable shift
T m_x0;
T m_x0{};
Copy link
Member

Choose a reason for hiding this comment

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

there is a bit of a structural problem here. We have constructors, but none of these variables are initialized there. They are set in functions called from within the constructor....but that is a different thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so how should it be?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rrsettgast please let me know what to fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flag: no rebaseline Does not require rebaseline flag: ready for review type: cleanup / refactor Non-functional change (NFC)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants