-
Notifications
You must be signed in to change notification settings - Fork 101
feat: Additional information on the table log perforation #3966
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
Open
arng40
wants to merge
89
commits into
develop
Choose a base branch
from
feat/dudes/perforations-table-detail
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
d764bca
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 87a4eec
first attempt new version of log table perforation
arng40 5638062
doxygen + add const
arng40 3b7ade4
remove logPerfo header
arng40 dbee251
revert modif on wellElementSubRegion
arng40 b6f5ca6
new method to get cell id & region / subregion
arng40 f10caa5
wip MPI for table perfo
arng40 7dcac44
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 f29df71
MPI gather string - code MPI duplicate with negative pressure cell
arng40 673eae7
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 c09f8bf
Squashed commit of the following:
arng40 66863a1
1st version mpi table
arng40 d6128ee
new version mpi table : sorted
arng40 254f20e
add sorting method
arng40 4600be3
extract outputLine function
arng40 bbae597
sorted mpi table
arng40 77b28da
use sorting method
arng40 863e969
add test in invert comparator
arng40 2b80760
fix sort method + doxygen + add rank column
arng40 ff7e66d
remove mpi code
arng40 ef3e09c
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 0261d8f
refactor gatherString using gatherBuffer
arng40 86e5cd7
fix test
arng40 6d1a918
fix typo remove unused header
arng40 9c9fdd1
minor clean
arng40 805c7b1
ranaming, reorg variable first step
arng40 7400922
some cleanup
arng40 d2925fb
doxygen
arng40 ebdadd8
Improve structure 🎨
arng40 b0eb0f6
Remove code :fire:
arng40 57d5802
Fix a bug. :bug:
arng40 ec41004
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
arng40 a06b548
Merge branch 'develop' into feat/dudes/perforations-table-detail
arng40 763103a
:green_heart: uncrustify
arng40 bfdf8c5
:lipstick: set rank column to the right
arng40 d15042d
:label: renaming & cde style
arng40 44ac609
Squashed commit of the following:
arng40 824deb6
Squashed commit of the following:
arng40 d340530
:construction: serialization/deserialisation cellData
arng40 78db217
:construction: remove packing function and set custom function
arng40 6f3c199
:art: add tableData serialization
arng40 bd75852
:hammer: update tableData gathering
arng40 d47c187
:hammer: update reservoirElementGlobalIndex default value
arng40 642c3b5
:fire: remove log
arng40 17deec4
:sparkles: add sorted function to tableData
arng40 341ad11
:label: namespace renaming
arng40 ff68563
:lock: add control for table
arng40 ccfbccf
:hammer: fix testMPI after merge conflict
arng40 52cc123
:bug: Use MPI for tableData control
arng40 1eb61c0
:rewind: revert outputLines
arng40 d79852f
:green_heart: uncrustfy
arng40 b045e50
:art: move gatherString to hpp
arng40 552229b
:coffin: include
arng40 47013b2
:recycle: simplify MPI guard
arng40 e7f1439
:art: remove template
arng40 ae56cb4
:building_construction: create namespace for serialization
arng40 632edd7
:art: Improve struct
arng40 73c7a37
:coffin: remove dead code
arng40 49d72e0
:coffin: rmove serial from tableData
arng40 c567f23
:art: format doxy
arng40 79c9ee2
:bug: fix deserialisation string bug
arng40 ecef467
:green_heart: fix CI build
arng40 bdc15ec
:truck: move declaration outside hpp
arng40 81a96b2
:coffin: :label: remove dead code, update types
arng40 7d6249d
:art: update perdoration sorting cond
arng40 935d117
:art: improve testMpiTable Cond
arng40 a302088
🎨 spaces
MelReyCG 1181253
:art: added boolean array for perfo availibility
arng40 23a5694
Merge branch 'develop' into feat/dudes/perforations-table-detail
MelReyCG 17538bd
:recycle: relocated in perfo data + renaming
arng40 0d22428
Merge branch 'feat/dudes/perforations-table-detail' of https://github…
arng40 ba863d7
Merge branch 'develop' into feat/dudes/perforations-table-detail
arng40 ee7d7da
:bug: local scope for globalWellElemIndices
arng40 55aff05
Merge branch 'feat/dudes/perforations-table-detail' of https://github…
arng40 dfe0619
:art: format code
arng40 b962b2c
:coffin: dead code & spaces
arng40 854c07d
🎨 doc & warning updated
arng40 1e1176e
:bug: fix typo
arng40 eefa8aa
:bug: fix warning
arng40 f83574c
:art: update doc
arng40 6a671b6
🎨 uncrustify
MelReyCG 86720a2
Merge branch 'develop' into feat/dudes/perforations-table-detail
MelReyCG d315944
Merge branch 'develop' into feat/dudes/perforations-table-detail
MelReyCG 3381ad8
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
MelReyCG 62f55f7
🐛 fix LvArray error detection draft (out of this branch scope)
MelReyCG ee8f95f
🐛 bugfix: MPI cooperation crash fix
MelReyCG 3c048ad
Revert "🐛 fix LvArray error detection draft (out of this branch scope)"
MelReyCG 97c698c
⚰️ unused variable
MelReyCG 418014b
Merge remote-tracking branch 'origin/develop' into feat/dudes/perfora…
MelReyCG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -59,7 +59,81 @@ TableData & TableData::operator=( TableData const & other ) | |||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| bool TableData::operator<( TableData const & other ) const | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| return m_rows < other.m_rows; | ||||||||||||||||||||||||||||||||||||||||||||||
| if( other.getCellsData().size()!= getCellsData().size()) | ||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need a comment in the function doc ? |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| for( size_t i = 0; i < getCellsData().size(); i++ ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| if( getCellsData()[i].data()->value > other.getCellsData()[i].data()->value ) | ||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| bool TableData::operator==( TableData const & comparingTable ) const | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| if( comparingTable.getCellsData().size()!= getCellsData().size()) | ||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||
| for( size_t i = 0; i < getCellsData().size(); i++ ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| if( getCellsData()[i].data()->value != comparingTable.getCellsData()[i].data()->value ) | ||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+73
to
+83
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| void TableData::CellData::serialize( stdVector< buffer_unit_type > & out ) const | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| basicSerialization::serializePrimitive( type, out ); | ||||||||||||||||||||||||||||||||||||||||||||||
| basicSerialization::serializeString( value, out ); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| size_t TableData::CellData::getSerializedSize() const | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| return basicSerialization::sizeOfPrimitive( type ) + basicSerialization::sizeOfString( value ); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| size_t TableData::getSerializedSize() const | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| size_t totalSize =0; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| if( m_rows.empty()) | ||||||||||||||||||||||||||||||||||||||||||||||
| return totalSize; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| for( auto & row : m_rows ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| size_t rowSize = 0; | ||||||||||||||||||||||||||||||||||||||||||||||
| for( auto & cell : row ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| rowSize += cell.getSerializedSize(); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| totalSize += sizeof(size_t) + rowSize; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| return totalSize; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| void TableData::serialize( stdVector< buffer_unit_type > & serializedTableData ) const | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| if( m_rows.empty()) | ||||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| for( auto & row : m_rows ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| { // pack row size; | ||||||||||||||||||||||||||||||||||||||||||||||
| size_t rowSize = 0; | ||||||||||||||||||||||||||||||||||||||||||||||
| for( auto const & cell : row ) | ||||||||||||||||||||||||||||||||||||||||||||||
| rowSize += cell.getSerializedSize(); | ||||||||||||||||||||||||||||||||||||||||||||||
| basicSerialization::serializePrimitive( rowSize, serializedTableData ); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| { // pack cells | ||||||||||||||||||||||||||||||||||||||||||||||
| for( auto const & cell : row ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| cell.serialize( serializedTableData ); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -180,4 +254,63 @@ TableData2D::TableDataHolder TableData2D::buildTableData( string_view targetUnit | |||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| return tableData1D; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| void basicSerialization::serializeString ( string const & data, stdVector< buffer_unit_type > & out ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| basicSerialization::serializePrimitive( data.size(), out ); | ||||||||||||||||||||||||||||||||||||||||||||||
| auto * begin = data.data(); | ||||||||||||||||||||||||||||||||||||||||||||||
| auto * end = begin + data.size(); | ||||||||||||||||||||||||||||||||||||||||||||||
| out.insert( out.end(), begin, end ); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| void basicSerialization::deserializeString( string & str, buffer_unit_type const * & ptr, buffer_unit_type const * end ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| string::size_type strSize = 0; | ||||||||||||||||||||||||||||||||||||||||||||||
| basicSerialization::deserializePrimitive( strSize, ptr, end ); | ||||||||||||||||||||||||||||||||||||||||||||||
| if( static_cast< long >(strSize) > std::distance( ptr, end ) ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| throw std::runtime_error( "buffer overflow reading string" ); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| str.assign( ptr, ptr + strSize ); | ||||||||||||||||||||||||||||||||||||||||||||||
| ptr += str.size(); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| bool tableDataSorting::positiveNumberStringComp( string_view s1, string_view s2 ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| auto split = []( string_view s, string & intPart, string & decPart ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| size_t dotPos = s.find( '.' ); | ||||||||||||||||||||||||||||||||||||||||||||||
| if( dotPos == string::npos ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| intPart = s; | ||||||||||||||||||||||||||||||||||||||||||||||
| decPart = ""; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| intPart = s.substr( 0, dotPos ); | ||||||||||||||||||||||||||||||||||||||||||||||
| decPart = s.substr( dotPos + 1 ); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| string s1Int, s1Dec, s2Int, s2Dec; | ||||||||||||||||||||||||||||||||||||||||||||||
| split( s1, s1Int, s1Dec ); | ||||||||||||||||||||||||||||||||||||||||||||||
| split( s2, s2Int, s2Dec ); | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| if( s1Int.length() != s2Int.length()) | ||||||||||||||||||||||||||||||||||||||||||||||
| return s1Int.length() < s2Int.length(); | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| if( s1Int != s2Int ) | ||||||||||||||||||||||||||||||||||||||||||||||
| return s1Int < s2Int; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| size_t minLen = std::min( s1Dec.length(), s2Dec.length()); | ||||||||||||||||||||||||||||||||||||||||||||||
| for( size_t i = 0; i < minLen; ++i ) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| if( s1Dec[i] != s2Dec[i] ) | ||||||||||||||||||||||||||||||||||||||||||||||
| return s1Dec[i] < s2Dec[i]; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could you show an example of how to use addRow when the number of arguments is runtime defined ?
For example reporting a table of phase / component / phase component properties...
where number of phases and components is runtime defined
.and row would have labels water density, gas density , comp1_massfrac, comp2_massfrac, comp3_massfrac , phasecompfrac_water_comp1,, phasecompfrac_water_comp2, phasecompfrac_comp3, ....