|
Vlasiator ebf0dd394 on dev (v5.4.0 + 1054 commits)
|
#include <iostream>#include <limits>#include <stdint.h>#include <cmath>#include <list>#include <sstream>#include <dirent.h>#include <stdio.h>#include <unordered_set>#include <vlsv_reader.h>#include <vlsv_writer.h>#include <vlsv_amr.h>#include <boost/program_options.hpp>#include <Eigen/Dense>#include <phiprof.hpp>#include "vlsv_util.h"#include "vlsvreaderinterface.h"#include "vlsvextract.h"
Go to the source code of this file.
Functions | |
| uint64_t | convUInt (const char *ptr, const datatype::type &dataType, const uint64_t &dataSize) |
| bool | convertSlicedVelocityMesh (vlsvinterface::Reader &vlsvReader, const string &fname, const string &meshName, CellStructure &cellStruct, const std::string &popName) |
| void | applyTranslation (const Real *V_bulk, Real *transform) |
| void | applyRotation (const Real *B, Real *transform) |
| void | getBulkVelocity (Real *V_bulk, vlsvinterface::Reader &vlsvReader, const string &meshName, const string &popName, const uint64_t &cellID) |
| void | getB (Real *B, vlsvinterface::Reader &vlsvReader, const string &meshName, const uint64_t &cellID) |
| bool | convertVelocityBlocks2 (vlsvinterface::Reader &vlsvReader, const string &fname, const string &meshName, CellStructure &cellStruct, const uint64_t &cellID, const bool rotate, const bool plasmaFrame, vlsv::Writer &out, const std::string &popName) |
| template<class T> | |
| bool | createCellIdList (T &vlsvReader, unordered_set< uint64_t > &cellIdList) |
| bool | convertVelocityBlocks2 (vlsvinterface::Reader &vlsvReader, const string &fname, const string &meshName, CellStructure &cellStruct, const uint64_t &cellID, const bool rotate, const bool plasmaFrame) |
| void | getCellCoordinates (const CellStructure &cellStruct, const uint64_t cellId, Real *coordinates) |
| uint64_t | searchForBestCellId (const CellStructure &cellStruct, const uint64_t *cellIdList, const Real *coordinates, const uint64_t sizeOfCellIdList) |
| uint64_t | searchForBestCellId (const CellStructure &cellStruct, const unordered_set< uint64_t > &cellIdList, const std::array< Real, 3 > coordinates) |
| bool | setVelocityMeshVariables (vlsv::Reader &vlsvReader, CellStructure &cellStruct) |
| bool | setVelocityMeshVariables (vlsv::Reader &vlsvReader, CellStructure &cellStruct, const std::string &popName) |
| bool | setSpatialCellVariables (Reader &vlsvReader, CellStructure &cellStruct) |
| uint64_t | getCellIdFromCoords (const CellStructure &cellStruct, const unordered_set< uint64_t > cellIdList, const std::array< Real, 3 > coords) |
| void | printUsageMessage () |
| bool | retrieveOptions (const int argn, char *args[], UserOptions &mainOptions) |
| void | setCoordinatesAlongALine (const CellStructure &cellStruct, const std::array< Real, 3 > &start, const std::array< Real, 3 > &end, uint32_t numberOfCoordinates, std::vector< std::array< Real, 3 > > &outputCoordinates) |
| template<class T> | |
| void | extractDistribution (const string &fileName, const UserOptions &mainOptions) |
| int | main (int argn, char *args[]) |
Variables | |
| static bool | runDebug = false |
Definition at line 372 of file vlsvextract.cpp.


| bool convertSlicedVelocityMesh | ( | vlsvinterface::Reader & | vlsvReader, |
| const string & | fname, | ||
| const string & | meshName, | ||
| CellStructure & | cellStruct, | ||
| const std::string & | popName ) |
| bool convertVelocityBlocks2 | ( | vlsvinterface::Reader & | vlsvReader, |
| const string & | fname, | ||
| const string & | meshName, | ||
| CellStructure & | cellStruct, | ||
| const uint64_t & | cellID, | ||
| const bool | rotate, | ||
| const bool | plasmaFrame ) |
Driver function for convertVelocityBlocks. Reads the names of existing particle species and calls convertVelocityBlocks2 for each of them.
| vlsvReader | VLSV file reader that has input file open. |
| fname | Name of the input file. |
| meshName | Name of the spatial mesh. |
| cellStruct | Struct containing mesh metadata. |
| cellID | ID of the spatial cell whose distribution function(s) are to be extracted. |
| rotate | If true, distribution function(s) are rotated so that the magnetic field points along +vz axis. |
| plasmaFrame | If true, distribution function(s) are translated to local plasma rest frame. |
Definition at line 1058 of file vlsvextract.cpp.

