PLUTO
split_source.c
Go to the documentation of this file.
1 /* ///////////////////////////////////////////////////////////////////// */
2 /*!
3  \file
4  \brief Include source terms using operator splitting.
5 
6  The SplitSource() function handles source terms in a separate
7  step using operator splitting.
8  It is called from Integrate() between standard hydro advances.
9  At present these source terms are one or more of the following:
10 
11  - optically thin radiative losses (cooling)
12  - Diffusion operators:
13  - resistivity
14  - Thermal conduction
15  - Viscosity
16  - additional user-defined terms may also be included here.
17 
18  \authors A. Mignone (mignone@ph.unito.it)
19  \date May 10, 2013
20 */
21 /* ///////////////////////////////////////////////////////////////////// */
22 #include "pluto.h"
23 
24 /* ********************************************************************* */
25 void SplitSource (const Data *d, double dt, Time_Step *Dts, Grid *grid)
26 /*!
27  * Take one step on operator-split source terms.
28  *
29  * \param [in,out] d pointer to PLUTO Data structure containing
30  * the solution array updated from the most
31  * recent call
32  * \param[in] dt the time step used to integrate the source
33  * terms
34  * \param[in] Dts pointer to the time step structure
35  * \param[in] grid pointer to an array of grid structures
36  *
37  *********************************************************************** */
38 {
39 /* ---- GLM source term treated in main ---- */
40 /*
41  #ifdef GLM_MHD
42  GLM_SOURCE (d->Vc, dt, grid);
43  #endif
44 */
45 /* ---------------------------------------------
46  Cooling/Heating losses
47  --------------------------------------------- */
48 
49  #if COOLING != NO
50  #if COOLING == POWER_LAW /* -- solve exactly -- */
51  PowerLawCooling (d->Vc, dt, Dts, grid);
52  #else
53  CoolingSource (d, dt, Dts, grid);
54  #endif
55  #endif
56 
57 /* ----------------------------------------------
58  Parabolic terms using STS:
59 
60  - resistivity
61  - thermal conduction
62  - viscosity
63  ---------------------------------------------- */
64 
65  #if (PARABOLIC_FLUX & SUPER_TIME_STEPPING)
66  STS (d, Dts, grid);
67  #endif
68 
69  #if (PARABOLIC_FLUX & RK_CHEBYSHEV)
70  RKC (d, Dts, grid);
71  #endif
72 }
void RKC(const Data *d, Time_Step *, Grid *)
Definition: rkc.c:58
double **** Vc
The main four-index data array used for cell-centered primitive variables.
Definition: structs.h:31
void CoolingSource(const Data *d, double dt, Time_Step *Dts, Grid *GXYZ)
void PowerLawCooling(Data_Arr VV, double dt, Time_Step *Dts, Grid *grid)
Definition: cooling.c:50
Definition: structs.h:78
void STS(const Data *d, Time_Step *, Grid *)
Definition: sts.c:55
PLUTO main header file.
Definition: structs.h:30
void SplitSource(const Data *d, double dt, Time_Step *Dts, Grid *grid)
Definition: split_source.c:25