Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
further optimizing sdc code
Browse files Browse the repository at this point in the history
  • Loading branch information
David Blom committed Jun 26, 2015
1 parent ad41164 commit bfdc6bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fsi/SDC.C
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace sdc
qold = solStages.row( p );

// Form right hand side
rhs = -dt * F.row( p + 1 ) + Sj.row( p );
rhs.noalias() = -dt * F.row( p + 1 ) + Sj.row( p );

solver->implicitSolve( true, p, t, dt, qold, rhs, f, result );

Expand All @@ -167,7 +167,7 @@ namespace sdc
// Only compute row k-2 of matrix Qj for efficiency
computeResidual( qmat, F, dt, qj );

residual = solStages.row( 0 ) + qj.row( 0 ) - solStages.row( k - 1 );
residual.noalias() = solStages.row( 0 ) + qj.row( 0 ) - solStages.row( k - 1 );

scalarList squaredNorm( Pstream::nProcs(), scalar( 0 ) );
squaredNorm[Pstream::myProcNo()] = residual.squaredNorm();
Expand Down Expand Up @@ -203,7 +203,7 @@ namespace sdc
computeResidual( qmat, F, dt, qj );
computeResidual( qmatEmbedded, Fembedded, dt, qjEmbedded );

errorEstimate = qj.row( 0 ) - qjEmbedded.row( 0 );
errorEstimate.noalias() = qj.row( 0 ) - qjEmbedded.row( 0 );

bool accepted = adaptiveTimeStepper->determineNewTimeStep( errorEstimate, result, dt, newTimeStep );

Expand Down

0 comments on commit bfdc6bb

Please sign in to comment.