|
27 | 27 | // near the equator.
|
28 | 28 | // -----------------------------------------------------------------------------
|
29 | 29 |
|
| 30 | + |
| 31 | +// ----------------------------------------------------------------------------- |
| 32 | +// This is the main exchange messages for the neutrals. |
| 33 | +// We are exchanging densities, temperatures, and velocities |
| 34 | +// ----------------------------------------------------------------------------- |
| 35 | + |
| 36 | + |
| 37 | +bool Neutrals::exchange_old(Grid &grid) { |
| 38 | + |
| 39 | + std::string function = "Neutrals::exchange"; |
| 40 | + static int iFunction = -1; |
| 41 | + report.enter(function, iFunction); |
| 42 | + |
| 43 | + bool DidWork = true; |
| 44 | + int64_t nGCs = grid.get_nGCs(); |
| 45 | + |
| 46 | + for (int iSpecies = 0; iSpecies < nSpecies; iSpecies++) { |
| 47 | + if (species[iSpecies].DoAdvect) |
| 48 | + DidWork = exchange_one_var(grid, species[iSpecies].density_scgc, false); |
| 49 | + } |
| 50 | + |
| 51 | + DidWork = exchange_one_var(grid, temperature_scgc, false); |
| 52 | + |
| 53 | + // velocity components: |
| 54 | + // reverse east across the pole: |
| 55 | + DidWork = exchange_one_var(grid, velocity_vcgc[0], true); |
| 56 | + // reverse north across the pole: |
| 57 | + DidWork = exchange_one_var(grid, velocity_vcgc[1], true); |
| 58 | + // don't reverse vertical across the pole: |
| 59 | + DidWork = exchange_one_var(grid, velocity_vcgc[2], false); |
| 60 | + |
| 61 | + report.exit(function); |
| 62 | + return DidWork; |
| 63 | +} |
| 64 | + |
| 65 | + |
| 66 | + |
30 | 67 | // -----------------------------------------------------------------------------
|
31 | 68 | // Pack variables for message passing
|
32 | 69 | // value is variable to pack
|
@@ -473,38 +510,6 @@ Grid::messages_struct Grid::make_new_interconnection(int64_t iDir,
|
473 | 510 | return new_inter;
|
474 | 511 | }
|
475 | 512 |
|
476 |
| -// ----------------------------------------------------------------------------- |
477 |
| -// |
478 |
| -// ----------------------------------------------------------------------------- |
479 |
| - |
480 |
| - |
481 |
| -bool Neutrals::exchange_old(Grid &grid) { |
482 |
| - |
483 |
| - std::string function = "Neutrals::exchange"; |
484 |
| - static int iFunction = -1; |
485 |
| - report.enter(function, iFunction); |
486 |
| - |
487 |
| - bool DidWork = true; |
488 |
| - |
489 |
| - for (int iSpecies = 0; iSpecies < nSpecies; iSpecies++) { |
490 |
| - if (species[iSpecies].DoAdvect) |
491 |
| - DidWork = exchange_one_var(grid, species[iSpecies].density_scgc, false); |
492 |
| - } |
493 |
| - |
494 |
| - DidWork = exchange_one_var(grid, temperature_scgc, false); |
495 |
| - |
496 |
| - // velocity components: |
497 |
| - // reverse east across the pole: |
498 |
| - DidWork = exchange_one_var(grid, velocity_vcgc[0], true); |
499 |
| - // reverse north across the pole: |
500 |
| - DidWork = exchange_one_var(grid, velocity_vcgc[1], true); |
501 |
| - // don't reverse vertical across the pole: |
502 |
| - DidWork = exchange_one_var(grid, velocity_vcgc[2], false); |
503 |
| - |
504 |
| - report.exit(function); |
505 |
| - return DidWork; |
506 |
| -} |
507 |
| - |
508 | 513 |
|
509 | 514 | /*
|
510 | 515 | // -----------------------------------------------------------------------------
|
@@ -994,6 +999,9 @@ bool exchange_one_var(Grid &grid,
|
994 | 999 | var_to_pass = var_scgc;
|
995 | 1000 | }
|
996 | 1001 |
|
| 1002 | + // Now we fill in the corners so that we don't have zero values there: |
| 1003 | + fill_corners(var_to_pass, nG); |
| 1004 | + |
997 | 1005 | report.exit(function);
|
998 | 1006 | return DidWork;
|
999 | 1007 | }
|
|
0 commit comments