Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ void PVTDriver::postInputInitialization()
// Check that the functions exist
FunctionManager & functionManager = FunctionManager::getInstance();
GEOS_ERROR_IF( !functionManager.hasGroup< TableFunction >( m_pressureFunctionName ),
getWrapperDataContext( viewKeyStruct::pressureFunctionString() ) <<
"Pressure function with name '" << m_pressureFunctionName << "' not found" );
GEOS_FMT( "Pressure function with name '{}' not found", m_pressureFunctionName ),
getWrapperDataContext( viewKeyStruct::pressureFunctionString() ) );

GEOS_ERROR_IF( !functionManager.hasGroup< TableFunction >( m_temperatureFunctionName ),
getWrapperDataContext( viewKeyStruct::temperatureFunctionString() ) <<
"Temperature function with name '" << m_temperatureFunctionName << "' not found" );
GEOS_FMT( "Temperature function with name '{}' not found", m_temperatureFunctionName ),
getWrapperDataContext( viewKeyStruct::temperatureFunctionString() ) );

// get number of phases and components
MultiFluidBase & baseFluid = getFluid();
Expand All @@ -105,9 +105,9 @@ void PVTDriver::postInputInitialization()
m_numComponents = baseFluid.numFluidComponents();

GEOS_ERROR_IF( m_feed.size() != m_numComponents,
getWrapperDataContext( viewKeyStruct::feedString() ) <<
"Feed must have the same number of components as the fluid. "
"Feed has " << m_feed.size() << " and fluid has " << m_numComponents );
GEOS_FMT( "Feed must have the same number of components as the fluid. Feed has {} and fluid has {}",
m_feed.size(), m_numComponents ),
getWrapperDataContext( viewKeyStruct::feedString() ) );

string_array columnNames;
getColumnNames( columnNames );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,29 @@ namespace hypre

/// @cond DO_NOT_DOCUMENT

namespace internal
{

struct ZeroRowSumMessage
{
long long row;
};

inline std::ostream & operator<<( std::ostream & os, ZeroRowSumMessage const & msg )
{
return os << "Zero row sum in row " << msg.row;
}

GEOS_HOST_DEVICE inline ZeroRowSumMessage zeroRowSumMessage( globalIndex const row )
{
#if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__)
printf( "***** Zero row sum in row %lld\n", static_cast< long long >( row ) );
#endif
return { static_cast< long long >( row ) };
}

} // namespace internal

template< bool CONST >
struct CSRData
{
Expand Down Expand Up @@ -103,7 +126,7 @@ void rescaleMatrixRows( hypre_ParCSRMatrix * const mat,
}
}

GEOS_ASSERT_MSG( !isZero( scale ), GEOS_FMT( "Zero row sum in row {}", rowIndices[i] ) );
GEOS_ASSERT_MSG( !isZero( scale ), internal::zeroRowSumMessage( rowIndices[i] ) );
scale = 1.0 / scale;
for( HYPRE_Int k = diag.rowptr[localRow]; k < diag.rowptr[localRow + 1]; ++k )
{
Expand Down
Loading