Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

allocate.c File Reference

routines for allocating particle and tree storage More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "allvars.h"
#include "proto.h"

Go to the source code of this file.

Functions

void allocate_commbuffers (void)
void allocate_memory (void)
void free_memory (void)


Detailed Description

routines for allocating particle and tree storage

Definition in file allocate.c.


Function Documentation

void allocate_commbuffers void   ) 
 

Allocates a number of small buffers and arrays, the largest one being the communication buffer. The communication buffer itself is mapped onto various tables used in the different parts of the force algorithms. We further allocate space for the top-level tree nodes, and auxiliary arrays for the domain decomposition algorithm.

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

< Maximum number of nodes in the top-level tree used for domain decomposition

Definition at line 19 of file allocate.c.

References All, global_data_all_processes::BufferSize, global_data_all_processes::BunchSizeDensity, global_data_all_processes::BunchSizeDomain, global_data_all_processes::BunchSizeForce, global_data_all_processes::BunchSizeHydro, CommBuffer, DensDataGet, DensDataIn, DensDataPartialResult, DensDataResult, DomainCount, DomainCountSph, DomainEndList, DomainHmax, DomainKeyBuf, DomainMoment, DomainNodeIndex, DomainPartBuf, DomainSphBuf, DomainStartList, DomainTask, DomainTreeNodeLen, DomainWork, endrun(), Exportflag, FLOAT, GravDataGet, GravDataIn, GravDataIndexTable, GravDataOut, GravDataResult, HydroDataGet, HydroDataIn, HydroDataPartialResult, HydroDataResult, MAXTOPNODES, NTask, peanokey, ThisTask, and TopNodes.

Referenced by begrun().

void allocate_memory void   ) 
 

This routine allocates memory for particle storage, both the collisionless and the SPH particles.

Definition at line 103 of file allocate.c.

References All, endrun(), global_data_all_processes::MaxPart, global_data_all_processes::MaxPartSph, P, SphP, and ThisTask.

Referenced by read_file(), and restart().

void free_memory void   ) 
 

This routine frees the memory for the particle storage. Note: We don't actually bother to call it in the code... When the program terminats, the memory will be automatically freed by the operating system.

Definition at line 144 of file allocate.c.

References All, global_data_all_processes::MaxPart, global_data_all_processes::MaxPartSph, P, and SphP.


Generated on Sun May 22 17:33:29 2005 for GADGET-2 by  doxygen 1.3.9.1