MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <math.h>
#include <mpi.h>
#include <stdio.h>
#include <time.h>
#include <gsl/gsl_rng.h>
#include <libgadget/partmanager.h>
#include <libgadget/walltime.h>
#include <libgadget/slotsmanager.h>
#include <libgadget/utils/mymalloc.h>
#include <libgadget/density.h>
#include <libgadget/domain.h>
#include <libgadget/forcetree.h>
#include <libgadget/timestep.h>
#include <libgadget/gravity.h>
#include "stub.h"
Go to the source code of this file.
Classes | |
struct | density_testdata |
Functions | |
static void | set_init_hsml (ForceTree *Tree) |
static void | check_densities (double MinGasHsml) |
static void | do_density_test (void **state, const int numpart, double expectedhsml, double hsmlerr) |
static void | test_density_flat (void **state) |
static void | test_density_close (void **state) |
void | do_random_test (void **state, gsl_rng *r, const int numpart) |
static void | test_density_random (void **state) |
void | trivial_domain (DomainDecomp *ddecomp) |
static int | teardown_density (void **state) |
static int | setup_density (void **state) |
int | main (void) |
Variables | |
static struct ClockTable | CT |
|
static |
Definition at line 60 of file test_density.c.
References part_manager_type::NumPart, P, PartManager, and SPHP.
Referenced by do_density_test().
|
static |
Definition at line 80 of file test_density.c.
References ActiveParticles::ActiveParticle, part_manager_type::BoxSize, check_densities(), Cosmology::CMBTemperature, CP, density_testdata::ddecomp, density(), density_testdata::dp, force_tree_free(), force_tree_rebuild(), get_unitsystem(), GetDensityKernelType(), GetNumNgb(), Cosmology::HubbleParam, slots_manager_type::info, init_cosmology(), density_params::MaxNumNgbDeviation, part_manager_type::MaxPart, message(), density_params::MinGasHsmlFractional, myfree, mymalloc2, ActiveParticles::NumActiveParticle, part_manager_type::NumPart, Cosmology::Omega0, Cosmology::OmegaBaryon, Cosmology::OmegaLambda, P, PartManager, PEANO(), Cosmology::RadiationOn, set_densitypar(), set_init_hsml(), slot_info::size, SlotsManager, density_testdata::sph_pred, SPHP, DomainDecomp::TopLeaves, topleaf_data::topnode, and Cosmology::w0_fld.
Referenced by do_random_test(), test_density_close(), and test_density_flat().
void do_random_test | ( | void ** | state, |
gsl_rng * | r, | ||
const int | numpart | ||
) |
Definition at line 230 of file test_density.c.
References part_manager_type::BoxSize, do_density_test(), P, and PartManager.
Referenced by test_density_random().
int main | ( | void | ) |
Definition at line 357 of file test_density.c.
|
static |
Definition at line 34 of file test_density.c.
References force_get_father(), GetDensityKernelType(), GetNumNgb(), NODE::len, NODE::mass, NODE::mom, ForceTree::Nodes, part_manager_type::NumPart, P, and PartManager.
Referenced by do_density_test().
|
static |
Definition at line 314 of file test_density.c.
References density_params::BlackHoleMaxAccretionRadius, density_params::BlackHoleNgbFactor, CT, density_testdata::ddecomp, DENSITY_KERNEL_CUBIC_SPLINE, density_params::DensityKernelType, density_params::DensityResolutionEta, density_testdata::dp, gravshort_tree_params::FractionalGravitySoftening, gravshort_set_softenings(), init_forcetree_params(), density_params::MaxNumNgbDeviation, part_manager_type::MaxPart, density_params::MinGasHsmlFractional, mymalloc, particle_alloc_memory(), PartManager, density_testdata::r, set_densitypar(), set_gravshort_treepar(), setup_sync_points(), slots_allocate_sph_pred_data(), slots_init(), slots_reserve(), slots_set_enabled(), SlotsManager, density_testdata::sph_pred, trivial_domain(), and walltime_init().
|
static |
Definition at line 301 of file test_density.c.
|
static |
Definition at line 197 of file test_density.c.
References part_manager_type::BoxSize, do_density_test(), P, and PartManager.
|
static |
Definition at line 178 of file test_density.c.
References part_manager_type::BoxSize, do_density_test(), P, and PartManager.
|
static |
Definition at line 262 of file test_density.c.
References do_random_test(), and density_testdata::r.
void trivial_domain | ( | DomainDecomp * | ddecomp | ) |
Definition at line 278 of file test_density.c.
References BITS_PER_DIMENSION, topnode_data::Daughter, density_testdata::ddecomp, DomainDecomp::domain_allocated_flag, task_data::EndLeaf, topnode_data::Leaf, mymalloc, DomainDecomp::NTopLeaves, DomainDecomp::NTopNodes, topnode_data::Shift, topnode_data::StartKey, task_data::StartLeaf, topleaf_data::Task, DomainDecomp::Tasks, DomainDecomp::TopLeaves, topleaf_data::topnode, and DomainDecomp::TopNodes.
Referenced by setup_density().
|
static |
Definition at line 301 of file test_density.c.
Referenced by setup_density().