-
Notifications
You must be signed in to change notification settings - Fork 91
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: FieldSpecification context when targeting wrong fieldName #3508
base: develop
Are you sure you want to change the base?
Conversation
src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp
Outdated
Show resolved
Hide resolved
WrapperBase const & targetField = targetObject.getWrapperBase( fieldName ); | ||
string const solverName = *(targetField.getRegisteringObjects().begin()); | ||
|
||
for( auto const & view : targetObject.wrappers() ) | ||
{ | ||
if( *(view.second->getRegisteringObjects().begin()) == solverName ) | ||
{ | ||
fieldNameAvail.insert( view.second->getName() ); | ||
} | ||
} |
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.
This loop could completely be flatten.
Also, does the call to getRegisteringObjects() changes the result of the list?
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.
loop can be flatten, afterwards this is a bit confusing 😅
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!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3508 +/- ##
===========================================
- Coverage 56.65% 56.64% -0.01%
===========================================
Files 1216 1216
Lines 105074 105091 +17
===========================================
+ Hits 59529 59531 +2
- Misses 45545 45560 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Here's the typical error encountered when setting the wrong target for a FieldSpecification :
Here we wanted to define initial conditions in FieldSpecifications to impose the value of a property (here: “rock_initialPorosity”).
However, this property doesn't exist because we've given it the wrong name. It expects the name of the Porosity model for stress (i.e. “rockPorosity_initialPorosity” here).
With more indications we would have (in progress)