stardis-hbound-prog.h (2508B)
1 /* Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com) 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 16 #ifndef SDIS_HBOUND_PROG_H 17 #define SDIS_HBOUND_PROG_H 18 19 #include <rsys/rsys.h> 20 #include <rsys/str.h> 21 22 #include "stardis-prog-properties.h" 23 24 struct mem_allocator; 25 struct fluid_prog; 26 struct description; 27 struct program; 28 29 /******************************************************************************* 30 * H boundary prog data 31 ******************************************************************************/ 32 struct h_boundary_prog { 33 void* prog_data; /* result of the create() call */ 34 struct str name; 35 struct str prog_name; 36 size_t argc; 37 char** argv; 38 /* lib handle and function ptrs */ 39 struct program* program; 40 void* (*create) 41 (const struct stardis_description_create_context*, void*, size_t, char**); 42 void (*release)(void*); 43 double (*ref_temp)(const struct stardis_interface_fragment*, void*); 44 double (*emissivity) 45 (const struct stardis_interface_fragment*, const unsigned src_id, void*); 46 double (*alpha) 47 (const struct stardis_interface_fragment*, const unsigned src_id, void*); 48 double (*hc)(const struct stardis_interface_fragment*, void*); 49 double (*hmax)(void*); 50 double* (*t_range)(void*, double trange[2]); 51 /* for h for solid */ 52 double (*boundary_temp)(const struct stardis_interface_fragment*, void*); 53 /* for h for fluid */ 54 double (*fluid_temp)(const struct stardis_vertex*, void*); 55 unsigned mat_id; 56 struct fluid_prog* possible_external_fluid; /* if H for solid */ 57 }; 58 59 res_T 60 init_h_boundary_prog 61 (struct mem_allocator* allocator, 62 struct h_boundary_prog** dst); 63 64 void 65 release_h_boundary_prog 66 (struct h_boundary_prog* bound, 67 struct mem_allocator* allocator); 68 69 res_T 70 str_print_h_boundary_prog 71 (struct str* str, 72 const struct description* bound); 73 74 double 75 h_bound_prog_get_hmax 76 (struct h_boundary_prog* h_boundary_props); 77 78 #endif