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

feat: Transmissibility output #3091

Merged
merged 86 commits into from
Aug 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
e1ca063
added transmissibility unit
MelReyCG Apr 24, 2024
3aa9701
Added Cell-To-Cell output
MelReyCG Apr 24, 2024
8880a0c
generated docs
MelReyCG Apr 24, 2024
8ae44d1
uncrustify
MelReyCG Apr 25, 2024
837feea
Reorganized functions / methods
MelReyCG Apr 25, 2024
44f38d7
removed old method version
MelReyCG Apr 25, 2024
6dded4b
Add the logLevel viewkey & description (cherrypick from feature/rey/s…
MelReyCG Apr 25, 2024
10ca879
added wrapper descriptions
MelReyCG Apr 25, 2024
e077668
logLevel refactor generated documentation
MelReyCG Apr 25, 2024
14e96e0
Refactor the StencilOutput so the PackCollection can read it.
MelReyCG Jun 13, 2024
d11eebe
Changing the Problem sub-groups init order so the outputs are at the …
MelReyCG Jun 13, 2024
2cb99f3
Joining an uml diagram of the stencil architecture.
MelReyCG Jun 13, 2024
1c15439
Merge remote-tracking branch 'origin/develop' into feature/rey/transm…
MelReyCG Jun 13, 2024
736b706
loglevel viewkeystruct adjustments
MelReyCG Jun 20, 2024
a9c2fab
Solved a bug where datasets were duplicated in the hdf5
MelReyCG Jun 20, 2024
06cb7f3
Merge remote-tracking branch 'origin/develop' into feature/rey/transm…
MelReyCG Jun 24, 2024
c5df35b
completing merge
MelReyCG Jun 24, 2024
7ca6b2d
completing merge
MelReyCG Jul 2, 2024
763ba5c
adressing a few review comments
MelReyCG Jul 2, 2024
91134c9
adding a side note
MelReyCG Jul 3, 2024
339a5db
continuing wip
MelReyCG Jul 3, 2024
56f280d
CellToCellDataCollection don't support multiple mesh discretization f…
MelReyCG Jul 4, 2024
5aebddd
Merge commit 'c5df35bbf68888cbea60702c1b707a184648e7b7' into feature/…
MelReyCG Jul 4, 2024
f51665e
Revert unrelated modifications
MelReyCG Jul 4, 2024
a3d1dfc
Adding unit test (has an issue for now)
MelReyCG Jul 5, 2024
9a54196
Merge branch 'feature/rey/transmissibilityOutput' of https://github.c…
MelReyCG Jul 5, 2024
5125104
fixing unit test expectations
MelReyCG Jul 8, 2024
432669d
generated files
MelReyCG Jul 8, 2024
748da47
unit test documentation
MelReyCG Jul 8, 2024
b894e68
unit test slight refactor to improve code clarity
MelReyCG Jul 8, 2024
abc9475
Adding a test where cell size is different for each axis
MelReyCG Jul 8, 2024
e423a76
optimising test + clearing debug logging
MelReyCG Jul 8, 2024
ab3bc1a
Changed the way to get mesh & discretization objects
MelReyCG Jul 15, 2024
f87de86
Translated forgotten french notes
MelReyCG Jul 15, 2024
ea30ba2
bugfix
MelReyCG Jul 15, 2024
b6bd5d3
unit test adaptations
MelReyCG Jul 15, 2024
b4aa625
Merge commit 'a7ddc53638bc37ac1927904e0c1d4e4dad754cda' into feature/…
MelReyCG Jul 15, 2024
c13b90e
postProcessInput -> postInputInitialization
MelReyCG Jul 15, 2024
6d6718f
Merge branch 'develop' into feature/rey/transmissibilityOutput
rrsettgast Jul 15, 2024
579c961
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 19, 2024
d4f35e9
update submodule
MelReyCG Jul 19, 2024
aace4ec
🐛 exposing members for CUDA kernel compilation
MelReyCG Jul 19, 2024
49c44da
gpu bugfix: removing accessing by function
MelReyCG Jul 22, 2024
92f79f0
update submodules
MelReyCG Jul 22, 2024
efd4cc6
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 22, 2024
e797afb
Merge branch 'develop' into fileIO-refactor-start
MelReyCG Jul 22, 2024
5b97dc6
removing host calls from host-device
MelReyCG Jul 22, 2024
0099b6c
📦 generated files update
MelReyCG Jul 22, 2024
0b1df04
removing full context for simple loggings
MelReyCG Jul 23, 2024
d542326
Joining an exemple to illustrate how to use the component.
MelReyCG Jul 23, 2024
117ff6b
todos
MelReyCG Jul 23, 2024
c1232af
adding some info to error message
MelReyCG Jul 23, 2024
9801cb6
code style + more info in kernel error msg
MelReyCG Jul 23, 2024
cac3f42
temporary debug info
MelReyCG Jul 23, 2024
e6e691f
adding more temporary debug info
MelReyCG Jul 23, 2024
db69a2c
adding more debug info
MelReyCG Jul 23, 2024
b3bf215
adding more debug info
MelReyCG Jul 23, 2024
80bd90a
more and more debug infos
MelReyCG Jul 24, 2024
5dee431
debug info uncrustify
MelReyCG Jul 24, 2024
89ab11b
silly fix test
MelReyCG Jul 24, 2024
6d43243
freeOnDevice fix test
MelReyCG Jul 25, 2024
309611e
Merge remote-tracking branch 'origin/develop' into feature/rey/transm…
MelReyCG Jul 25, 2024
4e16a41
DataTypes.hpp now only manage static types
MelReyCG Jul 26, 2024
99c20c8
generated files
MelReyCG Jul 26, 2024
d0c8bbb
Merge remote-tracking branch 'origin/develop' into fileIO-refactor-ba…
MelReyCG Jul 26, 2024
73093e9
🐛 physicsSolvers refactor compilation fix
MelReyCG Jul 26, 2024
008f8e8
sharper todos
MelReyCG Jul 26, 2024
23c47d6
♻️🔇 removing debug outputs + prefering move(host) instead of freeOnDe…
MelReyCG Jul 26, 2024
56a4db2
more todo
MelReyCG Jul 26, 2024
fb447b8
removing common -> fileIO
MelReyCG Jul 26, 2024
78afee2
last common->fileIO ref
MelReyCG Jul 26, 2024
675f6a6
removing common->codingUtilities
MelReyCG Jul 26, 2024
ef68fd0
logger has now a dedicated folder for upcoming files (future PRs)
MelReyCG Jul 26, 2024
71d9dbc
🐛 compil fix (dynamicCast)
MelReyCG Jul 29, 2024
e660950
📝 missed docs (where not previously catched by the CI)
MelReyCG Jul 29, 2024
df1be47
🐛 compil fix fix (dynamicCast)
MelReyCG Jul 29, 2024
9bb911a
📝 docs fix
MelReyCG Jul 29, 2024
4388b5d
Merge branch 'develop' into feature/rey/remove-circular-fileIO&common…
MelReyCG Jul 29, 2024
9580842
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 29, 2024
27090a2
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 31, 2024
6981b3b
Merge remote-tracking branch 'origin/develop' into feature/rey/remove…
MelReyCG Jul 31, 2024
4084a46
Merge remote-tracking branch 'origin/develop' into feature/rey/remove…
MelReyCG Aug 2, 2024
6958c06
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Aug 2, 2024
73f7b56
Merge remote-tracking branch 'origin/feature/rey/remove-circular-file…
MelReyCG Aug 2, 2024
57c5d97
Merge branch 'feature/rey/transmissibilityOutput' of https://github.c…
MelReyCG Aug 2, 2024
9c93b4d
Merge branch 'develop' into feature/rey/transmissibilityOutput
rrsettgast Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
♻️🔇 removing debug outputs + prefering move(host) instead of freeOnDe…
…vice()
  • Loading branch information
MelReyCG committed Jul 26, 2024
commit 23c47d6d4fdd7b06b7acaa85b9c41893eb50ebf4
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
} catch( BadTypeError const & e )
{
// only TPFA is supported for now
GEOS_ERROR( GEOS_FMT( "{}: target discretization is not supported by {} (for now, only '{}' is).",

Check warning on line 92 in src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp#L92

Added line #L92 was not covered by tests
getDataContext(), catalogName(), TwoPointFluxApproximation::catalogName() ) );
}
}
Expand Down Expand Up @@ -166,20 +166,6 @@
IndexContainerType const & elemSubRegionIndices = stencilWrapper.getElementSubRegionIndices();
IndexContainerType const & elementIndices = stencilWrapper.getElementIndices();

GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} = {}", "elemRegionIndices size", elemRegionIndices.size() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} = {}", "elemSubRegionIndices size", elemSubRegionIndices.size() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} = {}", "elementIndices size", elementIndices.size() ) );
RAJA::ReduceSum< parallelDeviceReduce, int > runCount( 0 ); // FOR DEBUG OUTPUT
RAJA::ReduceMin< parallelDeviceReduce, localIndex > minLclId( std::numeric_limits< localIndex >::max() ); // FOR DEBUG OUTPUT
RAJA::ReduceMax< parallelDeviceReduce, localIndex > maxLclId( std::numeric_limits< localIndex >::min() ); // FOR DEBUG OUTPUT
RAJA::ReduceMin< parallelDeviceReduce, localIndex > minRegId( std::numeric_limits< localIndex >::max() ); // FOR DEBUG OUTPUT
RAJA::ReduceMax< parallelDeviceReduce, localIndex > maxRegId( std::numeric_limits< localIndex >::min() ); // FOR DEBUG OUTPUT
RAJA::ReduceMin< parallelDeviceReduce, localIndex > minSubRegId( std::numeric_limits< localIndex >::max() ); // FOR DEBUG OUTPUT
RAJA::ReduceMax< parallelDeviceReduce, localIndex > maxSubRegId( std::numeric_limits< localIndex >::min() ); // FOR DEBUG OUTPUT
RAJA::ReduceMin< parallelDeviceReduce, localIndex > minElemId( std::numeric_limits< localIndex >::max() ); // FOR DEBUG OUTPUT
RAJA::ReduceMax< parallelDeviceReduce, localIndex > maxElemId( std::numeric_limits< localIndex >::min() ); // FOR DEBUG OUTPUT
RAJA::ReduceMin< parallelDeviceReduce, real64 > minTransmiId( std::numeric_limits< real64 >::max() ); // FOR DEBUG OUTPUT
RAJA::ReduceMax< parallelDeviceReduce, real64 > maxTransmiId( std::numeric_limits< real64 >::min() ); // FOR DEBUG OUTPUT
forAll< POLICY >( stencilWrapper.size(), [=] GEOS_HOST_DEVICE ( localIndex const iConn )
{
real64 transmissibility[1][2];
Expand All @@ -197,33 +183,9 @@
connData[iConn].m_regionId[i] = elemRegionIndices( iConn, i );
connData[iConn].m_subRegionId[i] = elemSubRegionIndices( iConn, i );
connData[iConn].m_elementId[i] = elementIndices( iConn, i );
minRegId.min( elemRegionIndices( iConn, i ) ); maxRegId.max( elemRegionIndices( iConn, i ) );
minSubRegId.min( elemSubRegionIndices( iConn, i ) ); maxSubRegId.max( elemSubRegionIndices( iConn, i ) );
minElemId.min( elementIndices( iConn, i ) ); maxElemId.max( elementIndices( iConn, i ) );
minTransmiId.min( transmissibility[0][i] ); maxTransmiId.max( transmissibility[0][i] );
}
runCount+=1;
minLclId.min( iConn );
maxLclId.max( iConn );
} );
connData.freeOnDevice();
// DEBUG OUTPUTS
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} = {}", "run count", runCount.get() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} : {} -> {}", "lcl ids ", minLclId.get(), maxLclId.get() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} : {} -> {}", "elem reg ids ", minRegId.get(), maxRegId.get() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} : {} -> {}", "elem sub reg ids", minSubRegId.get(), maxSubRegId.get() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} : {} -> {}", "elem ids ", minElemId.get(), maxElemId.get() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel {} : {} -> {}", "transmissibility", minTransmiId.get(), maxTransmiId.get() ) );
GEOS_LOG( GEOS_FMT( "StencilDataCollection::Kernel first line : transmi[{},{},{},0] = {} ; transmi[{},{},{},1] = {}",
connData[0].m_regionId[0],
connData[0].m_subRegionId[0],
connData[0].m_elementId[0],
connData[0].m_transmissibility[0],
connData[0].m_regionId[1],
connData[0].m_subRegionId[1],
connData[0].m_elementId[1],
connData[0].m_transmissibility[1] ) );
GEOS_LOG( showKernelDataExtract( connData, 8 ) );
connData.move( LvArray::MemorySpace::host );
}

