rnpfi.5 (3244B)
1 .\" Copyright (C) 2022, 2023, 2025 Centre National de la Recherche Scientifique 2 .\" Copyright (C) 2022, 2023, 2025 Institut Pierre-Simon Laplace 3 .\" Copyright (C) 2022, 2023, 2025 Institut de Physique du Globe de Paris 4 .\" Copyright (C) 2022, 2023, 2025 |Méso|Star>(contact@meso-star.com) 5 .\" Copyright (C) 2022, 2023, 2025 Observatoire de Paris 6 .\" Copyright (C) 2022, 2023, 2025 Université de Reims Champagne-Ardenne 7 .\" Copyright (C) 2022, 2023, 2025 Université de Versaille Saint-Quentin 8 .\" Copyright (C) 2022, 2023, 2025 Université Paul Sabatier 9 .\" 10 .\" This program is free software: you can redistribute it and/or modify 11 .\" it under the terms of the GNU General Public License as published by 12 .\" the Free Software Foundation, either version 3 of the License, or 13 .\" (at your option) any later version. 14 .\" 15 .\" This program is distributed in the hope that it will be useful, 16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 .\" GNU General Public License for more details. 19 .\" 20 .\" You should have received a copy of the GNU General Public License 21 .\" along with this program. If not, see <http://www.gnu.org/licenses/>. 22 .Dd September 26, 2023 23 .Dt RNPFI 5 24 .Os 25 .Sh NAME 26 .Nm rnpfi 27 .Nd Rad-Net Phase Function Indices 28 .Sh DESCRIPTION 29 .Nm 30 is a binary file format for storing a list of indices referring to 31 phase functions. 32 The indices are attached to a volumetric mesh which is 33 .Em not 34 described there but must be defined in a separate file, for example in an 35 .Xr smsh 5 36 file. 37 The number of indices and their order must therefore correspond to the 38 data of the mesh to which they are attached, i.e. to the nodes or cells 39 listed in the corresponding mesh. 40 .Pp 41 A 42 .Nm 43 file is actually a Star-Buffer file 44 .Pq see Xr sbuf 5 . 45 It starts with a header of 4 integers. 46 The first integer is a power of two 47 .Pq usually 4096 48 that defines the size of the memory page in bytes 49 .Pq Va pagesize 50 on which the list of indices are aligned. 51 By aligning data to pagesize, and depending on system requirements, 52 memory mapping can be used to automatically load/unload pages on demand 53 .Pq see Xr mmap 2 . 54 The second integer is the 55 .Va size 56 of the array, i.e. the number of indices stored in the list. 57 The two remaining integers store the memory size 58 .Pq 4 bytes 59 and the memory alignment 60 .Pq 4 bytes 61 of an index. 62 .Pp 63 Padding bytes follow the file header to align the listed indices to 64 .Va pagesize . 65 .Pp 66 Padding bytes are finally added at the end of the file to align its 67 overall size with the size of a page. 68 .Pp 69 Data are encoded with respect to the little endian bytes ordering, 70 i.e. least significant bytes are stored first. 71 .Pp 72 The file format is as follows: 73 .Bl -column (pagesize) (::=) () 74 .It Ao Va rnpfi Ac Ta ::= Ta Ao Va pagesize Ac Ao Va size Ac Li 4 4 75 .It Ta Ta Aq Va padding 76 .It Ta Ta Aq Va indices 77 .It Ta Ta Aq Va padding 78 .It Ao Va pagesize Ac Ta ::= Ta Vt uint64_t 79 .It Ao Va size Ac Ta ::= Ta Vt uint64_t 80 # Number of indices stored 81 .It Ao Va indices Ac Ta ::= Ta Vt uint32_t ... 82 .It Ao Va padding Ac Ta ::= Ta Op Vt int8_t ... 83 .El 84 .Sh SEE ALSO 85 .Xr mmap 2 , 86 .Xr sbuf 5 , 87 .Xr smsh 5 88 .Sh HISTORY 89 The 90 .Nm 91 format was first developed for the 92 .Xr htrdr-planeto 1 93 program.