htrdr

Solving radiative transfer in heterogeneous media
git clone git://git.meso-star.fr/htrdr.git
Log | Files | Refs | README | LICENSE

htrdr_atmosphere_sun.h (2509B)


      1 /* Copyright (C) 2018-2019, 2022-2025 Centre National de la Recherche Scientifique
      2  * Copyright (C) 2020-2022 Institut Mines Télécom Albi-Carmaux
      3  * Copyright (C) 2022-2025 Institut Pierre-Simon Laplace
      4  * Copyright (C) 2022-2025 Institut de Physique du Globe de Paris
      5  * Copyright (C) 2018-2025 |Méso|Star> (contact@meso-star.com)
      6  * Copyright (C) 2022-2025 Observatoire de Paris
      7  * Copyright (C) 2022-2025 Université de Reims Champagne-Ardenne
      8  * Copyright (C) 2022-2025 Université de Versaille Saint-Quentin
      9  * Copyright (C) 2018-2019, 2022-2025 Université Paul Sabatier
     10  *
     11  * This program is free software: you can redistribute it and/or modify
     12  * it under the terms of the GNU General Public License as published by
     13  * the Free Software Foundation, either version 3 of the License, or
     14  * (at your option) any later version.
     15  *
     16  * This program is distributed in the hope that it will be useful,
     17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     19  * GNU General Public License for more details.
     20  *
     21  * You should have received a copy of the GNU General Public License
     22  * along with this program. If not, see <http://www.gnu.org/licenses/>. */
     23 
     24 #ifndef HTRDR_ATMOSPHERE_SUN_H
     25 #define HTRDR_ATMOSPHERE_SUN_H
     26 
     27 #include <rsys/rsys.h>
     28 
     29 /* Forward declaration */
     30 struct htrdr;
     31 struct htrdr_atmosphere_sun;
     32 struct ssp_rng;
     33 
     34 extern LOCAL_SYM res_T
     35 htrdr_atmosphere_sun_create
     36   (struct htrdr* htrdr,
     37    struct htrdr_atmosphere_sun** out_sun);
     38 
     39 extern LOCAL_SYM void
     40 htrdr_atmosphere_sun_ref_get
     41   (struct htrdr_atmosphere_sun* sun);
     42 
     43 extern LOCAL_SYM void
     44 htrdr_atmosphere_sun_ref_put
     45   (struct htrdr_atmosphere_sun* sun);
     46 
     47 /* Setup the direction *toward* the sun "center" */
     48 extern LOCAL_SYM void
     49 htrdr_atmosphere_sun_set_direction
     50   (struct htrdr_atmosphere_sun* sun,
     51    const double direction[3]); /* Must be normalized */
     52 
     53 /* Return a pdf of the sampled dir */
     54 extern LOCAL_SYM double
     55 htrdr_atmosphere_sun_sample_direction
     56   (struct htrdr_atmosphere_sun* sun,
     57    struct ssp_rng* rng,
     58    double dir[3]);
     59 
     60 extern LOCAL_SYM double
     61 htrdr_atmosphere_sun_get_solid_angle
     62   (const struct htrdr_atmosphere_sun* sun);
     63 
     64 extern LOCAL_SYM double /* W/m^2/sr/m */
     65 htrdr_atmosphere_sun_get_radiance
     66   (const struct htrdr_atmosphere_sun* sun,
     67    const double wavelength);
     68 
     69 extern LOCAL_SYM int
     70 htrdr_atmosphere_sun_is_dir_in_solar_cone
     71   (const struct htrdr_atmosphere_sun* sun,
     72    const double dir[3]);
     73 
     74 #endif /* HTRDR_ATMOSPHERE_SUN_H */