1,330 research outputs found

    Efficient and accurate three dimensional Poisson solver for surface problems

    Full text link
    We present a method that gives highly accurate electrostatic potentials for systems where we have periodic boundary conditions in two spatial directions but free boundary conditions in the third direction. These boundary conditions are needed for all kind of surface problems. Our method has an O(N log N) computational cost, where N is the number of grid points, with a very small prefactor. This Poisson solver is primarily intended for real space methods where the charge density and the potential are given on a uniform grid.Comment: 6 pages, 2 figure

    Direct Integration of the Collisionless Boltzmann Equation in Six-dimensional Phase Space: Self-gravitating Systems

    Full text link
    We present a scheme for numerical simulations of collisionless self-gravitating systems which directly integrates the Vlasov--Poisson equations in six-dimensional phase space. By the results from a suite of large-scale numerical simulations, we demonstrate that the present scheme can simulate collisionless self-gravitating systems properly. The integration scheme is based on the positive flux conservation method recently developed in plasma physics. We test the accuracy of our code by performing several test calculations including the stability of King spheres, the gravitational instability and the Landau damping. We show that the mass and the energy are accurately conserved for all the test cases we study. The results are in good agreement with linear theory predictions and/or analytic solutions. The distribution function keeps the property of positivity and remains non-oscillatory. The largest simulations are run on 64^6 grids. The computation speed scales well with the number of processors, and thus our code performs efficiently on massively parallel supercomputers.Comment: 35 pages, 19 figures. Submitted to the Astrophysical Journa

    COSMOS: A Hybrid N-Body/Hydrodynamics Code for Cosmological Problems

    Get PDF
    We describe a new hybrid N-body/hydrodynamical code based on the particle-mesh (PM) method and the piecewise-parabolic method (PPM) for use in solving problems related to the evolution of large-scale structure, galaxy clusters, and individual galaxies. The code, named COSMOS, possesses several new features which distinguish it from other PM-PPM codes. In particular, to solve the Poisson equation we have written a new multigrid solver which can determine the gravitational potential of isolated matter distributions and which properly takes into account the finite-volume discretization required by PPM. All components of the code are constructed to work with a nonuniform mesh, preserving second-order spatial differences. The PPM code uses vacuum boundary conditions for isolated problems, preventing inflows when appropriate. The PM code uses a second-order variable-timestep time integration scheme. Radiative cooling and cosmological expansion terms are included. COSMOS has been implemented for parallel computers using the Parallel Virtual Machine (PVM) library, and it features a modular design which simplifies the addition of new physics and the configuration of the code for different types of problems. We discuss the equations solved by COSMOS and describe the algorithms used, with emphasis on these features. We also discuss the results of tests we have performed to establish that COSMOS works and to determine its range of validity.Comment: 43 pages, 14 figures, submitted to ApJS and revised according to referee's comment

    A Parallel Adaptive P3M code with Hierarchical Particle Reordering

    Full text link
    We discuss the design and implementation of HYDRA_OMP a parallel implementation of the Smoothed Particle Hydrodynamics-Adaptive P3M (SPH-AP3M) code HYDRA. The code is designed primarily for conducting cosmological hydrodynamic simulations and is written in Fortran77+OpenMP. A number of optimizations for RISC processors and SMP-NUMA architectures have been implemented, the most important optimization being hierarchical reordering of particles within chaining cells, which greatly improves data locality thereby removing the cache misses typically associated with linked lists. Parallel scaling is good, with a minimum parallel scaling of 73% achieved on 32 nodes for a variety of modern SMP architectures. We give performance data in terms of the number of particle updates per second, which is a more useful performance metric than raw MFlops. A basic version of the code will be made available to the community in the near future.Comment: 34 pages, 12 figures, accepted for publication in Computer Physics Communication

    GAMER: a GPU-Accelerated Adaptive Mesh Refinement Code for Astrophysics

    Full text link
    We present the newly developed code, GAMER (GPU-accelerated Adaptive MEsh Refinement code), which has adopted a novel approach to improve the performance of adaptive mesh refinement (AMR) astrophysical simulations by a large factor with the use of the graphic processing unit (GPU). The AMR implementation is based on a hierarchy of grid patches with an oct-tree data structure. We adopt a three-dimensional relaxing TVD scheme for the hydrodynamic solver, and a multi-level relaxation scheme for the Poisson solver. Both solvers have been implemented in GPU, by which hundreds of patches can be advanced in parallel. The computational overhead associated with the data transfer between CPU and GPU is carefully reduced by utilizing the capability of asynchronous memory copies in GPU, and the computing time of the ghost-zone values for each patch is made to diminish by overlapping it with the GPU computations. We demonstrate the accuracy of the code by performing several standard test problems in astrophysics. GAMER is a parallel code that can be run in a multi-GPU cluster system. We measure the performance of the code by performing purely-baryonic cosmological simulations in different hardware implementations, in which detailed timing analyses provide comparison between the computations with and without GPU(s) acceleration. Maximum speed-up factors of 12.19 and 10.47 are demonstrated using 1 GPU with 4096^3 effective resolution and 16 GPUs with 8192^3 effective resolution, respectively.Comment: 60 pages, 22 figures, 3 tables. More accuracy tests are included. Accepted for publication in ApJ

    A Direct Multigrid Poisson Solver for Oct-Tree Adaptive Meshes

    Full text link
    We describe a finite-volume method for solving the Poisson equation on oct-tree adaptive meshes using direct solvers for individual mesh blocks. The method is a modified version of the method presented by Huang and Greengard (2000), which works with finite-difference meshes and does not allow for shared boundaries between refined patches. Our algorithm is implemented within the FLASH code framework and makes use of the PARAMESH library, permitting efficient use of parallel computers. We describe the algorithm and present test results that demonstrate its accuracy.Comment: 10 pages, 6 figures, accepted by the Astrophysical Journal; minor revisions in response to referee's comments; added char
    corecore