|
Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
|
#include <cstddef>#include <cstdlib>#include <iostream>#include <iomanip>#include <cmath>#include <sstream>#include <ctime>#include <cstring>#include <array>#include <algorithm>#include <limits>#include <initializer_list>#include "object_wrapper.h"#include "datareduction/datareductionoperator.h"#include "iowrite.h"#include "vdf_compression/compression.h"#include "math.h"#include "grid.h"#include "phiprof.hpp"#include "parameters.h"#include "logger.h"#include "vlasovsolver/vlasovmover.h"#include "velocity_mesh_parameters.h"#include "sysboundary/ionosphere.h"#include "fieldtracing/fieldtracing.h"
Go to the source code of this file.
Functions | |
| bool | writeVelocityDistributionData (const uint popID, Writer &vlsvWriter, const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, MPI_Comm comm) |
| bool | writeVelocityDistributionDataAsterix (const uint popID, Writer &vlsvWriter, dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, std::vector< std::vector< char > > &mpl_bytes, MPI_Comm comm) |
| bool | updateLocalIds (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &local_cells, MPI_Comm comm) |
| bool | globalSuccess (bool success, const string &errorMessage, MPI_Comm comm) |
| bool | writeVelocityDistributionData (Writer &vlsvWriter, const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const vector< CellID > &cells, MPI_Comm comm) |
| bool | writeVelocityDistributionDataAsterix (Writer &vlsvWriter, dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const vector< CellID > &cells, std::vector< std::vector< char > > &mlp_bytes, MPI_Comm comm) |
| bool | writeVspaceDataCompressionNone (const uint popID, Writer &vlsvWriter, dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, std::size_t totalBlocks, MPI_Comm comm) |
| bool | writeDataReducer (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const std::vector< CellID > &cells, const FieldSolverData &fieldSolverData, const bool writeAsFloat, const bool writeFsGrid, DataReducer &dataReducer, cint dataReducerIndex, Writer &vlsvWriter) |
| bool | writeCommonGridData (Writer &vlsvWriter, const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const vector< uint64_t > &local_cells, const uint &fileIndex, MPI_Comm comm) |
| bool | writeGhostZoneDomainAndLocalIdNumbers (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, Writer &vlsvWriter, const string &meshName, const vector< uint64_t > &ghost_cells) |
| bool | writeDomainSizes (Writer &vlsvWriter, const string &meshName, const unsigned int &numberOfLocalZones, const unsigned int &numberOfGhostZones) |
| bool | writeDomainExtents (Writer &vlsvWriter, const string &meshName, const std::vector< CellID > &local_cells, const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid) |
| bool | writeZoneGlobalIdNumbers (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, Writer &vlsvWriter, const string &meshName, const vector< uint64_t > &local_cells, const vector< uint64_t > &ghost_cells) |
| bool | writeBoundingBoxNodeCoordinates (Writer &vlsvWriter, const string &meshName, const int masterRank, MPI_Comm comm) |
| bool | writeMeshBoundingBox (Writer &vlsvWriter, const string &meshName, const int masterRank, MPI_Comm comm) |
| bool | writeVersionInfo (const std::string &version, vlsv::Writer &vlsvWriter, MPI_Comm comm) |
| bool | writeConfigInfo (const std::string &config, vlsv::Writer &vlsvWriter, MPI_Comm comm) |
| bool | writeFsGridMetadata (FieldSolverGrid &fsgrid, fsgrids::consttechnicalspan technical, vlsv::Writer &vlsvWriter, bool writeIDs=false) |
| bool | writeIonosphereGridMetadata (vlsv::Writer &vlsvWriter) |
| bool | writeVelocitySpace (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, Writer &vlsvWriter, int index, const vector< uint64_t > &cells) |
| bool | checkForSameMembers (const vector< uint64_t > &local_cells, const vector< uint64_t > &ghost_cells) |
| bool | writeGrid (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const FieldSolverData &fieldSolverData, fsgrids::consttechnicalspan technical, const std::string &versionInfo, const std::string &configInfo, DataReducer *dataReducer, const uint &outputFileTypeIndex, const int &stripe, const bool writeGhosts, bool compress_vdfs) |
| Write out system into a vlsv file. | |
| bool | writeRestart (dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, const FieldSolverData &fieldSolverData, fsgrids::consttechnicalspan technical, const std::string &versionInfo, const std::string &configInfo, DataReducer &dataReducer, const string &name, const uint &fileIndex, const bool dateInFileName, const int &stripe, bool compress_vdfs) |
| Write out a restart of the simulation into a vlsv file. All block data in remote cells will be reset. | |
| bool | writeDiagnostic (const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > &mpiGrid, DataReducer &dataReducer) |
| Write out simulation diagnostics into diagnostic.txt. | |
Variables | |
| Logger | logFile |
| Logger | diagnostic |
| char * | IObuffer = 0 |
| bool checkForSameMembers | ( | const vector< uint64_t > & | local_cells, |
| const vector< uint64_t > & | ghost_cells ) |
This function makes sure that local cells and ghost cells do not have any identical members (used for error checking)
| local_cells | List of local cells within this process |
| ghost_cells | List of ghost cells within this process (cells on the process boundary) |
Definition at line 1800 of file iowrite.cpp.

