stardis-hfbound-prog.h (2587B)
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_HFBOUND_PROG_H 17 #define SDIS_HFBOUND_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 * HF boundary prog data 31 ******************************************************************************/ 32 struct hf_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 double (*flux)(const struct stardis_interface_fragment*, void*); 54 /* for h for fluid */ 55 double (*fluid_temp)(const struct stardis_vertex*, void*); 56 unsigned mat_id; 57 struct fluid_prog* possible_external_fluid; /* if H for solid */ 58 }; 59 60 res_T 61 init_hf_boundary_prog 62 (struct mem_allocator* allocator, 63 struct hf_boundary_prog** dst); 64 65 void 66 release_hf_boundary_prog 67 (struct hf_boundary_prog* bound, 68 struct mem_allocator* allocator); 69 70 res_T 71 str_print_hf_boundary_prog 72 (struct str* str, 73 const struct description* bound); 74 75 double 76 hf_bound_prog_get_hmax 77 (struct hf_boundary_prog* hf_boundary_props); 78 79 #endif