GADGET-4
grav_forcetest.h
Go to the documentation of this file.
1/*******************************************************************************
2 * \copyright This file is part of the GADGET4 N-body/SPH code developed
3 * \copyright by Volker Springel. Copyright (C) 2014-2020 by Volker Springel
4 * \copyright (vspringel@mpa-garching.mpg.de) and all contributing authors.
5 *******************************************************************************/
6
12#ifndef GRAV_FORCETEST_H
13#define GRAV_FORCETEST_H
14
15#include "gadgetconfig.h"
16
17#include <math.h>
18#include <mpi.h>
19#include <stdio.h>
20#include <stdlib.h>
21#include <string.h>
22
23#include "../data/allvars.h"
24#include "../data/dtypes.h"
25#include "../data/simparticles.h"
26#include "../domain/domain.h"
27#include "../gravtree/gravtree.h"
28
29#define TESTGRID 384
30
31#ifdef LONG_X_BITS
32#if TESTGRID != ((TESTGRID / LONG_X) * LONG_X)
33#error "TESTGRID must be a multiple of the stretch factor in the x-direction"
34#endif
35#endif
36
37#ifdef LONG_Y_BITS
38#if TESTGRID != ((TESTGRID / LONG_Y) * LONG_Y)
39#error "TESTGRID must be a multiple of the stretch factor in the y-direction"
40#endif
41#endif
42
43#ifdef LONG_Z_BITS
44#if TESTGRID != ((TESTGRID / LONG_Z) * LONG_Z)
45#error "TESTGRID must be a multiple of the stretch factor in the x-direction"
46#endif
47#endif
48
49#define TESTGRIDX ((TESTGRID / LONG_X))
50#define TESTGRIDY ((TESTGRID / LONG_Y))
51#define TESTGRIDZ ((TESTGRID / LONG_Z))
52
53#define TESTGRIDZ2 (TESTGRIDZ / 2 + 1)
54
55#define ASMTH_DIRECT 30.0
56
58{
59 private:
60 simparticles *Sp;
61 gravtree<simparticles> *GravTree;
63
64 public:
66 {
67 Sp = Sp_ptr;
68 GravTree = GravTree_ptr;
69 D = Domain_ptr;
70 }
71
72 void gravity_forcetest(int timebin);
73};
74
75#endif /* GRAV_FORCETEST_H */
Definition: domain.h:31
void gravity_forcetest(int timebin)
gravtest(simparticles *Sp_ptr, gravtree< simparticles > *GravTree_ptr, domain< simparticles > *Domain_ptr)