DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
DNDS::Geom::UnstructuredMeshSerialRW Struct Reference

#include <Mesh.hpp>

Collaboration diagram for DNDS::Geom::UnstructuredMeshSerialRW:
[legend]

Public Types

using PartitionOptions = Geom::PartitionOptions
 

Public Member Functions

template<class tC2n , class tCoordExt >
void _detail_GetCoordsSerial (const tC2n &c2n, tSmallCoords &cs, tCoordExt &coo)
 directly load coords; gets faulty if isPeriodic!, analog of mesh's method
 
template<class tC2n , class tC2nPbi , class tCoordExt >
void _detail_GetCoordsOnElemSerial (const tC2n &c2n, const tC2nPbi &c2nPbi, tSmallCoords &cs, tCoordExt &coo)
 specially for periodicity, analog of mesh's method
 
void GetCoordsOnCellSerial (index iCell, tSmallCoords &cs, tCoord &coo)
 analog of mesh's method
 
 UnstructuredMeshSerialRW (decltype(mesh) n_mesh, DNDS::MPI_int n_mRank)
 
void ReadFromCGNSSerial (const std::string &fName, const t_FBCName_2_ID &FBCName_2_ID)
 reads a cgns file as serial input
 
auto ReadFromCGNSSerial (const std::string &fName)
 
void ReadFromOpenFOAMAndConvertSerial (const std::string &fName, const std::map< std::string, std::string > &nameMapping, const t_FBCName_2_ID &FBCName_2_ID=FBC_Name_2_ID_Default)
 
void Deduplicate1to1Periodic (real search_eps=1e-8)
 
void BuildCell2Cell ()
 build cell2cell topology, with node-neighbors included
 
void BuildNode2Node ()
 
void MeshPartitionCell2Cell (const PartitionOptions &options)
 
void PartitionReorderToMeshCell2Cell ()
 
void ClearSerial ()
 
void BuildSerialOut ()
 should be called to build data for serial out
 
void GetCurrentOutputArrays (int flag, tCoordPair &coordOut, tAdjPair &cell2nodeOut, tPbiPair &cell2nodePbiOut, tElemInfoArrayPair &cellElemInfoOut, index &nCell, index &nNode)
 
void PrintSerialPartPltBinaryDataArray (std::string fname, int arraySiz, int arraySizPoint, const tFGetName &names, const tFGetData &data, const tFGetName &namesPoint, const tFGetData &dataPoint, double t, int flag)
 names(idata) data(idata, ivolume) https://tecplot.azureedge.net/products/360/current/360_data_format_guide.pdf
 
void PrintSerialPartVTKDataArray (std::string fname, std::string seriesName, int arraySiz, int vecArraySiz, int arraySizPoint, int vecArraySizPoint, const tFGetName &names, const tFGetData &data, const tFGetName &vectorNames, const tFGetVecData &vectorData, const tFGetName &namesPoint, const tFGetData &dataPoint, const tFGetName &vectorNamesPoint, const tFGetVecData &vectorDataPoint, double t, int flag=0)
 names(idata) data(idata, ivolume)
 
void SetASCIIPrecision (int n)
 
void SetVTKFloatEncodeMode (const std::string &v)
 

Public Attributes

DNDS::ssp< UnstructuredMeshmesh
 
MeshReaderMode mode {UnknownMode}
 
bool dataIsSerialOut = false
 
bool dataIsSerialIn = false
 
tCoord coordSerial
 
tAdj cell2nodeSerial
 
tAdj bnd2nodeSerial
 
tElemInfoArray cellElemInfoSerial
 
tElemInfoArray bndElemInfoSerial
 
tAdj2 bnd2cellSerial
 
tAdj1 cell2cellOrigSerial
 
tAdj1 node2nodeOrigSerial
 
tAdj1 bnd2bndOrigSerial
 
tPbi cell2nodePbiSerial
 
tPbi bnd2nodePbiSerial
 
tAdj cell2cellSerial
 
tAdj node2nodeSerial
 
tAdj cell2cellSerialFacial
 
tAdj node2cellSerial
 
