Loading [MathJax]/extensions/tex2jax.js
VTK  9.4.20250405
AvmeshMetadata.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// AvmeshMetadata stores all the the metadata included in the header of an
5// AVMESH file (usually about 1500 bytes). These are all defined in the AVMESH
6// standard available at https://github.com/DOD-HPCMP-CREATE/avmeshlib. This is
7// a rigid standard. All of these variables must be present and in the order in
8// which they are declared below. The lengths of string variables are all
9// rigidly defined, usually at 128 characters. If a user tries to set strings
10// longer than these bounds, the tools in the CREATE-AV ecosystem that
11// manipulate AVMESH files will truncate them.
12//
13// Exceptions to the rules:
14// - the Description field in the main file header
15// - fields marked rev1 or rev2 only
16
17#ifndef AvmeshMetadata_h
18#define AvmeshMetadata_h
19
20#include <string>
21#include <vector>
22#include <vtkABINamespace.h>
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkFieldData;
26
28{
30
31 void ToFieldData(vtkFieldData* fieldData) const;
32
33 // These strings have maximum fixed lengths of 32 and 16 as specified in the AVMESH file format
34 char Label[32]; // descriptive name, e.g. "wing", "inlet"
35 char Type[16]; // BC, e.g. "noslipwall", "unspecified"
36 int Pid; // Patch ID, always negative
37};
38
40{
42
43 void ToFieldData(vtkFieldData* fieldData) const;
44
45 // File header
46 char MagicString[6];
50 char ContactInfo[128];
53 std::string Description; // written as an int length, then a C string
54
55 // Mesh header
56 char MeshName[128];
57 char MeshType[128];
58 char MeshGenerator[128];
60 double Scale;
61 char Units[128];
62 double RefLen[3]; // Scalar in rev1
63 double RefArea;
64 double RefPoint[3];
65 char RefDescription[128];
66 int Refined; // rev2 only
67 char MeshDescription[128];
68
69 // Unstruc header
76 char ElementScheme[32]; // rev2 only
77 int FacePolyOrder; // rev2 only
78 int CellPolyOrder; // rev2 only
84 int NumPolyCells; // rev1 only
89 int NumBndPolyCells; // rev1 only
90 int NumPolyFaces; // rev1 only
91 int BndPolyFacesSize; // rev1 only
92 int PolyFacesSize; // rev1 only
98
99 std::vector<AvmeshPatch> Patches;
100};
101
102VTK_ABI_NAMESPACE_END
103#endif // AvmeshMetadata_h
represent and manipulate fields of data
double RefPoint[3]
std::string Description
char MeshDescription[128]
char MeshType[128]
char ElementScheme[32]
void ToFieldData(vtkFieldData *fieldData) const
char ContactInfo[128]
char MeshGenerator[128]
char CoordinateSystem[128]
char MeshName[128]
std::vector< AvmeshPatch > Patches
char RefDescription[128]
char Type[16]
char Label[32]
void ToFieldData(vtkFieldData *fieldData) const