| bool globalSuccess | ( | bool | success, |
| const string & | errorMessage, | ||
| MPI_Comm | comm ) |
Checks the success of write IO
| success | Parameter for determining whether the IO has been successful |
| errorMessage | The message to be shown if global success is false |
| comm | The MPI comm |
Definition at line 110 of file iowrite.cpp.


| bool updateLocalIds | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| const std::vector< CellID > & | local_cells, | ||
| MPI_Comm | comm ) |
Updates local ids across MPI to let other processes know in which order this process saves the local cell ids
| mpiGrid | Vlasiator's MPI grid |
| local_cells | local cells on in the current process (no ghost cells included) |
| comm | The MPi comm |
Definition at line 79 of file iowrite.cpp.


| bool writeBoundingBoxNodeCoordinates | ( | Writer & | vlsvWriter, |
| const string & | meshName, | ||
| const int | masterRank, | ||
| MPI_Comm | comm ) |
Writes the node coordinates. This means basically every cell's node (Corner of each cell). Note: The grid is a structured one, so writing the nodes means starting from the corner of the grid and writing coordinates per every cell length until reaching the other corner of the grid
| vlsvWriter | Some vlsv writer with a file open |
| meshName | Name of the mesh (SpatialGrid used in writeGrid and should be the default) |
| masterRank | The master rank (Vlasiator uses 0) |
| comm | The MPI comm |
Definition at line 1225 of file iowrite.cpp.

| bool writeCommonGridData | ( | Writer & | vlsvWriter, |
| const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, | ||
| const vector< uint64_t > & | local_cells, | ||
| const uint & | fileIndex, | ||
| MPI_Comm | comm ) |
Writes common grid data such as parameters (time steps, x_min, ..) as well as local cell ids as variables
| vlsvWriter | Some vlsv writer with a file open |
| mpiGrid | Vlasiator's grid |
| local_cells | The local cell ids in this process |
| fileIndex | File index, file will be called "name.index.vlsv" |
| comm | The MPI comm |
Definition at line 926 of file iowrite.cpp.

| bool writeConfigInfo | ( | const std::string & | config, |
| vlsv::Writer & | vlsvWriter, | ||
| MPI_Comm | comm ) |
| bool writeDataReducer | ( | const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| const std::vector< CellID > & | cells, | ||
| const FieldSolverData & | fieldSolverData, | ||
| const bool | writeAsFloat, | ||
| const bool | writeFsGrid, | ||
| DataReducer & | dataReducer, | ||
| cint | dataReducerIndex, | ||
| Writer & | vlsvWriter ) |
Writes info received from data reducer. This function writes out the variable arrays into the file
| mpiGrid | The Vlasiator's grid |
| cells | List of local cells (no ghost cells included) |
| writeAsFloat | If true, the data reducer writes variable arrays as float instead of double |
| dataReducer | The data reducer which contains the necessary functions for calculating variables |
| dataReducerIndex | Index in the data reducer (determines which variable to read) Note: size of the data reducer can be retrieved with dataReducer.size() |
| vlsvWriter | Some vlsv writer with a file open |
Definition at line 790 of file iowrite.cpp.


| bool writeDiagnostic | ( | const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| DataReducer & | dataReducer ) |
Write out simulation diagnostics into diagnostic.txt.
| mpiGrid | The DCCRG grid with spatial cells |
| dataReducer | Contains datareductionoperators that are used to compute diagnostic data |
Definition at line 2422 of file iowrite.cpp.


