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

ConstantCompressibilityBrinePvt: encapsulate EclipseState w/ friends #3257

Merged
merged 3 commits into from
Dec 21, 2022

Conversation

akva2
Copy link
Member

@akva2 akva2 commented Dec 13, 2022

And replace naked throw with OPM_THROW.

Waiting for #3246

@akva2
Copy link
Member Author

akva2 commented Dec 13, 2022

jenkins build this please

@akva2 akva2 marked this pull request as draft December 13, 2022 11:24
@akva2 akva2 changed the title ConstantCompressbilityBrinePvt: encapsulate EclipseState w/ friends ConstantCompressibilityBrinePvt: encapsulate EclipseState w/ friends Dec 13, 2022
@akva2 akva2 force-pushed the constantcompressibilitybrinepvt_encapsulate branch from d126bb1 to 7941261 Compare December 15, 2022 10:26
…e unit

thus encapsulating EclipseState and TableManager
this is user-provided data. instead throw an exception
also replace a naked throw with OPM_THROW
drop unused constructors and explicit comparison operator
@akva2 akva2 force-pushed the constantcompressibilitybrinepvt_encapsulate branch from 7941261 to f58d9f1 Compare December 21, 2022 14:49
@akva2 akva2 marked this pull request as ready for review December 21, 2022 14:49
@akva2
Copy link
Member Author

akva2 commented Dec 21, 2022

jenkins build this please

Copy link
Member

@bska bska left a comment

Choose a reason for hiding this comment

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

Looks good to me. Please merge into master when the build check is green.

@akva2 akva2 merged commit 81f0315 into OPM:master Dec 21, 2022
@akva2 akva2 deleted the constantcompressibilitybrinepvt_encapsulate branch December 21, 2022 15:23
@bska
Copy link
Member

bska commented Dec 21, 2022

Hm, it happened again and this time I don't know how to work around the missing Dune headers. Any suggestions are welcome, but I suppose we may have to accept linking opm-common to dune-common now.


ork/opm/src/opm.kdev/opm-common/external/fmtlib/include -pipe -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wchar-subscripts -Wformat-nonliteral -Wmissing-declarations -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -fopenmp -pthread -ggdb3 -O0 -DDEBUG -fPIC   -fopenmp -std=c++17 -MD -MT CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o -MF CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o.d -o CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o -c /home/bska/work/opm/src/opm.kdev/opm-common/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp
In file included from /home/bska/work/opm/src/opm.kdev/opm-common/opm/material/densead/Math.hpp:35,
                 from /home/bska/work/opm/src/opm.kdev/opm-common/opm/material/common/Tabulated1DFunction.hpp:31,
                 from /home/bska/work/opm/src/opm.kdev/opm-common/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.hpp:30,
                 from /home/bska/work/opm/src/opm.kdev/opm-common/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp:25:
/home/bska/work/opm/src/opm.kdev/opm-common/opm/material/densead/Evaluation.hpp:618:10: fatal error: dune/common/ftraits.hh: No such file or directory
  618 | #include <dune/common/ftraits.hh>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

@akva2
Copy link
Member Author

akva2 commented Dec 21, 2022

isn't the cure the same? remove Math.hpp include from the Tabulated1DFunction. it's not needed before instancing the templates, which does not happen in opm-common (apart from the tests).

@bska
Copy link
Member

bska commented Dec 21, 2022

remove Math.hpp include from the Tabulated1DFunction. it's not needed before instancing the templates, which does not happen in opm-common

No, this one seems more involved. If I do that I just get the build failure below


[4/310] Building CXX object CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o
FAILED: CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o 
/usr/bin/g++  -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DFMT_HEADER_ONLY -DHAVE_CONFIG_H=1 -I. -I/home/bska/work/opm/src/opm.kdev/opm-common/external/cjson -Iinclude -I/home/bska/work/opm/src/opm.kdev/opm-common -isystem /home/bska/work/opm/src/opm.kdev/opm-common/external/fmtlib/include -pipe -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wchar-subscripts -Wformat-nonliteral -Wmissing-declarations -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -fopenmp -pthread -ggdb3 -O0 -DDEBUG -fPIC   -fopenmp -std=c++17 -MD -MT CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o -MF CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o.d -o CMakeFiles/opmcommon.dir/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp.o -c /home/bska/work/opm/src/opm.kdev/opm-common/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp
In file included from /home/bska/work/opm/src/opm.kdev/opm-common/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.hpp:30,
                 from /home/bska/work/opm/src/opm.kdev/opm-common/src/opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.cpp:25:
/home/bska/work/opm/src/opm.kdev/opm-common/opm/material/common/Tabulated1DFunction.hpp: In member function ‘size_t Opm::Tabulated1DFunction<Scalar>::findSegmentIndex_(const Evaluation&, bool) const’:
/home/bska/work/opm/src/opm.kdev/opm-common/opm/material/common/Tabulated1DFunction.hpp:493:116: error: ‘getValue’ is not a member of ‘Opm’
  493 |                 sstream << "Problematic interpolation/extrapolation segment is found for the input value " << Opm::getValue(x)
      |                                                                                                                    ^~~~~~~~

@akva2
Copy link
Member Author

akva2 commented Dec 21, 2022

right. i see it. we need deeper surgery. try commenting the dune traits include + struct at the bottom of Evaluation.hpp. it likely make some stuff fail but i don't know what exactly. we need to stick that part in a separate header, but as it's codegen stuff it's a bit too much for me to handle right now and repeated builds on my poor little laptop takes ages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants