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

A few solver messages rework #2783

Merged
merged 17 commits into from
Dec 7, 2023

Conversation

MelReyCG
Copy link
Contributor

@MelReyCG MelReyCG commented Oct 26, 2023

This PR aims to rework some messages by:

  • using meaningful class names in log lines & errors instead of abstract class names (using the final class catalog name, as it is done in other places).

  • fixing the unit in use in the following log line:
    FlowSolverBase compositionalMultiphaseFlow (aquifer.xml, l.28): at time 100s, the <Aquifer> boundary condition 'aquifer1' produces a flux of -0.6181975187076816 kg (or moles if useMass=0).
    Our investigations showed that the output value is in .
    The proposed new formulation is:
    Aquifer aquifer1 (aquifer.xml, l.226): at time 100s, the boundary condition produces a flux of -0.6181975187076816 m3.

  • remove some direct fmt::format reference in favor of GEOS_FMT.

- added a few getDataContext() references where it was forgotten
- removed some `` (it will be added later on DataContext::toString())
@MelReyCG MelReyCG changed the title Meaningful solver class name + aquifer flow logging unit fix A few solver messages rework Oct 26, 2023
@@ -53,6 +53,11 @@ class SolverBase : public ExecutableGroup

static string catalogName() { return "SolverBase"; }
Copy link
Contributor

Choose a reason for hiding this comment

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

@rrsettgast should we remove all those base catalogNames?

Copy link
Member

Choose a reason for hiding this comment

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

yes...but we can do that in its own PR. We can also do some of what we talked about yesterday.

/**
* @copydoc SolverBase::getCatalogName()
*/
string getCatalogName() const override { return catalogName(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be possible to avoid redefining that function for every solver?

Copy link
Member

Choose a reason for hiding this comment

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

No. It is a virtual function, so it will give the right name when you ask for the name through a base pointer....unless there is a way to have a derived class override a virtual function without defining the override.

@paveltomin
Copy link
Contributor

@MelReyCG please resolve conflicting files

@paveltomin paveltomin added the ci: run CUDA builds Allows to triggers (costly) CUDA jobs label Nov 29, 2023
@paveltomin paveltomin self-requested a review November 29, 2023 22:32
@dkachuma dkachuma self-requested a review November 30, 2023 16:47
@MelReyCG
Copy link
Contributor Author

MelReyCG commented Dec 4, 2023

I took the last comments into account, is it good to go ?

@paveltomin
Copy link
Contributor

This branch has conflicts that must be resolved

As long as the file conflict is resolved :)

@klevzoff klevzoff merged commit a1fd561 into develop Dec 7, 2023
@klevzoff klevzoff deleted the feature/rey/meaningful-solver-class-name branch December 7, 2023 01:35
ouassimkh pushed a commit that referenced this pull request Feb 16, 2024
* aquifer production logging rewrite with unit fix

* expose the final class name with getCatalogName()

* Used final class where possible on solvers +
- added a few getDataContext() references where it was forgotten
- removed some `` (it will be added later on DataContext::toString())

* uncrustify

* reformulation

* removed some direct fmt references

* Changed reduce() functions to Allreduce() where it is in fact a AllReduce under the hood

* added MpiWrapper::reduce (to avoid unneeded Allreduce())

* replaced a message by a warning (because it is effectively)

* replaced flux term by volume

* compil fixes

* Output names rather than data contexts at some places

---------

Co-authored-by: Pavel Tomin <paveltomin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run CUDA builds Allows to triggers (costly) CUDA jobs flag: ready for review type: cleanup / refactor Non-functional change (NFC)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aquifer flux unit in the log at each timestep.
6 participants