From 14ffe105794fb00a3306852953986bcc39747e38 Mon Sep 17 00:00:00 2001 From: schnetter Date: Mon, 7 Dec 2009 17:12:39 +0000 Subject: Add a new group "Bvec" to HydroBase, containing the magnetic field. Same as the velocity "vel", this is a vector group with three components. There are also two new parameters "initial_Bvec" with default value "none", specifying that Bvec does not have storage. This keeps things backward compatible. Another parameter "Bvec_evolution_method" specifies its method; the default value is also "none". These parameters need to be extended by initial data and evolution thorns that handle magnetic fields. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinBase/HydroBase/trunk@18 57fe0bb3-ccba-405f-9b23-de0201f165b7 --- src/Initialisation.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'src') diff --git a/src/Initialisation.c b/src/Initialisation.c index a739091..fcd71f5 100644 --- a/src/Initialisation.c +++ b/src/Initialisation.c @@ -111,3 +111,58 @@ void HydroBase_Y_e_one (CCTK_ARGUMENTS) "Unsupported parameter value for InitBase::initial_data_setup_method"); } } + + + +void HydroBase_Bvec_zero (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + + int const np = cctk_lsh[0] * cctk_lsh[1] * cctk_lsh[2]; + +#pragma omp parallel for + for (int i=0; i= 2) { +#pragma omp parallel for + for (int i=0; i= 3) { +#pragma omp parallel for + for (int i=0; i= 4) { + CCTK_WARN (CCTK_WARN_ABORT, + "Too many active time levels for HydroBase::Bvec"); + } + + } + else + { + CCTK_WARN (CCTK_WARN_ABORT, + "Unsupported parameter value for InitBase::initial_data_setup_method"); + } +} -- cgit v1.2.3