Documentation 6b54b78464
Loading...
Searching...
No Matches
CSU2BinaryMeshReaderFVM Class Reference

Reads a native SU2 binary grid into linear partitions for the finite volume solver (FVM). More...

#include <CSU2BinaryMeshReaderFVM.hpp>

Inheritance diagram for CSU2BinaryMeshReaderFVM:
[legend]

Public Member Functions

 CSU2BinaryMeshReaderFVM (CConfig *val_config, unsigned short val_iZone, unsigned short val_nZone)
 Constructor of the CSU2BinaryMeshReaderFVM class.
 
 ~CSU2BinaryMeshReaderFVM (void) override
 Destructor of the CSU2BinaryMeshReaderFVM class.
 
- Public Member Functions inherited from CSU2BinaryMeshReaderBase
 CSU2BinaryMeshReaderBase (CConfig *val_config, unsigned short val_iZone, unsigned short val_nZone)
 Constructor of the CSU2BinaryMeshReaderBase class.
 
 ~CSU2BinaryMeshReaderBase (void) override
 Destructor of the CSU2BinaryMeshReaderBase class.
 
- Public Member Functions inherited from CSU2MeshReaderBase
 CSU2MeshReaderBase (CConfig *val_config, unsigned short val_iZone, unsigned short val_nZone)
 Constructor of the CSU2MeshReaderBase class.
 
 ~CSU2MeshReaderBase (void) override
 Destructor of the CSU2MeshReaderBase class.
 
- Public Member Functions inherited from CMeshReaderBase
 CMeshReaderBase (const CConfig *val_config, unsigned short val_iZone, unsigned short val_nZone)
 Constructor of the CMeshReaderBase class.
 
virtual ~CMeshReaderBase ()=default
 
unsigned short GetDimension () const
 Get the physical dimension of the problem (2 or 3).
 
const vector< unsigned long > & GetGlobalPointIDs () const
 Get the global IDs of the local points.
 
const vector< vector< passivedouble > > & GetLocalPointCoordinates () const
 Get the local point coordinates (linearly partitioned).
 
const vector< unsigned long > & GetSurfaceElementConnectivityForMarker (int val_iMarker) const
 Get the surface element connectivity for the specified marker. Only the master node owns the surface connectivity.
 
const vector< unsigned long > & GetNumberOfSurfaceElementsAllMarkers () const
 Get the number surface elements for all markers.
 
unsigned long GetNumberOfSurfaceElementsForMarker (int val_iMarker) const
 Get the number surface elements for the specified marker.
 
const vector< unsigned long > & GetLocalVolumeElementConnectivity () const
 Get the local volume element connectivity (linearly partitioned).
 
unsigned long GetNumberOfMarkers () const
 Get the total number of markers in the mesh zone.
 
const vector< string > & GetMarkerNames () const
 Get the vector of string names for all markers in the mesh zone.
 
unsigned long GetNumberOfLocalPoints () const
 Get the number of local grid points within the linear partition on this rank.
 
unsigned long GetNumberOfGlobalPoints () const
 Get the number of global grid points within the mesh file.
 
unsigned long GetNumberOfLocalElements () const
 Get the number of local elements within the linear partition on this rank.
 
unsigned long GetNumberOfGlobalElements () const
 Get the number of global elements within the mesh file.
 

Additional Inherited Members

- Protected Member Functions inherited from CSU2BinaryMeshReaderBase
void ReadConnectivityType ()
 Reads the connectivity type used in the binary file and check if byte swapping must be applied.
 
void ReadMetadata (CConfig *config)
 Reads all SU2 binary mesh metadata and checks for errors.
 
virtual void ReadPointCoordinates ()
 Reads the grid points from an SU2 zone into linear partitions across all ranks.
 
virtual void ReadVolumeElementConnectivity ()
 Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
 
virtual void ReadSurfaceElementConnectivity ()
 Reads the surface (boundary) elements from the SU2 zone.
 
void FastForwardToMyZone ()
 Helper function to find the current zone in an SU2 binary mesh object.
 
uint64_t ReadBinaryNEntities ()
 Function to read one entity of the connectivity type from the binary file.
 
template<typename T >
void ReadBinaryData (T *data, const size_t nItems)
 Template function to read data from the binary file.
 
- Protected Member Functions inherited from CMeshReaderBase
void DetermineFacesVolumeElements (vector< CFaceOfElement > &localFaces)
 Function, which determines the faces of the local volume elements.
 
void GetCornerPointsAllFaces (const unsigned long *elemInfo, unsigned short &numFaces, unsigned short nPointsPerFace[], unsigned long faceConn[6][4])
 Get all the corner points of all the faces of the given element. It must.
 
void CopyMarkers (const std::vector< std::string > &srcDstMarkers)
 Creates copies of some markers.
 
