sln_line.h (1745B)
1 /* Copyright (C) 2022, 2026 |Méso|Star> (contact@meso-star.com) 2 * Copyright (C) 2026 Université de Lorraine 3 * Copyright (C) 2022 Centre National de la Recherche Scientifique 4 * Copyright (C) 2022 Université Paul Sabatier 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 18 19 #ifndef SLN_LINE_H 20 #define SLN_LINE_H 21 22 #include "sln.h" 23 24 #include <star/shtr.h> 25 #include <rsys/rsys.h> 26 #include <math.h> 27 28 /* Forward declaration */ 29 struct sln_mixture; 30 struct sln_tree; 31 struct darray_vertex; 32 33 static INLINE double 34 line_center 35 (const struct shtr_line* line, 36 const double pressure) /* In atm */ 37 { 38 ASSERT(line && pressure >= 0); 39 return line->wavenumber + line->delta_air * pressure; 40 } 41 42 extern LOCAL_SYM res_T 43 line_setup 44 (const struct sln_tree* tree, 45 const size_t iline, 46 struct sln_line* line); 47 48 extern LOCAL_SYM res_T 49 line_mesh 50 (struct sln_tree* tree, 51 const size_t iline, 52 const size_t nvertices_hint, 53 /* Vertex buffer in which line vertices are added */ 54 struct darray_vertex* vertices, /* out */ 55 /* Range of generated line vertices. Bounds are inclusive */ 56 size_t vertices_range[2]); /* out */ 57 58 #endif /* SLN_LINE_H */