tAdj node2faceSerial
 
tAdj node2edgeSerial
 
tAdj cell2faceSerial
 
tAdj cell2edgeSerial
 
tAdj face2nodeSerial
 
tAdj face2faceSerial
 
tAdj face2edgeSerial
 
tAdj face2cellSerial
 
tAdj edge2nodeSerial
 
tAdj edge2cellSerial
 
tAdj edge2edgeSerial
 
tAdj edge2faceSerial
 
DNDS::ArrayTransformerType< tCoord::element_type >::Type coordSerialOutTrans
 
DNDS::ArrayTransformerType< tAdj::element_type >::Type cell2nodeSerialOutTrans
 
DNDS::ArrayTransformerType< tPbi::element_type >::Type cell2nodePbiSerialOutTrans
 
DNDS::ArrayTransformerType< tAdj::element_type >::Type bnd2nodeSerialOutTrans
 
DNDS::ArrayTransformerType< tElemInfoArray::element_type >::Type cellElemInfoSerialOutTrans
 
DNDS::ArrayTransformerType< tElemInfoArray::element_type >::Type bndElemInfoSerialOutTrans
 
std::vector< DNDS::MPI_intcellPartition
 
std::vector< DNDS::MPI_intnodePartition
 
std::vector< DNDS::MPI_intbndPartition
 
DNDS::MPI_int mRank {0}
 
DNDS::MPI_int cnPart {0}
 

Detailed Description

Definition at line 1108 of file Mesh.hpp.

Member Typedef Documentation

◆ PartitionOptions

Constructor & Destructor Documentation

◆ UnstructuredMeshSerialRW()

