VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
WbWriterAvsASCII.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 WBWRITERAVSASCII_H
35#define WBWRITERAVSASCII_H
36
38
40{
41public:
43 {
44 static WbWriterAvsASCII instance;
45 return &instance;
46 }
47
50
51private:
52 WbWriterAvsASCII() = default;
53
54public:
55 std::string getFileExtension() override { return ".ascii.inp"; }
56
60 // lines
61 // 0 ---- 1
62 // nodenumbering must start with 0!
63 std::string writeLines(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
64 std::vector<UbTupleInt2> &lines) override;
65
67 // triangles
68 // cell numbering:
69 // 2
70 //
71 // 0---1
72 // nodenumbering must start with 0!
73 std::string writeTriangles(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
74 std::vector<UbTuple<int, int, int>> &triangles) override;
75 std::string writeTrianglesWithNodeData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
76 std::vector<UbTupleInt3> &cells, std::vector<std::string> &datanames,
77 std::vector<std::vector<double>> &nodedata) override;
78
80 // quads
81 // cell numbering:
82 // 3---2
83 // | |
84 // 0---1
85 // nodenumbering must start with 0!
86 std::string writeQuads(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
87 std::vector<UbTupleInt4> &cells) override;
88 std::string writeQuadsWithNodeData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
89 std::vector<UbTupleInt4> &cells, std::vector<std::string> &datanames,
90 std::vector<std::vector<double>> &nodedata) override;
91 std::string writeQuadsWithCellData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
92 std::vector<UbTupleInt4> &cells, std::vector<std::string> &datanames,
93 std::vector<std::vector<double>> &celldata) override;
94 std::string writeQuadsWithNodeAndCellData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
95 std::vector<UbTupleInt4> &cells, std::vector<std::string> &nodedatanames,
96 std::vector<std::vector<double>> &nodedata,
97 std::vector<std::string> &celldatanames,
98 std::vector<std::vector<double>> &celldata) override;
99
101 // octs
102 // 7 ---- 6
103 // /| /|
104 // 4 +--- 5 |
105 // | | | |
106 // | 3 ---+ 2
107 // |/ |/
108 // 0 ---- 1
109 std::string writeOcts(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
110 std::vector<UbTupleInt8> &cells) override;
111 std::string writeOctsWithCellData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
112 std::vector<UbTupleInt8> &cells, std::vector<std::string> &datanames,
113 std::vector<std::vector<double>> &celldata) override;
114 std::string writeOctsWithNodeData(const std::string &filename, std::vector<UbTupleFloat3> &nodes,
115 std::vector<UbTupleUInt8> &cells, std::vector<std::string> &datanames,
116 std::vector<std::vector<double>> &nodedata) override;
117};
118
119#endif // WBWRITERAVSASCII_H
120
std::string getFileExtension() override
static WbWriterAvsASCII * getInstance()
WbWriterAvsASCII(const WbWriterAvsASCII &)=delete
const WbWriterAvsASCII & operator=(const WbWriterAvsASCII &)=delete
std::shared_ptr< T > SPtr
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 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 writeQuads(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt4 > &cells) 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
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 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 writeOcts(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt8 > &cells) 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 writeTriangles(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTuple< int, int, int > > &triangles) override
std::string writeLines(const std::string &filename, std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt2 > &lines) override