private:
Expand Down Expand Up @@ -261,25 +223,25 @@
}


string showKernelDataExtract( arrayView1d< StencilDataCollection::KernelConnectionData > const & kernelData,
globalIndex maxLines )
string formatKernelDataExtract( arrayView1d< StencilDataCollection::KernelConnectionData > const & kernelData,

Check warning on line 226 in src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp#L226

Added line #L226 was not covered by tests
globalIndex maxLines )
{
TableData tableData;
auto kernelIterator = kernelData.begin();
for( int iConn=0; iConn < maxLines && kernelIterator != kernelData.end(); ++iConn, ++kernelIterator )

Check warning on line 231 in src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp#L229-L231

Added lines #L229 - L231 were not covered by tests
{
tableData.addRow( GEOS_FMT( "{} / {}", kernelIterator->m_regionId[0], kernelIterator->m_regionId[1] ),
GEOS_FMT( "{} / {}", kernelIterator->m_subRegionId[0], kernelIterator->m_subRegionId[1] ),
GEOS_FMT( "{} / {}", kernelIterator->m_elementId[0], kernelIterator->m_elementId[1] ),
kernelIterator->m_transmissibility[0],
kernelIterator->m_transmissibility[1] );

Check warning on line 237 in src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp#L233-L237

Added lines #L233 - L237 were not covered by tests
}
TableLayout const tableLayout{
{ "regionId A/B", "subRegionId A/B", "elementId A/B", "transmissibilityAB", "transmissibilityBA" },
GEOS_FMT( "Kernel data (real row count = {})", kernelData.size() )
};
TableTextFormatter const tableFormatter{ tableLayout };
return tableFormatter.toString( tableData );

Check warning on line 244 in src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp#L241-L244

Added lines #L241 - L244 were not covered by tests
}

void StencilDataCollection::storeConnectionData( string_view stencilName,
Expand All @@ -303,7 +265,7 @@
{ // data storing
GEOS_ERROR_IF_NE_MSG( size_t( m_cellAGlobalId.size() ), size_t( sortedData.size() ),
GEOS_FMT( "{}: Unexpected stencil size!\n{}",
getDataContext(), showKernelDataExtract( kernelData, 8 ) ) );
getDataContext(), formatKernelDataExtract( kernelData, 8 ) ) );
globalIndex i = 0;
for( ConnectionData const & conn : sortedData )
{
Expand Down
Loading