| bool writeDomainExtents | ( | Writer & | vlsvWriter, |
| const string & | meshName, | ||
| const std::vector< CellID > & | local_cells, | ||
| const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid ) |
Writes domain extents into the vlsv file, so a box that contains all the cells in this process
| vlsvWriter | Some vlsv writer with a file open |
| meshName | Name of the mesh (SpatialGrid used in the writeGrid function) |
| local_cells | Cells that are local to current process |
| mpiGrid | Vlaisator's MPI grid |
Definition at line 1080 of file iowrite.cpp.


| bool writeDomainSizes | ( | Writer & | vlsvWriter, |
| const string & | meshName, | ||
| const unsigned int & | numberOfLocalZones, | ||
| const unsigned int & | numberOfGhostZones ) |
Writes domain sizes into the vlsv file, so the number of ghost and local cell ids in this process
| vlsvWriter | Some vlsv writer with a file open |
| meshName | Name of the mesh (SpatialGrid used in the writeGrid function) |
| numberOfLocalZones | Number of local cells in this process |
| numberOfGhostZones | Number of ghost cells in this process ( Cells on the process boundary ) |
Definition at line 1050 of file iowrite.cpp.


| bool writeFsGridMetadata | ( | FieldSolverGrid & | fsgrid, |
| fsgrids::consttechnicalspan | technical, | ||
| vlsv::Writer & | vlsvWriter, | ||
| bool | writeIDs = false ) |
Writes the mesh metadata for Visit to read FSGrid variable data.
| fsgrid | An fsgrid instance used to extract metadata info. |
| vlsvWriter | file object to write into. |
Definition at line 1400 of file iowrite.cpp.

| bool writeGhostZoneDomainAndLocalIdNumbers | ( | const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| Writer & | vlsvWriter, | ||
| const string & | meshName, | ||
| const vector< uint64_t > & | ghost_cells ) |
Writes ghost cell ids into the file
| mpiGrid | Vlasiator's grid |
| vlsvWriter | Some vlsv writer with a file open |
| meshName | Name of the mesh (If unsure, put SpatialGrid) |
| ghost_cells | List of cell ids on the process boundary (Ghost cells) |
Definition at line 986 of file iowrite.cpp.


| bool writeGrid | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| const FieldSolverData & | fieldSolverData, | ||
| fsgrids::consttechnicalspan | technical, | ||
| const std::string & | versionInfo, | ||
| const std::string & | configInfo, | ||
| DataReducer * | dataReducer, | ||
| const uint & | outputFileTypeIndex, | ||
| const int & | stripe, | ||
| const bool | writeGhosts, | ||
| bool | compress_vdfs ) |
Write out system into a vlsv file.
| mpiGrid | The DCCRG grid with spatial cells |
| dataReducer | Contains datareductionoperators that are used to compute data that is added into file |
| index | Index to call the correct member of the various parameter vectors |
| writeGhosts | If true, writes out ghost cells (cells that exist on the process boundary so other process' cells) |
Definition at line 1829 of file iowrite.cpp.


| bool writeIonosphereGridMetadata | ( | vlsv::Writer & | vlsvWriter | ) |
Writes the mesh metadata for Visit to read the Ionosphere grid and its variables.
Definition at line 1496 of file iowrite.cpp.

| bool writeMeshBoundingBox | ( | Writer & | vlsvWriter, |
| const string & | meshName, | ||
| const int | masterRank, | ||
| MPI_Comm | comm ) |
Function for writing the bounding box. This writes only if the process running it is the master rank. This array contains info on the boundaries of the grid so for example the number of cells in x, y, z direction. Note that this is not the physical coordinate bounding box, but the computational domain bounding box, measured in blocks and cells.
| vlsvWriter | Some vlsv writer with a file open |
| meshName | Name of the mesh to write ("SpatialGrid" is used in writeGrid and it should be the default) |
| masterRank | The master process' id. Vlasiator uses 0 as the master process id, so by default should be 0 |
| comm | MPI comm |
Definition at line 1311 of file iowrite.cpp.

| bool writeRestart | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| const FieldSolverData & | fieldSolverData, | ||
| fsgrids::consttechnicalspan | technical, | ||
| const std::string & | versionInfo, | ||
| const std::string & | configInfo, | ||
| DataReducer & | dataReducer, | ||
| const string & | name, | ||
| const uint & | fileIndex, | ||
| const bool | dateInFileName, | ||
| const int & | stripe, | ||
| bool | compress_vdfs ) |
Write out a restart of the simulation into a vlsv file. All block data in remote cells will be reset.
| mpiGrid | The DCCRG grid with spatial cells |
| dataReducer | Contains datareductionoperators that are used to compute data that is added into file |
| name | File name prefix, file will be called "name.index.vlsv" |
| fileIndex | File index, file will be called "name.index.vlsv" |
Definition at line 2048 of file iowrite.cpp.


