File tree Expand file tree Collapse file tree
tests/integrated/test-snb Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,20 +209,18 @@ int main(int argc, char** argv) {
209209 // Change the mesh spacing and cell volume (Jdy)
210210 Coordinates* coord = Te.getCoordinates ();
211211
212- {
213- auto dy = emptyFrom (coord->dx ());
214- auto J = emptyFrom (coord->J ());
215- for (int x = mesh->xstart ; x <= mesh->xend ; x++) {
216- for (int y = mesh->ystart ; y <= mesh->yend ; y++) {
217- const double y_n = (double (y) + 0.5 ) / double (mesh->yend + 1 );
218-
219- dy (x, y) = 1 . - 0.9 * y_n;
220- J (x, y) = 1 . + y_n * y_n;
221- }
212+ auto dy_copy = coord->dy ();
213+ auto J_copy = coord->J ();
214+ for (int x = mesh->xstart ; x <= mesh->xend ; x++) {
215+ for (int y = mesh->ystart ; y <= mesh->yend ; y++) {
216+ const double y_n = (double (y) + 0.5 ) / double (mesh->yend + 1 );
217+
218+ dy_copy (x, y) = 1 . - 0.9 * y_n;
219+ J_copy (x, y) = 1 . + y_n * y_n;
222220 }
223- coord->setDy (dy);
224- coord->setJ (J);
225221 }
222+ coord->setDy (dy_copy);
223+ coord->setJ (J_copy);
226224
227225 HeatFluxSNB snb;
228226
You can’t perform that action at this time.
0 commit comments