- Static Protected Member Functions inherited from CSU2BinaryMeshReaderBase
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 even on platforms where "long" is only 32 bits wide (e.g. Windows).
 
static int64_t FileTell64 (FILE *file)
 Portable, 64-bit safe replacement for ftell.
 
- Protected Attributes inherited from CSU2BinaryMeshReaderBase
FILE * mesh_file
 File object for the SU2 binary mesh file.
 
bool swap_bytes
 Whether or not byte swapping must be used.
 
int size_conn_type
 Size, in bytes of the connectivity type.
 
- Protected Attributes inherited from CSU2MeshReaderBase
const unsigned short myZone
 Current SU2 zone index.
 
const unsigned short nZones
 Total number of zones in the SU2 file.
 
const string meshFilename
 Name of the SU2 ASCII mesh file being read.
 
bool actuator_disk
 Boolean for whether we have an actuator disk to split.
 
unsigned long ActDiskNewPoints
 Total number of new grid points to add due to actuator disk splitting.
 
su2double Xloc = 0.0
 X-coordinate of the CG of the actuator disk surface.
 
su2double Yloc = 0.0
 X-coordinate of the CG of the actuator disk surface.
 
su2double Zloc = 0.0
 X-coordinate of the CG of the actuator disk surface.
 
vector< bool > ActDisk_Bool
 Flag to identify the grid points on the actuator disk.
 
vector< unsigned long > ActDiskPoint_Back
 Vector containing the global index for the new grid points added to the back of the actuator disk.
 
vector< unsigned long > VolumePoint_Inv
 Vector containing the inverse mapping from the global index to the added point index for the actuator disk.
 
vector< su2double > CoordXActDisk
 X-coordinates of the new grid points added by splitting the actuator disk (size = ActDiskNewPoints).
 
vector< su2double > CoordYActDisk
 Y-coordinates of the new grid points added by splitting the actuator disk (size = ActDiskNewPoints).
 
vector< su2double > CoordZActDisk
 Z-coordinates of the new grid points added by splitting the actuator disk (size = ActDiskNewPoints).
 
vector< su2double > CoordXVolumePoint
 X-coordinates of the volume elements touching the actuator disk.
 
vector< su2double > CoordYVolumePoint
 Y-coordinates of the volume elements touching the actuator disk.
 
vector< su2double > CoordZVolumePoint
 Z-coordinates of the volume elements touching the actuator disk.
 
- Protected Attributes inherited from CMeshReaderBase
const int rank
 MPI Rank.
 
const int size
 MPI Size.
 
const CConfig * config = nullptr
 Local pointer to the config parameter object.
 
unsigned short dimension = 0
 Dimension of the problem (2 or 3).
 
unsigned long numberOfLocalPoints
 Number of local grid points within the linear partition on this rank.
 
unsigned long numberOfGlobalPoints = 0
 Number of global grid points within the mesh file.
 
vector< vector< passivedouble > > localPointCoordinates
 Vector holding the coordinates from the mesh file for the local grid points. First index is dimension, second is point index.
 
vector< unsigned long > globalPointIDs
 Vector holding the global IDs of the local grid points.
 
unsigned long numberOfLocalElements
 Number of local elements within the linear partition on this rank.
 
unsigned long numberOfGlobalElements = 0
 Number of global elements within the mesh file.
 
vector< unsigned long > localVolumeElementConnectivity
 Vector containing the element connectivity from the mesh file for the local elements.
 
unsigned long numberOfMarkers = 0
 Total number of markers contained within the mesh file.
 
vector< string > markerNames
 String names for all markers in the mesh file.
 
vector< unsigned long > numberOfLocalSurfaceElements
 Vector containing the number of local surface elements.
 
vector< vector< unsigned long > > surfaceElementConnectivity
 Vector containing the surface element connectivity from the mesh file on a per-marker basis. For FVM, only the master node reads and stores this connectivity.
 
- Static Protected Attributes inherited from CSU2BinaryMeshReaderBase
static constexpr int SU2_STRING_SIZE
 Size of the strings in the SU2 binary mesh file.
 

Detailed Description

Reads a native SU2 binary grid into linear partitions for the finite volume solver (FVM).

Author
T. Economon, E. van der Weide

Constructor & Destructor Documentation

◆ CSU2BinaryMeshReaderFVM()

CSU2BinaryMeshReaderFVM::CSU2BinaryMeshReaderFVM ( CConfig *  val_config,
unsigned short  val_iZone,
unsigned short  val_nZone 
)

Constructor of the CSU2BinaryMeshReaderFVM class.

◆ ~CSU2BinaryMeshReaderFVM()

CSU2BinaryMeshReaderFVM::~CSU2BinaryMeshReaderFVM ( void  )
overridedefault

Destructor of the CSU2BinaryMeshReaderFVM class.


The documentation for this class was generated from the following files: