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

Base class for the reading of a native SU2 ASCII grid. More...

#include <CSU2ASCIIMeshReaderBase.hpp>

Inheritance diagram for CSU2ASCIIMeshReaderBase:
[legend]

Public Member Functions

 CSU2ASCIIMeshReaderBase (CConfig *val_config, unsigned short val_iZone, unsigned short val_nZone)
 Constructor of the CSU2ASCIIMeshReaderBase class.
 
virtual ~CSU2ASCIIMeshReaderBase (void) override
 Destructor of the CSU2ASCIIMeshReaderBase 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.
 

Protected Types

enum class  FileSection { POINTS , ELEMENTS , MARKERS }
 

Protected Member Functions

bool ReadMetadata (bool single_pass, CConfig *config)
 Reads all SU2 ASCII mesh metadata and checks for errors.
 
virtual void ReadPointCoordinates (bool single_pass=false)
 Reads the grid points from an SU2 zone into linear partitions across all ranks.
 
virtual void ReadVolumeElementConnectivity (bool single_pass=false)
 Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
 
virtual void ReadSurfaceElementConnectivity (bool single_pass=false)
 Reads the surface (boundary) elements from the SU2 zone.
 
void FastForwardToMyZone ()
 Helper function to find the current zone in an SU2 ASCII mesh object.
 
- 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.
 

Protected Attributes

std::array< FileSection, 3 > SectionOrder {}
 Order of the sections in the file.
 
ifstream mesh_file
 File object for the SU2 ASCII mesh file.
 
- 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.
 

Detailed Description

Base class for the reading of a native SU2 ASCII grid.

Author
T. Economon

Member Enumeration Documentation

◆ FileSection

enum class CSU2ASCIIMeshReaderBase::FileSection
strongprotected
Enumerator
POINTS 
ELEMENTS 
MARKERS 

Constructor & Destructor Documentation

◆ CSU2ASCIIMeshReaderBase()

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

Constructor of the CSU2ASCIIMeshReaderBase class.

◆ ~CSU2ASCIIMeshReaderBase()

CSU2ASCIIMeshReaderBase::~CSU2ASCIIMeshReaderBase ( void  )
overridevirtualdefault

Destructor of the CSU2ASCIIMeshReaderBase class.

Member Function Documentation

◆ FastForwardToMyZone()

void CSU2ASCIIMeshReaderBase::FastForwardToMyZone ( )
protected

Helper function to find the current zone in an SU2 ASCII mesh object.

◆ ReadMetadata()

bool CSU2ASCIIMeshReaderBase::ReadMetadata ( bool  single_pass,
CConfig *  config 
)
protected

Reads all SU2 ASCII mesh metadata and checks for errors.

Parameters
[in]single_pass- Try to read the contents together with the metadata if the order allows (points before elements).
[in,out]config- Problem configuration where some metadata is updated (e.g. AoA).
Returns
True if single_pass was successful.

◆ ReadPointCoordinates()

void CSU2ASCIIMeshReaderBase::ReadPointCoordinates ( bool  single_pass = false)
protectedvirtual

Reads the grid points from an SU2 zone into linear partitions across all ranks.

◆ ReadSurfaceElementConnectivity()

void CSU2ASCIIMeshReaderBase::ReadSurfaceElementConnectivity ( bool  single_pass = false)
protectedvirtual

Reads the surface (boundary) elements from the SU2 zone.

◆ ReadVolumeElementConnectivity()

void CSU2ASCIIMeshReaderBase::ReadVolumeElementConnectivity ( bool  single_pass = false)
protectedvirtual

Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.

TODO: Use a compressed format.

Member Data Documentation

◆ mesh_file

ifstream CSU2ASCIIMeshReaderBase::mesh_file
protected

File object for the SU2 ASCII mesh file.

◆ SectionOrder

std::array<FileSection, 3> CSU2ASCIIMeshReaderBase::SectionOrder {}
protected

Order of the sections in the file.


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