chombo-discharge
Loading...
Searching...
No Matches
CD_DataParser.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_DATAPARSER_H
14#define CD_DATAPARSER_H
15
16// Chombo includes
17#include <List.H>
18
19// Our includes
20#include <CD_ParticleSoA.H>
21#include <CD_LookupTable.H>
22#include <CD_Triangle.H>
23#include <CD_NamespaceHeader.H>
24
28namespace DataParser {
29
44simpleFileReadASCII(const std::string& a_fileName,
45 const int a_xColumn = 0,
46 const int a_yColumn = 1,
47 const std::vector<char>& a_ignoreChars = {'#', '/'});
48
65fractionalFileReadASCII(const std::string& a_fileName,
66 const std::string& a_startRead,
67 const std::string& a_stopRead,
68 const int a_xColumn = 0,
69 const int a_yColumn = 1,
70 const std::vector<char>& a_ignoreChars = {'#', '/'});
71
87readPointParticlesASCII(const std::string& a_fileName,
88 const unsigned int a_xColumn = 0,
89 const unsigned int a_yColumn = 1,
90 const unsigned int a_zColumn = 2,
91 const unsigned int a_wColumn = 3,
92 const std::vector<char>& a_ignoreChars = {'#', '/'});
93
110std::vector<std::shared_ptr<Triangle>>
111readTriangles(const std::string& a_filename, const std::string& a_vertexDataIdentifier);
112
113} // namespace DataParser
114
115#include <CD_NamespaceFooter.H>
116
117#endif
Declaration of a table for looking up coefficients etc.
Declaration of ParticleSoA, an arena-backed Struct-of-Arrays particle container.
Header file for a simple Triangle class.
Class for interpolation of f = f(x) data in one independent variable x.
Definition CD_LookupTable1D.H:32
Arena-backed Struct-of-Arrays particle container for a single grid patch.
Definition CD_ParticleSoA.H:655
Class for simple data parsing from IO files.
Definition CD_DataParser.H:28
LookupTable1D< Real, 1 > simpleFileReadASCII(const std::string &a_fileName, const int a_xColumn=0, const int a_yColumn=1, const std::vector< char > &a_ignoreChars={'#', '/'})
Simple file parser which reads a file and puts the data into two columns (a lookup table).
Definition CD_DataParser.cpp:27
LookupTable1D< Real, 1 > fractionalFileReadASCII(const std::string &a_fileName, const std::string &a_startRead, const std::string &a_stopRead, const int a_xColumn=0, const int a_yColumn=1, const std::vector< char > &a_ignoreChars={'#', '/'})
Simple ASCII file parser which reads a file and puts the data into two columns (a lookup table)
Definition CD_DataParser.cpp:84
ParticleSoA< NoPayload > readPointParticlesASCII(const std::string &a_fileName, const unsigned int a_xColumn=0, const unsigned int a_yColumn=1, const unsigned int a_zColumn=2, const unsigned int a_wColumn=3, const std::vector< char > &a_ignoreChars={'#', '/'})
Simple file parser which will read particles (position/weight) from an ASCII file.
Definition CD_DataParser.cpp:150
std::vector< std::shared_ptr< Triangle > > readTriangles(const std::string &a_filename, const std::string &a_vertexDataIdentifier)
Read a PLY or VTK triangle mesh file and return a list of Triangle objects.
Definition CD_DataParser.cpp:223