| bool writeVelocityDistributionData | ( | const uint | popID, |
| Writer & | vlsvWriter, | ||
| const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, | ||
| const std::vector< CellID > & | cells, | ||
| MPI_Comm | comm ) |
Writes the velocity distribution of specified population into the file.
| vlsvWriter | Some vlsv writer with a file open. |
| mpiGrid | Vlasiator's grid. |
| cells | Vector of local cells within this process (no ghost cells). |
| comm | The MPI communicator. |
Definition at line 161 of file iowrite.cpp.


| bool writeVelocityDistributionData | ( | Writer & | vlsvWriter, |
| const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, | ||
| const vector< CellID > & | cells, | ||
| MPI_Comm | comm ) |
Writes the velocity distribution into the file.
| vlsvWriter | Some vlsv writer with a file open. |
| mpiGrid | Vlasiator's grid. |
| cells | Vector of local cells within this process (no ghost cells). |
| comm | The MPI communicator. |
Definition at line 135 of file iowrite.cpp.

| bool writeVelocityDistributionDataAsterix | ( | const uint | popID, |
| Writer & | vlsvWriter, | ||
| dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, | ||
| const std::vector< CellID > & | cells, | ||
| std::vector< std::vector< char > > & | mpl_bytes, | ||
| MPI_Comm | comm ) |
Definition at line 634 of file iowrite.cpp.


| bool writeVelocityDistributionDataAsterix | ( | Writer & | vlsvWriter, |
| dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, | ||
| const vector< CellID > & | cells, | ||
| std::vector< std::vector< char > > & | mlp_bytes, | ||
| MPI_Comm | comm ) |
| bool writeVelocitySpace | ( | dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| Writer & | vlsvWriter, | ||
| int | index, | ||
| const vector< uint64_t > & | cells ) |
This function writes the velocity space.
| mpiGrid | Vlasiator's grid. |
| vlsvWriter | some vlsv writer with a file open. |
| index | Index to call the correct member of the various parameter vectors. |
| cells | Vector containing local cells of this process. |
Definition at line 1603 of file iowrite.cpp.


| bool writeVersionInfo | ( | const std::string & | version, |
| vlsv::Writer & | vlsvWriter, | ||
| MPI_Comm | comm ) |
| bool writeVspaceDataCompressionNone | ( | const uint | popID, |
| Writer & | vlsvWriter, | ||
| dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, | ||
| const std::vector< CellID > & | cells, | ||
| std::size_t | totalBlocks, | ||
| MPI_Comm | comm ) |
Definition at line 342 of file iowrite.cpp.


| bool writeZoneGlobalIdNumbers | ( | const dccrg::Dccrg< SpatialCell, dccrg::Cartesian_Geometry > & | mpiGrid, |
| Writer & | vlsvWriter, | ||
| const string & | meshName, | ||
| const vector< uint64_t > & | local_cells, | ||
| const vector< uint64_t > & | ghost_cells ) |
Writes the zone global id numbers into the file. The vlsv file needs to know in which order the local cells + ghost cells are written. Local cells are first appended to a vector called global ids, after which the ghost cells are appended. The global ids vector will then be saved into a vlsv file
| mpiGrid | Vlasiator's MPI grid |
| vlsvWriter | Some vlsv writer with a file open |
| meshName | Name of the mesh ("SpatialGrid" used in the writeGrid function and it should be the default) |
| local_cells | Vector containing the local cells of this process |
| ghost_cells | Vector containing the ghost cells of this process ( The cells on process boundary ) |
Definition at line 1141 of file iowrite.cpp.

| Logger diagnostic |
Definition at line 59 of file iowrite.cpp.
| char* IObuffer = 0 |
Definition at line 61 of file iowrite.cpp.