-
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
refactor: address some code analysis issues #3456
base: develop
Are you sure you want to change the base?
Conversation
@@ -337,7 +337,7 @@ void ElasticIsotropicPressureDependentUpdates::smallStrainUpdate( localIndex con | |||
real64 eps_v_elastic; | |||
real64 oldElasticStrainVol; | |||
real64 oldElasticStrainDev; | |||
real64 bulkModulus = -p0/Cr; |
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.
reassigned below, down in the code
src/coreComponents/fileIO/timeHistory/HistoryCollectionBase.cpp
Outdated
Show resolved
Hide resolved
@@ -429,7 +429,6 @@ size_t findAttribute( string const & attName, string const & xmlBuffer, size_t c | |||
{ | |||
return candidatePos; | |||
} | |||
searchStart = candidatePos + attName.size(); |
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.
not used
@@ -189,9 +189,6 @@ dataRepository::Group const * HistoryCollectionBase::getTargetObject( DomainPart | |||
} | |||
else | |||
{ | |||
string const targetTokensStr = stringutilities::join( targetTokens.begin(), |
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.
not used
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.
Nice!
@@ -84,6 +84,7 @@ class SolutionScalingAndCheckingKernelBase | |||
|
|||
StackVariables( real64 _localMinVal ) | |||
: | |||
localRow( -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.
Just a question: why -1
instead of 0
? (=> localRow()
)
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.
-1
to force it to crash when something goes wrong
dispMeshTargets[std::make_pair( meshBodyName, solidDiscretizationName )] = regions; | ||
presMeshTargets[std::make_pair( meshBodyName, flowDiscretizationName )] = regions; |
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.
How did the previous code worked?? Good catch!
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 think using moved is a big deal here but better not to use it
@CusiniM, @acitrain, @castelletto1, @frankfeifan, @jhuang2601, @rrsettgast, @ryar9534, @sframba, @untereiner, @wrtobin please approve |
@CusiniM, @andrea-borio, @castelletto1, @dkachuma, @frankfeifan, @jhuang2601, @rrsettgast, @ryar9534, @untereiner, and/or @wrtobin please approve |
src/coreComponents/finiteElement/elementFormulations/ConformingVirtualElementOrder1.hpp
Outdated
Show resolved
Hide resolved
@@ -421,19 +421,19 @@ class ExponentialRelation | |||
private: | |||
|
|||
/// variable shift | |||
T m_x0; | |||
T m_x0{}; |
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.
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.
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 how should it be?
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.
@rrsettgast please let me know what to fix?
No description provided.