7from .Makefile
import Makefile
8from ..Logger
import Logger, LoggerPrintOption
12 Creates one README for the whole setup, so people can look up what
13 they have actually built.
15 The README has some default content. Then it hosts some info about the
16 actual build. This information is provided from the makefile just before
17 the readme is actually dumped. Finally, there is information about the
18 individual tools used. This information is generated from
19 peano4.api.datamodel.Model where each individual model that we use adds
20 entries to the readme. Particular toolboxes or extensions can add their
21 information through their models, too
25# Readme of a Peano 4 project
27This experiment did rely on Peano 4 or a toolbox created on top of Peano.
28If you publish results obtained with this source code, we would appreciate
29if you could point to the project homepage
31http://www.peano-framework.org/
33and cite the appropriate papers from below.
38Peano's core ideas, algorithms and (usage) vision are best discussed in the
39TOMS paper below. The TOMS paper describes the third generation of Peano.
40While it is thus not a perfect description, the core concepts by means of
41data structures and user model is the same as in Peano 4. Please cite this
42paper when you use the software:
44~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45 @article{Weinzierl:2019:Peano,
46 author = {Weinzierl, Tobias},
47 title = {The Peano Software-Parallel, Automaton-Based, Dynamically Adaptive Grid Traversals},
49 issue_date = {June 2019},
50 publisher = {Association for Computing Machinery},
51 address = {New York, NY, USA},
55 url = {https://doi.org/10.1145/3319797},
56 doi = {10.1145/3319797},
57 abstract = {We discuss the design decisions, design alternatives, and rationale behind the third generation of Peano, a framework for dynamically adaptive Cartesian meshes derived from spacetrees. Peano ties the mesh traversal to the mesh storage and supports only one element-wise traversal order resulting from space-filling curves. The user is not free to choose a traversal order herself. The traversal can exploit regular grid subregions and shared memory as well as distributed memory systems with almost no modifications to a serial application code. We formalize the software design by means of two interacting automata-one automaton for the multiscale grid traversal and one for the application-specific algorithmic steps. This yields a callback-based programming paradigm. We further sketch the supported application types and the two data storage schemes realized before we detail high-performance computing aspects and lessons learned. Special emphasis is put on observations regarding the used programming idioms and algorithmic concepts. This transforms our report from a "one way to implement things" code description into a generic discussion and summary of some alternatives, rationale, and design decisions to be made for any tree-based adaptive mesh refinement software.},
58 journal = {ACM Trans. Math. Softw.}, \
62 keywords = {Software, spacetree, adaptive mesh refinement, parallel multiscale grid traversal
64~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67There is an earlier publication about Peano in SISC which discusses the core
68algorithms with the stacks in great detail. This paper can be seen as release
69paper for previous Peano code generations (generation 2).
72~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 @article{10.1137/100799071,
74 author = {Weinzierl, Tobias and Mehl, Miriam},
75 title = {Peano-A Traversal and Storage Scheme for Octree-Like Adaptive Cartesian Multiscale Grids},
77 issue_date = {September 2011},
78 publisher = {Society for Industrial and Applied Mathematics},
83 url = {https://doi.org/10.1137/100799071},
84 doi = {10.1137/100799071},
85 abstract = {Almost all approaches to solving partial differential equations (PDEs) are based upon a spatial discretization of the computational domain - a grid. This paper presents an algorithm to generate, store, and traverse a hierarchy of $d$-dimensional Cartesian grids represented by a $(k=3)$-spacetree, a generalization of the well-known octree concept, and it also shows the correctness of the approach. These grids may change their adaptive structure throughout the traversal. The algorithm uses $2d+4$ stacks as data structures for both cells and vertices, and the storage requirements for the pure grid reduce to one bit per vertex for both the complete grid connectivity structure and the multilevel grid relations. Since the traversal algorithm uses only stacks, the algorithm's cache hit rate is continually higher than 99.9 percent, and the runtime per vertex remains almost constant; i.e., it does not depend on the overall number of vertices or the adaptivity pattern. We use the algorithmic approach as the fundamental concept for a mesh management for $d$-dimensional PDEs and for a matrix-free PDE solver represented by a compact discrete $3^d$-point operator. In the latter case, one can implement a Jacobi smoother, a Krylov solver, or a geometric multigrid scheme within the presented traversal scheme which inherits the low memory requirements and the good memory access characteristics directly.},
86 journal = {SIAM J. Sci. Comput.},
90 keywords = {octree, cache efficiency, multiscale, space-filling curve, adaptive Cartesian grid, spacetree, partial differential equation}
92~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119 Write README-executablename.md into directory, e.g. README-tsunami.md
121 If the project has no executable name, we fall back to the name of the
122 Python script which invoked the generation.
124 name = self.
_executable_name or os.path.splitext(os.path.basename(sys.argv[0]))[0]
125 filename = directory +
"/README-" + name +
".md"
127 Logger().log(
"Write README to {}".format(filename))
129 with open(filename,
"w")
as file:
133## Information provided by used packages
140## Information provided by data model
149File has been generated by
153 file.write(
" " + i )
156www.peano-framework.org
157(C) 2021- Tobias Weinzierl
161 Logger().log(
"README {} is ready".format(filename), LoggerPrintOption.ALWAYS_PRINT)
Singleton logger for the Peano 4 Python API.
Creates one README for the whole setup, so people can look up what they have actually built.
set_executable_name(self, executable_name)
add_entry(self, readme_entry)
add_package_description(self, readme_package_descriptor)
set_constants(self, description)
generate(self, directory)
Write README-executablename.md into directory, e.g.