2,334 research outputs found

    A simple multigrid scheme for solving the Poisson equation with arbitrary domain boundaries

    Get PDF
    We present a new multigrid scheme for solving the Poisson equation with Dirichlet boundary conditions on a Cartesian grid with irregular domain boundaries. This scheme was developed in the context of the Adaptive Mesh Refinement (AMR) schemes based on a graded-octree data structure. The Poisson equation is solved on a level-by-level basis, using a "one-way interface" scheme in which boundary conditions are interpolated from the previous coarser level solution. Such a scheme is particularly well suited for self-gravitating astrophysical flows requiring an adaptive time stepping strategy. By constructing a multigrid hierarchy covering the active cells of each AMR level, we have designed a memory-efficient algorithm that can benefit fully from the multigrid acceleration. We present a simple method for capturing the boundary conditions across the multigrid hierarchy, based on a second-order accurate reconstruction of the boundaries of the multigrid levels. In case of very complex boundaries, small scale features become smaller than the discretization cell size of coarse multigrid levels and convergence problems arise. We propose a simple solution to address these issues. Using our scheme, the convergence rate usually depends on the grid size for complex grids, but good linear convergence is maintained. The proposed method was successfully implemented on distributed memory architectures in the RAMSES code, for which we present and discuss convergence and accuracy properties as well as timing performances.Comment: 33 pages, 15 figures, accepted for publication in Journal of Computational Physic

    Tips for implementing multigrid methods on domains containing holes

    Full text link
    As part of our development of a computer code to perform 3D `constrained evolution' of Einstein's equations in 3+1 form, we discuss issues regarding the efficient solution of elliptic equations on domains containing holes (i.e., excised regions), via the multigrid method. We consider as a test case the Poisson equation with a nonlinear term added, as a means of illustrating the principles involved, and move to a "real world" 3-dimensional problem which is the solution of the conformally flat Hamiltonian constraint with Dirichlet and Robin boundary conditions. Using our vertex-centered multigrid code, we demonstrate globally second-order-accurate solutions of elliptic equations over domains containing holes, in two and three spatial dimensions. Keys to the success of this method are the choice of the restriction operator near the holes and definition of the location of the inner boundary. In some cases (e.g. two holes in two dimensions), more and more smoothing may be required as the mesh spacing decreases to zero; however for the resolutions currently of interest to many numerical relativists, it is feasible to maintain second order convergence by concentrating smoothing (spatially) where it is needed most. This paper, and our publicly available source code, are intended to serve as semi-pedagogical guides for those who may wish to implement similar schemes.Comment: 18 pages, 11 figures, LaTeX. Added clarifications and references re. scope of paper, mathematical foundations, relevance of work. Accepted for publication in Classical & Quantum Gravit

    Afivo: a framework for quadtree/octree AMR with shared-memory parallelization and geometric multigrid methods

    Get PDF
    Afivo is a framework for simulations with adaptive mesh refinement (AMR) on quadtree (2D) and octree (3D) grids. The framework comes with a geometric multigrid solver, shared-memory (OpenMP) parallelism and it supports output in Silo and VTK file formats. Afivo can be used to efficiently simulate AMR problems with up to about 10810^{8} unknowns on desktops, workstations or single compute nodes. For larger problems, existing distributed-memory frameworks are better suited. The framework has no built-in functionality for specific physics applications, so users have to implement their own numerical methods. The included multigrid solver can be used to efficiently solve elliptic partial differential equations such as Poisson's equation. Afivo's design was kept simple, which in combination with the shared-memory parallelism facilitates modification and experimentation with AMR algorithms. The framework was already used to perform 3D simulations of streamer discharges, which required tens of millions of cells

    Multi-Dimensional Astrophysical Structural and Dynamical Analysis I. Development of a Nonlinear Finite Element Approach

    Full text link
    A new field of numerical astrophysics is introduced which addresses the solution of large, multidimensional structural or slowly-evolving problems (rotating stars, interacting binaries, thick advective accretion disks, four dimensional spacetimes, etc.). The technique employed is the Finite Element Method (FEM), commonly used to solve engineering structural problems. The approach developed herein has the following key features: 1. The computational mesh can extend into the time dimension, as well as space, perhaps only a few cells, or throughout spacetime. 2. Virtually all equations describing the astrophysics of continuous media, including the field equations, can be written in a compact form similar to that routinely solved by most engineering finite element codes. 3. The transformations that occur naturally in the four-dimensional FEM possess both coordinate and boost features, such that (a) although the computational mesh may have a complex, non-analytic, curvilinear structure, the physical equations still can be written in a simple coordinate system independent of the mesh geometry. (b) if the mesh has a complex flow velocity with respect to coordinate space, the transformations will form the proper arbitrary Lagrangian- Eulerian advective derivatives automatically. 4. The complex difference equations on the arbitrary curvilinear grid are generated automatically from encoded differential equations. This first paper concentrates on developing a robust and widely-applicable set of techniques using the nonlinear FEM and presents some examples.Comment: 28 pages, 9 figures; added integral boundary conditions, allowing very rapidly-rotating stars; accepted for publication in Ap.
    corecore