Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
gridGlue.hpp File Reference
#include "../definitions.h"
#include <fsgrid.hpp>
#include <vector>
#include <array>
#include <map>
#include <set>
Include dependency graph for gridGlue.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  FieldsToCommunicate {
  PERBXVOL , PERBYVOL , PERBZVOL , dPERBXVOLdx ,
  dPERBXVOLdy , dPERBXVOLdz , dPERBYVOLdx , dPERBYVOLdy ,
  dPERBYVOLdz , dPERBZVOLdx , dPERBZVOLdy , dPERBZVOLdz ,
  BGBXVOL , BGBYVOL , BGBZVOL , EXGRADPE ,
  EYGRADPE , EZGRADPE , EXVOL , EYVOL ,
  EZVOL , CURVATUREX , CURVATUREY , CURVATUREZ ,
  dVxdx , dVxdy , dVxdz , dVydx ,
  dVydy , dVydz , dVzdx , dVzdy ,
  dVzdz , N_FIELDSTOCOMMUNICATE
}

Functions

std::vector< CellIDmapDccrgIdToFsGridGlobalID (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, CellID dccrgID)
void feedMomentsIntoFsGrid (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, fsgrid::FsData< std::array< Real, fsgrids::moments::N_MOMENTS > > &moments, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, bool dt2=false)
void getFieldsFromFsGrid (fsgrids::constvolspan volumefields, fsgrids::constbgbspan bgb, fsgrids::constegradpespan egradpe, fsgrids::constdmomentsspan dmoments, fsgrids::consttechnicalspan technical, FieldSolverGrid &fsgrid, dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells)
void getBgFieldsAndDerivativesFromFsGrid (fsgrid::FsData< std::array< Real, fsgrids::bgbfield::N_BGB > > &bgb, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid, dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells)
int getNumberOfCellsOnMaxRefLvl (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells)
void feedBoundaryIntoFsGrid (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, fsgrids::technicalspan technical, FieldSolverGrid &fsgrid)
template<int STENCIL>
void computeCoupling (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, fsgrid::FsGrid< STENCIL > &fsgrid, fsgrids::technicalspan technical)

Variables

std::map< int, std::set< CellID > > onDccrgMapRemoteProcessGlobal
std::map< int, std::set< CellID > > onFsgridMapRemoteProcessGlobal
std::map< CellID, std::vector< int64_t > > onFsgridMapCellsGlobal

Enumeration Type Documentation

◆ FieldsToCommunicate

Enumerator
PERBXVOL 
PERBYVOL 
PERBZVOL 
dPERBXVOLdx 
dPERBXVOLdy 
dPERBXVOLdz 
dPERBYVOLdx 
dPERBYVOLdy 
dPERBYVOLdz 
dPERBZVOLdx 
dPERBZVOLdy 
dPERBZVOLdz 
BGBXVOL 
BGBYVOL 
BGBZVOL 
EXGRADPE 
EYGRADPE 
EZGRADPE 
EXVOL 
EYVOL 
EZVOL 
CURVATUREX 
CURVATUREY 
CURVATUREZ 
dVxdx 
dVxdy 
dVxdz 
dVydx 
dVydy 
dVydz 
dVzdx 
dVzdy 
dVzdz 
N_FIELDSTOCOMMUNICATE 

Definition at line 14 of file gridGlue.hpp.

Function Documentation

◆ computeCoupling()

template<int STENCIL>
void computeCoupling ( dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const std::vector< CellID > & cells,
fsgrid::FsGrid< STENCIL > & fsgrid,
fsgrids::technicalspan technical )

Definition at line 122 of file gridGlue.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ feedBoundaryIntoFsGrid()

void feedBoundaryIntoFsGrid ( dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const std::vector< CellID > & cells,
fsgrids::technicalspan technical,
FieldSolverGrid & fsgrid )

◆ feedMomentsIntoFsGrid()

void feedMomentsIntoFsGrid ( dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const std::vector< CellID > & cells,
fsgrid::FsData< std::array< Real, fsgrids::moments::N_MOMENTS > > & moments,
fsgrids::technicalspan technical,
FieldSolverGrid & fsgrid,
bool dt2 = false )

Take input moments from DCCRG grid and put them into the Fieldsolver grid

Parameters
mpiGridThe DCCRG grid carrying rho, rhoV and P
cellsList of local cells
momentsfsgrid for moments quantities
technicalfsgrid with technical parameters
fsgridfsgrid container
dt2Whether to copy base moments, or _DT2 moments

This function assumes that proper grid coupling has been set up.

◆ getBgFieldsAndDerivativesFromFsGrid()

void getBgFieldsAndDerivativesFromFsGrid ( fsgrid::FsData< std::array< Real, fsgrids::bgbfield::N_BGB > > & bgb,
fsgrids::technicalspan technical,
FieldSolverGrid & fsgrid,
dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const std::vector< CellID > & cells )

Copy background B fields and store them into DCCRG

Parameters
bgbfsgrid for background magnetic field
technicalfsgrid with technical parameters
fsgridfsgrids container
mpiGridThe DCCRG grid
cellsList of local DCCRG cells

This function assumes that proper grid coupling has been set up.

◆ getFieldsFromFsGrid()

void getFieldsFromFsGrid ( fsgrids::constvolspan volumefields,
fsgrids::constbgbspan bgb,
fsgrids::constegradpespan egradpe,
fsgrids::constdmomentsspan dmoments,
fsgrids::consttechnicalspan technical,
FieldSolverGrid & fsgrid,
dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const std::vector< CellID > & cells )

Copy field solver result (VOLB, VOLE, VOLPERB derivatives, gradpe) and store them back into DCCRG

Parameters
volumefieldsfsgrid for volume-averaged fields
bgbfsgrid for background magnetic field
egradpefsgrid for grad(Pe) component of electric field
dmomentsfsgrid for moments derivatives
technicalfsgrid with technical parameters
fsgridfsgrids container
mpiGridThe DCCRG grid
cellsList of local DCCRG cells

This function assumes that proper grid coupling has been set up.

◆ getNumberOfCellsOnMaxRefLvl()

int getNumberOfCellsOnMaxRefLvl ( dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const std::vector< CellID > & cells )

◆ mapDccrgIdToFsGridGlobalID()

std::vector< CellID > mapDccrgIdToFsGridGlobalID ( dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
CellID dccrgID )
Here is the caller graph for this function:

Variable Documentation

◆ onDccrgMapRemoteProcessGlobal

std::map<int, std::set<CellID> > onDccrgMapRemoteProcessGlobal
extern

Definition at line 11 of file gridGlue.cpp.

◆ onFsgridMapCellsGlobal

std::map<CellID, std::vector<int64_t> > onFsgridMapCellsGlobal
extern

Definition at line 13 of file gridGlue.cpp.

◆ onFsgridMapRemoteProcessGlobal

std::map<int, std::set<CellID> > onFsgridMapRemoteProcessGlobal
extern

Definition at line 12 of file gridGlue.cpp.