stardis-prog-properties.h.in (27220B)
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 4 * modify it under the terms of the GNU Lesser General Public 5 * License as published by the Free Software Foundation; either 6 * version 3 of the License, or (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 GNU 11 * Lesser General Public License for more details. 12 * 13 * You should have received a copy of the GNU Lesser General Public 14 * License along with this program. If not, see 15 * <http://www.gnu.org/licenses/>. */ 16 17 #ifndef STARDIS_PROG_H__ 18 #define STARDIS_PROG_H__ 19 20 /* This header file is intended for inclusion in shared libraries defining 21 * programmed descriptions used in stardis model files. 22 * Please refer to stardis(1) and stardis-input(5) man pages for additional 23 * information. */ 24 25 /* The version of the API described thereafter */ 26 #define STARDIS_PROG_PROPERTIES_VERSION @STARDIS_PROG_PROPERTIES_VERSION@ 27 28 #include <limits.h> /* UINT_MAX */ 29 #include <stddef.h> /* size_t */ 30 31 #if defined(__GNUC__) 32 #define STARDIS_API extern __attribute__((visibility("default"))) 33 #else 34 #define STARDIS_API extern 35 #endif 36 37 /* Constants defining that no power density/imposed flux is defined */ 38 #define STARDIS_VOLUMIC_POWER_NONE DBL_MAX 39 #define STARDIS_FLUX_NONE DBL_MAX 40 41 /* Syntactic sugar used to define whether a temperature is known or not */ 42 #define STARDIS_TEMPERATURE_NONE (-(DBL_MAX+DBL_MAX)*0) /* NAN */ 43 #define STARDIS_TEMPERATURE_IS_KNOWN(Temp) (Temp==Temp) 44 #define STARDIS_TEMPERATURE_IS_UNKNOWN(Temp) (Temp!=Temp) 45 46 /* Indentifier of the internal source of radiation */ 47 #define STARDIS_INTERN_SOURCE_ID UINT_MAX 48 49 /* Forward declaration of external data types */ 50 struct sdis_scene; 51 struct ssp_rng; 52 53 /******************************************************************************* 54 * API types. 55 * The various functions defining programmed descriptions receive arguments 56 * of the following types when called from the stardis simulation. 57 ******************************************************************************/ 58 struct stardis_vertex { 59 double P[3]; /* World space position */ 60 double time; /* "Time" of the vertex */ 61 }; 62 #define STARDIS_VERTEX_NULL__ {{0,0,0}, 0} 63 static const struct stardis_vertex STARDIS_VERTEX_NULL = STARDIS_VERTEX_NULL__; 64 65 enum stardis_side { 66 FRONT, 67 BACK 68 }; 69 70 struct stardis_interface_fragment { 71 double P[3]; /* World space position */ 72 double Ng[3]; /* Normalized world space geometry normal at the interface */ 73 double uv[2]; /* Parametric coordinates of the interface */ 74 double time; /* Current time */ 75 enum stardis_side side; 76 }; 77 78 enum stardis_return_status { 79 STARDIS_SUCCESS, 80 STARDIS_FAILURE 81 }; 82 83 enum stardis_verbosity_levels { 84 STARDIS_VERBOSE_NONE, 85 STARDIS_VERBOSE_ERROR, 86 STARDIS_VERBOSE_WARNING, 87 STARDIS_VERBOSE_INFO 88 }; 89 90 struct stardis_program_context { 91 const char* name; /* Program name */ 92 enum stardis_verbosity_levels verbosity_level; 93 }; 94 95 struct stardis_description_create_context { 96 const char* name; /* Description name */ 97 }; 98 99 struct stardis_triangle { 100 double vtx0[3]; 101 double vtx1[3]; 102 double vtx2[3]; 103 }; 104 #define STARDIS_TRIANGLE_NULL__ {{0,0,0}, {0,0,0}, {0,0,0}} 105 static const struct stardis_triangle STARDIS_TRIANGLE_NULL = 106 STARDIS_TRIANGLE_NULL__; 107 108 /* Helper macro that check if the triangle is NULL */ 109 #define STARDIS_TRIANGLE_NONE(T) \ 110 ( (T)->vtx0[0] == 0 && (T)->vtx0[1] == 0 && (T)->vtx0[2] == 0 \ 111 && (T)->vtx1[0] == 0 && (T)->vtx1[1] == 0 && (T)->vtx1[2] == 0 \ 112 && (T)->vtx2[0] == 0 && (T)->vtx2[1] == 0 && (T)->vtx2[2] == 0) 113 114 /* A sampled path */ 115 struct stardis_path { 116 struct stardis_vertex vtx; /* Current position and time */ 117 118 /* Triangle intersected by the path. When defined, the path is on a border */ 119 struct stardis_triangle tri; 120 121 double weight; /* Monte Carlo weight update along the path */ 122 123 /* Define whether the path has reached a boundary conduction in time/space */ 124 int at_limit; 125 }; 126 #define STARDIS_PATH_NULL__ { \ 127 STARDIS_VERTEX_NULL__, \ 128 STARDIS_TRIANGLE_NULL__, \ 129 0, /* MC weight */ \ 130 0 /* At limit */ \ 131 } 132 static const struct stardis_path STARDIS_PATH_NULL = 133 STARDIS_PATH_NULL__; 134 135 #ifdef __cplusplus 136 extern "C" { 137 #endif 138 139 /******************************************************************************* 140 * Optional functions for any programmed library. 141 * Either all 3 or none of the 3 following functions must be defined. 142 * If a libray doesn't need its own data, just let these functions undefined. 143 ******************************************************************************/ 144 145 /* Create the data attached to a given libray. 146 * A NULL result is interpreted as an error and ends the program. 147 * This function is called the first time a description using this library is 148 * processed. 149 * argc + argv describe the (possibly zero) arguments coming from the stardis 150 * input file in the main-like standard way. */ 151 STARDIS_API void* 152 stardis_create_library_data 153 (const struct stardis_program_context* ctx, 154 size_t argc, 155 char* argv[]); 156 157 /* Finalize the data created by the successive stardis_create_data calls for 158 * the descriptions created using this library. 159 * A STARDIS_FAILURE result ends the program. 160 * This function is called after descriptions creation, before simulation 161 * starts. 162 * lib_data is the pointer returned by stardis_create_library_data for this 163 * library. */ 164 STARDIS_API enum stardis_return_status 165 stardis_finalize_library_data 166 (void* lib_data); 167 168 /* Release the data created by stardis_create_library_data. 169 * This function is called after the simulation finished and after releasing 170 * descriptions data. 171 * lib_data is the pointer returned by stardis_create_library_data for this 172 * library. */ 173 STARDIS_API void 174 stardis_release_library_data 175 (void* lib_data); 176 177 /******************************************************************************* 178 * Mandatory functions for any programmed description regardless of its type. 179 ******************************************************************************/ 180 181 /* Create the data attached to a given description. 182 * A NULL result is interpreted as an error and ends the program. 183 * This function is called every time a description using this library is 184 * processed. 185 * lib_data is the pointer returned by stardis_create_library_data for the 186 * library or NULL if stardis_create_library_data is not defined. 187 * argc + argv describe the (possibly zero) arguments coming from the stardis 188 * input file in the main-like standard way. */ 189 STARDIS_API void* 190 stardis_create_data 191 (const struct stardis_description_create_context *ctx, 192 void* lib_data, 193 size_t argc, 194 char* argv[]); 195 196 /* Release the data created by stardis_create_data. 197 * This function is called after the simulation finished. 198 * data is the pointer returned by stardis_create_data for the description. */ 199 STARDIS_API void 200 stardis_release_data 201 (void* data); 202 203 /* Get the copyright notice. 204 * A NULL result is interpreted as an error and ends the program. 205 * data is the pointer returned by stardis_create_data for the description. */ 206 STARDIS_API const char* 207 get_copyright_notice 208 (void* data); 209 210 /* Get single-line (name and link?) version of the license. 211 * A NULL result is interpreted as an error and ends the program. 212 * data is the pointer returned by stardis_create_data for the description. */ 213 STARDIS_API const char* 214 get_license_short 215 (void* data); 216 217 /* Get full license text. 218 * A NULL result is interpreted as an error and ends the program. 219 * data is the pointer returned by stardis_create_data for the description. */ 220 STARDIS_API const char* 221 get_license_text 222 (void* data); 223 224 /******************************************************************************* 225 * Mandatory functions for a solid 226 ******************************************************************************/ 227 228 /* Returns the calorific capacity at a given vertex. 229 * This functions is called at every vertex of every path of the computation 230 * crossing this solid. 231 * data is the pointer returned by stardis_create_data for this solid. */ 232 STARDIS_API double 233 stardis_calorific_capacity 234 (const struct stardis_vertex* vtx, 235 void* data); 236 237 /* Returns the volumic mass at a given vertex. 238 * This functions is called at every vertex of every path of the computation 239 * crossing this solid. 240 * data is the pointer returned by stardis_create_data for this solid. */ 241 STARDIS_API double 242 stardis_volumic_mass 243 (const struct stardis_vertex* vtx, 244 void* data); 245 246 /* Returns the conductivity at a given vertex. 247 * This functions is called at every vertex of every path of the computation 248 * crossing this solid. 249 * data is the pointer returned by stardis_create_data for this solid. */ 250 STARDIS_API double 251 stardis_conductivity 252 (const struct stardis_vertex* vtx, 253 void* data); 254 255 /* Returns the delta numerical parameter at a given vertex. 256 * This functions is called at every vertex of every path of the computation 257 * crossing this solid. 258 * data is the pointer returned by stardis_create_data for this solid. */ 259 STARDIS_API double 260 stardis_delta_solid 261 (const struct stardis_vertex* vtx, 262 void* data); 263 264 /* Returns the volumic power at a given vertex. 265 * This functions is called at every vertex of every path of the computation 266 * crossing this solid. 267 * data is the pointer returned by stardis_create_data for this solid. */ 268 STARDIS_API double 269 stardis_volumic_power 270 (const struct stardis_vertex* vtx, 271 void* data); 272 273 /* Returns the temperature at a given vertex. 274 * If the temperature is not known/imposed the expected return value is -1. 275 * This functions is called at every vertex of every path of the computation 276 * crossing this solid. 277 * data is the pointer returned by stardis_create_data for this solid. */ 278 STARDIS_API double 279 stardis_medium_temperature 280 (const struct stardis_vertex* vtx, 281 void* data); 282 283 /******************************************************************************* 284 * Optional function for a solid 285 ******************************************************************************/ 286 287 /* Function used to sample a conductive path. When defined, it is no 288 * longer Stardis that samples the path, but the user via this function */ 289 STARDIS_API int /* Error code */ 290 stardis_sample_conductive_path 291 (struct sdis_scene* scn, 292 struct ssp_rng* rng, 293 struct stardis_path* path, 294 void* data); 295 296 /******************************************************************************* 297 * Mandatory functions for a fluid 298 ******************************************************************************/ 299 300 /* Returns the calorific capacity at a given vertex. 301 * This functions is called at every vertex of every path of the computation 302 * crossing this fluid. 303 * data is the pointer returned by stardis_create_data for this fluid. */ 304 STARDIS_API double 305 stardis_calorific_capacity 306 (const struct stardis_vertex* vtx, 307 void* data); 308 309 /* Returns the volumic mass at a given vertex. 310 * This functions is called at every vertex of every path of the computation 311 * crossing this fluid. 312 * data is the pointer returned by stardis_create_data for this fluid. */ 313 STARDIS_API double 314 stardis_volumic_mass 315 (const struct stardis_vertex* vtx, 316 void* data); 317 318 /* Returns the temperature at a given vertex. 319 * If the temperature is not known/imposed the expected return value is -1. 320 * This functions is called at every vertex of every path of the computation 321 * crossing this fluid. 322 * data is the pointer returned by stardis_create_data for this fluid. */ 323 STARDIS_API double 324 stardis_medium_temperature 325 (const struct stardis_vertex* vtx, 326 void* data); 327 328 /******************************************************************************* 329 * Mandatory functions for a H boundary for a fluid 330 ******************************************************************************/ 331 332 /* Returns the boundary temperature at a given fragment. 333 * This functions is called every time a path of the computation reaches 334 * this boundary. 335 * data is the pointer returned by stardis_create_data for this boundary. */ 336 STARDIS_API double 337 stardis_boundary_temperature 338 (const struct stardis_interface_fragment* frag, 339 void* data); 340 341 /* Returns the emissivity at a given fragment. 342 * This functions is called every time a path of the computation reaches 343 * this boundary. 344 * data is the pointer returned by stardis_create_data for this boundary. */ 345 STARDIS_API double 346 stardis_emissivity 347 (const struct stardis_interface_fragment* frag, 348 const unsigned source_id, 349 void* data); 350 351 /* Returns the specular fraction at a given fragment. 352 * This functions is called every time a path of the computation reaches 353 * this boundary. 354 * data is the pointer returned by stardis_create_data for this boundary. */ 355 STARDIS_API double 356 stardis_specular_fraction 357 (const struct stardis_interface_fragment* frag, 358 const unsigned source_id, 359 void* data); 360 361 /* Returns the convection coefficient at a given fragment. 362 * This functions is called every time a path of the computation reaches 363 * this boundary. 364 * data is the pointer returned by stardis_create_data for this boundary. */ 365 STARDIS_API double 366 stardis_convection_coefficient 367 (const struct stardis_interface_fragment* frag, 368 void* data); 369 370 /* Returns the reference temperature at a given fragment. 371 * This temperature is used as a reference to linearize radiative transfer 372 * in Picard computations. 373 * This functions is called every time a path of the computation reaches 374 * this boundary. 375 * data is the pointer returned by stardis_create_data for this boundary. */ 376 STARDIS_API double 377 stardis_reference_temperature 378 (const struct stardis_interface_fragment* frag, 379 void* data); 380 381 /* Returns the upper bound of the convection coefficient accross this boundary. 382 * This functions is called once when initializing the computation. 383 * data is the pointer returned by stardis_create_data for this boundary. */ 384 STARDIS_API double 385 stardis_max_convection_coefficient 386 (void* data); 387 388 /* Computes the expected temperature range for this boundary. 389 * This functions is called once when initializing the computation. 390 * data is the pointer returned by stardis_create_data for this boundary. 391 * Returns its modified range argument. */ 392 STARDIS_API double* 393 stardis_t_range 394 (void* data, 395 double range[2]); 396 397 /******************************************************************************* 398 * Mandatory functions for a H boundary for a solid 399 ******************************************************************************/ 400 401 /* Returns the emissivity at a given fragment. 402 * This functions is called every time a path of the computation reaches 403 * this boundary. 404 * data is the pointer returned by stardis_create_data for this boundary. */ 405 STARDIS_API double 406 stardis_emissivity 407 (const struct stardis_interface_fragment* frag, 408 const unsigned source_id, 409 void* data); 410 411 /* Returns the specular fraction at a given fragment. 412 * This functions is called every time a path of the computation reaches 413 * this boundary. 414 * data is the pointer returned by stardis_create_data for this boundary. */ 415 STARDIS_API double 416 stardis_specular_fraction 417 (const struct stardis_interface_fragment* frag, 418 const unsigned source_id, 419 void* data); 420 421 /* Returns the convection coefficient at a given fragment. 422 * This functions is called every time a path of the computation reaches 423 * this boundary. 424 * data is the pointer returned by stardis_create_data for this boundary. */ 425 STARDIS_API double 426 stardis_convection_coefficient 427 (const struct stardis_interface_fragment* frag, 428 void* data); 429 430 /* Returns the reference temperature at a given fragment. 431 * This temperature is used as a reference to linearize radiative transfer 432 * in Picard computations. 433 * This functions is called every time a path of the computation reaches 434 * this boundary. 435 * data is the pointer returned by stardis_create_data for this boundary. */ 436 STARDIS_API double 437 stardis_reference_temperature 438 (const struct stardis_interface_fragment* frag, 439 void* data); 440 441 /* Returns the temperature at a given vertex. 442 * The intent is to return the temperature in an implicit fluid enclosing this 443 * solid. 444 * This functions is called at every vertex of every path of the computation 445 * crossing this fluid. 446 * data is the pointer returned by stardis_create_data for this boundary. */ 447 STARDIS_API double 448 stardis_medium_temperature 449 (const struct stardis_vertex* vtx, 450 void* data); 451 452 /* Returns the upper bound of the convection coefficient accross this boundary. 453 * This functions is called once when initializing the computation. 454 * data is the pointer returned by stardis_create_data for this boundary. */ 455 STARDIS_API double 456 stardis_max_convection_coefficient 457 (void* data); 458 459 /* Computes the expected temperature range for this boundary. 460 * This functions is called once when initializing the computation. 461 * data is the pointer returned by stardis_create_data for this boundary. 462 * Returns its modified range argument. */ 463 STARDIS_API double* 464 stardis_t_range 465 (void* data, 466 double range[2]); 467 468 /******************************************************************************* 469 * Mandatory functions for a T boundary 470 ******************************************************************************/ 471 472 /* Returns the boundary temperature at a given fragment. 473 * This functions is called every time a path of the computation reaches 474 * this boundary. 475 * data is the pointer returned by stardis_create_data for this boundary. */ 476 STARDIS_API double 477 stardis_boundary_temperature 478 (const struct stardis_interface_fragment* frag, 479 void* data); 480 481 /* Computes the expected temperature range for this boundary. 482 * This functions is called once when initializing the computation. 483 * data is the pointer returned by stardis_create_data for this boundary. 484 * Returns its modified range argument. */ 485 STARDIS_API double* 486 stardis_t_range 487 (void* data, 488 double range[2]); 489 490 /******************************************************************************* 491 * Mandatory functions for a F+H boundary 492 ******************************************************************************/ 493 494 /* Returns the emissivity at a given fragment. 495 * This functions is called every time a path of the computation reaches 496 * this boundary. 497 * data is the pointer returned by stardis_create_data for this boundary. */ 498 STARDIS_API double 499 stardis_emissivity 500 (const struct stardis_interface_fragment* frag, 501 const unsigned source_id, 502 void* data); 503 504 /* Returns the specular fraction at a given fragment. 505 * This functions is called every time a path of the computation reaches 506 * this boundary. 507 * data is the pointer returned by stardis_create_data for this boundary. */ 508 STARDIS_API double 509 stardis_specular_fraction 510 (const struct stardis_interface_fragment* frag, 511 const unsigned source_id, 512 void* data); 513 514 /* Returns the convection coefficient at a given fragment. 515 * This functions is called every time a path of the computation reaches 516 * this boundary. 517 * data is the pointer returned by stardis_create_data for this boundary. */ 518 STARDIS_API double 519 stardis_convection_coefficient 520 (const struct stardis_interface_fragment* frag, 521 void* data); 522 523 /* Returns the flux at the boundary at a given fragment. 524 * This functions is called every time a path of the computation reaches 525 * this boundary. 526 * data is the pointer returned by stardis_create_data for this boundary. */ 527 STARDIS_API double 528 stardis_boundary_flux 529 (const struct stardis_interface_fragment* frag, 530 void* data); 531 532 /* Returns the reference temperature at a given fragment. 533 * This temperature is used as a reference to linearize radiative transfer 534 * in Picard computations. 535 * This functions is called every time a path of the computation reaches 536 * this boundary. 537 * data is the pointer returned by stardis_create_data for this boundary. */ 538 STARDIS_API double 539 stardis_reference_temperature 540 (const struct stardis_interface_fragment* frag, 541 void* data); 542 543 /* Returns the temperature at a given vertex. 544 * The intent is to return the temperature in an implicit fluid enclosing this 545 * solid. 546 * This functions is called at every vertex of every path of the computation 547 * crossing this fluid. 548 * data is the pointer returned by stardis_create_data for this boundary. */ 549 STARDIS_API double 550 stardis_medium_temperature 551 (const struct stardis_vertex* vtx, 552 void* data); 553 554 /* Returns the upper bound of the convection coefficient accross this boundary. 555 * This functions is called once when initializing the computation. 556 * data is the pointer returned by stardis_create_data for this boundary. */ 557 STARDIS_API double 558 stardis_max_convection_coefficient 559 (void* data); 560 561 /* Computes the expected temperature range for this boundary. 562 * This functions is called once when initializing the computation. 563 * data is the pointer returned by stardis_create_data for this boundary. 564 * Returns its modified range argument. */ 565 STARDIS_API double* 566 stardis_t_range 567 (void* data, 568 double range[2]); 569 570 /******************************************************************************* 571 * Mandatory functions for a F boundary 572 ******************************************************************************/ 573 574 /* Returns the flux at the boundary at a given fragment. 575 * This functions is called every time a path of the computation reaches 576 * this boundary. 577 * data is the pointer returned by stardis_create_data for this boundary. */ 578 STARDIS_API double 579 stardis_boundary_flux 580 (const struct stardis_interface_fragment* frag, 581 void* data); 582 583 /******************************************************************************* 584 * Mandatory functions for a solid-solid connection 585 ******************************************************************************/ 586 587 /* Returns the thermal contact resistance at a given fragment. 588 * This functions is called every time a path of the computation reaches 589 * this connection. 590 * data is the pointer returned by stardis_create_data for this connection. */ 591 STARDIS_API double 592 stardis_thermal_contact_resistance 593 (const struct stardis_interface_fragment* frag, 594 void* data); 595 596 /******************************************************************************* 597 * Mandatory functions for a solid-fluid connection 598 ******************************************************************************/ 599 600 /* Returns the emissivity at a given fragment. 601 * This functions is called every time a path of the computation reaches 602 * this connection. 603 * data is the pointer returned by stardis_create_data for this connection. */ 604 STARDIS_API double 605 stardis_emissivity 606 (const struct stardis_interface_fragment* frag, 607 const unsigned source_id, 608 void* data); 609 610 /* Returns the specular fraction at a given fragment. 611 * This functions is called every time a path of the computation reaches 612 * this connection. 613 * data is the pointer returned by stardis_create_data for this connection. */ 614 STARDIS_API double 615 stardis_specular_fraction 616 (const struct stardis_interface_fragment* frag, 617 const unsigned source_id, 618 void* data); 619 620 /* Returns the convection coefficient at a given fragment. 621 * This functions is called every time a path of the computation reaches 622 * this connection. 623 * data is the pointer returned by stardis_create_data for this connection. */ 624 STARDIS_API double 625 stardis_convection_coefficient 626 (const struct stardis_interface_fragment* frag, 627 void* data); 628 629 /* Returns the upper bound of the convection coefficient accross this connection. 630 * This functions is called once when initializing the computation. 631 * data is the pointer returned by stardis_create_data for this connection. */ 632 STARDIS_API double 633 stardis_max_convection_coefficient 634 (void* data); 635 636 /* Returns the reference temperature at a given fragment. 637 * This temperature is used as a reference to linearize radiative transfer 638 * in Picard computations. 639 * This functions is called every time a path of the computation reaches 640 * this boundary. 641 * data is the pointer returned by stardis_create_data for this boundary. */ 642 STARDIS_API double 643 stardis_reference_temperature 644 (const struct stardis_interface_fragment* frag, 645 void* data); 646 647 /* Computes the expected temperature range for this connection. 648 * This functions is called once when initializing the computation. 649 * data is the pointer returned by stardis_create_data for this connection. 650 * Returns its modified range argument. */ 651 STARDIS_API double* 652 stardis_t_range 653 (void* data, 654 double range[2]); 655 656 /******************************************************************************* 657 * Mandatory functions for a spherical source. 658 * These functions are used to calculate the external flux at the boundaries 659 ******************************************************************************/ 660 661 /* Retrieve the position of the spherical source center. 662 * This function is used to calculate the external flux at the boundaries. 663 * Returns its modified position argument */ 664 STARDIS_API double* 665 stardis_spherical_source_position 666 (const double time, /* [s] */ 667 double position[3], 668 void* data); 669 670 /* Retrieve the power of the spherical source. */ 671 STARDIS_API double /* [W] */ 672 stardis_spherical_source_power 673 (const double time, 674 void* data); 675 676 /* Describes the diffuse part of the source's radiance, i.e. the radiance 677 * emitted by the source and scattered at least once in the environment. This 678 * parameter is actually used to approximate a semi-transparent medium. Its 679 * value can be 0, meaning that the source has not been scattered by the 680 * environment, or, to put it another way, that the source is in a vacuum. */ 681 STARDIS_API double /* [W/m^2/sr] */ 682 stardis_spherical_source_diffuse_radiance 683 (const double time, 684 const double dir[3], 685 void* data); 686 687 /******************************************************************************* 688 * Mandatory functions for a radiative environment 689 ******************************************************************************/ 690 691 /* Retrieve the temperature of radiative paths that reach infinity */ 692 STARDIS_API double 693 stardis_radiative_env_temperature 694 (const double time, /* [s] */ 695 const double dir[3], 696 void* data); 697 698 /* Recover the reference temperature of radiative paths that reach 699 * infinity. It is used to linearize radiative transfer */ 700 STARDIS_API double 701 stardis_radiative_env_reference_temperature 702 (const double time, /* [s] */ 703 const double dir[3], 704 void* data); 705 706 /* Computes the expected temperature range for this radiative 707 * environment. 708 * This functions is called once when initializing the computation. 709 * data is the pointer returned by stardis_create_data for this 710 * radiative environment. 711 * Returns its modified range argument. */ 712 STARDIS_API double* 713 stardis_t_range 714 (void* data, 715 double range[2]); 716 717 #ifdef __cplusplus 718 } /* extern "C" */ 719 #endif 720 721 #endif