DNDSR 0.1.0.dev1+gcd065ad
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 __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 __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 (const 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 searchEps=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 847 of file Mesh.hpp.

Member Typedef Documentation

◆ PartitionOptions

Constructor & Destructor Documentation

◆ UnstructuredMeshSerialRW()

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

Definition at line 958 of file Mesh.hpp.

Member Function Documentation

◆ __GetCoordsOnElemSerial()

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

specially for periodicity, analog of mesh's method

Definition at line 938 of file Mesh.hpp.

Here is the caller graph for this function:

◆ __GetCoordsSerial()

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

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

Definition at line 924 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 202 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 999 of file Mesh.hpp.

◆ Deduplicate1to1Periodic()

void DNDS::Geom::UnstructuredMeshSerialRW::Deduplicate1to1Periodic ( real  searchEps = 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 950 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 19 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 8 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 104 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 126 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 753 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 974 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 245 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 630 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 1064 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 1065 of file Mesh.hpp.

Member Data Documentation

◆ bnd2bndOrigSerial

tAdj1 DNDS::Geom::UnstructuredMeshSerialRW::bnd2bndOrigSerial

Definition at line 871 of file Mesh.hpp.

◆ bnd2cellSerial

tAdj2 DNDS::Geom::UnstructuredMeshSerialRW::bnd2cellSerial

Definition at line 868 of file Mesh.hpp.

◆ bnd2nodePbiSerial

tPbi DNDS::Geom::UnstructuredMeshSerialRW::bnd2nodePbiSerial

Definition at line 873 of file Mesh.hpp.

◆ bnd2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::bnd2nodeSerial

Definition at line 865 of file Mesh.hpp.

◆ bnd2nodeSerialOutTrans

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

Definition at line 910 of file Mesh.hpp.

◆ bndElemInfoSerial

tElemInfoArray DNDS::Geom::UnstructuredMeshSerialRW::bndElemInfoSerial

Definition at line 867 of file Mesh.hpp.

◆ bndElemInfoSerialOutTrans

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

Definition at line 912 of file Mesh.hpp.

◆ bndPartition

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

Definition at line 916 of file Mesh.hpp.

◆ cell2cellOrigSerial

tAdj1 DNDS::Geom::UnstructuredMeshSerialRW::cell2cellOrigSerial

Definition at line 869 of file Mesh.hpp.

◆ cell2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2cellSerial

Definition at line 885 of file Mesh.hpp.

◆ cell2cellSerialFacial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2cellSerialFacial

Definition at line 888 of file Mesh.hpp.

◆ cell2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2edgeSerial

Definition at line 895 of file Mesh.hpp.

◆ cell2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2faceSerial

Definition at line 894 of file Mesh.hpp.

◆ cell2nodePbiSerial

tPbi DNDS::Geom::UnstructuredMeshSerialRW::cell2nodePbiSerial

Definition at line 872 of file Mesh.hpp.

◆ cell2nodePbiSerialOutTrans

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

Definition at line 909 of file Mesh.hpp.

◆ cell2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::cell2nodeSerial

Definition at line 864 of file Mesh.hpp.

◆ cell2nodeSerialOutTrans

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

Definition at line 908 of file Mesh.hpp.

◆ cellElemInfoSerial

tElemInfoArray DNDS::Geom::UnstructuredMeshSerialRW::cellElemInfoSerial

Definition at line 866 of file Mesh.hpp.

◆ cellElemInfoSerialOutTrans

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

Definition at line 911 of file Mesh.hpp.

◆ cellPartition

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

Definition at line 914 of file Mesh.hpp.

◆ cnPart

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

Definition at line 918 of file Mesh.hpp.

◆ coordSerial

tCoord DNDS::Geom::UnstructuredMeshSerialRW::coordSerial

Definition at line 863 of file Mesh.hpp.

◆ coordSerialOutTrans

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

Definition at line 907 of file Mesh.hpp.

◆ dataIsSerialIn

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

Definition at line 861 of file Mesh.hpp.

◆ dataIsSerialOut

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

Definition at line 860 of file Mesh.hpp.

◆ edge2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2cellSerial

Definition at line 903 of file Mesh.hpp.

◆ edge2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2edgeSerial

Definition at line 904 of file Mesh.hpp.

◆ edge2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2faceSerial

Definition at line 905 of file Mesh.hpp.

◆ edge2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::edge2nodeSerial

Definition at line 902 of file Mesh.hpp.

◆ face2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2cellSerial

Definition at line 900 of file Mesh.hpp.

◆ face2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2edgeSerial

Definition at line 899 of file Mesh.hpp.

◆ face2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2faceSerial

Definition at line 898 of file Mesh.hpp.

◆ face2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::face2nodeSerial

Definition at line 897 of file Mesh.hpp.

◆ mesh

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

Definition at line 856 of file Mesh.hpp.

◆ mode

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

Definition at line 858 of file Mesh.hpp.

◆ mRank

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

Definition at line 918 of file Mesh.hpp.

◆ node2cellSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2cellSerial

Definition at line 890 of file Mesh.hpp.

◆ node2edgeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2edgeSerial

Definition at line 892 of file Mesh.hpp.

◆ node2faceSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2faceSerial

Definition at line 891 of file Mesh.hpp.

◆ node2nodeOrigSerial

tAdj1 DNDS::Geom::UnstructuredMeshSerialRW::node2nodeOrigSerial

Definition at line 870 of file Mesh.hpp.

◆ node2nodeSerial

tAdj DNDS::Geom::UnstructuredMeshSerialRW::node2nodeSerial

Definition at line 886 of file Mesh.hpp.

◆ nodePartition

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

Definition at line 915 of file Mesh.hpp.


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