DNDS::Geom::UnstructuredMeshSerialRW::UnstructuredMeshSerialRW ( decltype(mesh n_mesh,
DNDS::MPI_int  n_mRank 
)
inline

Definition at line 1219 of file Mesh.hpp.

Member Function Documentation

◆ _detail_GetCoordsOnElemSerial()

template<class tC2n , class tC2nPbi , class tCoordExt >
void DNDS::Geom::UnstructuredMeshSerialRW::_detail_GetCoordsOnElemSerial ( const tC2n &  c2n,
const tC2nPbi &  c2nPbi,
tSmallCoords cs,
tCoordExt &  coo 
)
inline

specially for periodicity, analog of mesh's method

Definition at line 1199 of file Mesh.hpp.

Here is the caller graph for this function:

◆ _detail_GetCoordsSerial()

template<class tC2n , class tCoordExt >
void DNDS::Geom::UnstructuredMeshSerialRW::_detail_GetCoordsSerial ( const tC2n &  c2n,
tSmallCoords cs,
tCoordExt &  coo 
)
inline

directly load coords; gets faulty if isPeriodic!, analog of mesh's method

Definition at line 1185 of file Mesh.hpp.

Here is the caller graph for this function:

◆ BuildCell2Cell()

void DNDS::Geom::UnstructuredMeshSerialRW::BuildCell2Cell ( )

build cell2cell topology, with node-neighbors included

Todo:
add support for only face-neighbors

TODO: abstract these: invert cone (like node 2 cell -> cell 2 node) (also support operating on pair)

** override: point-complete cell2cell info!

** override: point-complete cell2cell info!

mesh->dim - 1 is a simple method

Definition at line 327 of file Mesh_Serial_BuildCell2Cell.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildNode2Node()

void DNDS::Geom::UnstructuredMeshSerialRW::BuildNode2Node ( )

◆ BuildSerialOut()

void DNDS::Geom::UnstructuredMeshSerialRW::BuildSerialOut ( )

should be called to build data for serial out

Definition at line 192 of file Mesh.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearSerial()

void DNDS::Geom::UnstructuredMeshSerialRW::ClearSerial ( )
inline

Definition at line 1260 of file Mesh.hpp.

◆ Deduplicate1to1Periodic()

void DNDS::Geom::UnstructuredMeshSerialRW::Deduplicate1to1Periodic ( real  search_eps = 1e-8)

below are all periodic code

Definition at line 14 of file Mesh_Serial_BuildCell2Cell.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCoordsOnCellSerial()

void DNDS::Geom::UnstructuredMeshSerialRW::GetCoordsOnCellSerial ( index  iCell,
tSmallCoords cs,
tCoord coo 
)
inline

analog of mesh's method

Definition at line 1211 of file Mesh.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurrentOutputArrays()

void DNDS::Geom::UnstructuredMeshSerialRW::GetCurrentOutputArrays ( int  flag,
tCoordPair coordOut,
tAdjPair cell2nodeOut,
tPbiPair cell2nodePbiOut,
tElemInfoArrayPair cellElemInfoOut,
index nCell,
index nNode 
)

only non-ghost cells are output

need all the nodes with ghost

Definition at line 20 of file Mesh_Plts.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MeshPartitionCell2Cell()

void DNDS::Geom::UnstructuredMeshSerialRW::MeshPartitionCell2Cell ( const PartitionOptions options)

preset hyper config, should be optional in the future

assuming all adj point to local numbers now

Todo:
//TODO: parmetis needs testing!

assuming homogenous

Definition at line 10 of file Mesh_Serial_Partition.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PartitionReorderToMeshCell2Cell()

void DNDS::Geom::UnstructuredMeshSerialRW::PartitionReorderToMeshCell2Cell ( )

Definition at line 91 of file Mesh.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PrintSerialPartPltBinaryDataArray()

void DNDS::Geom::UnstructuredMeshSerialRW::PrintSerialPartPltBinaryDataArray ( std::string  fname,
int  arraySiz,
int  arraySizPoint,
const tFGetName names,
const tFGetData data,
const tFGetName namesPoint,
const tFGetData dataPoint,
double  t,
int  flag 
)

names(idata) data(idata, ivolume) https://tecplot.azureedge.net/products/360/current/360_data_format_guide.pdf

Todo:
//TODO add support for bnd export

full: write both grid and data

Tecplot is sensitive to the correctness of min/max val

2d or 3d elems

Definition at line 127 of file Mesh_Plts.cpp.

Here is the call graph for this function:

◆ PrintSerialPartVTKDataArray()

void DNDS::Geom::UnstructuredMeshSerialRW::PrintSerialPartVTKDataArray ( std::string  fname,
std::string  seriesName,
int  arraySiz,
int  vecArraySiz,
int  arraySizPoint,
int  vecArraySizPoint,
const tFGetName names,
const tFGetData data,
const tFGetName vectorNames,
const tFGetVecData vectorData,
const tFGetName namesPoint,
const tFGetData dataPoint,
const tFGetName vectorNamesPoint,
const tFGetVecData vectorDataPoint,
double  t,
int  flag = 0 
)

names(idata) data(idata, ivolume)

referencing https://docs.vtk.org/en/latest/design_documents/VTKFileFormats.html

Todo:
//TODO add support for bnd export
Parameters
fname
arraySiz
vecArraySiz
arraySizPoint
vecArraySizPoint
names
data
vectorNames
vectorData
namesPoint
dataPoint
vectorNamesPoint
vectorDataPoint
t
flag

cout << uint8_t(v) is ill-posed

Definition at line 751 of file Mesh_Plts.cpp.

Here is the call graph for this function:

◆ ReadFromCGNSSerial() [1/2]

auto DNDS::Geom::UnstructuredMeshSerialRW::ReadFromCGNSSerial ( const std::string &  fName)
inline

Definition at line 1235 of file Mesh.hpp.

Here is the call graph for this function:

◆ ReadFromCGNSSerial() [2/2]

void DNDS::Geom::UnstructuredMeshSerialRW::ReadFromCGNSSerial ( const std::string &  fName,
const t_FBCName_2_ID FBCName_2_ID 
)

reads a cgns file as serial input

the file MUST consist of one CGNS base node, and multiple zones within. All the zones are treated as a whole unstructured grid Proofed on .cgns files generated from Pointwise

Warning
//!Pointwise Options: with "Include Donor Information", "Treat Structured as Unstructured", "Unstructured Interfaces = Node-to-Node"
Todo:
//TODO Add some multi thread here!
Parameters
fNamefile name of .cgns file

parallel done!!! now serial!!!

purely serial

only supports unstructured

convert to 0 based; pointing to zonal index

initialized as inner,need new way of doing vol condition

Todo:
//TODO: TEST with actual data (MIXED TYPE) !!!!!!

convert to 0 based; pointing to zonal index

initialized as inner,need new way of doing vol condition

setting BC code

only supports unstructured

Definition at line 246 of file Mesh_Serial_ReadFromCGNS.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadFromOpenFOAMAndConvertSerial()

void DNDS::Geom::UnstructuredMeshSerialRW::ReadFromOpenFOAMAndConvertSerial ( const std::string &  fName,
const std::map< std::string, std::string > &  nameMapping,
const t_FBCName_2_ID FBCName_2_ID = FBC_Name_2_ID_Default 
)

parallel done!!! now serial!!!

Definition at line 631 of file Mesh_Serial_ReadFromCGNS.cpp.

Here is the call graph for this function:

◆ SetASCIIPrecision()

void DNDS::Geom::UnstructuredMeshSerialRW::SetASCIIPrecision ( int  n)
inline

Definition at line 1325 of file Mesh.hpp.

Here is the call graph for this function:

◆ SetVTKFloatEncodeMode()

void DNDS::Geom::UnstructuredMeshSerialRW::SetVTKFloatEncodeMode ( const std::string &  v)
inline

Definition at line 1326 of file Mesh.hpp.

Member Data Documentation

◆ bnd2bndOrigSerial

tAdj1 DNDS::Geom::UnstructuredMeshSerialRW::bnd2bndOrigSerial

Definition at line 1132 of file Mesh.hpp.

◆ bnd2cellSerial

tAdj2 DNDS::Geom::UnstructuredMeshSerialRW::bnd2cellSerial

Definition at line 1129 of file Mesh.hpp.

◆ bnd2nodePbiSerial

tPbi DNDS::Geom::UnstructuredMeshSerialRW::bnd2nodePbiSerial

Definition at line 1134 of file Mesh.hpp.

◆ bnd2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::bnd2nodeSerial

Definition at line 1126 of file Mesh.hpp.

◆ bnd2nodeSerialOutTrans

DNDS::ArrayTransformerType<tAdj::element_type>::Type DNDS::Geom::UnstructuredMeshSerialRW::bnd2nodeSerialOutTrans

Definition at line 1171 of file Mesh.hpp.

◆ bndElemInfoSerial

tElemInfoArray DNDS::Geom::UnstructuredMeshSerialRW::bndElemInfoSerial

Definition at line 1128 of file Mesh.hpp.

◆ bndElemInfoSerialOutTrans

DNDS::ArrayTransformerType<tElemInfoArray::element_type>::Type DNDS::Geom::UnstructuredMeshSerialRW::bndElemInfoSerialOutTrans

Definition at line 1173 of file Mesh.hpp.

◆ bndPartition

std::vector<DNDS::MPI_int> DNDS::Geom::UnstructuredMeshSerialRW::bndPartition

Definition at line 1177 of file Mesh.hpp.

◆ cell2cellOrigSerial

tAdj1 DNDS::Geom::UnstructuredMeshSerialRW::cell2cellOrigSerial

Definition at line 1130 of file Mesh.hpp.

◆ cell2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2cellSerial

Definition at line 1146 of file Mesh.hpp.

◆ cell2cellSerialFacial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2cellSerialFacial

Definition at line 1149 of file Mesh.hpp.

◆ cell2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2edgeSerial

Definition at line 1156 of file Mesh.hpp.

◆ cell2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2faceSerial

Definition at line 1155 of file Mesh.hpp.

◆ cell2nodePbiSerial

tPbi DNDS::Geom::UnstructuredMeshSerialRW::cell2nodePbiSerial

Definition at line 1133 of file Mesh.hpp.

◆ cell2nodePbiSerialOutTrans

DNDS::ArrayTransformerType<tPbi::element_type>::Type DNDS::Geom::UnstructuredMeshSerialRW::cell2nodePbiSerialOutTrans

Definition at line 1170 of file Mesh.hpp.

◆ cell2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2nodeSerial

Definition at line 1125 of file Mesh.hpp.

◆ cell2nodeSerialOutTrans

DNDS::ArrayTransformerType<tAdj::element_type>::Type DNDS::Geom::UnstructuredMeshSerialRW::cell2nodeSerialOutTrans

Definition at line 1169 of file Mesh.hpp.

◆ cellElemInfoSerial

tElemInfoArray DNDS::Geom::UnstructuredMeshSerialRW::cellElemInfoSerial

Definition at line 1127 of file Mesh.hpp.

◆ cellElemInfoSerialOutTrans

DNDS::ArrayTransformerType<tElemInfoArray::element_type>::Type DNDS::Geom::UnstructuredMeshSerialRW::cellElemInfoSerialOutTrans

Definition at line 1172 of file Mesh.hpp.

◆ cellPartition

std::vector<DNDS::MPI_int> DNDS::Geom::UnstructuredMeshSerialRW::cellPartition

Definition at line 1175 of file Mesh.hpp.

◆ cnPart

DNDS::MPI_int DNDS::Geom::UnstructuredMeshSerialRW::cnPart {0}

Definition at line 1179 of file Mesh.hpp.

◆ coordSerial

tCoord DNDS::Geom::UnstructuredMeshSerialRW::coordSerial

Definition at line 1124 of file Mesh.hpp.

◆ coordSerialOutTrans

DNDS::ArrayTransformerType<tCoord::element_type>::Type DNDS::Geom::UnstructuredMeshSerialRW::coordSerialOutTrans

Definition at line 1168 of file Mesh.hpp.

◆ dataIsSerialIn

bool DNDS::Geom::UnstructuredMeshSerialRW::dataIsSerialIn = false

Definition at line 1122 of file Mesh.hpp.

◆ dataIsSerialOut

bool DNDS::Geom::UnstructuredMeshSerialRW::dataIsSerialOut = false

Definition at line 1121 of file Mesh.hpp.

◆ edge2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2cellSerial

Definition at line 1164 of file Mesh.hpp.

◆ edge2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2edgeSerial

Definition at line 1165 of file Mesh.hpp.

◆ edge2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2faceSerial

Definition at line 1166 of file Mesh.hpp.

◆ edge2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2nodeSerial

Definition at line 1163 of file Mesh.hpp.

◆ face2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2cellSerial

Definition at line 1161 of file Mesh.hpp.

◆ face2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2edgeSerial

Definition at line 1160 of file Mesh.hpp.

◆ face2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2faceSerial

Definition at line 1159 of file Mesh.hpp.

◆ face2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2nodeSerial

Definition at line 1158 of file Mesh.hpp.

◆ mesh

DNDS::ssp<UnstructuredMesh> DNDS::Geom::UnstructuredMeshSerialRW::mesh

Definition at line 1117 of file Mesh.hpp.

◆ mode

MeshReaderMode DNDS::Geom::UnstructuredMeshSerialRW::mode {UnknownMode}

Definition at line 1119 of file Mesh.hpp.

◆ mRank

DNDS::MPI_int DNDS::Geom::UnstructuredMeshSerialRW::mRank {0}

Definition at line 1179 of file Mesh.hpp.

◆ node2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2cellSerial

Definition at line 1151 of file Mesh.hpp.

◆ node2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2edgeSerial

Definition at line 1153 of file Mesh.hpp.

◆ node2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2faceSerial

Definition at line 1152 of file Mesh.hpp.

◆ node2nodeOrigSerial

tAdj1 DNDS::Geom::UnstructuredMeshSerialRW::node2nodeOrigSerial

Definition at line 1131 of file Mesh.hpp.

◆ node2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2nodeSerial

Definition at line 1147 of file Mesh.hpp.

◆ nodePartition

std::vector<DNDS::MPI_int> DNDS::Geom::UnstructuredMeshSerialRW::nodePartition

Definition at line 1176 of file Mesh.hpp.


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