|
Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
|
#include "definitions.h"#include "spatial_cells/spatial_cell_wrapper.hpp"#include "spatial_cells/block_adjust_wrapper.hpp"#include <dccrg.hpp>#include <dccrg_cartesian_geometry.hpp>#include "fsgrid.hpp"#include "sysboundary/sysboundary.h"#include "projects/project.h"#include <string>

Go to the source code of this file.
Classes | |
| struct | FieldSolverData |
Functions | |
| void | initializeGrids (int argn, char **argc, dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrid::FsData< std::array< Real, fsgrids::bfield::N_BFIELD > > &perb, fsgrid::FsData< std::array< Real, fsgrids::bgbfield::N_BGB > > &bgb, fsgrid::FsData< std::array< Real, fsgrids::moments::N_MOMENTS > > &moments, fsgrid::FsData< std::array< Real, fsgrids::moments::N_MOMENTS > > &momentsdt2, fsgrid::FsData< std::array< Real, fsgrids::dmoments::N_DMOMENTS > > &dmoments, fsgrid::FsData< std::array< Real, fsgrids::efield::N_EFIELD > > &e, fsgrid::FsData< std::array< Real, fsgrids::egradpe::N_EGRADPE > > &egradpe, fsgrid::FsData< std::array< Real, fsgrids::volfields::N_VOL > > &vol, fsgrid::FsData< fsgrids::technical > &technical, FieldSolverGrid &fsgrid, SysBoundary &sysBoundaries, Project &project) |
| Initialize DCCRG and fsgrids. | |
| void | balanceLoad (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, SysBoundary &sysBoundaries, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, bool doTranslationLists=true) |
| Balance load. | |
| void | prepareAMRLists (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) |
| void | updateRemoteVelocityBlockLists (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const uint popID, const uint neighborhood=Neighborhoods::DIST_FUNC) |
| void | deallocateRemoteCellBlocks (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) |
| bool | adjustVelocityBlocks (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cellsToAdjust, bool doPrepareToReceiveBlocks, const uint popID) |
| void | shrink_to_fit_grid_data (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) |
| void | setFaceNeighborRanks (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) |
| void | mapRefinement (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid) |
| bool | adaptRefinement (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, SysBoundary &sysBoundaries, Project &project, int useStatic=-1) |
| void | recalculateLocalCellsCache (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) |
| bool adaptRefinement | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| fsgrids::technicalspan | technical, | ||
| FieldSolverGrid & | fsgrid, | ||
| SysBoundary & | sysBoundaries, | ||
| Project & | project, | ||
| int | useStatic = -1 ) |
Refine spatial cells and update necessary information
| mpiGrid | Spatial grid |
| fsgrid | Technical grid |
| sysBoundaries | System boundaries |
| project | Project used |
| useStatic | Used for forcing static refinement on restart. Negative values use adaptive refinement, non-negative values correspond to static refinement pass in Project::forceRefinement |
Definition at line 1337 of file grid.cpp.


| bool adjustVelocityBlocks | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| const std::vector< CellID > & | cellsToAdjust, | ||
| bool | doPrepareToReceiveBlocks, | ||
| const uint | popID ) |
Adjust sparse velocity space to make it consistent in all 6 dimensions
1) Compute which blocks have content (done for all cells in mpiGrid) 2) Adjust local velocity blocks. That is, make sure blocks exist which have content, or have neighbors with content in all 6-dimensions. This is done for cells in cellsToAdjust list. 3) Make sure remote cells are up-to-date and ready to receive data, if doPrepareToReceiveBlocks is true.
Note that block existence does not use vlasov stencil as it is important to also include diagonals to avoid massloss
| mpiGrid | Parallel grid with spatial cells |
| cellsToAdjust | List of cells that are adjusted, that is cells which blocks are added or removed. |
| doPrepareToReceiveBlocks | If true, then remote cells are set up so that velocity space data can be received. Global operation, value has to be the same for all processes. |
| void balanceLoad | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| SysBoundary & | sysBoundaries, | ||
| fsgrids::technicalspan | technical, | ||
| FieldSolverGrid & | fsgrid, | ||
| bool | doTranslationLists = true ) |
| void deallocateRemoteCellBlocks | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid | ) |
Deallocates all blocks in remote cells in order to save memory.
| mpiGrid | Spatial grid |
Deallocates all block data in remote cells in order to save memory
| mpiGrid | Spatial grid |
Definition at line 902 of file grid.cpp.


| void initializeGrids | ( | int | argn, |
| char ** | argc, | ||
| dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, | ||
| fsgrid::FsData< std::array< Real, fsgrids::bfield::N_BFIELD > > & | perb, | ||
| fsgrid::FsData< std::array< Real, fsgrids::bgbfield::N_BGB > > & | bgb, | ||
| fsgrid::FsData< std::array< Real, fsgrids::moments::N_MOMENTS > > & | moments, | ||
| fsgrid::FsData< std::array< Real, fsgrids::moments::N_MOMENTS > > & | momentsdt2, | ||
| fsgrid::FsData< std::array< Real, fsgrids::dmoments::N_DMOMENTS > > & | dmoments, | ||
| fsgrid::FsData< std::array< Real, fsgrids::efield::N_EFIELD > > & | e, | ||
| fsgrid::FsData< std::array< Real, fsgrids::egradpe::N_EGRADPE > > & | egradpe, | ||
| fsgrid::FsData< std::array< Real, fsgrids::volfields::N_VOL > > & | vol, | ||
| fsgrid::FsData< fsgrids::technical > & | technical, | ||
| FieldSolverGrid & | fsgrid, | ||
| SysBoundary & | sysBoundaries, | ||
| Project & | project ) |
| void mapRefinement | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| fsgrids::technicalspan | technical, | ||
| FieldSolverGrid & | fsgrid ) |
| void prepareAMRLists | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid | ) |
| void recalculateLocalCellsCache | ( | const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid | ) |
| void setFaceNeighborRanks | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid | ) |
| void shrink_to_fit_grid_data | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid | ) |
| void updateRemoteVelocityBlockLists | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| const uint | popID, | ||
| const uint | neighborhood = Neighborhoods::DIST_FUNC ) |
Updates velocity block lists between remote neighbors and prepares local copies of remote neighbors to receive velocity block data. This is needed if one has locally adjusted velocity blocks
| mpiGrid | The DCCRG grid with spatial cells |
Definition at line 919 of file grid.cpp.

