Markus Blatt
7e3eeb34b0
Added exception to mark time step being cut too often.
...
This is needed for a more user friendly message in the simulator.
2023-07-12 14:17:56 +02:00
Arne Morten Kvarving
e6280fc80d
add override qualifier to virtual methods
2023-05-22 20:53:33 +02:00
Bård Skaflestad
53383fd875
Sort headers in alphabetical order
2023-05-08 22:40:24 +02:00
Bård Skaflestad
b17d618c7b
Use memcmp() from namespace std
...
Don't rely on clients using
#include <string.h>
before including cmp.hpp .
2023-05-08 22:40:14 +02:00
Arne Morten Kvarving
6b71f3d3c2
Merge pull request #3417 from blattms/fix-hdf5-dune-2.6
...
Do not use FieldVector::data() mehod as it misses from DUNE 2.6.
2023-03-15 21:10:34 +01:00
Arne Morten Kvarving
3fddcc0dd8
split out timing macros to separate header
2023-03-01 13:17:00 +01:00
Markus Blatt
393c42cd4c
Do not use FieldVector::data() mehod as it misses from DUNE 2.6.
...
Instead we use the old fashioned way of checking the size and then
either return the address of the first element or a nullptr.
Closes OPM/opm-simulator#4472
2023-02-28 16:46:06 +01:00
Bård Skaflestad
2171c7afe6
Merge pull request #3389 from hnil/timing_block
...
Added empty macro which can be used for timing with for example Tracy
2023-02-10 12:22:44 +01:00
hnil
05a7672173
addressed review comments
2023-02-10 11:13:08 +01:00
Bård Skaflestad
e6abb5e3df
Don't Index Out of Bounds in Vector
...
In the admittedly special case that "position" is equal to the
buffer's size() and "n == 0", then the expression
&buffer[position]
will index out of bounds. Use the safer expression
buffer.data() + position
instead since that's valid when position <= size().
Detected by libstdc++'s debug mode (checked iterators).
2023-02-08 12:52:28 +01:00
hnil
9613cdd917
Added empty marco which can be used for timing with forexample Tracy
2023-02-02 14:19:51 +01:00
Arne Morten Kvarving
d04a30592a
Serializer: handle Dune::BlockVector as vectors
2023-02-01 14:49:15 +01:00
Arne Morten Kvarving
6ba29b0920
Serializer: allow generic vector classes
...
needs to adhere to stl's interface
2023-02-01 14:48:39 +01:00
Arne Morten Kvarving
e211a8cbf6
Serializer: handle Dune::FieldVector as arrays
2023-02-01 14:39:32 +01:00
Arne Morten Kvarving
7e6b28317a
Serializer.hpp: add missing include
2023-02-01 10:48:48 +01:00
Arne Morten Kvarving
b138598518
changed: rename the packer used in test_Serialization to MemPacker
...
make it a public header so it can be reused elsewhere.
2023-02-01 10:48:48 +01:00
Arne Morten Kvarving
26f5c770b5
ParameterRequirement: encapsulate sstream usage
2023-01-04 11:03:33 +01:00
Arne Morten Kvarving
5395e29b5f
ParameterGroup_impl: avoid use of sstream
2023-01-04 11:03:33 +01:00
Arne Morten Kvarving
f987a3794c
Parameter: move more code to compile unit
...
in particular this allows encapsulating sstream
2023-01-04 11:03:33 +01:00
Arne Morten Kvarving
a154d8baf4
add compile unit for String.hpp
...
one less <sstream> in header
2023-01-03 19:06:46 +01:00
Arne Morten Kvarving
d1522761f3
add license header
2023-01-03 19:06:13 +01:00
Arne Morten Kvarving
dbf838ab90
ErrorMacros: remove sstream usage
2023-01-03 16:32:56 +01:00
Arne Morten Kvarving
5caa5bf858
ParameterGroup: remove usage of sstream
2023-01-02 15:53:05 +01:00
Arne Morten Kvarving
1c1140b0c6
SparseVector: remove use of sstream
2023-01-02 15:52:44 +01:00
Atgeirr Flø Rasmussen
bb48205767
Add missing <string> include.
2023-01-02 12:12:26 +01:00
Arne Morten Kvarving
b125823f92
added: symbol demangling helper
...
this is trivial enough to carry ourself instead of
relying on dune-common
2022-12-23 08:49:19 +01:00
Arne Morten Kvarving
f235061ee3
RootFinders: avoid stream usage in header
...
put logging functions in separate compile unit where we use {fmt}
2022-12-21 13:26:56 +01:00
Arne Morten Kvarving
b529080fb7
TimerLog: avoid sstream in header
2022-12-21 11:26:33 +01:00
Arne Morten Kvarving
913f71557d
fixed: zero initialize to avoid compiler warnings
2022-12-02 09:34:54 +01:00
Arne Morten Kvarving
fb0f3c451e
changed: rename serializeObject to serializationTestObject
...
makes it more clear what these members are used for.
2022-10-04 14:10:30 +02:00
Kjetil Olsen Lye
c664a0dfd2
Remove use of reserved identifier in OPM_THROW.
2022-09-26 11:51:37 +02:00
Arne Morten Kvarving
d731cd3775
import serializer code from opm-simulators
...
add tests using a simple memcpy based packer
2022-09-16 15:34:58 +02:00
Arne Morten Kvarving
6576370c19
changed: only use operator() for the serializer
2022-09-14 10:33:56 +02:00
Arne Morten Kvarving
ada6853a61
changed: remove unused Serialization class
2022-09-07 10:31:47 +02:00
Atgeirr Flø Rasmussen
49262ae96d
Add and use portable_timegm().
...
This function converts a std::tm to a std::time_t, assuming UTC
and not local timezone. This is used instead of relying on
repeated calls to mktime(), which can fail on some system (BSD)
for dates before 1900.
2022-08-18 09:21:52 +02:00
Arne Morten Kvarving
068bff1ebc
clean up stream includes
2022-07-27 16:05:01 +02:00
Bård Skaflestad
a79ee15082
Decouple Opm::Box From EclipseGrid
...
This commit switches to constructing Box instances from a GridDims
and two call-back functions instead of taking an EclipseGrid
directly. The two call-back functions are a predicate for active
cells and a translation from Cartesian to active cell indices
respectively.
This is intended to simplify working with nested boxes, such as
those that occur for local grid refinement.
2022-07-05 14:27:49 +02:00
Bård Skaflestad
5377ff3442
Streamline GridDims::getIJK()
...
This commit switches the Cartesian -> IJK decomposition in GridDims
from K->J->I into the I->J->K order. The latter is simpler.
While here, also consistently use 'std::size_t' instead of 'size_t'.
2022-07-04 15:06:07 +02:00
Joakim Hove
c50eb01bb0
Implement fnmatch() in Opm::shmatch() with std::regex
2022-01-11 11:14:11 +01:00
Joakim Hove
aede532b9a
Filesystem rename parser/eclipse/ input/eclipse
2022-01-02 14:32:14 +01:00
Bård Skaflestad
64e8ec3cfd
Remove 'Execute' Permission From Source Files
...
These files just need to have read/write permissions on Linux/Unix.
2021-12-08 15:09:23 +01:00
Arne Morten Kvarving
6465cfe1ea
changed: drop gcc7 compatibility
...
this means getting rid of the Opm::filesystem namespace
and directly using std::filesystem, as well as dropping
some of the compat code for the tr filesystem.
we still need the FileSystem.hpp/cpp files though as unique_path
is not part of std::filesystem.
2021-11-01 12:36:42 +01:00
Joakim Hove
97455adfa6
Add utility function to parse string -> double without exception
2021-09-23 10:23:25 +02:00
Joakim Hove
daaee6d2a4
Accept numerical month values when outputting ACTIONX state for rst
2021-09-20 19:05:06 +02:00
Joakim Hove
8d63e4f20d
Moved time related functions from ScheduleDeck to TimeService
2021-09-19 11:06:52 +02:00
Joakim Hove
fb6aeb240f
Merge pull request #2683 from blattms/spelling-fix
...
Fixed spelling of assignment,
2021-09-14 15:52:19 +02:00
Markus Blatt
9833afbc5f
Fixed spelling of assignment,
...
Detected by linitian run on Debian package for opm-upscaling.
2021-09-14 12:27:36 +02:00
Joakim Hove
206fe1cf69
Utility function to create time_point from UTC timestamp
2021-09-08 13:58:45 +02:00
Joakim Hove
cc05d493c0
Add utility function to format double
2021-09-06 19:43:16 +02:00
Joakim Hove
02b7e9ae04
Add mapping int -> string for month names
2021-09-06 19:42:51 +02:00