The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
proto.h
Go to the documentation of this file.
1 /** \file proto.h
2 
3 Declaration of all the functions of the FARGO code
4 
5 @author THORIN modifications by
6 Ondřej Chrenko <chrenko@sirrah.troja.mff.cuni.cz>, Copyright (C) 2017;
7 original code by Frédéric Masset
8 
9 */
10 
11 void masterprint (const char *template, ...);
12 void mastererr (const char *template, ...);
14 void prs_exit ();
15 void prs_error();
16 void message ();
19 void DumpSources ();
20 void UpdateLog ();
21 void ReadfromFile ();
22 void InitLabel ();
23 void Initialization ();
24 void var();
25 void ReadVariables();
26 void PrintUsage ();
29 void TellEverything ();
30 void GiveTimeInfo ();
31 void InitSpecificTime ();
32 void GiveSpecificTime ();
33 void EmptyPlanetSystemFile ();
34 void WritePlanetFile ();
35 void WritePlanetSystemFile ();
36 void WriteBigPlanetFile ();
40 void WriteDiskPolar();
41 void WriteDim ();
42 void SendOutput ();
43 void FillForcesArrays ();
44 void AdvanceSystemFromDisk ();
46 void InitGas ();
47 void AccreteOntoPlanets ();
48 void FindOrbitalElements ();
49 int FindNumberOfPlanets ();
51 void FreePlanetary ();
53 void ListPlanets ();
54 real GetPsysInfo ();
55 void RotatePsys ();
57 real GasMomentum ();
58 void DivisePolarGrid ();
59 void InitComputeAccel ();
60 void OpenBoundary ();
61 void NonReflectingBoundary ();
62 void ApplyOuterSourceMass ();
64 void CorrectVtheta ();
65 boolean DetectCrash ();
66 void FillPolar1DArrays ();
67 void InitEuler ();
68 real min2 ();
69 real max2 ();
70 void ActualiseGas ();
71 void AlgoGas ();
72 void SubStep1 ();
73 void SubStep2 ();
74 int ConditionCFL ();
75 real Sigma();
76 void FillSigma();
77 void RefillSigma ();
78 void Transport ();
79 void OneWindRad ();
82 void ComputeResiduals ();
84 void AdvectSHIFT ();
85 void OneWindTheta ();
86 void QuantitiesAdvection ();
87 void ComputeExtQty ();
88 void ComputeSpeQty ();
89 void InitTransport () ;
90 void ComputeStarRad ();
91 void ComputeStarTheta ();
92 void ComputeLRMomenta ();
93 void ComputeVelocities ();
95 void VanLeerTheta ();
96 void InitViscosity ();
97 void ViscousTerms ();
98 void AllocateComm ();
99 void CommunicateBoundaries ();
100 void handfpe();
101 void setfpe ();
102 void merge ();
103 void ReadPrevDim ();
104 void CheckRebin ();
105 void SplitDomain ();
106 void InitVariables();
107 real FViscosity ();
108 real AspectRatio ();
109 void MakeDir ();
110 FILE *fopenp ();
111 /* #THORIN: energy equation implementation */
112 void SubStep3 ();
113 void ComputeSoundSpeed ();
115 void ComputePressureField ();
117 void mpi_make1Dprofile ();
118 void InitGasDensityEnergy ();
120 real Energy ();
121 void FillEnergy ();
122 void RefillEnergy ();
123 void FillVtheta ();
124 void InitGasVelocity ();
126 void FillCoolingTime ();
127 real InitQplus ();
128 void FillQplus ();
131 void ImposeKeplerianEdges ();
132 void ReadfromAsciiFile ();
133 /* #THORIN: radiative diffusion */
135 void CalculateQminus ();
136 void CalculateFlaring ();
137 void CalculateQirr ();
139 void TemperatureGradient ();
140 void MidplaneVolumeDensity ();
141 void OpacityProfile ();
146 void DiffusionCoefs ();
148 void ChessBoardIndexing ();
149 void SetWaveKillingZones ();
150 void DampingBoundary ();
151 void ActualizeQbalance ();
152 /* #THORIN: FARGO-REBOUND interface */
153 struct reb_simulation *SetupReboundSimulation ();
154 void SetupIntegratorParams ();
155 void AdvanceSystemRebound ();
156 void AdditionalForces ();
157 void OutputElements ();
158 void OutputNbodySimulation ();
159 boolean ChkCloseEncWithPl ();
160 void DiscardParticlesDist ();
162 int ResolveCollisions ();
163 struct reb_simulation *RestartReboundSimulation ();
165 void MinStepForRebound ();
166 real DampingTW04 ();
168 void DumpOmegaFrame ();
170 /* #THORIN: pebble accretion */
171 void InitPebbleArrays ();
172 void EquilPebbleDisk ();
173 void InitPebblesViaFlux ();
174 void RestartPebbleDisk ();
175 void PebbleStokesNumbers ();
177 void CorrectPebblesVtheta ();
178 void EvolvePebbleDisk ();
179 void WritePebbles ();
180 real Trapzd ();
182 void EtaPressureSupport ();
183 void DampPebbles ();
184 void TransportPebbles ();
185 void OneWindRadPebbles ();
186 void OneWindThetaPebbles ();
188 void SourceTermsPebbles ();
189 void SubStep1Pebbles ();
190 boolean DetectCrashPebbles ();
191 void SynchronizePebbleDisc ();
192 void CriticalCharTime ();
193 void ParticleDiffusion ();
194 void BckpFieldsForBC ();
195 void ParametricAccretion ();
196 /* #THORIN: tools */
197 void CreateTorqueMapInfile ();
void ImposeKeplerianEdges()
PlanetarySystem * AllocPlanetSystem()
void InitPebbleArrays()
Initialise polar arrays associated with the pebble disk.
Definition: Pebbles.c:37
double real
Definition of the type 'real' used throughout the code.
Definition: types.h:20
real IntegrateColumnMass()
void ComputeAverageThetaVelocities()
void FillPolar1DArrays()
Definition: SourceEuler.c:57
void ComputeStarTheta()
void PrintUsage()
void MultiplyPolarGridbyConstant()
void setfpe()
Definition: fpe.c:15
PlanetarySystem * InitPlanetarySystem()
void WritePlanetFile()
void OneWindThetaPebbles()
void SourceTermsPebbles()
void CalculateQirr()
void SetupIntegratorParams()
void CalculateQminus()
void Transport()
void ImplicitRadiativeDiffusion()
real ConstructSequence()
void SynchronizeFargoRebound()
real InitCoolingTime()
real FluxLimiterValue()
real GasTotalMass()
real ThicknessSmoothing()
void ComputePressureField()
real max2()
void FillCoolingTime()
Definition: Theo.c:110
void SetWaveKillingZones()
Sets the wave-killing factors within the damping zones; inspired by de Val-Borro et al...
Definition: SideEuler.c:242
boolean DetectCrash()
real DampingTW04()
void DumpSources()
void AdvanceSystemFromDisk()
void WritePlanetSystemFile()
void SendOutput()
void InitGasVelocity()
void SynchronizeOverlapFields()
real VanLeerRadial()
void InitGasDensityEnergy()
void SubStep3()
void DampingBoundary()
void WriteBigPlanetFile()
A structure used to store any scalar fied on the computational domain.
Definition: types.h:37
void ChessBoardIndexing()
Function ensures the odd-even ordering of the SOR method when the grid is split on multiple CPUs...
void PebbleStokesNumbers()
real min2()
void OpacityProfile()
Fills the opacity polar grid, either with a fixed parametric value or using the Bell & Lin (1994) opa...
void DiffusionCoefs()
Calculation of the diffusion coefficients.
void FreePlanetary()
void OneWindRadPebbles()
void WriteBigPlanetSystemFile()
real GetPsysInfoFromRsim()
void RefillEnergy()
int ConditionCFL()
Contains all the information about a planetary system at a given instant in time. ...
Definition: types.h:96
void prs_error()
void InitGas()
void CommunicateBoundaries()
void CalculateFlaring()
Calculates the sine of the grazing angle by reconstructing the surface from the pressure scale height...
void WriteDiskPolar()
void InitRadiatDiffusionFields()
Initialises the polar arrays associated with the heating/cooling processes.
Definition: EnergySources.c:46
void ActualiseGas()
void WritePebbles()
void AdditionalForces()
void ApplyOuterSourceMass()
void RefillSigma()
void AlgoGas()
void masterprint(const char *template,...)
Definition: LowTasks.c:40
real AspectRatio()
void FillSigma()
Definition: Theo.c:25
void InitLabel()
void handfpe()
Definition: fpe.c:8
void prs_exit()
void FillForcesArrays()
void TransportPebbles()
void ReadfromFile()
void ActualizeQbalance()
Definition: Output.c:239
void SubStep1Pebbles()
void ComputeResiduals()
void InitViscosity()
Definition: Viscosity.c:67
void message()
void QuantitiesAdvection()
void DiscardParticlesUnbound()
void CorrectPebblesVtheta()
void CreateTorqueMapInfile()
void ParticleDiffusion()
void AccreteOntoPlanets()
void CriticalCharTime()
void RotatePsys()
void RestartPlanetarySystem()
void RestartPebbleDisk()
void GiveSpecificTime()
void DumpOmegaFrame()
void UpdateDivVelocAndStressTensor()
int FindNumberOfPlanets()
void InitPebblesViaFlux()
void SynchronizePebbleDisc()
Synchronises pebble fluid hydrodynamic quantities among the overlapping grid zones.
Definition: Pebbles.c:685
real FViscosity()
void merge()
void InitComputeAccel()
Definition: SideEuler.c:93
void EtaPressureSupport()
void TellEverything()
Definition: Interpret.c:281
void VanLeerTheta()
void MinStepForRebound()
void ParametricAccretion()
void InitVariables()
Definition: var.c:17
void CheckRebin()
real GetOmegaFrame()
PolarGrid * CreatePolarGrid()
void FillEnergy()
Definition: Theo.c:76
real GetGlobalIFrac()
real InitQplus()
void ComputeVelocities()
void UpdateLog()
void ReadVariables()
void BckpFieldsForBC()
Backs up the initial state of the pebble disk to impose damping boundary conditions later...
Definition: Pebbles.c:168
void ComputeThetaElongations()
real GasTotalEnergy()
void mpi_make1Dprofile()
void SplitDomain()
Definition: split.c:24
void AdvectSHIFT()
void OutputElements()
void MakeDir()
void EquilPebbleDisk()
void InitSpecificTime()
void DiscardParticlesDist()
void FindOrbitalElements()
void mastererr(const char *template,...)
Definition: LowTasks.c:49
real EffectiveOpticalDepth()
void ComputeLRMomenta()
void ReadPrevDim()
Definition: rebin.c:16
void UpdateVelocityWithViscousTerms()
void ComputeConstantResidual()
void GiveTimeInfo()
FILE * fopenp()
void EvolvePebbleDisk()
struct reb_simulation * SetupReboundSimulation()
boolean DetectCrashPebbles()
Safety check for negative pebble densities.
Definition: Pebbles.c:753
void InitEuler()
void FillVtheta()
void Initialization()
void QuantitiesAdvectionPebbles()
real TellNbOrbits()
void ListPlanets()
void ComputeStarRad()
void AccretePebblesOntoPlanets()
void InitTransport()
void OneWindTheta()
void DivisePolarGrid()
struct reb_simulation * RestartReboundSimulation()
void TemperatureGradient()
Finds the temperature gradients and their magnitude over the mesh.
real Energy()
void AdvanceSystemRebound()
void ComputeTemperatureField()
real Trapzd()
real GetPsysInfo()
void WriteDim()
Definition: Output.c:191
void DampPebbles()
real Sigma()
void EmptyPlanetSystemFile()
int SuccessiveOverrelaxation()
void OpenBoundary()
void MidplaneVolumeDensity()
real TellNbOutputs()
void CorrectVtheta()
void IterateRelaxationParameter()
When solving the energy equation for the first time, the function spans through various values of the...
void FillQplus()
Definition: Theo.c:125
void ApplyBoundaryCondition()
void OutputNbodySimulation()
void SubStep1()
real GetfromPlanetFile()
void SubStep2()
void NonReflectingBoundary()
void ComputeSoundSpeed()
void ViscousTerms()
void OneWindRad()
int ResolveCollisions()
void var()
void ReadfromAsciiFile()
void AllocateComm()
Definition: commbound.c:28
void ComputeSpeQty()
void ComputeExtQty()
real GasMomentum()
boolean ChkCloseEncWithPl()