Skip to content
Open
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 @@ -185,6 +185,9 @@ template< typename T, typename COL_INDEX >
void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1,
CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName )
{
matrix1.move( hostMemorySpace, false );
matrix2.move( hostMemorySpace, false );

std::ofstream omat1( testName+".csv" );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ template< typename T, typename COL_INDEX >
void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1,
CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName )
{
matrix1.move( hostMemorySpace, false );
matrix2.move( hostMemorySpace, false );

std::ofstream omat1( testName+".csv" );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ template< typename T, typename COL_INDEX >
void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1,
CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName )
{
matrix1.move( hostMemorySpace, false );
matrix2.move( hostMemorySpace, false );

std::ofstream omat1( testName+".csv" );


Expand Down Expand Up @@ -716,7 +719,6 @@ void testWellEstimatorNumericalJacobian( CompositionalMultiphaseReservoirAndWell
residual.zero();
jacobian.zero();
assembleFunction( jacobian.toViewConstSizes(), residual.toView() );
std::cout << "tjb dq iwelem " << iwelem << " " << (residual[25] - residualOrig[25])/dRate << std::endl;
fillNumericalJacobian( residual.toViewConst(),
residualOrig.toViewConst(),
wellElemDofNumber[iwelem] + compositionalMultiphaseWellKernels::ColOffset::DCOMP + NC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ template< typename T, typename COL_INDEX >
void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1,
CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName )
{
matrix1.move( hostMemorySpace, false );
matrix2.move( hostMemorySpace, false );

std::ofstream omat1( testName+".csv" );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ template< typename T, typename COL_INDEX >
void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1,
CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName )
{
matrix1.move( hostMemorySpace, false );
matrix2.move( hostMemorySpace, false );

std::ofstream omat1( testName+".csv" );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ template< typename T, typename COL_INDEX >
void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1,
CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName )
{
matrix1.move( hostMemorySpace, false );
matrix2.move( hostMemorySpace, false );

std::ofstream omat1( testName+".csv" );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ template< typename T, typename COL_INDEX >
void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1,
CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName )
{
matrix1.move( hostMemorySpace, false );
matrix2.move( hostMemorySpace, false );

std::ofstream omat1( testName+".csv" );


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ struct ConstraintHelper
wellElemGravCoef,
&dControlEqn,
&iwelemRef,
localRhs,
localMatrix,
controlEqn,
eqnRowIndex,
dofColIndices,
&refGravCoef] ( localIndex const )
{
real64 const diffGravCoef = refGravCoef - wellElemGravCoef[iwelemRef];
Expand All @@ -103,14 +108,13 @@ struct ConstraintHelper
{
dControlEqn[COFFSET_WJ::dT] = dDensity[iwelemRef][0][Deriv::dT] * diffGravCoef;
}
// add solver matrices
localRhs[eqnRowIndex] += controlEqn;
localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex,
dofColIndices,
dControlEqn,
COFFSET_WJ::nDer );
} );

// add solver matrices
localRhs[eqnRowIndex] += controlEqn;
localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex,
dofColIndices,
dControlEqn,
COFFSET_WJ::nDer );
}
template< template< typename U > class T, typename U=VolumeRateConstraint >
static void assembleConstraintEquation( real64 const & time_n,
Expand Down Expand Up @@ -166,7 +170,12 @@ struct ConstraintHelper
dDensity,
&dControlEqn,
&useSurfaceConditions,
&iwelemRef] ( localIndex const )
&iwelemRef,
localRhs,
localMatrix,
controlEqn,
eqnRowIndex,
dofColIndices] ( localIndex const )
{
// compute the inverse of the total density and derivatives
real64 const densInv = 1.0 / density[iwelemRef][0];
Expand All @@ -178,14 +187,13 @@ struct ConstraintHelper
dControlEqn[COFFSET_WJ::dT] = -( useSurfaceConditions == 0 ) * dDensity[iwelemRef][0][Deriv::dT] * currentVolRate * densInv;
}

// add solver matrices
localRhs[eqnRowIndex] += controlEqn;
localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex,
dofColIndices,
dControlEqn,
COFFSET_WJ::nDer );
} );

// add solver matrices
localRhs[eqnRowIndex] += controlEqn;
localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex,
dofColIndices,
dControlEqn,
COFFSET_WJ::nDer );
}
};

Expand Down
Loading