32#include "../../../include/toolboxes/SwapBytes.hpp"
85 static int FileSeek64(FILE* file, int64_t offset,
int whence);
101 template <
typename T>
104 auto ret = fread(data,
sizeof(T), nItems,
mesh_file);
121 void ReadMetadataZone(
bool storeMetadata);
Header file for the class CSU2MeshReaderBase. The implementations are in the CSU2MeshReaderBase....
void SwapBytes(char *buffer, size_t nBytes, unsigned long nVar)
Change storage of buffer to/from big endian from/to little endian.
Definition SwapBytes.cpp:32
static void Error(const std::string &ErrorMsg, const std::string &FunctionName)
Definition mpi_structure.cpp:131
Main class for defining the problem; basically this class reads the configuration file,...
Definition CConfig.hpp:64
const CConfig * config
Local pointer to the config parameter object.
Definition CMeshReaderBase.hpp:49
Base class for the reading of a native SU2 binary grid.
Definition CSU2BinaryMeshReaderBase.hpp:39
bool swap_bytes
Whether or not byte swapping must be used.
Definition CSU2BinaryMeshReaderBase.hpp:45
virtual void ReadSurfaceElementConnectivity()
Reads the surface (boundary) elements from the SU2 zone.
Definition CSU2BinaryMeshReaderBase.cpp:345
virtual void ReadPointCoordinates()
Reads the grid points from an SU2 zone into linear partitions across all ranks.
Definition CSU2BinaryMeshReaderBase.cpp:108
void ReadConnectivityType()
Reads the connectivity type used in the binary file and check if byte swapping must be applied.
Definition CSU2BinaryMeshReaderBase.cpp:56
void ReadMetadata(CConfig *config)
Reads all SU2 binary mesh metadata and checks for errors.
Definition CSU2BinaryMeshReaderBase.cpp:73
void FastForwardToMyZone()
Helper function to find the current zone in an SU2 binary mesh object.
Definition CSU2BinaryMeshReaderBase.cpp:426
uint64_t ReadBinaryNEntities()
Function to read one entity of the connectivity type from the binary file.
Definition CSU2BinaryMeshReaderBase.cpp:442
~CSU2BinaryMeshReaderBase(void) override
Destructor of the CSU2BinaryMeshReaderBase class.
static constexpr int SU2_STRING_SIZE
Size of the strings in the SU2 binary mesh file.
Definition CSU2BinaryMeshReaderBase.hpp:41
FILE * mesh_file
File object for the SU2 binary mesh file.
Definition CSU2BinaryMeshReaderBase.hpp:44
int size_conn_type
Size, in bytes of the connectivity type.
Definition CSU2BinaryMeshReaderBase.hpp:46
static int FileSeek64(FILE *file, int64_t offset, int whence)
Portable, 64-bit safe replacement for fseek. Needed because binary SU2 grid files can exceed 2 GiB ev...
Definition CSU2BinaryMeshReaderBase.cpp:40
void ReadBinaryData(T *data, const size_t nItems)
Template function to read data from the binary file.
Definition CSU2BinaryMeshReaderBase.hpp:102
static int64_t FileTell64(FILE *file)
Portable, 64-bit safe replacement for ftell.
Definition CSU2BinaryMeshReaderBase.cpp:48
virtual void ReadVolumeElementConnectivity()
Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ...
Definition CSU2BinaryMeshReaderBase.cpp:146
Base class for the reading of a native SU2 grid.
Definition CSU2MeshReaderBase.hpp:40
const string meshFilename
Name of the SU2 ASCII mesh file being read.
Definition CSU2MeshReaderBase.hpp:45
#define CURRENT_FUNCTION
Definition mpi_structure.hpp:59
const int SU2_BINARY_STRING_SIZE
Length of strings (e.g. marker names) used in the native SU2 binary mesh format. Shared by CSU2Binary...
Definition option_structure.hpp:263