| bool convertVelocityBlocks2 | ( | vlsvinterface::Reader & | vlsvReader, |
| const string & | fname, | ||
| const string & | meshName, | ||
| CellStructure & | cellStruct, | ||
| const uint64_t & | cellID, | ||
| const bool | rotate, | ||
| const bool | plasmaFrame, | ||
| vlsv::Writer & | out, | ||
| const std::string & | popName ) |
Definition at line 727 of file vlsvextract.cpp.


| uint64_t convUInt | ( | const char * | ptr, |
| const datatype::type & | dataType, | ||
| const uint64_t & | dataSize ) |
Definition at line 84 of file vlsvextract.cpp.
| bool createCellIdList | ( | T & | vlsvReader, |
| unordered_set< uint64_t > & | cellIdList ) |
| void extractDistribution | ( | const string & | fileName, |
| const UserOptions & | mainOptions ) |
Definition at line 1805 of file vlsvextract.cpp.


| void getB | ( | Real * | B, |
| vlsvinterface::Reader & | vlsvReader, | ||
| const string & | meshName, | ||
| const uint64_t & | cellID ) |
| void getBulkVelocity | ( | Real * | V_bulk, |
| vlsvinterface::Reader & | vlsvReader, | ||
| const string & | meshName, | ||
| const string & | popName, | ||
| const uint64_t & | cellID ) |
| void getCellCoordinates | ( | const CellStructure & | cellStruct, |
| const uint64_t | cellId, | ||
| Real * | coordinates ) |
| uint64_t getCellIdFromCoords | ( | const CellStructure & | cellStruct, |
| const unordered_set< uint64_t > | cellIdList, | ||
| const std::array< Real, 3 > | coords ) |
Definition at line 1465 of file vlsvextract.cpp.


| int main | ( | int | argn, |
| char * | args[] ) |
| void printUsageMessage | ( | ) |
| bool retrieveOptions | ( | const int | argn, |
| char * | args[], | ||
| UserOptions & | mainOptions ) |
| uint64_t searchForBestCellId | ( | const CellStructure & | cellStruct, |
| const uint64_t * | cellIdList, | ||
| const Real * | coordinates, | ||
| const uint64_t | sizeOfCellIdList ) |
Definition at line 1142 of file vlsvextract.cpp.


| uint64_t searchForBestCellId | ( | const CellStructure & | cellStruct, |
| const unordered_set< uint64_t > & | cellIdList, | ||
| const std::array< Real, 3 > | coordinates ) |
| void setCoordinatesAlongALine | ( | const CellStructure & | cellStruct, |
| const std::array< Real, 3 > & | start, | ||
| const std::array< Real, 3 > & | end, | ||
| uint32_t | numberOfCoordinates, | ||
| std::vector< std::array< Real, 3 > > & | outputCoordinates ) |
Definition at line 1734 of file vlsvextract.cpp.


| bool setSpatialCellVariables | ( | Reader & | vlsvReader, |
| CellStructure & | cellStruct ) |
Set correct spatial mesh variables to cellStruct. This function leaves the velocity mesh-related variables untouched.
| vlsvReader | VLSV file reader with input file open. |
| cellStruct | Struct where spatial mesh variables are written. |
Definition at line 1396 of file vlsvextract.cpp.

| bool setVelocityMeshVariables | ( | vlsv::Reader & | vlsvReader, |
| CellStructure & | cellStruct ) |
Read velocity mesh metadata from older Vlasiator VLSV files.
| vlsvReader | VLSV reader that has input file open. |
| cellStruct | Struct where read metadata is written. |
Definition at line 1228 of file vlsvextract.cpp.

| bool setVelocityMeshVariables | ( | vlsv::Reader & | vlsvReader, |
| CellStructure & | cellStruct, | ||
| const std::string & | popName ) |
Read velocity mesh metadata for the given particle species.
| vlsvReader | VLSV reader that has input file open. |
| cellStruct | Struct where read metadata is written. |
| popName | Name of the particle species. |
Definition at line 1304 of file vlsvextract.cpp.
|
static |
Definition at line 52 of file vlsvextract.cpp.