VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
WbWriterAvsBinary.h
Go to the documentation of this file.
1//=======================================================================================
2// ____ ____ __ ______ __________ __ __ __ __
3// \ \ | | | | | _ \ |___ ___| | | | | / \ | |
4// \ \ | | | | | |_) | | | | | | | / \ | |
5// \ \ | | | | | _ / | | | | | | / /\ \ | |
6// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
7// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
8// \ \ | | ________________________________________________________________
9// \ \ | | | ______________________________________________________________|
10// \ \| | | | __ __ __ __ ______ _______
11// \ | | |_____ | | | | | | | | | _ \ / _____)
12// \ | | _____| | | | | | | | | | | \ \ \_______
13// \ | | | | |_____ | \_/ | | | | |_/ / _____ |
14// \ _____| |__| |________| \_______/ |__| |______/ (_______/
15//
16// This file is part of VirtualFluids. VirtualFluids is free software: you can
17// redistribute it and/or modify it under the terms of the GNU General Public
18// License as published by the Free Software Foundation, either version 3 of
19// the License, or (at your option) any later version.
20//
21// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
22// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24// for more details.
25//
26// SPDX-License-Identifier: GPL-3.0-or-later
27// SPDX-FileCopyrightText: Copyright © VirtualFluids Project contributors, see AUTHORS.md in root folder
28//
33//=======================================================================================
34#ifndef WBWRITERAVSBINARY_H
35#define WBWRITERAVSBINARY_H
36
38
40{
41public:
43 {
44 static WbWriterAvsBinary instance;
45 return &instance;
46 }
47
50
51private:
52 WbWriterAvsBinary() = default;
53
54public:
55 std::string getFileExtension() override { return ".bin.inp"; }
56
58 // lines
59 // 0 ---- 1
60 // nodenumbering must start with 0!
61 std::string writeLines(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
62 std::vector<UbTupleInt2> &lines) override;
63
65 // triangles
66 // cell numbering:
67 // 2
68 //
69 // 0---1
70 // nodenumbering must start with 0!
71 std::string writeTriangles(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
72 std::vector<UbTuple<int, int, int>> &triangles) override;
73 std::string writeTrianglesWithNodeData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
74 std::vector<UbTupleInt3> &cells, std::vector<std::string> &datanames,
75 std::vector<std::vector<double>> &nodedata) override;
76
78 // quads
79 // cell numbering:
80 // 3---2
81 // | |
82 // 0---1
83 // nodenumbering must start with 0!
84 std::string writeQuads(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
85 std::vector<UbTupleInt4> &cells) override;
86 std::string writeQuadsWithNodeData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
87 std::vector<UbTupleInt4> &cells, std::vector<std::string> &datanames,
88 std::vector<std::vector<double>> &nodedata) override;
89 std::string writeQuadsWithCellData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
90 std::vector<UbTupleInt4> &cells, std::vector<std::string> &datanames,
91 std::vector<std::vector<double>> &celldata) override;
92 std::string writeQuadsWithNodeAndCellData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
93 std::vector<UbTupleInt4> &cells, std::vector<std::string> &nodedatanames,
94 std::vector<std::vector<double>> &nodedata,
95 std::vector<std::string> &celldatanames,
96 std::vector<std::vector<double>> &celldata) override;
97
99 // octs
100 // 7 ---- 6
101 // /| /|
102 // 4 +--- 5 |
103 // | | | |
104 // | 3 ---+ 2
105 // |/ |/
106 // 0 ---- 1
107 std::string writeOcts(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
108 std::vector<UbTupleInt8> &cells) override;
109 std::string writeOctsWithCellData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
110 std::vector<UbTupleInt8> &cells, std::vector<std::string> &datanames,
111 std::vector<std::vector<double>> &celldata) override;
112 std::string writeOctsWithNodeData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
113 std::vector<UbTupleUInt8> &cells, std::vector<std::string> &datanames,
114 std::vector<std::vector<double>> &nodedata) override;
115};
116
117#endif // WBWRITERAVSBINARY_H
118
WbWriterAvsBinary(const WbWriterAvsBinary &)=delete
std::string getFileExtension() override
static WbWriterAvsBinary * getInstance()
const WbWriterAvsBinary & operator=(const WbWriterAvsBinary &)=delete
std::shared_ptr< T > SPtr
std::string writeOctsWithNodeData(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleUInt8 > &cells, std::vector< std::string > &datanames, std::vector< std::vector< double > > &nodedata) override
std::string writeTrianglesWithNodeData(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt3 > &cells, std::vector< std::string > &datanames, std::vector< std::vector< double > > &nodedata) override
std::string writeOctsWithCellData(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt8 > &cells, std::vector< std::string > &datanames, std::vector< std::vector< double > > &celldata) override
std::string writeQuads(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt4 > &cells) override
std::string writeOcts(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt8 > &cells) override
std::string writeQuadsWithCellData(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt4 > &cells, std::vector< std::string > &datanames, std::vector< std::vector< double > > &celldata) override
std::string writeLines(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt2 > &lines) override
std::string writeTriangles(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTuple< int, int, int > > &triangles) override
std::string writeQuadsWithNodeAndCellData(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt4 > &cells, std::vector< std::string > &nodedatanames, std::vector< std::vector< double > > &nodedata, std::vector< std::string > &celldatanames, std::vector< std::vector< double > > &celldata) override
std::string writeQuadsWithNodeData(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt4 > &cells, std::vector< std::string > &datanames, std::vector< std::vector< double > > &nodedata) override