Adaptive mesh refinement in titanium Page: 3 of 8
This article is part of the collection entitled: Office of Scientific & Technical Information Technical Reports and was provided to Digital Library by the UNT Libraries Government Documents Department.
The following text was automatically extracted from the image on this page using optical character recognition software:
f ine grid 1 (P1)
fine grid 0 (P0)
coarse grid 0 (p0)
mre grid 2
coarse grid 1 (pl)
Figure 1. Two adjacent levels of grids are
shown in this example for the two dimen-
sional case. There are two coarse grids at the
coarse level and three fine grids at the fine
level. For each grid, the number in parenthe-
sis represents the processor it is assigned
to. The dotted squares in each grid are the
cells it contains. The refinement ratio be-
tween these two levels is 2. In this paper, all
AMR algorithms are cell-centered.
the values of two adjacent arrays (at the same refinement
level) at their grid boundary by copying them to the corre-
sponding ghost cells. This copy operation is performed by
the copy method of Titanium array. Given two Titanium ar-
rays TA1 and TA2, TA1.copy(TA2) copies the contents
of the elements of TA2 into the elements of TA1 that have
the same indexes, where TA1 and TA2 can belong to differ-
ent processors. For our Poisson solver, a large portion of the
communication time is consumed by the exchange method.
The basic AMR data structures are implemented in 2000
lines of Titanium code in contrast to around 35000 lines of
code in Chombo. Note that we do not include comments in
the lines of code. Even after consideration of the simplifica-
tions we have made and the limitation of the lines of code
as a productivity measure, there is still a significant save in
programming effort for using Titanium.
Frequently used operations on data-class objects are im-
plemented as methods of classes. Some of these operations
are used to match the solution at the grid interfaces be-
tween two adjacent refinement levels, while others are used
to pass information from one level to another. One method
we want to mention is CFlnterp, which determines the val-
ues at ghost cells with quadratic interpretations. This opera-
tion is a good example of the ones that involve both irregu-
lar data access and computation. The basic AMR operations
are implemented in 1200 lines of Titanium code, whereas
the corresponding part in Chombo has around 6500 lines of
2.2. An AMR multigrid algorithm
We use the same multigrid algorithm for elliptic problems
as Chombo does, which is described at high level in Fig-
ures 2 to 4. The goal here is to provide readers an over-
all picture of this algorithm and establish the notations for
our later discussions. For its details, please refer to  and
Chombo's design documents available at its website .
Note that the meaningful parts of 0i for l = 0, - - - ,'max
are those whose domains are not covered by any finer grids.
They together serve as the numerical solution to (2.1) on
the grid hierarchy Q0, - - , Qt'. Hereafter, we denote this
composite solution by 4/OmP, and let LOmP be the corre-
sponding discretized operator.
At each level 1, on the inner regions of Q' that are away
from OG'+1 (if it exists) Li is simply the usual (2N + 1)-
point stencil, where N is the space dimension. In the bound-
ary regions (both MG and 3Ql+l) L addresses the various
boundary conditions using the corresponding ghost cells.
Since these ghost cells may be filled in with additional infor-
mation from either level (1-1) or level (1+1), at most three
levels of data are needed to evaluate Li on Q1. In the multi-
grid algorithm described here, a simplified version of L l de-
noted by Llg is also used, where it is assumed that there is
no finer levels above 1.
To illustrate how the multigrid algorithm iterates through
the refinement levels, shown in Figure 5 is a simple sketch
of one multigrid V-cycle on a three-level grid hierarchy. The
iteration starts at the finest level on the way down to the
coarsest level. After reaching the bottom, it goes back to the
top level. The arrows in this diagram show how informa-
tion flows through refinement levels. Note that the small V-
cycles are from procedure mgRelax, which introduces inter-
mediate refinement levels. This AMR multigrid algorithm
for Poisson's equation is implemented in 1500 lines of Ti-
tanium code, where 90% of our code is reusable for other
elliptic PDE solvers.
3. Test problems and preliminary profiling re-
Our implementation has covered almost all Titanium's fea-
tures including those added to Java such as templates, im-
mutable classes, and zone-based memory management. In
this section, we study the performance of our elliptic solver
in solving Poisson's equation on a cubic domain subject to
Here’s what’s next.
This article can be searched. Note: Results may vary based on the legibility of text within the document.
Tools / Downloads
Get a copy of this page or view the extracted text.
Citing and Sharing
Basic information for referencing this web page. We also provide extended guidance on usage rights, references, copying or embedding.
Reference the current page of this Article.
Colella, Phillip & Wen, Tong. Adaptive mesh refinement in titanium, article, January 21, 2005; Berkeley, California. (digital.library.unt.edu/ark:/67531/metadc785489/m1/3/: accessed January 22, 2018), University of North Texas Libraries, Digital Library, digital.library.unt.edu; crediting UNT Libraries Government Documents Department.