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: fields and constitutives #3517

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

Conversation

paveltomin
Copy link
Contributor

@paveltomin paveltomin commented Jan 17, 2025

clean up fields and constitutive "registration"

@paveltomin paveltomin changed the title Pt/fields and constitutives refactor: fields and constitutives Jan 17, 2025
@paveltomin paveltomin marked this pull request as ready for review January 17, 2025 23:01
@paveltomin paveltomin added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Jan 17, 2025
@paveltomin paveltomin self-assigned this Jan 18, 2025
@paveltomin paveltomin added type: cleanup / refactor Non-functional change (NFC) ci: run CUDA builds Allows to triggers (costly) CUDA jobs flag: ready for review labels Jan 20, 2025
@paveltomin paveltomin requested a review from tjb-ltk as a code owner February 7, 2025 22:40
@@ -250,22 +249,19 @@ void CompositionalMultiphaseBase::registerDataOnMesh( Group & meshBodies )
}

// If at least one region has a capillary pressure model, consider it enabled for all
string const capPresName = getConstitutiveName< CapillaryPressureBase >( subRegion );
if( !capPresName.empty() )
if( !getConstitutiveName< CapillaryPressureBase >( subRegion ).empty() )
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if( !getConstitutiveName< CapillaryPressureBase >( subRegion ).empty() )
m_hasCapPressure = !getConstitutiveName< CapillaryPressureBase >( subRegion ).empty();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this would change the logic, i committed first but now will revert

Copy link
Contributor

Choose a reason for hiding this comment

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

What about m_hasCapPressure |= !getConstitutiveName< CapillaryPressureBase >( subRegion ).empty();?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MelReyCG done, could you please approve?

@@ -228,8 +229,6 @@ void CompositionalMultiphaseBase::postInputInitialization()

void CompositionalMultiphaseBase::registerDataOnMesh( Group & meshBodies )
{
using namespace fields::flow;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious as to why we are removing this. Is this part of the coding standard?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

using namespace fields already defined in the very beginning of the file, so no need to duplicate it here

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 am not sure if there is a coding standard about that, just trying to make things consistent across the solvers

paveltomin and others added 3 commits February 11, 2025 10:43
@paveltomin paveltomin removed the request for review from Guotong-Ren February 11, 2025 16:48
@paveltomin paveltomin added the flag: requires rebaseline Requires rebaseline branch in integratedTests label Feb 12, 2025
setRestartFlags( RestartFlags::NO_WRITE ).
setSizedFromParent( 0 );
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity, what is the need for PhysicsSolverBase::setConstitutiveNamesCallSuper...
why was this removed

Copy link
Contributor Author

@paveltomin paveltomin Feb 12, 2025

Choose a reason for hiding this comment

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

i am not exactly sure about the logic behind, i think it originates from this big PR #1682
fluidNames registration moved somewhere else (next to its assignement), so this function becomes redundant

@paveltomin paveltomin removed the request for review from ryar9534 March 4, 2025 15:30
@paveltomin paveltomin added the ci: run integrated tests Allows to run the integrated tests in GEOS CI label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests type: cleanup / refactor Non-functional change (NFC)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants