Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
Loading...
Searching...
No Matches
cpu_trans_pencils.cpp File Reference
#include "../grid.h"
#include "cpu_trans_pencils.hpp"
#include "../logger.h"
Include dependency graph for cpu_trans_pencils.cpp:

Go to the source code of this file.

Functions

bool do_translate_cell (const SpatialCell *const SC)
bool check_is_active (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, CellID cid, int dimension)
bool check_is_written_to (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID cid, const int dimension)
int getNeighborhood (const uint dimension, const uint stencil)
void findNeighborhoodCells (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const CellID startingCellID, const uint dimension, const uint searchLength, std::vector< CellID > &foundCells)
void prepareGhostTranslationCellLists (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const vector< CellID > &localPropagatedCells)
void computeSpatialSourceCellsForPencil (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, CellID *ids, const uint L, const uint dimension, std::vector< uint > path, Realf *sourceDZ, Realf *targetRatios)
CellID selectPositiveNeighbor (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &grid, const CellID id, const int dimension=0, const uint path=0)
void buildPencilsWithNeighbors (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &grid, setOfPencils &pencils, const CellID seedId, vector< CellID > ids, const uint dimension, vector< uint > path, const vector< CellID > &endIds)
void getSeedIds (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const vector< CellID > &propagatedCells, const uint dimension, vector< CellID > &seedIds)
void check_ghost_cells (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, setOfPencils &pencils, const uint dimension)
void printPencilsFunc (const setOfPencils &pencils, const uint dimension, const int myRank, const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid)
void prepareSeedIdsAndPencils (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid)
void prepareSeedIdsAndPencils (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const uint dimension)

Variables

Logger logFile
std::unordered_set< CellIDghostTranslate_sources_x
std::unordered_set< CellIDghostTranslate_sources_y
std::unordered_set< CellIDghostTranslate_sources_z
std::unordered_set< CellIDghostTranslate_active_x
std::unordered_set< CellIDghostTranslate_active_y
std::unordered_set< CellIDghostTranslate_active_z
std::array< setOfPencils, 3 > DimensionPencils

Function Documentation

◆ buildPencilsWithNeighbors()

void buildPencilsWithNeighbors ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & grid,
setOfPencils & pencils,
const CellID seedId,
vector< CellID > ids,
const uint dimension,
vector< uint > path,
const vector< CellID > & endIds )

Definition at line 719 of file cpu_trans_pencils.cpp.

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

◆ check_ghost_cells()

void check_ghost_cells ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
setOfPencils & pencils,
const uint dimension )

Definition at line 1083 of file cpu_trans_pencils.cpp.

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

◆ check_is_active()

bool check_is_active ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
CellID cid,
int dimension )

Definition at line 35 of file cpu_trans_pencils.cpp.

Here is the caller graph for this function:

◆ check_is_written_to()

bool check_is_written_to ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const CellID cid,
const int dimension )

Definition at line 66 of file cpu_trans_pencils.cpp.

Here is the caller graph for this function:

◆ computeSpatialSourceCellsForPencil()

void computeSpatialSourceCellsForPencil ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
CellID * ids,
const uint L,
const uint dimension,
std::vector< uint > path,
Realf * sourceDZ,
Realf * targetRatios )

Definition at line 447 of file cpu_trans_pencils.cpp.

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

◆ do_translate_cell()

bool do_translate_cell ( const SpatialCell *const SC)

Definition at line 26 of file cpu_trans_pencils.cpp.

Here is the caller graph for this function:

◆ findNeighborhoodCells()

void findNeighborhoodCells ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const CellID startingCellID,
const uint dimension,
const uint searchLength,
std::vector< CellID > & foundCells )

Helper function for locating unique, valid, and translated cells in a given direction

Definition at line 154 of file cpu_trans_pencils.cpp.

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

◆ getNeighborhood()

int getNeighborhood ( const uint dimension,
const uint stencil )

Definition at line 106 of file cpu_trans_pencils.cpp.

Here is the caller graph for this function:

◆ getSeedIds()

void getSeedIds ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const vector< CellID > & propagatedCells,
const uint dimension,
vector< CellID > & seedIds )

Definition at line 920 of file cpu_trans_pencils.cpp.

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

◆ prepareGhostTranslationCellLists()

void prepareGhostTranslationCellLists ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const vector< CellID > & localPropagatedCells )

Translation order (dimensions) is 1: z 2: x 3: y Prepare in reverse order First: y-direction

Now use y-translation source cells as starting points and evaluate x-direction

Now use x-translation source cells as starting points and evaluate z-direction

Definition at line 183 of file cpu_trans_pencils.cpp.

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

◆ prepareSeedIdsAndPencils() [1/2]

void prepareSeedIdsAndPencils ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid)

Definition at line 1340 of file cpu_trans_pencils.cpp.

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

◆ prepareSeedIdsAndPencils() [2/2]

void prepareSeedIdsAndPencils ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid,
const uint dimension )

Definition at line 1357 of file cpu_trans_pencils.cpp.

Here is the call graph for this function:

◆ printPencilsFunc()

void printPencilsFunc ( const setOfPencils & pencils,
const uint dimension,
const int myRank,
const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & mpiGrid )

Definition at line 1228 of file cpu_trans_pencils.cpp.

Here is the caller graph for this function:

◆ selectPositiveNeighbor()

CellID selectPositiveNeighbor ( const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & grid,
const CellID id,
const int dimension = 0,
const uint path = 0 )

Definition at line 663 of file cpu_trans_pencils.cpp.

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

Variable Documentation

◆ DimensionPencils

std::array<setOfPencils,3> DimensionPencils

Definition at line 23 of file cpu_trans_pencils.cpp.

◆ ghostTranslate_active_x

std::unordered_set<CellID> ghostTranslate_active_x

Definition at line 19 of file cpu_trans_pencils.cpp.

◆ ghostTranslate_active_y

std::unordered_set<CellID> ghostTranslate_active_y

Definition at line 20 of file cpu_trans_pencils.cpp.

◆ ghostTranslate_active_z

std::unordered_set<CellID> ghostTranslate_active_z

Definition at line 21 of file cpu_trans_pencils.cpp.

◆ ghostTranslate_sources_x

std::unordered_set<CellID> ghostTranslate_sources_x

Definition at line 16 of file cpu_trans_pencils.cpp.

◆ ghostTranslate_sources_y

std::unordered_set<CellID> ghostTranslate_sources_y

Definition at line 17 of file cpu_trans_pencils.cpp.

◆ ghostTranslate_sources_z

std::unordered_set<CellID> ghostTranslate_sources_z

Definition at line 18 of file cpu_trans_pencils.cpp.

◆ logFile

Logger logFile
extern

Definition at line 25 of file main.cpp.