The FARGO_THORIN code developer's guide
|
Declaration of all the functions of the FARGO code. More...
Go to the source code of this file.
Declaration of all the functions of the FARGO code.
Definition in file proto.h.
void AccreteOntoPlanets | ( | ) |
void AccretePebblesOntoPlanets | ( | ) |
void ActualiseGas | ( | ) |
Referenced by OneWindRad(), OneWindRadPebbles(), QuantitiesAdvection(), and QuantitiesAdvectionPebbles().
void ActualizeQbalance | ( | ) |
Definition at line 239 of file Output.c.
References polargrid::Field, polargrid::Nrad, polargrid::Nsec, Qbalance, Qminus, and Qplus.
Referenced by SendOutput().
void AdditionalForces | ( | ) |
void AdvanceSystemFromDisk | ( | ) |
void AdvanceSystemRebound | ( | ) |
void AdvectSHIFT | ( | ) |
void AlgoGas | ( | ) |
void AllocateComm | ( | ) |
Definition at line 28 of file commbound.c.
References AdvecteLabel, allocated_com, CPU_Rank, CPUOVERLAP, EnergyEq, NSEC, prs_exit(), RecvInnerBoundary, RecvOuterBoundary, SendInnerBoundary, SendOuterBoundary, size_com, and YES.
Referenced by CommunicateBoundaries().
PlanetarySystem* AllocPlanetSystem | ( | ) |
void ApplyBoundaryCondition | ( | ) |
void ApplyOuterSourceMass | ( | ) |
real AspectRatio | ( | ) |
void BckpFieldsForBC | ( | ) |
Backs up the initial state of the pebble disk to impose damping boundary conditions later.
Definition at line 168 of file Pebbles.c.
References polargrid::Field, polargrid::Nrad, polargrid::Nsec, OmegaFrame, PebbleDens, PebbleVrad, PebbleVtheta, PebDensInit, PebVradInit, PebVthetaInit, and Rmed.
Referenced by RestartPebbleDisk().
void CalculateFlaring | ( | ) |
Calculates the sine of the grazing angle by reconstructing the surface from the pressure scale height.
See Eq. (15) in Chrenko et al. (2017).
Definition at line 147 of file EnergySources.c.
References AU_SI, polargrid::Field, InvDiffRsup, InvRmed, polargrid::Nrad, polargrid::Nsec, OmegaInv, Rinf, Rmed, Rsup, SoundSpeed, SQRT_ADIABIND_INV, and STELLARRADIUS.
Referenced by ImplicitRadiativeDiffusion().
void CalculateQirr | ( | ) |
void CalculateQminus | ( | ) |
void CheckRebin | ( | ) |
void ChessBoardIndexing | ( | ) |
Function ensures the odd-even ordering of the SOR method when the grid is split on multiple CPUs.
Definition at line 486 of file EnergySources.c.
References CPU_Master, CPU_Number, CPU_Rank, CPUOVERLAP, fargostat, jchess1st, jchess2nd, MPI_COMM_WORLD, MPI_INT, MPI_Recv(), MPI_Send(), and NRAD.
Referenced by SuccessiveOverrelaxation().
boolean ChkCloseEncWithPl | ( | ) |
void CommunicateBoundaries | ( | ) |
void ComputeAverageThetaVelocities | ( | ) |
void ComputeConstantResidual | ( | ) |
void ComputeExtQty | ( | ) |
void ComputeLRMomenta | ( | ) |
void ComputePressureField | ( | ) |
void ComputeResiduals | ( | ) |
void ComputeSoundSpeed | ( | ) |
Referenced by ApplyBoundaryCondition(), ImplicitRadiativeDiffusion(), and Initialization().
void ComputeSpeQty | ( | ) |
void ComputeStarRad | ( | ) |
void ComputeStarTheta | ( | ) |
void ComputeTemperatureField | ( | ) |
Referenced by ImplicitRadiativeDiffusion(), and Initialization().
void ComputeThetaElongations | ( | ) |
void ComputeVelocities | ( | ) |
int ConditionCFL | ( | ) |
real ConstructSequence | ( | ) |
void CorrectPebblesVtheta | ( | ) |
void CorrectVtheta | ( | ) |
PolarGrid* CreatePolarGrid | ( | ) |
void CreateTorqueMapInfile | ( | ) |
void CriticalCharTime | ( | ) |
void DampingBoundary | ( | ) |
real DampingTW04 | ( | ) |
void DampPebbles | ( | ) |
Referenced by EvolvePebbleDisk(), and SourceTermsPebbles().
boolean DetectCrash | ( | ) |
boolean DetectCrashPebbles | ( | ) |
Safety check for negative pebble densities.
Definition at line 753 of file Pebbles.c.
References DetectCrash(), and PebbleDens.
Referenced by AlgoGas().
void DiffusionCoefs | ( | ) |
Calculation of the diffusion coefficients.
Definition at line 527 of file EnergySources.c.
References polargrid::Field, FluxLimiterValue(), polargrid::Nrad, polargrid::Nsec, STEFANBOLTZMANN, Temperature, and TemperatureGradient().
Referenced by ImplicitRadiativeDiffusion().
void DiscardParticlesDist | ( | ) |
void DiscardParticlesUnbound | ( | ) |
void DivisePolarGrid | ( | ) |
void DumpOmegaFrame | ( | ) |
void DumpSources | ( | ) |
real EffectiveOpticalDepth | ( | ) |
void EmptyPlanetSystemFile | ( | ) |
real Energy | ( | ) |
void EquilPebbleDisk | ( | ) |
void EtaPressureSupport | ( | ) |
void EvolvePebbleDisk | ( | ) |
void FillCoolingTime | ( | ) |
Definition at line 110 of file Theo.c.
References CoolingTimeMed, InitCoolingTime(), NRAD, and Rmed.
Referenced by InitGasVelocity().
void FillEnergy | ( | ) |
void FillForcesArrays | ( | ) |
void FillPolar1DArrays | ( | ) |
Definition at line 57 of file SourceEuler.c.
References CPU_Master, GLOBALNRAD, GlobalRmed, IMIN, InvDiffRmed, InvDiffRsup, InvRinf, InvRmed, InvSurf, LogGrid, mastererr(), NRAD, NSEC, OmegaInv, OUTPUTDIR, PI, prs_exit(), Radii, Rinf, RMAX, Rmed, Rmed2, RMIN, Rsup, Surf, and YES.
Referenced by InitEuler().
void FillQplus | ( | ) |
Definition at line 125 of file Theo.c.
References InitQplus(), NRAD, QplusMed, and Rmed.
Referenced by InitGasVelocity().
void FillSigma | ( | ) |
void FillVtheta | ( | ) |
int FindNumberOfPlanets | ( | ) |
void FindOrbitalElements | ( | ) |
real FluxLimiterValue | ( | ) |
FILE* fopenp | ( | ) |
void FreePlanetary | ( | ) |
real FViscosity | ( | ) |
Referenced by InitGasVelocity(), InitQplus(), ParticleDiffusion(), and SubStep3().
real GetfromPlanetFile | ( | ) |
real GetGlobalIFrac | ( | ) |
real GetOmegaFrame | ( | ) |
real GetPsysInfo | ( | ) |
void GiveSpecificTime | ( | ) |
void GiveTimeInfo | ( | ) |
void handfpe | ( | ) |
Definition at line 8 of file fpe.c.
References CPU_Rank, and prs_exit().
Referenced by setfpe().
void ImplicitRadiativeDiffusion | ( | ) |
void ImposeKeplerianEdges | ( | ) |
void InitComputeAccel | ( | ) |
Definition at line 93 of file SideEuler.c.
References CellAbscissa, CellOrdinate, CreatePolarGrid(), polargrid::Field, NRAD, polargrid::Nrad, NSEC, polargrid::Nsec, PI, and Rmed.
Referenced by main().
real InitCoolingTime | ( | ) |
void InitEuler | ( | ) |
void InitGas | ( | ) |
void InitGasDensityEnergy | ( | ) |
void InitGasVelocity | ( | ) |
void Initialization | ( | ) |
void InitLabel | ( | ) |
void InitPebbleArrays | ( | ) |
Initialise polar arrays associated with the pebble disk.
Definition at line 37 of file Pebbles.c.
References CreatePolarGrid(), DragForceRad, DragForceTheta, GasAccelrad, GasAcceltheta, NRAD, NSEC, PEBBLEBULKDENS, PebbleDens, PebbleVrad, PebbleVtheta, pebbulkdens, RHO2CGS, and StokesNumber.
Referenced by InitEuler().
void InitPebblesViaFlux | ( | ) |
PlanetarySystem* InitPlanetarySystem | ( | ) |
real InitQplus | ( | ) |
void InitRadiatDiffusionFields | ( | ) |
Initialises the polar arrays associated with the heating/cooling processes.
Definition at line 46 of file EnergySources.c.
References ADIABIND, CreatePolarGrid(), CV, GASCONST, MOLWEIGHT, NRAD, NSEC, Qbalance, Qminus, and Write_Qbalance.
Referenced by InitEuler().
void InitSpecificTime | ( | ) |
void InitTransport | ( | ) |
Definition at line 217 of file TransportEuler.c.
References CreatePolarGrid(), dq, NRAD, NSEC, and TempShift.
Referenced by InitEuler().
void InitVariables | ( | ) |
Definition at line 17 of file var.c.
References ACCRETIONALHEATING, ACCRETIONRATE, ADIABIND, ADVLABEL, ALPHAVISCOSITY, ASPECTRATIO, BACKREACTION, CAVITYRADIUS, CAVITYRATIO, CAVITYWIDTH, COOLINGTIME, DAMPINGPERIODFRAC, DAMPINGRMAXFRAC, DAMPINGRMINFRAC, DAMPTOWARDS, DENSINFILE, DISCALBEDO, DISK, DT, ECCENTRICITY, EFFECTIVETEMPERATURE, ENERGYEQUATION, EXCLUDEHILL, FLARINGINDEX, FRAME, GETTORQUEFORPLANET, GRIDSPACING, HEATINGDELAY, HILLCUT, IAS15MINDT, IAS15PRECISSION, IMPOSEDDISKDRIFT, INDIRECTTERM, INITIALIZEFROMFILE, INT, LAMBDADOUBLING, MASSTAPER, NINTERM, NO, NOUTELEMENTS, NRAD, NSEC, NTOT, OMEGAFRAME, OPACITYDROP, OPENINNERBOUNDARY, OUTERSOURCEMASS, OUTPUTDIR, PARAMETRICACCRETION, PARAMETRICOPACITY, PARTICLEDIFFUSION, PEBBLEACCRETION, PEBBLEALPHA, PEBBLEBULKDENS, PEBBLECOAGULATION, PEBBLEFLUX, PLANETARYDENSITY, PLANETCONFIG, PLANETSFEELDISK, REAL, RELEASEDATE, RELEASERADIUS, RESOLVECOLLISIONS, RMAX, RMIN, ROCHESMOOTHING, SCHMIDTNUMBER, SIGMA0, SIGMASLOPE, STELLARIRRADIATION, STELLARRADIUS, STRING, TARGETNPL, TEMPERINFILE, THICKNESSSMOOTHING, TORQUEMAPINFILE, TRANSITIONRADIUS, TRANSITIONRATIO, TRANSITIONWIDTH, TRANSPORT, var(), VERTICALDAMPING, VISCOSITY, VRADINFILE, VTHETAINFILE, WRITEDENSITY, WRITEDIVV, WRITEENERGY, WRITEETA, WRITEQBALANCE, WRITEQPLUS, WRITETEMPERATURE, WRITETORQUEFILES, WRITEVELOCITY, and YES.
Referenced by ReadVariables().
void InitViscosity | ( | ) |
Definition at line 67 of file Viscosity.c.
References CreatePolarGrid(), DivergenceVelocity, NRAD, NSEC, TAUPP, TAURP, and TAURR.
Referenced by InitEuler().
real IntegrateColumnMass | ( | ) |
void IterateRelaxationParameter | ( | ) |
When solving the energy equation for the first time, the function spans through various values of the SOR parameter in order to find its best value to start with.
Definition at line 338 of file EnergySources.c.
References domega, polargrid::Field, masterprint(), Niterbest, NO, polargrid::Nrad, polargrid::Nsec, omegabest, prs_exit(), SORMAXITERS, SuccessiveOverrelaxation(), Temperature, and YES.
Referenced by ImplicitRadiativeDiffusion().
void ListPlanets | ( | ) |
void MakeDir | ( | ) |
void mastererr | ( | const char * | template, |
... | |||
) |
Definition at line 49 of file LowTasks.c.
References CPU_Master.
Referenced by CheckRebin(), Energy(), FillPolar1DArrays(), GetfromPlanetFile(), GetOmegaFrame(), Initialization(), main(), mpi_make1Dprofile(), PrintUsage(), ReadVariables(), and SplitDomain().
void masterprint | ( | const char * | template, |
... | |||
) |
Definition at line 40 of file LowTasks.c.
References CPU_Master.
Referenced by AlgoGas(), CreateTorqueMapInfile(), DiscardParticlesDist(), IntegrateColumnMass(), IterateRelaxationParameter(), main(), ReadVariables(), ResolveCollisions(), SetupReboundSimulation(), SplitDomain(), SuccessiveOverrelaxation(), and WriteDiskPolar().
real max2 | ( | ) |
void merge | ( | ) |
void message | ( | ) |
void MidplaneVolumeDensity | ( | ) |
real min2 | ( | ) |
void MinStepForRebound | ( | ) |
void mpi_make1Dprofile | ( | ) |
void MultiplyPolarGridbyConstant | ( | ) |
void NonReflectingBoundary | ( | ) |
void OneWindRad | ( | ) |
void OneWindRadPebbles | ( | ) |
void OneWindTheta | ( | ) |
void OneWindThetaPebbles | ( | ) |
void OpacityProfile | ( | ) |
Fills the opacity polar grid, either with a fixed parametric value or using the Bell & Lin (1994) opacity table.
Definition at line 656 of file EnergySources.c.
References a, b, polargrid::Field, kappa0, NO, polargrid::Nrad, polargrid::Nsec, OPA2CU, PARAMETRICOPACITY, RHO2CGS, T2SI, Temperature, and YES.
Referenced by ImplicitRadiativeDiffusion().
void OpenBoundary | ( | ) |
void OutputElements | ( | ) |
void OutputNbodySimulation | ( | ) |
void ParametricAccretion | ( | ) |
void ParticleDiffusion | ( | ) |
void PebbleStokesNumbers | ( | ) |
void PrintUsage | ( | ) |
void prs_error | ( | ) |
void prs_exit | ( | ) |
void QuantitiesAdvection | ( | ) |
void QuantitiesAdvectionPebbles | ( | ) |
void ReadfromAsciiFile | ( | ) |
void ReadfromFile | ( | ) |
void ReadPrevDim | ( | ) |
Definition at line 16 of file rebin.c.
References CPU_Master, OldNRAD, OldNSEC, OldRadii, OldRmed, and OUTPUTDIR.
Referenced by Initialization().
void ReadVariables | ( | ) |
void RefillEnergy | ( | ) |
void RefillSigma | ( | ) |
int ResolveCollisions | ( | ) |
void RestartPebbleDisk | ( | ) |
void RestartPlanetarySystem | ( | ) |
struct reb_simulation* RestartReboundSimulation | ( | ) |
void RotatePsys | ( | ) |
void SendOutput | ( | ) |
void setfpe | ( | ) |
void SetupIntegratorParams | ( | ) |
struct reb_simulation* SetupReboundSimulation | ( | ) |
void SetWaveKillingZones | ( | ) |
Sets the wave-killing factors within the damping zones; inspired by de Val-Borro et al.
(2006).
Definition at line 242 of file SideEuler.c.
References DAMPINGPERIODFRAC, DAMPINGRMAXFRAC, DAMPINGRMINFRAC, Max_or_active, PI, RMAX, Rmed, RMIN, WaveKiller, and Zero_or_active.
Referenced by InitEuler().
real Sigma | ( | ) |
Referenced by CreateTorqueMapInfile(), and InitGasVelocity().
void SourceTermsPebbles | ( | ) |
void SplitDomain | ( | ) |
Definition at line 24 of file split.c.
References CPU_Number, CPU_Rank, CPUOVERLAP, debug, GLOBALNRAD, IMAX, IMIN, mastererr(), masterprint(), Max_or_active, MaxMO_or_active, NRAD, One_or_active, prs_exit(), YES, and Zero_or_active.
Referenced by main().
void SubStep1 | ( | ) |
void SubStep1Pebbles | ( | ) |
void SubStep2 | ( | ) |
void SubStep3 | ( | ) |
int SuccessiveOverrelaxation | ( | ) |
void SynchronizeFargoRebound | ( | ) |
void SynchronizeOverlapFields | ( | ) |
void SynchronizePebbleDisc | ( | ) |
Synchronises pebble fluid hydrodynamic quantities among the overlapping grid zones.
Definition at line 685 of file Pebbles.c.
References CPU_Number, CPUOVERLAP, polargrid::Field, polargrid::Nrad, PebbleDens, PebbleVrad, PebbleVtheta, and SynchronizeOverlapFields().
Referenced by AlgoGas().
void TellEverything | ( | ) |
Definition at line 281 of file Interpret.c.
References AdvecteLabel, ASPECTRATIO, CPU_Master, DT, EnergyEq, G, NINTERM, NRAD, NSEC, NTOT, ParametricCooling, PI, RMAX, RMIN, SIGMA0, TellNbOrbits(), TellNbOutputs(), and YES.
Referenced by main().
real TellNbOrbits | ( | ) |
real TellNbOutputs | ( | ) |
void TemperatureGradient | ( | ) |
Finds the temperature gradients and their magnitude over the mesh.
Definition at line 580 of file EnergySources.c.
References polargrid::Field, InvDiffRmed, polargrid::Nrad, polargrid::Nsec, PI, Rmed, and Temperature.
Referenced by DiffusionCoefs().
real ThicknessSmoothing | ( | ) |
void Transport | ( | ) |
void TransportPebbles | ( | ) |
real Trapzd | ( | ) |
void UpdateDivVelocAndStressTensor | ( | ) |
void UpdateLog | ( | ) |
void UpdateVelocityWithViscousTerms | ( | ) |
real VanLeerRadial | ( | ) |
void VanLeerTheta | ( | ) |
void var | ( | ) |
void ViscousTerms | ( | ) |
void WriteBigPlanetFile | ( | ) |
void WriteBigPlanetSystemFile | ( | ) |
void WriteDim | ( | ) |
Definition at line 191 of file Output.c.
References CPU_Master, fopenp(), GLOBALNRAD, NINTERM, NSEC, NTOT, OUTPUTDIR, and RMAX.
Referenced by Initialization().
void WriteDiskPolar | ( | ) |
void WritePebbles | ( | ) |
void WritePlanetFile | ( | ) |
void WritePlanetSystemFile | ( | ) |