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

Commit bfdc6bb

Browse files
author
David Blom
committed
further optimizing sdc code
1 parent ad41164 commit bfdc6bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fsi/SDC.C

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ namespace sdc
151151
qold = solStages.row( p );
152152

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)