Octree-based domain discretization. For the sake of simplicity, the basic principles are outlined by using a quadtree, the 2-D analog of a 3-D octree. (a) Quadtree structure: the tissue (gray quads, material tag “1”) is discretized at a higher resolution, whereas a coarser resolution is used to discretize the bath (white quads, material tag “0”). The solid red line represents the surface of the object. The quadtree is nonconformal, with hanging nodes arising wherever larger cells meet smaller cells. (b) Dual mesh generation: the dual mesh is derived from the primal mesh, i.e., the octree cells, by the following transformation rules. The entities vertex, edge, face, and cell in the primal mesh are translated to cell, face, edge, and vertex in the dual mesh, respectively. (c) Modified dual mesh: in 3-D, the basic dual mesh approach may also yield nonstandard element types. The insertion of nodes at the transition between larger and smaller boxes eliminates this undesirable property, resulting in the generation of “standard” elements only. (d) Element types: the four “standard” elements generated by the algorithm and an example of a “nonstandard” element that could arise in 3-D without modifications of the dual mesh are shown.