KLSS3N5JSIY3CIMXEKMYAOOBGBCEEDFPYFN5RVZIQLQLKFZ3YGUQC Cactus Code Thorn HydroBaseAuthor(s) : Erik Schnetter <schnetter@gmail.com>Maintainer(s): Erik Schnetter <schnetter@gmail.com>Licence : LGPL--------------------------------------------------------------------------1. PurposeProvide storage for the hydro variables2. DefinitionsThe HydroBase variables correspond to the Valencia formulation.HydroBase uses the following conventions:M = M_sunc = G = 1We also assume the following constants of nature:c = 299792458.0 m/sG = 6.67428e-11 m^3/kg/s^2mu0 = 4 pi 1.0e-7 N/A^2eps0 = 1 / (mu0 c^2)M_sun = 1.98892e+30 kgThis corresponds to the following units:[M] = M_sun[L] = [M] (G / c^2)[T] = [L] / c[B] = 1 / [L] / sqrt(eps0 G / c^2))
# Interface definition for thorn HydroBaseIMPLEMENTS: HydroBaseUSES INCLUDE HEADER: loop.hxxPUBLIC:CCTK_REAL rho TYPE=gf TAGS='index={1 1 1}' "rest mass density rho"CCTK_REAL vel TYPE=gf TAGS='index={1 1 1}' { velx vely velz } "velocity v^i"CCTK_REAL eps TYPE=gf TAGS='index={1 1 1}' "specific internal energy epsilon"CCTK_REAL press TYPE=gf TAGS='index={1 1 1}' "pressure p"
# Parameter definitions for thorn HydroBaseRESTRICTED:KEYWORD initial_hydro "Initial conditions for hydro"{"vacuum" :: "vacuum (without atmosphere)"} "vacuum"
# Schedule definitions for thorn HydroBaseSCHEDULE GROUP HydroBase_InitialData AT initial{} "Schedule group for calculating hydro initial data"SCHEDULE GROUP HydroBase_PostInitial AT initial AFTER HydroBase_InitialData{} "Schedule group for modifying the hydro initial data, such as e.g. adding noise"SCHEDULE GROUP HydroBase_InitialData AT postregrid{} "Schedule group for calculating hydro initial data"SCHEDULE GROUP HydroBase_PostInitial AT postregrid AFTER HydroBase_InitialData{} "Schedule group for modifying the hydro initial data, such as e.g. adding noise"SCHEDULE GROUP HydroBase_SetHydroVars AT postregrid{} "Set hydro variables in this group, or before this group"SCHEDULE GROUP HydroBase_SetHydroVars AT poststep{} "Set hydro variables in this group, or before this group"SCHEDULE GROUP HydroBase_SetHydroVars IN ODESolvers_PostStep{} "Set hydro variables in this group, or before this group"if (CCTK_EQUALS(initial_hydro, "vacuum")) {SCHEDULE HydroBase_initial_data IN HydroBase_InitialData{LANG: CWRITES: rho(everywhere) vel(everywhere) eps(everywhere) press(everywhere)} "Set up vacuum initial data"}
#include <loop.hxx>#include <cctk.h>#include <cctk_Arguments_Checked.h>#include <cctk_Parameters.h>namespace HydroBase {using namespace Loop;extern "C" void HydroBase_initial_data(CCTK_ARGUMENTS) {DECLARE_CCTK_ARGUMENTS_HydroBase_initial_data;DECLARE_CCTK_PARAMETERS;const GF3D<CCTK_REAL, 1, 1, 1> rho_(cctkGH, rho);const GF3D<CCTK_REAL, 1, 1, 1> velx_(cctkGH, velx);const GF3D<CCTK_REAL, 1, 1, 1> vely_(cctkGH, vely);const GF3D<CCTK_REAL, 1, 1, 1> velz_(cctkGH, velz);const GF3D<CCTK_REAL, 1, 1, 1> eps_(cctkGH, eps);const GF3D<CCTK_REAL, 1, 1, 1> press_(cctkGH, press);loop_all<1, 1, 1>(cctkGH, [&](const PointDesc &p) { rho_(p.I) = 0; });loop_all<1, 1, 1>(cctkGH, [&](const PointDesc &p) { velx_(p.I) = 0; });loop_all<1, 1, 1>(cctkGH, [&](const PointDesc &p) { vely_(p.I) = 0; });loop_all<1, 1, 1>(cctkGH, [&](const PointDesc &p) { velz_(p.I) = 0; });loop_all<1, 1, 1>(cctkGH, [&](const PointDesc &p) { eps_(p.I) = 0; });loop_all<1, 1, 1>(cctkGH, [&](const PointDesc &p) { press_(p.I) = 0; });}} // namespace HydroBase
# Main make.code.defn file for thorn HydroBase# Source files in this directorySRCS = hydrobase.cxx# Subdirectories containing source filesSUBDIRS =