From b2d9429312b117fd22eb7058cd82f2f3a95ce025 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Wed, 19 Mar 2025 11:36:59 -0400 Subject: [PATCH 01/15] docs(LICENSE): added GPLv3 license --- LICENSE.txt | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..20d40b6 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file From 6cda7b1be9b410b86ff47d4ae7824d2b53171b43 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 07:31:34 -0400 Subject: [PATCH 02/15] feat(assets): brought changes from main --- assets/const/const.dat | 4 ++-- assets/const/format.sh | 10 ++++++++++ assets/const/meson.build | 17 +++++++++++++++++ assets/mesh/sphere.msh | Bin 0 -> 34259 bytes 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 assets/const/format.sh create mode 100644 assets/const/meson.build create mode 100644 assets/mesh/sphere.msh diff --git a/assets/const/const.dat b/assets/const/const.dat index 5d165ce..2d51028 100644 --- a/assets/const/const.dat +++ b/assets/const/const.dat @@ -11,7 +11,7 @@ Codata Internationally Recommended 2022 Values of the Fundamental Physical Const Symbol Name Value Unit Uncertainty Source ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -weinK Wien displacement law constant 2.89776850e-01 K cm 5.10000000e-07 CODATA2022 +wienK Wien displacement law constant 2.89776850e-01 K cm 5.10000000e-07 CODATA2022 au1Hyper atomic unit of 1st hyperpolarizablity 3.20636151e-53 C^3 m^3 J^-2 2.80000000e-60 CODATA2022 au2Hyper atomic unit of 2nd hyperpolarizablity 6.23538080e-65 C^4 m^4 J^-3 1.10000000e-71 CODATA2022 auEDip atomic unit of electric dipole moment 8.47835309e-30 C m 7.30000000e-37 CODATA2022 @@ -428,7 +428,7 @@ mH_amu_rel helion relative atomic mass h_shield_shift helion shielding shift 5.99674300e-05 1.00000000e-10 CODATA2022 F_hyperfine_Cs-133 hyperfine transition frequency of Cs-133 9.19263177e+09 1 / s 0.00000000e+00 CODATA2022 aSi_220_ideal lattice spacing of ideal Si (220) 1.92015572e-08 cm 3.20000000e-16 CODATA2022 -eta luminous efficacy 6.83000000e-05 s3 rad2 cd / (g cm2) 0.00000000e+00 CODATA2022 +eta luminous efficacy 6.83000000e-05 s3 rad2 cd/(g cm2) 0.00000000e+00 CODATA2022 rg_n_MHz_T neutron gyromag. ratio in MHz/T 2.91646931e+01 MHz T^-1 6.90000000e-06 CODATA2022 mN_amu_rel neutron relative atomic mass 1.00866492e+00 4.90000000e-10 CODATA2022 mu_N_invm nuclear magneton in inverse meter per tesla 2.54262341e-02 m^-1 T^-1 7.80000000e-12 CODATA2022 diff --git a/assets/const/format.sh b/assets/const/format.sh new file mode 100755 index 0000000..7e53731 --- /dev/null +++ b/assets/const/format.sh @@ -0,0 +1,10 @@ +#!/bin/sh +if [ "$#" -ne 2 ]; then + echo "Usage: $0 " + exit 1 +fi +input_file="$1" +output_file="$2" +printf 'const char embeddedConstants[] = R"(' > "$output_file" +cat "$input_file" >> "$output_file" +printf ')";\n' >> "$output_file" diff --git a/assets/const/meson.build b/assets/const/meson.build new file mode 100644 index 0000000..583fb32 --- /dev/null +++ b/assets/const/meson.build @@ -0,0 +1,17 @@ +data_file = files('const.dat') +command_file = files('format.sh') +output_file = meson.current_build_dir() + '/embedded_constants.h' + +embedded_constants_h = custom_target('embed_constants', + input: data_file, + output: 'embedded_constants.h', + command: ['sh', '-c', command_file[0].full_path()+' @INPUT@ ' + output_file, '@INPUT@', '@OUTPUT@'] +) + +# Ensure the generated header is included +const_data_header = include_directories('.') + +const_data_dep = declare_dependency( + include_directories: const_data_header, + sources: embedded_constants_h +) \ No newline at end of file diff --git a/assets/mesh/sphere.msh b/assets/mesh/sphere.msh new file mode 100644 index 0000000000000000000000000000000000000000..416c655ee2b9cd106d956e1d466e6f27ab12367b GIT binary patch literal 34259 zcmZvl1(cRm7q%7Yln@L=6c9vF6h!(UEg&VK(j`bsOAa6{-Q6H5-S9AU!_W*h$-oRC zDuROX-E5n#mu{U}^ho=`yC39!KX>u8 z&pz|aGimcy>fG9}yfwSDZqq&O2Stkgi`C-)`y~6%ec=B4n)v0pq{cJCn7(7kWq&3-?PN=gG@4f|DGj|A3QI^_wQNa_%5@I#PtQ9C64d1$ngDp zmN>r4D#Q2hS>pIEn+)H-XFk6#$ngDp=JT6fhVS1qpWhrZeE**L{Jto|_n&m!m&APk zNymLz%=e#k+*ibW|4GNqDdzXjk1Oln=T-gb_s@@;h@Q!%FMj|0xSqYHFMj|0xSr+K z7r%dgT+d$D7r%dgT+iOn7r%dgT+j08i{C##u4j4m#pltF>sda1@p<&)diJKi_&oY? zJzdq~pG0nBPA?ZXv_`{`qm=HO%jyANM`O z{QmiI3mfM5&yV}QVSfMoxE~ni_s@@8#4x{qe%zvl`Tg_berTBAKR<3U!~FjFaX&K5 z@1GyHxLEPgKR*BZomiK8-<)*a8yt1747k_&na8oNgxJ$ff0iA1=APRyc0#!_wZdGn zx0)=fS?Gu>DOUC2(u=PS+wV^F`?YaIzc9DE?B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--8F^ecpT4us|`trCX(KQZmEv{{5ZR zCu?}lF!r{R#8@|_%=ZB??hT*|zLw+(D zhR+=sA&ropPr~s19m(C0N=hbWHtn8OoW;cOtR|*hvYD8#FPJ!m;_N0)sW^v;8S~%& L2e1GBue<&aH!g3X literal 0 HcmV?d00001 From d2978ebccb3ac6c82b850491a66b4a57b7626ad8 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 07:33:33 -0400 Subject: [PATCH 03/15] refactor(src/resources): removed old src/resources directory in favor of ./assets --- src/resources/const/const.dat | 469 -------------------------------- src/resources/const/format.sh | 10 - src/resources/const/meson.build | 17 -- src/resources/mesh/sphere.msh | Bin 34259 -> 0 bytes src/resources/meson.build | 1 - 5 files changed, 497 deletions(-) delete mode 100644 src/resources/const/const.dat delete mode 100755 src/resources/const/format.sh delete mode 100644 src/resources/const/meson.build delete mode 100644 src/resources/mesh/sphere.msh delete mode 100644 src/resources/meson.build diff --git a/src/resources/const/const.dat b/src/resources/const/const.dat deleted file mode 100644 index 2d51028..0000000 --- a/src/resources/const/const.dat +++ /dev/null @@ -1,469 +0,0 @@ -CODATA 2022 + astrophysical constants -Most quantities have been converted to CGS -Generated on Feb 10, 2025 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -Reference: - -Mohr, P. , Tiesinga, E. , Newell, D. and Taylor, B. (2024), Codata Internationally Recommended 2022 Values of the Fundamental Physical Constants, -Codata Internationally Recommended 2022 Values of the Fundamental Physical Constants, -[online], https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=958002, https://physics.nist.gov/constants (Accessed February 10, 2025) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -Symbol Name Value Unit Uncertainty Source -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -wienK Wien displacement law constant 2.89776850e-01 K cm 5.10000000e-07 CODATA2022 -au1Hyper atomic unit of 1st hyperpolarizablity 3.20636151e-53 C^3 m^3 J^-2 2.80000000e-60 CODATA2022 -au2Hyper atomic unit of 2nd hyperpolarizablity 6.23538080e-65 C^4 m^4 J^-3 1.10000000e-71 CODATA2022 -auEDip atomic unit of electric dipole moment 8.47835309e-30 C m 7.30000000e-37 CODATA2022 -auEPol atomic unit of electric polarizablity 1.64877727e-41 C^2 m^2 J^-1 1.60000000e-49 CODATA2022 -auEQuad atomic unit of electric quadrupole moment 4.48655124e-40 C m^2 3.90000000e-47 CODATA2022 -auMDip atomic unit of magn. dipole moment 1.85480190e-23 J T^-1 1.60000000e-30 CODATA2022 -auMFlux atomic unit of magn. flux density 2.35051757e+09 G 7.10000000e-01 CODATA2022 -muD deuteron magn. moment 4.33073482e-27 J T^-1 3.80000000e-34 CODATA2022 -muD_Bhor deuteron magn. moment to Bohr magneton ratio 4.66975457e-04 5.00000000e-12 CODATA2022 -muD_Nuc deuteron magn. moment to nuclear magneton ratio 8.57438233e-01 9.20000000e-09 CODATA2022 -muD_e deuteron-electron magn. moment ratio -4.66434555e-04 5.00000000e-12 CODATA2022 -muD_p deuteron-proton magn. moment ratio 3.07012208e-01 4.50000000e-09 CODATA2022 -muD_n deuteron-neutron magn. moment ratio -4.48206520e-01 1.10000000e-07 CODATA2022 -rgE electron gyromagn. ratio 1.76085963e+11 s^-1 T^-1 5.30000000e+01 CODATA2022 -rgE_2pi electron gyromagn. ratio over 2 pi 2.80249532e+04 MHz T^-1 2.40000000e-03 CODATA2022 -muE electron magn. moment -9.28476412e-24 J T^-1 8.00000000e-31 CODATA2022 -muE_Bhor electron magn. moment to Bohr magneton ratio -1.00115965e+00 3.80000000e-12 CODATA2022 -muE_Nuc electron magn. moment to nuclear magneton ratio -1.83828197e+03 8.50000000e-07 CODATA2022 -muE_anom electron magn. moment anomaly 1.15965219e-03 3.80000000e-12 CODATA2022 -muE_muP_shield electron to shielded proton magn. moment ratio -6.58227596e+02 7.10000000e-06 CODATA2022 -muE_muH_shield electron to shielded helion magn. moment ratio 8.64058255e+02 1.00000000e-05 CODATA2022 -muE_D electron-deuteron magn. moment ratio -2.14392349e+03 2.30000000e-05 CODATA2022 -muE_mu electron-muon magn. moment ratio 2.06766989e+02 5.40000000e-06 CODATA2022 -muE_n electron-neutron magn. moment ratio 9.60920500e+02 2.30000000e-04 CODATA2022 -muE_p electron-proton magn. moment ratio -6.58210686e+02 6.60000000e-06 CODATA2022 -mu0 magn. constant 1.25663706e-06 N A^-2 0.00000000e+00 CODATA2022 -phi0 magn. flux quantum 2.06783385e-15 Wb 0.00000000e+00 CODATA2022 -muMu muon magn. moment -4.49044799e-26 J T^-1 4.00000000e-33 CODATA2022 -muMu_Bhor muon magn. moment to Bohr magneton ratio -4.84197045e-03 1.30000000e-10 CODATA2022 -muMu_Nuc muon magn. moment to nuclear magneton ratio -8.89059698e+00 2.30000000e-07 CODATA2022 -muMu_p muon-proton magn. moment ratio -3.18334512e+00 8.90000000e-08 CODATA2022 -rgN neutron gyromagn. ratio 1.83247171e+08 s^-1 T^-1 4.30000000e+01 CODATA2022 -rgN_2pi neutron gyromagn. ratio over 2 pi 2.91646950e+01 MHz T^-1 7.30000000e-06 CODATA2022 -muN neutron magn. moment -9.66236450e-27 J T^-1 2.40000000e-33 CODATA2022 -muN_Bhor neutron magn. moment to Bohr magneton ratio -1.04187563e-03 2.50000000e-10 CODATA2022 -muN_Nuc neutron magn. moment to nuclear magneton ratio -1.91304273e+00 4.50000000e-07 CODATA2022 -muN_p_shield neutron to shielded proton magn. moment ratio -6.84996940e-01 1.60000000e-07 CODATA2022 -muN_e neutron-electron magn. moment ratio 1.04066882e-03 2.50000000e-10 CODATA2022 -muN_p neutron-proton magn. moment ratio -6.84979340e-01 1.60000000e-07 CODATA2022 -rgP proton gyromagn. ratio 2.67522187e+08 s^-1 T^-1 1.10000000e-01 CODATA2022 -rgP_2pi proton gyromagn. ratio over 2 pi 4.25774813e+01 MHz T^-1 3.70000000e-06 CODATA2022 -muP proton magn. moment 1.41060671e-26 J T^-1 1.20000000e-33 CODATA2022 -muP_Bhor proton magn. moment to Bohr magneton ratio 1.52103221e-03 1.50000000e-11 CODATA2022 -muP_Nuc proton magn. moment to nuclear magneton ratio 2.79284735e+00 2.80000000e-08 CODATA2022 -muP_shield proton magn. shielding correction 2.56890000e-05 1.10000000e-08 CODATA2022 -muP_n proton-neutron magn. moment ratio -1.45989805e+00 3.40000000e-07 CODATA2022 -rgH shielded helion gyromagn. ratio 2.03789457e+08 s^-1 T^-1 2.40000000e+00 CODATA2022 -rgH_2pi shielded helion gyromagn. ratio over 2 pi 3.24341015e+01 MHz T^-1 2.80000000e-06 CODATA2022 -muH_shield shielded helion magn. moment -1.07455302e-26 J T^-1 9.30000000e-34 CODATA2022 -muH_shield_Bhor shielded helion magn. moment to Bohr magneton rati -1.15867147e-03 1.40000000e-11 CODATA2022 -muH_shield_Nuc shielded helion magn. moment to nuclear magneton r -2.12749772e+00 2.50000000e-08 CODATA2022 -muH_shield_p shielded helion to proton magn. moment ratio -7.61766562e-01 1.20000000e-08 CODATA2022 -muH_shield_p_shield shielded helion to shielded proton magn. moment ra -7.61786131e-01 3.30000000e-09 CODATA2022 -muP_shield shielded proton magn. moment 1.41057047e-26 J T^-1 1.20000000e-33 CODATA2022 -muP_shield_Bhor shielded proton magn. moment to Bohr magneton rati 1.52099313e-03 1.60000000e-11 CODATA2022 -muP_shield_Nuc shielded proton magn. moment to nuclear magneton r 2.79277560e+00 3.00000000e-08 CODATA2022 -aSi_220 {220} lattice spacing of silicon 1.92015571e-08 cm 3.20000000e-16 CODATA2022 -aSi lattice spacing of silicon 1.92015576e-08 cm 5.00000000e-16 CODATA2022 -mAlpha_e alpha particle-electron mass ratio 7.29429954e+03 2.40000000e-07 CODATA2022 -mAlpha alpha particle mass 6.64465734e-24 g 2.00000000e-33 CODATA2022 -EAlpha alpha particle mass energy equivalent 5.97192019e-03 erg 1.80000000e-12 CODATA2022 -EAlpha_MeV alpha particle mass energy equivalent in MeV 5.97192019e-03 erg 1.76239430e-12 CODATA2022 -mAlpha_u alpha particle mass in u 6.64465734e-24 g 1.04613961e-34 CODATA2022 -MAlpha alpha particle molar mass 4.00150618e+00 g / mol 1.20000000e-09 CODATA2022 -mAlpha_p alpha particle-proton mass ratio 3.97259969e+00 2.20000000e-10 CODATA2022 -angstromStar Angstrom star 1.00001495e-08 cm 9.00000000e-15 CODATA2022 -mU atomic mass constant 1.66053907e-24 g 5.00000000e-34 CODATA2022 -mU_E atomic mass constant energy equivalent 1.49241809e-03 erg 4.50000000e-13 CODATA2022 -mU_E_MeV atomic mass constant energy equivalent in MeV 1.49241809e-03 erg 4.48609458e-13 CODATA2022 -mU_eV atomic mass unit-electron volt relationship 1.49241809e-03 erg 4.48609458e-13 CODATA2022 -mU_hartree atomic mass unit-hartree relationship 3.42317769e+07 E_h 1.00000000e-02 CODATA2022 -mU_Hz atomic mass unit-hertz relationship 2.25234272e+23 1 / s 6.80000000e+13 CODATA2022 -mU_invm atomic mass unit-inverse meter relationship 7.51300661e+12 1 / cm 2.30000000e+03 CODATA2022 -mU_J atomic mass unit-joule relationship 1.49241809e-03 erg 4.50000000e-13 CODATA2022 -mU_K atomic mass unit-kelvin relationship 1.08095402e+13 K 3.30000000e+03 CODATA2022 -mU_kg atomic mass unit-kilogram relationship 1.66053907e-24 g 5.00000000e-34 CODATA2022 -au1Hyper atomic unit of 1st hyperpolarizability 3.20636131e-53 C^3 m^3 J^-2 1.50000000e-62 CODATA2022 -au2Hyper atomic unit of 2nd hyperpolarizability 6.23537999e-65 C^4 m^4 J^-3 3.80000000e-74 CODATA2022 -auAct atomic unit of action 1.05457182e-27 erg s 0.00000000e+00 CODATA2022 -auC atomic unit of charge 1.60217663e-19 C 0.00000000e+00 CODATA2022 -auCrho atomic unit of charge density 1.08120238e+12 C m^-3 4.90000000e+02 CODATA2022 -auI atomic unit of current 6.62361824e-03 A 1.30000000e-14 CODATA2022 -auMu atomic unit of electric dipole mom. 8.47835363e-30 C m 1.30000000e-39 CODATA2022 -auE atomic unit of electric field 5.14220675e+11 V m^-1 7.80000000e+01 CODATA2022 -auEFG atomic unit of electric field gradient 9.71736243e+21 V m^-2 2.90000000e+12 CODATA2022 -auPol atomic unit of electric polarizability 1.64877727e-41 C^2 m^2 J^-1 5.00000000e-51 CODATA2022 -auV atomic unit of electric potential 2.72113862e+01 V 5.30000000e-11 CODATA2022 -auQuad atomic unit of electric quadrupole mom. 4.48655152e-40 C m^2 1.40000000e-49 CODATA2022 -Eh atomic unit of energy 4.35974472e-11 erg 8.50000000e-23 CODATA2022 -auF atomic unit of force 8.23872350e-03 dyn 1.20000000e-12 CODATA2022 -auL atomic unit of length 5.29177211e-09 cm 8.00000000e-19 CODATA2022 -auM atomic unit of mag. dipole mom. 1.85480202e-23 J T^-1 5.60000000e-33 CODATA2022 -auB atomic unit of mag. flux density 2.35051757e+09 G 7.10000000e-01 CODATA2022 -auChi atomic unit of magnetizability 7.89103660e-29 J T^-2 4.80000000e-38 CODATA2022 -amu atomic unit of mass 9.10938370e-28 g 2.80000000e-37 CODATA2022 -aup atomic unit of momentum 1.99285191e-19 dyn s 3.00000000e-29 CODATA2022 -auEps atomic unit of permittivity 1.11265006e-10 F m^-1 1.70000000e-20 CODATA2022 -aut atomic unit of time 2.41888433e-17 s 4.70000000e-29 CODATA2022 -auv atomic unit of velocity 2.18769126e+08 cm / s 3.30000000e-02 CODATA2022 -N_a Avogadro constant 6.02214076e+23 1 / mol 0.00000000e+00 CODATA2022 -mu_B Bohr magneton 9.27401008e-24 J T^-1 2.80000000e-33 CODATA2022 -mu_B_eV_T Bohr magneton in eV/T 5.78838181e-05 eV T^-1 1.70000000e-14 CODATA2022 -mu_B_Hz_T Bohr magneton in Hz/T 1.39962449e+10 Hz T^-1 4.20000000e+00 CODATA2022 -mu_B__mT Bohr magneton in inverse meters per tesla 4.66864481e+01 m^-1 T^-1 2.90000000e-07 CODATA2022 -muB_K_T Bohr magneton in K/T 6.71713816e-01 K T^-1 2.00000000e-10 CODATA2022 -rBhor Bohr radius 5.29177211e-09 cm 8.00000000e-19 CODATA2022 -kB Boltzmann constant 1.38064900e-16 erg / K 0.00000000e+00 CODATA2022 -kB_eV_K Boltzmann constant in eV/K 1.38064900e-16 erg / K 0.00000000e+00 CODATA2022 -kB_Hz_K Boltzmann constant in Hz/K 2.08366191e+10 1 / (K s) 0.00000000e+00 CODATA2022 -kB__MK Boltzmann constant in inverse meters per kelvin 6.95034570e-01 1 / (K cm) 4.00000000e-07 CODATA2022 -Z0 characteristic impedance of vacuum 3.76730314e+02 ohm 5.61366546e-08 CODATA2022 -re classical electron radius 2.81794033e-13 cm 1.30000000e-22 CODATA2022 -lambda_compt Compton wavelength 2.42631024e-10 cm 7.30000000e-20 CODATA2022 -lambda_compt_2pi Compton wavelength over 2 pi 3.86159268e-11 cm 1.80000000e-20 CODATA2022 -G0 conductance quantum 7.74809173e-05 S 0.00000000e+00 CODATA2022 -K_J-90 conventional value of Josephson constant 4.83597900e+14 Hz V^-1 0.00000000e+00 CODATA2022 -R_K-90 conventional value of von Klitzing constant 2.58128070e+04 ohm 0.00000000e+00 CODATA2022 -xu(CuKa1) Cu x unit 1.00207697e-11 cm 2.80000000e-18 CODATA2022 -muD_e deuteron-electron mag. mom. ratio -4.66434555e-04 1.20000000e-12 CODATA2022 -mD_e deuteron-electron mass ratio 3.67048297e+03 1.30000000e-07 CODATA2022 -g_D deuteron g factor 8.57438234e-01 2.20000000e-09 CODATA2022 -muD deuteron mag. mom. 4.33073509e-27 J T^-1 1.10000000e-35 CODATA2022 -muD_Bhor deuteron mag. mom. to Bohr magneton ratio 4.66975457e-04 1.20000000e-12 CODATA2022 -muD_Nuc deuteron mag. mom. to nuclear magneton ratio 8.57438234e-01 2.20000000e-09 CODATA2022 -mD deuteron mass 3.34358377e-24 g 1.00000000e-33 CODATA2022 -mD_E deuteron mass energy equivalent 3.00506323e-03 erg 9.10000000e-13 CODATA2022 -mD_E_MeV deuteron mass energy equivalent in MeV 3.00506323e-03 erg 9.13240681e-13 CODATA2022 -mD_u deuteron mass in u 3.34358377e-24 g 6.64215627e-35 CODATA2022 -MD deuteron molar mass 2.01355321e+00 g / mol 6.10000000e-10 CODATA2022 -muD_n deuteron-neutron mag. mom. ratio -4.48206530e-01 1.10000000e-07 CODATA2022 -muD_p deuteron-proton mag. mom. ratio 3.07012209e-01 7.90000000e-10 CODATA2022 -mD_p deuteron-proton mass ratio 1.99900750e+00 1.10000000e-10 CODATA2022 -RrmsD deuteron rms charge radius 2.12799000e-13 cm 7.40000000e-17 CODATA2022 -eps_0 electric constant 8.85418781e-12 F m^-1 1.30000000e-21 CODATA2022 -qE_m electron charge to mass quotient -1.75882001e+11 C kg^-1 5.30000000e+01 CODATA2022 -muE_D electron-deuteron mag. mom. ratio -2.14392349e+03 5.60000000e-06 CODATA2022 -mE_D electron-deuteron mass ratio 2.72443711e-04 9.60000000e-15 CODATA2022 -g_e electron g factor -2.00231930e+00 3.50000000e-13 CODATA2022 -rg_e electron gyromag. ratio 1.76085963e+11 s^-1 T^-1 5.30000000e+01 CODATA2022 -rg_e_2pi electron gyromag. ratio over 2 pi 2.80249516e+04 MHz T^-1 1.70000000e-04 CODATA2022 -muE electron mag. mom. -9.28476470e-24 J T^-1 2.80000000e-33 CODATA2022 -muE_anom electron mag. mom. anomaly 1.15965218e-03 1.80000000e-13 CODATA2022 -muE_Bhor electron mag. mom. to Bohr magneton ratio -1.00115965e+00 1.80000000e-13 CODATA2022 -muE_Nuc electron mag. mom. to nuclear magneton ratio -1.83828197e+03 1.10000000e-07 CODATA2022 -mE electron mass 9.10938370e-28 g 2.80000000e-37 CODATA2022 -mE_E electron mass energy equivalent 8.18710578e-07 erg 2.50000000e-16 CODATA2022 -mE_MeV electron mass energy equivalent in MeV 8.18710578e-07 erg 2.40326495e-16 CODATA2022 -mE_u electron mass in u 9.10938370e-28 g 2.65686251e-38 CODATA2022 -ME electron molar mass 5.48579909e-04 g / mol 1.70000000e-13 CODATA2022 -muE_mu electron-muon mag. mom. ratio 2.06766988e+02 4.60000000e-06 CODATA2022 -mE_mu electron-muon mass ratio 4.83633169e-03 1.10000000e-10 CODATA2022 -muE_n electron-neutron mag. mom. ratio 9.60920500e+02 2.30000000e-04 CODATA2022 -mE_n electron-neutron mass ratio 5.43867344e-04 2.60000000e-13 CODATA2022 -muE_p electron-proton mag. mom. ratio -6.58210688e+02 2.00000000e-07 CODATA2022 -mE_p electron-proton mass ratio 5.44617021e-04 3.30000000e-14 CODATA2022 -mE_tau electron-tau mass ratio 2.87585000e-04 1.90000000e-08 CODATA2022 -mE_alpha electron to alpha particle mass ratio 1.37093355e-04 4.50000000e-15 CODATA2022 -muE_H_shield electron to shielded helion mag. mom. ratio 8.64058257e+02 1.00000000e-05 CODATA2022 -muE_p_shield electron to shielded proton mag. mom. ratio -6.58227597e+02 7.20000000e-06 CODATA2022 -eV electron volt 1.60217663e-12 erg 0.00000000e+00 CODATA2022 -eV_amu electron volt-atomic mass unit relationship 1.78266192e-33 g 5.31372501e-43 CODATA2022 -eV_hartree electron volt-hartree relationship 3.67493222e-02 E_h 7.10000000e-14 CODATA2022 -eV_Hz electron volt-hertz relationship 2.41798924e+14 1 / s 0.00000000e+00 CODATA2022 -eV_invm electron volt-inverse meter relationship 8.06554394e+03 1 / cm 0.00000000e+00 CODATA2022 -eV_J electron volt-joule relationship 1.60217663e-12 erg 0.00000000e+00 CODATA2022 -eV_K electron volt-kelvin relationship 1.16045181e+04 K 0.00000000e+00 CODATA2022 -eV_kg electron volt-kilogram relationship 1.78266192e-33 g 0.00000000e+00 CODATA2022 -e elementary charge 1.60217663e-19 C 0.00000000e+00 CODATA2022 -e_h elementary charge over h 2.41798926e+14 A J^-1 1.50000000e+06 CODATA2022 -F Faraday constant 9.64853321e+04 C mol^-1 0.00000000e+00 CODATA2022 -F_conv Faraday constant for conventional electric current 9.64853251e+04 C_90 mol^-1 1.20000000e-03 CODATA2022 -G_F Fermi coupling constant 4.54379566e+00 s4 / (g2 cm4) 2.33738613e-06 CODATA2022 -alpha fine-structure constant 7.29735257e-03 1.10000000e-12 CODATA2022 -c1 first radiation constant 3.74177185e-05 St erg 0.00000000e+00 CODATA2022 -c1L first radiation constant for spectral radiance 1.19104297e-05 St erg / rad2 0.00000000e+00 CODATA2022 -Eh_amu hartree-atomic mass unit relationship 4.85087021e-32 g 1.46127438e-41 CODATA2022 -Eh_eV hartree-electron volt relationship 4.35974472e-11 erg 8.49153616e-23 CODATA2022 -Eh Hartree energy 4.35974472e-11 erg 8.50000000e-23 CODATA2022 -Eh_E_eV Hartree energy in eV 4.35974472e-11 erg 8.49153616e-23 CODATA2022 -Eh_Hz hartree-hertz relationship 6.57968392e+15 1 / s 1.30000000e+04 CODATA2022 -Eh_invm hartree-inverse meter relationship 2.19474631e+05 1 / cm 4.30000000e-07 CODATA2022 -Eh_J hartree-joule relationship 4.35974472e-11 erg 8.50000000e-23 CODATA2022 -Eh_K hartree-kelvin relationship 3.15775025e+05 K 6.10000000e-07 CODATA2022 -Eh_kg hartree-kilogram relationship 4.85087021e-32 g 9.40000000e-44 CODATA2022 -mH_e helion-electron mass ratio 5.49588528e+03 2.40000000e-07 CODATA2022 -mH helion mass 5.00641278e-24 g 1.50000000e-33 CODATA2022 -mH_E helion mass energy equivalent 4.49953941e-03 erg 1.40000000e-12 CODATA2022 -mH_E_eV helion mass energy equivalent in MeV 4.49953941e-03 erg 1.36185014e-12 CODATA2022 -mH_u helion mass in u 5.00641278e-24 g 1.61072289e-34 CODATA2022 -MH helion molar mass 3.01493225e+00 g / mol 9.10000000e-10 CODATA2022 -mH_p helion-proton mass ratio 2.99315267e+00 1.30000000e-10 CODATA2022 -Hz_amu hertz-atomic mass unit relationship 7.37249732e-48 g 2.15870079e-57 CODATA2022 -Hz_eV hertz-electron volt relationship 6.62607015e-27 erg 0.00000000e+00 CODATA2022 -Hz_Eh hertz-hartree relationship 1.51982985e-16 E_h 2.90000000e-28 CODATA2022 -Hz_invm hertz-inverse meter relationship 3.33564095e-11 1 / cm 0.00000000e+00 CODATA2022 -Hz_J hertz-joule relationship 6.62607015e-27 erg 0.00000000e+00 CODATA2022 -Hz_K hertz-kelvin relationship 4.79924307e-11 K 0.00000000e+00 CODATA2022 -Hz_kg hertz-kilogram relationship 7.37249732e-48 g 0.00000000e+00 CODATA2022 -invalpha inverse fine-structure constant 1.37035999e+02 2.10000000e-08 CODATA2022 -invm_amu inverse meter-atomic mass unit relationship 2.21021909e-39 g 6.64215627e-49 CODATA2022 -invm_eV inverse meter-electron volt relationship 1.98644586e-18 erg 0.00000000e+00 CODATA2022 -invm_Eh inverse meter-hartree relationship 4.55633525e-08 E_h 8.80000000e-20 CODATA2022 -invm_Hz inverse meter-hertz relationship 2.99792458e+08 1 / s 0.00000000e+00 CODATA2022 -invm_J inverse meter-joule relationship 1.98644586e-18 erg 0.00000000e+00 CODATA2022 -invm_K inverse meter-kelvin relationship 1.43877688e-02 K 0.00000000e+00 CODATA2022 -invm_kg inverse meter-kilogram relationship 2.21021909e-39 g 0.00000000e+00 CODATA2022 -invG0 inverse of conductance quantum 1.29064037e+04 ohm 0.00000000e+00 CODATA2022 -K_J Josephson constant 4.83597848e+14 Hz V^-1 0.00000000e+00 CODATA2022 -J_amu joule-atomic mass unit relationship 1.11265006e-14 g 3.32107813e-24 CODATA2022 -J_eV joule-electron volt relationship 1.00000000e+07 erg 0.00000000e+00 CODATA2022 -J_Eh joule-hartree relationship 2.29371228e+17 E_h 4.50000000e+05 CODATA2022 -J_Hz joule-hertz relationship 1.50919018e+33 1 / s 0.00000000e+00 CODATA2022 -J_invm joule-inverse meter relationship 5.03411657e+22 1 / cm 0.00000000e+00 CODATA2022 -J_K joule-kelvin relationship 7.24297052e+22 K 0.00000000e+00 CODATA2022 -J_kg joule-kilogram relationship 1.11265006e-14 g 0.00000000e+00 CODATA2022 -K_amu kelvin-atomic mass unit relationship 1.53617919e-37 g 4.64950939e-47 CODATA2022 -K_eV kelvin-electron volt relationship 1.38064900e-16 erg 0.00000000e+00 CODATA2022 -K_Eh kelvin-hartree relationship 3.16681156e-06 E_h 6.10000000e-18 CODATA2022 -K_Hz kelvin-hertz relationship 2.08366191e+10 1 / s 0.00000000e+00 CODATA2022 -K_invm kelvin-inverse meter relationship 6.95034800e-01 1 / cm 0.00000000e+00 CODATA2022 -K_J kelvin-joule relationship 1.38064900e-16 erg 0.00000000e+00 CODATA2022 -K_kg kelvin-kilogram relationship 1.53617919e-37 g 0.00000000e+00 CODATA2022 -kg_amu kilogram-atomic mass unit relationship 1.00000000e+03 g 2.98897032e-07 CODATA2022 -kg_eV kilogram-electron volt relationship 8.98755179e+23 erg 0.00000000e+00 CODATA2022 -kg_Eh kilogram-hartree relationship 2.06148579e+34 E_h 4.00000000e+22 CODATA2022 -kg_Hz kilogram-hertz relationship 1.35639249e+50 1 / s 0.00000000e+00 CODATA2022 -kg_invm kilogram-inverse meter relationship 4.52443833e+39 1 / cm 0.00000000e+00 CODATA2022 -kg_J kilogram-joule relationship 8.98755179e+23 erg 0.00000000e+00 CODATA2022 -kg_K kilogram-kelvin relationship 6.50965726e+39 K 0.00000000e+00 CODATA2022 -aSi lattice parameter of silicon 5.43102051e-08 cm 8.90000000e-16 CODATA2022 -n0 Loschmidt constant (273.15 K, 101.325 kPa) 2.68678011e+19 1 / cm3 0.00000000e+00 CODATA2022 -mu0 mag. constant 1.25663706e-06 N A^-2 1.90000000e-16 CODATA2022 -Phi0 mag. flux quantum 2.06783385e-15 Wb 0.00000000e+00 CODATA2022 -R molar gas constant 8.31446262e+07 erg / (K mol) 0.00000000e+00 CODATA2022 -Mu molar mass constant 1.00000000e+00 g / mol 3.00000000e-10 CODATA2022 -MC12 molar mass of carbon-12 1.20000000e+01 g / mol 3.60000000e-09 CODATA2022 -h_mol molar Planck constant 3.99031271e-03 St g / mol 0.00000000e+00 CODATA2022 -ch_mol molar Planck constant times c 1.19626566e+08 cm erg / mol 5.40000000e-02 CODATA2022 -v_mol_ideal_100kPa molar volume of ideal gas (273.15 K, 100 kPa) 2.27109546e+04 cm3 / mol 0.00000000e+00 CODATA2022 -v_mol_ideal_101.325kPa molar volume of ideal gas (273.15 K, 101.325 kPa) 2.24139695e+04 cm3 / mol 0.00000000e+00 CODATA2022 -vSI_mol molar volume of silicon 1.20588320e+01 cm3 / mol 6.00000000e-07 CODATA2022 -xu Mo x unit 1.00209952e-11 cm 5.30000000e-18 CODATA2022 -lambda_compt_mu muon Compton wavelength 1.17344411e-12 cm 2.60000000e-20 CODATA2022 -lambda_compt_mu_2pi muon Compton wavelength over 2 pi 1.86759431e-13 cm 4.20000000e-21 CODATA2022 -mMu_e muon-electron mass ratio 2.06768283e+02 4.60000000e-06 CODATA2022 -g_mu muon g factor -2.00233184e+00 1.30000000e-09 CODATA2022 -muMu muon mag. mom. -4.49044830e-26 J T^-1 1.00000000e-33 CODATA2022 -muMu_anom muon mag. mom. anomaly 1.16592089e-03 6.30000000e-10 CODATA2022 -muMu_Bhor muon mag. mom. to Bohr magneton ratio -4.84197047e-03 1.10000000e-10 CODATA2022 -muMu_Nuc muon mag. mom. to nuclear magneton ratio -8.89059703e+00 2.00000000e-07 CODATA2022 -mMu muon mass 1.88353163e-25 g 4.20000000e-33 CODATA2022 -mMu_E muon mass energy equivalent 1.69283380e-04 erg 3.80000000e-12 CODATA2022 -mMu_E_MeV muon mass energy equivalent in MeV 1.69283380e-04 erg 3.68500626e-12 CODATA2022 -mMu_E_u muon mass in u 1.88353163e-25 g 4.15134767e-33 CODATA2022 -MMu muon molar mass 1.13428926e-01 g / mol 2.50000000e-09 CODATA2022 -mMu_n muon-neutron mass ratio 1.12454517e-01 2.50000000e-09 CODATA2022 -muMu_p muon-proton mag. mom. ratio -3.18334514e+00 7.10000000e-08 CODATA2022 -mMu_p muon-proton mass ratio 1.12609526e-01 2.50000000e-09 CODATA2022 -mMu_tau muon-tau mass ratio 5.94635000e-02 4.00000000e-06 CODATA2022 -1 natural unit of action 1.05457182e-27 erg s 0.00000000e+00 CODATA2022 -1_eV_s natural unit of action in eV s 1.05457182e-27 erg s 0.00000000e+00 CODATA2022 -E natural unit of energy 8.18710578e-07 erg 2.50000000e-16 CODATA2022 -E_MeV natural unit of energy in MeV 8.18710578e-07 erg 2.40326495e-16 CODATA2022 -L natural unit of length 3.86159268e-11 cm 1.20000000e-20 CODATA2022 -M natural unit of mass 9.10938370e-28 g 2.80000000e-37 CODATA2022 -p natural unit of momentum 2.73092449e-17 dyn s 3.40000000e-25 CODATA2022 -p_MeV_c natural unit of momentum in MeV/c 5.10998946e-01 MeV/c 3.10000000e-09 CODATA2022 -t natural unit of time 1.28808867e-21 s 3.90000000e-31 CODATA2022 -v natural unit of velocity 2.99792458e+10 cm / s 0.00000000e+00 CODATA2022 -lambda_compt_n neutron Compton wavelength 1.31959091e-13 cm 7.50000000e-23 CODATA2022 -lambda_compt_n_2pi neutron Compton wavelength over 2 pi 2.10019415e-14 cm 1.40000000e-23 CODATA2022 -muN_e neutron-electron mag. mom. ratio 1.04066882e-03 2.50000000e-10 CODATA2022 -mN_e neutron-electron mass ratio 1.83868366e+03 8.90000000e-07 CODATA2022 -g_n neutron g factor -3.82608545e+00 9.00000000e-07 CODATA2022 -rg_n neutron gyromag. ratio 1.83247171e+08 s^-1 T^-1 4.30000000e+01 CODATA2022 -rg_n_2pi neutron gyromag. ratio over 2 pi 2.91646933e+01 MHz T^-1 6.90000000e-06 CODATA2022 -muN neutron mag. mom. -9.66236510e-27 J T^-1 2.30000000e-33 CODATA2022 -muN_Bhor neutron mag. mom. to Bohr magneton ratio -1.04187563e-03 2.50000000e-10 CODATA2022 -muN_Nuc neutron mag. mom. to nuclear magneton ratio -1.91304273e+00 4.50000000e-07 CODATA2022 -mN neutron mass 1.67492750e-24 g 9.50000000e-34 CODATA2022 -mN_E neutron mass energy equivalent 1.50534976e-03 erg 8.60000000e-13 CODATA2022 -mN_E_MeV neutron mass energy equivalent in MeV 1.50534976e-03 erg 8.65175382e-13 CODATA2022 -mN_u neutron mass in u 1.67492750e-24 g 8.13664143e-34 CODATA2022 -MN neutron molar mass 1.00866492e+00 g / mol 5.70000000e-10 CODATA2022 -mN_mu neutron-muon mass ratio 8.89248406e+00 2.00000000e-07 CODATA2022 -muN_p neutron-proton mag. mom. ratio -6.84979340e-01 1.60000000e-07 CODATA2022 -mN_p neutron-proton mass ratio 1.00137842e+00 4.90000000e-10 CODATA2022 -mN_tau neutron-tau mass ratio 5.28779000e-01 3.60000000e-05 CODATA2022 -muN_p_shield neutron to shielded proton mag. mom. ratio -6.84996940e-01 1.60000000e-07 CODATA2022 -G Newtonian constant of gravitation 6.67430000e-08 cm3 / (g s2) 1.50000000e-12 CODATA2022 -G_hbar_c Newtonian constant of gravitation over h-bar c 6.70883000e-39 (GeV/c^2)^-2 1.50000000e-43 CODATA2022 -mu_N nuclear magneton 5.05078375e-27 J T^-1 1.50000000e-36 CODATA2022 -mu_N_eV_T nuclear magneton in eV/T 3.15245126e-08 eV T^-1 9.60000000e-18 CODATA2022 -mu_N_invm_T nuclear magneton in inverse meters per tesla 2.54262343e-02 m^-1 T^-1 1.60000000e-10 CODATA2022 -mu_N_K_T nuclear magneton in K/T 3.65826778e-04 K T^-1 1.10000000e-13 CODATA2022 -mu_N_MHz_T nuclear magneton in MHz/T 7.62259323e+00 MHz T^-1 2.30000000e-09 CODATA2022 -h Planck constant 6.62607015e-27 erg s 0.00000000e+00 CODATA2022 -h_eV_s Planck constant in eV s 6.62607009e-27 erg s 4.00544159e-35 CODATA2022 -hbar Planck constant over 2 pi 1.05457180e-27 erg s 1.30000000e-35 CODATA2022 -hbar_eV_s Planck constant over 2 pi in eV s 1.05457181e-27 erg s 6.40870654e-36 CODATA2022 -chbar_MeV Planck constant over 2 pi times c in MeV fm 3.16152675e-17 cm erg 1.92261196e-25 CODATA2022 -planck_length Planck length 1.61625500e-33 cm 1.80000000e-38 CODATA2022 -planck_mass Planck mass 2.17643400e-05 g 2.40000000e-10 CODATA2022 -planck_mass_E_GeV Planck mass energy equivalent in GeV 1.95608143e+16 erg 2.24304729e+11 CODATA2022 -planck_temp Planck temperature 1.41678400e+32 K 1.60000000e+27 CODATA2022 -plank_time Planck time 5.39124700e-44 s 6.00000000e-49 CODATA2022 -qP_mP proton charge to mass quotient 9.57883316e+07 C kg^-1 2.90000000e-02 CODATA2022 -lambda_compt_p proton Compton wavelength 1.32140986e-13 cm 4.00000000e-23 CODATA2022 -lambda_compt_p_2pi proton Compton wavelength over 2 pi 2.10308910e-14 cm 9.70000000e-24 CODATA2022 -mP_e proton-electron mass ratio 1.83615267e+03 1.10000000e-07 CODATA2022 -g_p proton g factor 5.58569469e+00 1.60000000e-09 CODATA2022 -rg_p proton gyromag. ratio 2.67522187e+08 s^-1 T^-1 1.10000000e-01 CODATA2022 -rg_p_2pi proton gyromag. ratio over 2 pi 4.25774789e+01 MHz T^-1 2.90000000e-07 CODATA2022 -muP proton mag. mom. 1.41060680e-26 J T^-1 6.00000000e-36 CODATA2022 -muP_Bhor proton mag. mom. to Bohr magneton ratio 1.52103220e-03 4.60000000e-13 CODATA2022 -muP_Nuc proton mag. mom. to nuclear magneton ratio 2.79284734e+00 8.20000000e-10 CODATA2022 -muP_shield proton mag. shielding correction 2.56890000e-05 1.10000000e-08 CODATA2022 -mP proton mass 1.67262192e-24 g 5.10000000e-34 CODATA2022 -mP_E proton mass energy equivalent 1.50327762e-03 erg 4.60000000e-13 CODATA2022 -mP_E_MeV proton mass energy equivalent in MeV 1.50327762e-03 erg 4.64631224e-13 CODATA2022 -mP_u proton mass in u 1.67262192e-24 g 8.80085705e-35 CODATA2022 -MP proton molar mass 1.00727647e+00 g / mol 3.10000000e-10 CODATA2022 -mP_mu proton-muon mass ratio 8.88024337e+00 2.00000000e-07 CODATA2022 -muP_n proton-neutron mag. mom. ratio -1.45989805e+00 3.40000000e-07 CODATA2022 -mP_n proton-neutron mass ratio 9.98623478e-01 4.90000000e-10 CODATA2022 -RrmsP proton rms charge radius 8.41400000e-14 cm 1.90000000e-16 CODATA2022 -mP_tau proton-tau mass ratio 5.28051000e-01 3.60000000e-05 CODATA2022 -kappa quantum of circulation 3.63694755e+00 cm2 / s 1.10000000e-09 CODATA2022 -2kappa quantum of circulation times 2 7.27389510e+00 cm2 / s 2.20000000e-09 CODATA2022 -Rinf Rydberg constant 1.09737316e+05 1 / cm 2.10000000e-07 CODATA2022 -cRinf_Hz Rydberg constant times c in Hz 3.28984196e+15 1 / s 6.40000000e+03 CODATA2022 -hcRinf_eV Rydberg constant times hc in eV 2.17987236e-11 erg 4.16565925e-23 CODATA2022 -hcRinf_J Rydberg constant times hc in J 2.17987236e-11 erg 4.20000000e-23 CODATA2022 -S0_R_100kPa Sackur-Tetrode constant (1 K, 100 kPa) -1.15170754e+00 4.50000000e-10 CODATA2022 -S0_R_101.325kPa Sackur-Tetrode constant (1 K, 101.325 kPa) -1.16487052e+00 4.50000000e-10 CODATA2022 -c2 second radiation constant 1.43877688e+00 K cm 0.00000000e+00 CODATA2022 -rg_h_shield shielded helion gyromag. ratio 2.03789457e+08 s^-1 T^-1 2.40000000e+00 CODATA2022 -rg_h_shield_2pi shielded helion gyromag. ratio over 2 pi 3.24340997e+01 MHz T^-1 4.30000000e-07 CODATA2022 -muH_shield shielded helion mag. mom. -1.07455309e-26 J T^-1 1.30000000e-34 CODATA2022 -muH_shield_Bhor shielded helion mag. mom. to Bohr magneton ratio -1.15867147e-03 1.40000000e-11 CODATA2022 -muH_shield_Nuc shielded helion mag. mom. to nuclear magneton rati -2.12749772e+00 2.50000000e-08 CODATA2022 -muH_shield_p shielded helion to proton mag. mom. ratio -7.61766562e-01 8.90000000e-09 CODATA2022 -muH_shield_p_shield shielded helion to shielded proton mag. mom. ratio -7.61786131e-01 3.30000000e-09 CODATA2022 -rg_p_shield shielded proton gyromag. ratio 2.67515315e+08 s^-1 T^-1 2.90000000e+00 CODATA2022 -rg_p_shield_2pi shielded proton gyromag. ratio over 2 pi 4.25763851e+01 MHz T^-1 5.30000000e-07 CODATA2022 -muP_shield shielded proton mag. mom. 1.41057056e-26 J T^-1 1.50000000e-34 CODATA2022 -muP_shield_Bhor shielded proton mag. mom. to Bohr magneton ratio 1.52099313e-03 1.70000000e-11 CODATA2022 -muP_shield_Nuc shielded proton mag. mom. to nuclear magneton rati 2.79277560e+00 3.00000000e-08 CODATA2022 -c speed of light in vacuum 2.99792458e+10 cm / s 0.00000000e+00 CODATA2022 -g standard acceleration of gravity 9.80665000e+02 cm / s2 0.00000000e+00 CODATA2022 -atm standard atmosphere 1.01325000e+06 P / s 0.00000000e+00 CODATA2022 -sigma Stefan-Boltzmann constant 5.67037442e-05 g / (s3 K4) 0.00000000e+00 CODATA2022 -lambda_compt_tau tau Compton wavelength 6.97771000e-14 cm 4.70000000e-18 CODATA2022 -lambda_compt_tau_2pi tau Compton wavelength over 2 pi 1.11056000e-14 cm 1.00000000e-18 CODATA2022 -mTau_e tau-electron mass ratio 3.47723000e+03 2.30000000e-01 CODATA2022 -mTau tau mass 3.16754000e-24 g 2.10000000e-28 CODATA2022 -mTau_E tau mass energy equivalent 2.84684000e-03 erg 1.90000000e-07 CODATA2022 -mTau_E_MeV tau mass energy equivalent in MeV 2.84677949e-03 erg 2.56348261e-07 CODATA2022 -mTau_u tau mass in u 3.16754469e-24 g 2.15870079e-28 CODATA2022 -MTau tau molar mass 1.90754000e+00 g / mol 1.30000000e-04 CODATA2022 -mTau_mu tau-muon mass ratio 1.68170000e+01 1.10000000e-03 CODATA2022 -mTau_n tau-neutron mass ratio 1.89115000e+00 1.30000000e-04 CODATA2022 -mTau_p tau-proton mass ratio 1.89376000e+00 1.30000000e-04 CODATA2022 -sigma_T Thomson cross section 6.65245873e-25 cm2 6.00000000e-34 CODATA2022 -muPsi_e triton-electron mag. mom. ratio -1.62051442e-03 2.10000000e-11 CODATA2022 -mPsi_e triton-electron mass ratio 5.49692154e+03 2.70000000e-07 CODATA2022 -g_psi triton g factor 5.95792493e+00 1.20000000e-08 CODATA2022 -muPsi triton mag. mom. 1.50460952e-26 J T^-1 3.00000000e-35 CODATA2022 -muPsi_Bhor triton mag. mom. to Bohr magneton ratio 1.62239367e-03 3.20000000e-12 CODATA2022 -muPsi_Nuc triton mag. mom. to nuclear magneton ratio 2.97896247e+00 5.90000000e-09 CODATA2022 -mPsi triton mass 5.00735674e-24 g 1.50000000e-33 CODATA2022 -mPsi_E triton mass energy equivalent 4.50038781e-03 erg 1.40000000e-12 CODATA2022 -mPsi_E_MeV triton mass energy equivalent in MeV 4.50038781e-03 erg 1.36185014e-12 CODATA2022 -mPsi_u triton mass in u 5.00735674e-24 g 1.99264688e-34 CODATA2022 -MPsi triton molar mass 3.01550072e+00 g / mol 9.20000000e-10 CODATA2022 -muPsi_n triton-neutron mag. mom. ratio -1.55718553e+00 3.70000000e-07 CODATA2022 -muPsi_p triton-proton mag. mom. ratio 1.06663991e+00 1.00000000e-08 CODATA2022 -mPsi_p triton-proton mass ratio 2.99371703e+00 1.50000000e-10 CODATA2022 -u unified atomic mass unit 1.66053907e-24 g 5.00000000e-34 CODATA2022 -R_K von Klitzing constant 2.58128075e+04 ohm 0.00000000e+00 CODATA2022 -theta_W weak mixing angle 2.22900000e-01 3.00000000e-04 CODATA2022 -b_freq Wien frequency displacement law constant 5.87892576e+10 1 / (K s) 0.00000000e+00 CODATA2022 -b_lambda Wien wavelength displacement law constant 2.89777196e-01 K cm 0.00000000e+00 CODATA2022 -auMom_um atomic unit of mom.um 1.99285188e-19 dyn s 2.40000000e-27 CODATA2022 -mE_h electron-helion mass ratio 1.81954307e-04 7.90000000e-15 CODATA2022 -mE_psi electron-triton mass ratio 1.81920006e-04 9.00000000e-15 CODATA2022 -g_h helion g factor -4.25525061e+00 5.00000000e-08 CODATA2022 -muH helion mag. mom. -1.07461753e-26 J T^-1 1.30000000e-34 CODATA2022 -muH_Bhor helion mag. mom. to Bohr magneton ratio -1.15874096e-03 1.40000000e-11 CODATA2022 -muH_Nuc helion mag. mom. to nuclear magneton ratio -2.12762531e+00 2.50000000e-08 CODATA2022 -n0 Loschmidt constant (273.15 K, 100 kPa) 2.65164580e+19 1 / cm3 0.00000000e+00 CODATA2022 -p_um natural unit of mom.um 2.73092449e-17 dyn s 3.40000000e-25 CODATA2022 -p_um_MeV_c natural unit of mom.um in MeV/c 5.10998946e-01 MeV/c 3.10000000e-09 CODATA2022 -mN-mP neutron-proton mass difference 2.30557435e-27 g 8.20000000e-34 CODATA2022 -mN-mP_E neutron-proton mass difference energy equivalent 2.07214689e-06 erg 7.40000000e-13 CODATA2022 -mN-mP_E_MeV neutron-proton mass difference energy equivalent i 2.07214689e-06 erg 7.37001252e-13 CODATA2022 -mN-mP_u neutron-proton mass difference in u 2.30557435e-27 g 8.13664143e-34 CODATA2022 -stp standard-state pressure 1.00000000e+06 P / s 0.00000000e+00 CODATA2022 -mAlpha alpha particle relative atomic mass 4.00150618e+00 6.30000000e-11 CODATA2022 -muB_invm_T Bohr magneton in inverse meter per tesla 4.66864478e+01 m^-1 T^-1 1.40000000e-08 CODATA2022 -kB_invm Boltzmann constant in inverse meter per kelvin 6.95034800e-01 1 / (K cm) 0.00000000e+00 CODATA2022 -ampere-90 conventional value of ampere-90 1.00000009e+00 A 0.00000000e+00 CODATA2022 -coulomb-90 conventional value of coulomb-90 1.00000009e+00 C 0.00000000e+00 CODATA2022 -farad-90 conventional value of farad-90 9.99999982e-01 F 0.00000000e+00 CODATA2022 -henry-90 conventional value of henry-90 1.00000002e+00 H 0.00000000e+00 CODATA2022 -ohm-90 conventional value of ohm-90 1.00000002e+00 ohm 0.00000000e+00 CODATA2022 -volt-90 conventional value of volt-90 1.00000011e+00 V 0.00000000e+00 CODATA2022 -watt-90 conventional value of watt-90 1.00000020e+07 erg / s 0.00000000e+00 CODATA2022 -mD_amu_rel deuteron relative atomic mass 2.01355321e+00 4.00000000e-11 CODATA2022 -rg_e_MHz_T electron gyromag. ratio in MHz/T 2.80249514e+04 MHz T^-1 8.50000000e-06 CODATA2022 -mE_amu_rel electron relative atomic mass 5.48579909e-04 1.60000000e-14 CODATA2022 -e_hbar elementary charge over h-bar 1.51926745e+15 A J^-1 0.00000000e+00 CODATA2022 -mH_amu_rel helion relative atomic mass 3.01493225e+00 9.70000000e-11 CODATA2022 -h_shield_shift helion shielding shift 5.99674300e-05 1.00000000e-10 CODATA2022 -F_hyperfine_Cs-133 hyperfine transition frequency of Cs-133 9.19263177e+09 1 / s 0.00000000e+00 CODATA2022 -aSi_220_ideal lattice spacing of ideal Si (220) 1.92015572e-08 cm 3.20000000e-16 CODATA2022 -eta luminous efficacy 6.83000000e-05 s3 rad2 cd/(g cm2) 0.00000000e+00 CODATA2022 -rg_n_MHz_T neutron gyromag. ratio in MHz/T 2.91646931e+01 MHz T^-1 6.90000000e-06 CODATA2022 -mN_amu_rel neutron relative atomic mass 1.00866492e+00 4.90000000e-10 CODATA2022 -mu_N_invm nuclear magneton in inverse meter per tesla 2.54262341e-02 m^-1 T^-1 7.80000000e-12 CODATA2022 -h_eV_Hz Planck constant in eV/Hz 6.62607015e-27 erg s 0.00000000e+00 CODATA2022 -rg_p_MHz_T proton gyromag. ratio in MHz/T 4.25774785e+01 MHz T^-1 1.80000000e-08 CODATA2022 -mP_amu_rel proton relative atomic mass 1.00727647e+00 5.30000000e-11 CODATA2022 -lambda_compt_bar reduced Compton wavelength 3.86159268e-11 cm 1.20000000e-20 CODATA2022 -lambda_compt_mu_bar reduced muon Compton wavelength 1.86759431e-13 cm 4.20000000e-21 CODATA2022 -lambda_compt_n_bar reduced neutron Compton wavelength 2.10019416e-14 cm 1.20000000e-23 CODATA2022 -hbar reduced Planck constant 1.05457182e-27 erg s 0.00000000e+00 CODATA2022 -hbar_eV_s reduced Planck constant in eV s 1.05457182e-27 erg s 0.00000000e+00 CODATA2022 -chbar_MeV reduced Planck constant times c in MeV fm 3.16152677e-17 cm erg 0.00000000e+00 CODATA2022 -lambda_compt_p_bar reduced proton Compton wavelength 2.10308910e-14 cm 6.40000000e-24 CODATA2022 -lambda_compt_tau_bar reduced tau Compton wavelength 1.11053800e-14 cm 7.50000000e-19 CODATA2022 -rg_h_shield_MHz_T shielded helion gyromag. ratio in MHz/T 3.24340994e+01 MHz T^-1 3.80000000e-07 CODATA2022 -rg_p_shield_MHz_T shielded proton gyromag. ratio in MHz/T 4.25763847e+01 MHz T^-1 4.60000000e-07 CODATA2022 -d_shield-p_shield_HD shielding difference of d and p in HD 2.02000000e-08 2.00000000e-11 CODATA2022 -t_shield-p_shield_HT shielding difference of t and p in HT 2.41400000e-08 2.00000000e-11 CODATA2022 -tau_E tau energy equivalent 2.84684357e-03 erg 1.92261196e-07 CODATA2022 -psi_amu_rel triton relative atomic mass 3.01550072e+00 1.20000000e-10 CODATA2022 -muPsi_p triton to proton mag. mom. ratio 1.06663992e+00 2.10000000e-09 CODATA2022 -epsilon0 vacuum electric permittivity 8.85418781e-12 F m^-1 1.30000000e-21 CODATA2022 -mu0 vacuum mag. permeability 1.25663706e-06 N A^-2 1.90000000e-16 CODATA2022 -mWZ W to Z mass ratio 8.81530000e-01 1.70000000e-04 CODATA2022 -au Astronomical Unit 1.49597871e+13 cm 0.00000000e+00 IAU 2012 Resolution B2 -pc Parsec 3.08567758e+18 cm 0.00000000e+00 Derived from au + IAU 2015 Resolution B 2 note [4] -kpc Kiloparsec 3.08567758e+21 cm 0.00000000e+00 Derived from au + IAU 2015 Resolution B 2 note [4] -L_bol0 Luminosity for absolute bolometric magnitude 0 3.01280000e+35 erg / s 0.00000000e+00 IAU 2015 Resolution B 2 -L_sun Nominal solar luminosity 3.82800000e+33 erg / s 0.00000000e+00 IAU 2015 Resolution B 3 -GM_sun Nominal solar mass parameter 1.32712440e+26 cm3 / s2 0.00000000e+00 IAU 2015 Resolution B 3 -M_sun Solar mass 1.98840987e+33 g 4.46880543e+28 IAU 2015 Resolution B 3 + CODATA 2018 -R_sun Nominal solar radius 6.95700000e+10 cm 0.00000000e+00 IAU 2015 Resolution B 3 -GM_jup Nominal Jupiter mass parameter 1.26686530e+23 cm3 / s2 0.00000000e+00 IAU 2015 Resolution B 3 -M_jup Jupiter mass 1.89812460e+30 g 4.26589589e+25 IAU 2015 Resolution B 3 + CODATA 2018 -R_jup Nominal Jupiter equatorial radius 7.14920000e+09 cm 0.00000000e+00 IAU 2015 Resolution B 3 -GM_earth Nominal Earth mass parameter 3.98600400e+20 cm3 / s2 0.00000000e+00 IAU 2015 Resolution B 3 -M_earth Earth mass 5.97216787e+27 g 1.34220095e+23 IAU 2015 Resolution B 3 + CODATA 2018 -R_earth Nominal Earth equatorial radius 6.37810000e+08 cm 0.00000000e+00 IAU 2015 Resolution B 3 diff --git a/src/resources/const/format.sh b/src/resources/const/format.sh deleted file mode 100755 index 7e53731..0000000 --- a/src/resources/const/format.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -if [ "$#" -ne 2 ]; then - echo "Usage: $0 " - exit 1 -fi -input_file="$1" -output_file="$2" -printf 'const char embeddedConstants[] = R"(' > "$output_file" -cat "$input_file" >> "$output_file" -printf ')";\n' >> "$output_file" diff --git a/src/resources/const/meson.build b/src/resources/const/meson.build deleted file mode 100644 index 583fb32..0000000 --- a/src/resources/const/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -data_file = files('const.dat') -command_file = files('format.sh') -output_file = meson.current_build_dir() + '/embedded_constants.h' - -embedded_constants_h = custom_target('embed_constants', - input: data_file, - output: 'embedded_constants.h', - command: ['sh', '-c', command_file[0].full_path()+' @INPUT@ ' + output_file, '@INPUT@', '@OUTPUT@'] -) - -# Ensure the generated header is included -const_data_header = include_directories('.') - -const_data_dep = declare_dependency( - include_directories: const_data_header, - sources: embedded_constants_h -) \ No newline at end of file diff --git a/src/resources/mesh/sphere.msh b/src/resources/mesh/sphere.msh deleted file mode 100644 index 416c655ee2b9cd106d956e1d466e6f27ab12367b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34259 zcmZvl1(cRm7q%7Yln@L=6c9vF6h!(UEg&VK(j`bsOAa6{-Q6H5-S9AU!_W*h$-oRC zDuROX-E5n#mu{U}^ho=`yC39!KX>u8 z&pz|aGimcy>fG9}yfwSDZqq&O2Stkgi`C-)`y~6%ec=B4n)v0pq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oFmevkGUM$J;cBPD8h zzhRvfx0ZOHzZ)Getb$_J<|Nj4(6Bm+sZT$bLx!<#=Fd7S$4S==WB%JEYKD5bZW!;>l|GYr?}lO7 z6qlD?kYc5qhK*J{!mtR#7>Dt;NQ@V0*mA|}k3VBkhOwvY?JSACjW%q!V#XUJMMyD* zQA_;(b(E;3Si=@7CZCHX@_EZJ>W_EYOS~6nScqcA^yA$&j6Gm){XX0=jC_(yzYp<- zQG@I`d(XZn7{(fy3v*&FcMY4ZnEGQMslj`Ok&`i!-=q76@gDC?m3Z$b!+3}N_3u3} z?4$7Vi;$DcbiGH`PHy1ig^c4pAVBTKjuoY-wb2VA|>{5f%GT| z!-t=c9vk+ZV$T-n`|n8@@4$KQ55xZbEs@6_?311(VfcHc)zVYL{5=Nay+4yMeBR}~ zzYHTUQBtTx4*oU_4@Mj2`A-r?9$~!qOmhDC--8F^ecpT4us|`trCX(KQZmEv{{5ZR zCu?}lF!r{R#8@|_%=ZB??hT*|zLw+(D zhR+=sA&ropPr~s19m(C0N=hbWHtn8OoW;cOtR|*hvYD8#FPJ!m;_N0)sW^v;8S~%& L2e1GBue<&aH!g3X diff --git a/src/resources/meson.build b/src/resources/meson.build deleted file mode 100644 index 4a8d44e..0000000 --- a/src/resources/meson.build +++ /dev/null @@ -1 +0,0 @@ -subdir('const') \ No newline at end of file From eec8a356b418773193d448e5800b1a1664fbd5c1 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 07:36:14 -0400 Subject: [PATCH 04/15] feat(testsConfig): brought test config from pointwisePolytrope --- tests/testsConfig.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/testsConfig.yaml diff --git a/tests/testsConfig.yaml b/tests/testsConfig.yaml new file mode 100644 index 0000000..e82bfc2 --- /dev/null +++ b/tests/testsConfig.yaml @@ -0,0 +1,38 @@ +Debug: true + +Probe: + GLVis: + Visualization: true + # Host: "10.8.0.14" + Host: "localhost" + Port: 19916 + DefaultKeyset: "iimmMMc" + GetRaySolution: + MakeDir: true +Poly: + Solver: + ViewInitialGuess: true + GMRES: + MaxIter: 5000 + RelTol: 1.0e-8 + AbsTol: 1.0e-10 + PrintLevel: 0 + Newton: + MaxIter: 200 + RelTol: 1.0e-8 + AbsTol: 1.0e-10 + PrintLevel: 1 + Newton: + Output: + 1D: + Save: true + Path: "output/Poly/1D/poly.csv" + RaySamples: 1000 + RayCoLatitude: 0.0 + RayLongitude: 0.0 + +# THESE ARE ONLY USED BY THE TEST SUITE AND NOT THE MAIN CODE +# ANY OPTIONS NEEDED FOR THE TEST SUITE SHOULD BE PLACED HERE +Tests: + Poly: + Index: 1.1 \ No newline at end of file From efa4bdadff88d211fd622261906c4ae3ea1b5e65 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:24:20 -0400 Subject: [PATCH 05/15] feat(assets): setup assets for resource manager assets are broken into static (compiled into the binary) and dynamic (handled by the resource manager). All static assets should define a meson.build, all dynamic assets must have handlers written in src/resource/resourceManager and resourceManagerTypes BREAKING CHANGE: --- assets/{ => dynamic}/eos/helm_table.dat | 0 assets/dynamic/index.yaml | 4 ++++ assets/{ => dynamic}/mesh/sphere.msh | Bin assets/{ => static}/const/const.dat | 0 assets/{ => static}/const/format.sh | 0 assets/{ => static}/const/meson.build | 0 assets/static/meson.build | 1 + 7 files changed, 5 insertions(+) rename assets/{ => dynamic}/eos/helm_table.dat (100%) create mode 100644 assets/dynamic/index.yaml rename assets/{ => dynamic}/mesh/sphere.msh (100%) rename assets/{ => static}/const/const.dat (100%) rename assets/{ => static}/const/format.sh (100%) rename assets/{ => static}/const/meson.build (100%) create mode 100644 assets/static/meson.build diff --git a/assets/eos/helm_table.dat b/assets/dynamic/eos/helm_table.dat similarity index 100% rename from assets/eos/helm_table.dat rename to assets/dynamic/eos/helm_table.dat diff --git a/assets/dynamic/index.yaml b/assets/dynamic/index.yaml new file mode 100644 index 0000000..a37aa49 --- /dev/null +++ b/assets/dynamic/index.yaml @@ -0,0 +1,4 @@ +eos: + helm: "eos/helm_table.dat" +mesh: + sphere: "mesh/sphere.msh" \ No newline at end of file diff --git a/assets/mesh/sphere.msh b/assets/dynamic/mesh/sphere.msh similarity index 100% rename from assets/mesh/sphere.msh rename to assets/dynamic/mesh/sphere.msh diff --git a/assets/const/const.dat b/assets/static/const/const.dat similarity index 100% rename from assets/const/const.dat rename to assets/static/const/const.dat diff --git a/assets/const/format.sh b/assets/static/const/format.sh similarity index 100% rename from assets/const/format.sh rename to assets/static/const/format.sh diff --git a/assets/const/meson.build b/assets/static/const/meson.build similarity index 100% rename from assets/const/meson.build rename to assets/static/const/meson.build diff --git a/assets/static/meson.build b/assets/static/meson.build new file mode 100644 index 0000000..4a8d44e --- /dev/null +++ b/assets/static/meson.build @@ -0,0 +1 @@ +subdir('const') \ No newline at end of file From 171fbf7961a07211906a2aff1482e0da1c45b7bd Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:25:22 -0400 Subject: [PATCH 06/15] feat(eosIO): added EosIO class to handle arbitrary eos data EosIO class wraps all eos tables (like helm) so that they can be used in a more standard fashion --- src/eos/private/eosIO.cpp | 36 ++++++++++++ src/eos/private/helm.cpp | 92 +++++++++++++++--------------- src/eos/public/eosIO.h | 34 +++++++++++ src/eos/public/helm.h | 116 +++++++++++++++++++++++++++++++++++++- 4 files changed, 232 insertions(+), 46 deletions(-) create mode 100644 src/eos/private/eosIO.cpp create mode 100644 src/eos/public/eosIO.h diff --git a/src/eos/private/eosIO.cpp b/src/eos/private/eosIO.cpp new file mode 100644 index 0000000..ba3e471 --- /dev/null +++ b/src/eos/private/eosIO.cpp @@ -0,0 +1,36 @@ +#include + +#include "eosIO.h" +#include "helm.h" +#include "debug.h" + +EosIO::EosIO(const std::string filename) : m_filename(filename) { + load(); +} + +std::string EosIO::getFormat() const { + return m_format; +} + + +EOSTable& EosIO::getTable() { + return m_table; +} + +void EosIO::load() { + // Load the EOS table from the file + // For now, just set the format to HELM + + m_format = "helm"; + if (m_format == "helm") { + loadHelm(); + } +} + +void EosIO::loadHelm() { + // Load the HELM table from the file + auto helmTabptr = helmholtz::read_helm_table(m_filename); + m_table = std::move(helmTabptr); + m_loaded = true; +} + diff --git a/src/eos/private/helm.cpp b/src/eos/private/helm.cpp index 90c482e..ed60a3e 100644 --- a/src/eos/private/helm.cpp +++ b/src/eos/private/helm.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -121,21 +122,22 @@ namespace helmholtz { } // this function reads in the HELM table and stores in the above arrays - HELMTable read_helm_table(const std::string filename) { + std::unique_ptr read_helm_table(const std::string filename) { Config& config = Config::getInstance(); std::string logFile = config.get("EOS:Helm:LogFile", "log"); Probe::LogManager& logManager = Probe::LogManager::getInstance(); quill::Logger* logger = logManager.getLogger(logFile); LOG_INFO(logger, "read_helm_table : Reading HELM table from file {}", filename); - HELMTable table; + // Make a unique pointer to the HELMTable + std::unique_ptr table = std::make_unique(); string data; int i, j; //set T and Rho (d) arrays - for (j=0; jjmax; j++) { table->t[j] = pow(10, tlo + tstp*j); } - for (i=0; iimax; i++) { table->d[i] = pow(10, dlo + dstp*i); } ifstream helm_table(filename); if (!helm_table) { @@ -144,83 +146,83 @@ namespace helmholtz { throw std::runtime_error("Error (" + std::to_string(errorCode) + ") opening file " + filename); } //read the Helmholtz free energy and its derivatives - for (j=0; jjmax; j++) { + for (i=0; iimax; i++){ getline(helm_table, data); stringstream id(data); - id >> table.f[i][j]; - id >> table.fd[i][j]; - id >> table.ft[i][j]; - id >> table.fdd[i][j]; - id >> table.ftt[i][j]; - id >> table.fdt[i][j]; - id >> table.fddt[i][j]; - id >> table.fdtt[i][j]; - id >> table.fddtt[i][j]; + id >> table->f[i][j]; + id >> table->fd[i][j]; + id >> table->ft[i][j]; + id >> table->fdd[i][j]; + id >> table->ftt[i][j]; + id >> table->fdt[i][j]; + id >> table->fddt[i][j]; + id >> table->fdtt[i][j]; + id >> table->fddtt[i][j]; } } //read the pressure derivative with density - for (j=0; jjmax; j++) { + for (i=0; iimax; i++){ getline(helm_table, data); stringstream id(data); - id >> table.dpdf[i][j]; - id >> table.dpdfd[i][j]; - id >> table.dpdft[i][j]; - id >> table.dpdfdt[i][j]; + id >> table->dpdf[i][j]; + id >> table->dpdfd[i][j]; + id >> table->dpdft[i][j]; + id >> table->dpdfdt[i][j]; } } //read the electron chemical potential - for (j=0; jjmax; j++) { + for (i=0; iimax; i++){ getline(helm_table, data); stringstream id(data); - id >> table.ef[i][j]; - id >> table.efd[i][j]; - id >> table.eft[i][j]; - id >> table.efdt[i][j]; + id >> table->ef[i][j]; + id >> table->efd[i][j]; + id >> table->eft[i][j]; + id >> table->efdt[i][j]; } } //read the number density - for (j=0; jjmax; j++) { + for (i=0; iimax; i++){ getline(helm_table, data); stringstream id(data); - id >> table.xf[i][j]; - id >> table.xfd[i][j]; - id >> table.xft[i][j]; - id >> table.xfdt[i][j]; + id >> table->xf[i][j]; + id >> table->xfd[i][j]; + id >> table->xft[i][j]; + id >> table->xfdt[i][j]; } } helm_table.close(); //done reading // construct the temperature and density deltas and their inverses - for (j=0; jjmax; j++) { + double dth = table->t[j+1] - table->t[j]; double dt2 = dth * dth; double dti = 1.0/dth; double dt2i = 1.0/dt2; - table.dt_sav[j] = dth; - table.dt2_sav[j] = dt2; - table.dti_sav[j] = dti; - table.dt2i_sav[j] = dt2i; + table->dt_sav[j] = dth; + table->dt2_sav[j] = dt2; + table->dti_sav[j] = dti; + table->dt2i_sav[j] = dt2i; } - for (i=0; iimax; i++) { + double dd = table->d[i+1] - table->d[i]; double dd2 = dd * dd; double ddi = 1.0/dd; - table.dd_sav[i] = dd; - table.dd2_sav[i] = dd2; - table.ddi_sav[i] = ddi; + table->dd_sav[i] = dd; + table->dd2_sav[i] = dd2; + table->ddi_sav[i] = ddi; } - table.loaded = true; + table->loaded = true; return table; } diff --git a/src/eos/public/eosIO.h b/src/eos/public/eosIO.h new file mode 100644 index 0000000..4087f9f --- /dev/null +++ b/src/eos/public/eosIO.h @@ -0,0 +1,34 @@ +#ifndef EOSIO_H +#define EOSIO_H + +#include +#include +#include + +// EOS table format includes +#include "helm.h" + +using EOSTable = std::variant< + std::unique_ptr + >; + +class EosIO { +private: + std::string m_filename; + bool m_loaded = false; + std::string m_format; + EOSTable m_table; + void load(); + + // Loaders for each format, right now just HELM + void loadHelm(); +public: + EosIO(const std::string filename); + ~EosIO() = default; + + std::string getFormat() const; + + EOSTable& getTable(); +}; + +#endif // EOSIO_H \ No newline at end of file diff --git a/src/eos/public/helm.h b/src/eos/public/helm.h index bdbfdad..64e7a8a 100644 --- a/src/eos/public/helm.h +++ b/src/eos/public/helm.h @@ -35,6 +35,8 @@ #include #include +#include "debug.h" + /** * @brief 2D array template alias. * @tparam T Type of the array elements. @@ -139,6 +141,118 @@ namespace helmholtz heap_deallocate_contiguous_2D_memory(xfdt); } + // // Delete copy constructor and copy assignment operator to prevent accidental shallow copies + // HELMTable(const HELMTable&) = delete; + // HELMTable& operator=(const HELMTable&) = delete; + + // // Move constructor + // HELMTable(HELMTable&& other) noexcept + // : loaded(other.loaded), + // f(other.f), fd(other.fd), ft(other.ft), fdd(other.fdd), ftt(other.ftt), fdt(other.fdt), + // fddt(other.fddt), fdtt(other.fdtt), fddtt(other.fddtt), + // dpdf(other.dpdf), dpdfd(other.dpdfd), dpdft(other.dpdft), dpdfdt(other.dpdfdt), + // ef(other.ef), efd(other.efd), eft(other.eft), efdt(other.efdt), + // xf(other.xf), xfd(other.xfd), xft(other.xft), xfdt(other.xfdt) + // { + // other.f = nullptr; + // other.fd = nullptr; + // other.ft = nullptr; + // other.fdd = nullptr; + // other.ftt = nullptr; + // other.fdt = nullptr; + // other.fddt = nullptr; + // other.fdtt = nullptr; + // other.fddtt = nullptr; + // other.dpdf = nullptr; + // other.dpdfd = nullptr; + // other.dpdft = nullptr; + // other.dpdfdt = nullptr; + // other.ef = nullptr; + // other.efd = nullptr; + // other.eft = nullptr; + // other.efdt = nullptr; + // other.xf = nullptr; + // other.xfd = nullptr; + // other.xft = nullptr; + // other.xfdt = nullptr; + // } + + // // Move assignment operator + // HELMTable& operator=(HELMTable&& other) noexcept { + // if (this != &other) { + // // Deallocate current memory + // heap_deallocate_contiguous_2D_memory(f); + // heap_deallocate_contiguous_2D_memory(fd); + // heap_deallocate_contiguous_2D_memory(ft); + // heap_deallocate_contiguous_2D_memory(fdd); + // heap_deallocate_contiguous_2D_memory(ftt); + // heap_deallocate_contiguous_2D_memory(fdt); + // heap_deallocate_contiguous_2D_memory(fddt); + // heap_deallocate_contiguous_2D_memory(fdtt); + // heap_deallocate_contiguous_2D_memory(fddtt); + // heap_deallocate_contiguous_2D_memory(dpdf); + // heap_deallocate_contiguous_2D_memory(dpdfd); + // heap_deallocate_contiguous_2D_memory(dpdft); + // heap_deallocate_contiguous_2D_memory(dpdfdt); + // heap_deallocate_contiguous_2D_memory(ef); + // heap_deallocate_contiguous_2D_memory(efd); + // heap_deallocate_contiguous_2D_memory(eft); + // heap_deallocate_contiguous_2D_memory(efdt); + // heap_deallocate_contiguous_2D_memory(xf); + // heap_deallocate_contiguous_2D_memory(xfd); + // heap_deallocate_contiguous_2D_memory(xft); + // heap_deallocate_contiguous_2D_memory(xfdt); + + // // Transfer ownership of resources + // loaded = other.loaded; + // f = other.f; + // fd = other.fd; + // ft = other.ft; + // fdd = other.fdd; + // ftt = other.ftt; + // fdt = other.fdt; + // fddt = other.fddt; + // fdtt = other.fdtt; + // fddtt = other.fddtt; + // dpdf = other.dpdf; + // dpdfd = other.dpdfd; + // dpdft = other.dpdft; + // dpdfdt = other.dpdfdt; + // ef = other.ef; + // efd = other.efd; + // eft = other.eft; + // efdt = other.efdt; + // xf = other.xf; + // xfd = other.xfd; + // xft = other.xft; + // xfdt = other.xfdt; + + // // Null out the other object's pointers + // other.f = nullptr; + // other.fd = nullptr; + // other.ft = nullptr; + // other.fdd = nullptr; + // other.ftt = nullptr; + // other.fdt = nullptr; + // other.fddt = nullptr; + // other.fdtt = nullptr; + // other.fddtt = nullptr; + // other.dpdf = nullptr; + // other.dpdfd = nullptr; + // other.dpdft = nullptr; + // other.dpdfdt = nullptr; + // other.ef = nullptr; + // other.efd = nullptr; + // other.eft = nullptr; + // other.efdt = nullptr; + // other.xf = nullptr; + // other.xfd = nullptr; + // other.xft = nullptr; + // other.xfdt = nullptr; + // } + // return *this; + // } + friend std::ostream& operator<<(std::ostream& os, const helmholtz::HELMTable& table) { if (!table.loaded) { os << "HELMTable not loaded\n"; @@ -371,7 +485,7 @@ namespace helmholtz * @param filename Path to the file containing the table. * @return HELMTable structure containing the table data. */ - HELMTable read_helm_table(const std::string filename); + std::unique_ptr read_helm_table(const std::string filename); /** * @brief Calculate the Helmholtz EOS components. From 1cc21a368bb9353fc8bb3346f218bb2eb88ee3bb Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:25:51 -0400 Subject: [PATCH 07/15] feat(src/misc): moved macros to misc --- src/misc/macros/debug.h | 11 +++++++++++ src/misc/macros/meson.build | 21 +++++++++++++++++++++ src/misc/macros/warning_control.h | 16 ++++++++++++++++ src/misc/meson.build | 2 ++ 4 files changed, 50 insertions(+) create mode 100644 src/misc/macros/debug.h create mode 100644 src/misc/macros/meson.build create mode 100644 src/misc/macros/warning_control.h create mode 100644 src/misc/meson.build diff --git a/src/misc/macros/debug.h b/src/misc/macros/debug.h new file mode 100644 index 0000000..b0f7d5b --- /dev/null +++ b/src/misc/macros/debug.h @@ -0,0 +1,11 @@ +#ifdef __GNUC__ // GCC and Clang + #define BREAKPOINT() __builtin_debugtrap() +#elif defined(_MSC_VER) // MSVC + #define BREAKPOINT() __debugbreak() +#elif defined(__APPLE__) && defined(__MACH__) // macOS with Clang and LLDB + #include + #define BREAKPOINT() raise(SIGTRAP) +#else + #include + #define BREAKPOINT() std::raise(SIGTRAP) +#endif diff --git a/src/misc/macros/meson.build b/src/misc/macros/meson.build new file mode 100644 index 0000000..f91a3b9 --- /dev/null +++ b/src/misc/macros/meson.build @@ -0,0 +1,21 @@ +# *********************************************************************** +# +# Copyright (C) 2025 -- The 4D-STAR Collaboration +# File Author: Emily Boudreaux +# Last Modified: March 19, 2025 +# +# 4DSSE is free software; you can use it and/or modify +# it under the terms and restrictions the GNU General Library Public +# License version 3 (GPLv3) as published by the Free Software Foundation. +# +# 4DSSE is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this software; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# *********************************************************************** # +macros_dep = declare_dependency(include_directories: include_directories('.')) diff --git a/src/misc/macros/warning_control.h b/src/misc/macros/warning_control.h new file mode 100644 index 0000000..23bf5a8 --- /dev/null +++ b/src/misc/macros/warning_control.h @@ -0,0 +1,16 @@ +#ifndef WARNING_CONTROL_H +#define WARNING_CONTROL_H + +#if defined(__GNUC__) || defined(__clang__) + #define DEPRECATION_WARNING_OFF _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") + #define DEPRECATION_WARNING_ON _Pragma("GCC diagnostic pop") +#elif defined(_MSC_VER) + #define DEPRECATION_WARNING_OFF __pragma(warning(push)) __pragma(warning(disable: 4996)) + #define DEPRECATION_WARNING_ON __pragma(warning(pop)) +#else + #define DEPRECATION_WARNING_OFF + #define DEPRECATION_WARNING_ON +#endif + +#endif // WARNING_CONTROL_H diff --git a/src/misc/meson.build b/src/misc/meson.build new file mode 100644 index 0000000..196a8e4 --- /dev/null +++ b/src/misc/meson.build @@ -0,0 +1,2 @@ +# IMPORTANT: DO NOT MAKE MISC DEPEND ON ANY OTHER MODULE AS IT IS THE FIRST MODULE TO BE BUILT +subdir('macros') From 08075f51080b7f8ac42d5e8f34c145949c286bd6 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:26:44 -0400 Subject: [PATCH 08/15] feat(resource-manager): added working singleton resource manager all external data should now be handled through the resource manager. This will take care of location on disk as well as ownership --- src/resource/meson.build | 40 +++++++++++ src/resource/private/resourceManager.cpp | 68 +++++++++++++++++++ src/resource/private/resourceManagerTypes.cpp | 41 +++++++++++ src/resource/public/resourceManager.h | 47 +++++++++++++ src/resource/public/resourceManagerTypes.h | 22 ++++++ tests/resource/meson.build | 24 +++++++ tests/resource/resourceManagerTest.cpp | 61 +++++++++++++++++ 7 files changed, 303 insertions(+) create mode 100644 src/resource/meson.build create mode 100644 src/resource/private/resourceManager.cpp create mode 100644 src/resource/private/resourceManagerTypes.cpp create mode 100644 src/resource/public/resourceManager.h create mode 100644 src/resource/public/resourceManagerTypes.h create mode 100644 tests/resource/meson.build create mode 100644 tests/resource/resourceManagerTest.cpp diff --git a/src/resource/meson.build b/src/resource/meson.build new file mode 100644 index 0000000..bc32862 --- /dev/null +++ b/src/resource/meson.build @@ -0,0 +1,40 @@ +# Define the library +resourceManager_sources = files( + 'private/resourceManager.cpp', + 'private/resourceManagerTypes.cpp' +) + +resourceManager_headers = files( + 'public/resourceManager.h', + 'public/resourceManagerTypes.h' +) + +dependencies = [ + yaml_cpp_dep, + opatio_dep, + eos_dep, + quill_dep, + config_dep, + probe_dep, + mfem_dep, + macros_dep, + meshio_dep +] + +libResourceHeader_dep = declare_dependency(include_directories: include_directories('public')) +# Define the libresourceManager library so it can be linked against by other parts of the build system +libresourceManager = static_library('resourceManager', + resourceManager_sources, + include_directories: include_directories('public'), + cpp_args: ['-fvisibility=default'], + dependencies: dependencies, + install : true) + +resourceManager_dep = declare_dependency( + include_directories: include_directories('public'), + link_with: libresourceManager, + dependencies: dependencies +) + +# Make headers accessible +install_headers(resourceManager_headers, subdir : '4DSSE/resource') \ No newline at end of file diff --git a/src/resource/private/resourceManager.cpp b/src/resource/private/resourceManager.cpp new file mode 100644 index 0000000..ebbe62d --- /dev/null +++ b/src/resource/private/resourceManager.cpp @@ -0,0 +1,68 @@ +#include +#include +#include +#include + +#include "quill/LogMacros.h" + +#include "resourceManager.h" +#include "resourceManagerTypes.h" +#include "debug.h" + +#include "config.h" + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) + +ResourceManager::ResourceManager() { + std::string defaultDataDir = TOSTRING(DATA_DIR); + m_dataDir = m_config.get("Data:Dir", defaultDataDir); + // -- Get the index file path using filesytem to make it a system safe path + std::string indexFilePath = m_dataDir + "/index.yaml"; + std::filesystem::path indexFile(indexFilePath); + + m_resourceConfig.loadConfig(indexFile.string()); + std::vector assets = m_resourceConfig.keys(); + for (auto key : assets ) { + load(key); + } +} + + +std::vector ResourceManager::getAvaliableResources() { + std::vector resources; + resources = m_resourceConfig.keys(); + return resources; +} + +const Resource& ResourceManager::getResource(const std::string &name) const { + auto it = m_resources.find(name); + if (it != m_resources.end()) { + return it->second; + } + throw std::runtime_error("Resource " + name + " not found"); +} + + +bool ResourceManager::loadResource(std::string& name) { + return load(name); +} + +bool ResourceManager::load(const std::string& name) { + const std::string resourcePath = m_dataDir + "/" + m_resourceConfig.get(name); + std::filesystem::path resourceFile(resourcePath); + if (!std::filesystem::exists(resourceFile)) { + LOG_ERROR(m_logger, "Resource file not found: {}", resourceFile.string()); + return false; + } + LOG_INFO(m_logger, "Loading resource: {}", resourceFile.string()); + if (m_resources.find(name) != m_resources.end()) { + LOG_INFO(m_logger, "Resource already loaded: {}", name); + return true; + } + Resource resource = createResource(name, resourcePath); + m_resources[name] = std::move(resource); + // -- Check if the resource is already in the map + return true; +} + diff --git a/src/resource/private/resourceManagerTypes.cpp b/src/resource/private/resourceManagerTypes.cpp new file mode 100644 index 0000000..98593bf --- /dev/null +++ b/src/resource/private/resourceManagerTypes.cpp @@ -0,0 +1,41 @@ +#include + +#include "resourceManagerTypes.h" +#include "opatIO.h" +#include "meshIO.h" +#include "eosIO.h" + +#include "debug.h" + +std::string getFirstSegment(const std::string& input) { + size_t pos = input.find(':'); + if (pos == std::string::npos) { + // No colon found, return the entire string + return input; + } else { + // Return substring from start to the position of the first colon + return input.substr(0, pos); + } +} + + +Resource createResource(const std::string& type, const std::string& path) { + static const std::unordered_map> factoryMap = { + {"opac", [](const std::string& p) { return Resource( + std::make_unique(p)); + }}, + {"mesh", [](const std::string& p) { return Resource( + std::make_unique(p)); + }}, + {"eos", [](const std::string& p) { return Resource( + std::make_unique(p)); + }} + // Add more mappings as needed + }; + auto it = factoryMap.find(getFirstSegment(type)); + if (it != factoryMap.end()) { + return it->second(path); + } else { + throw std::invalid_argument("Unknown resource type: " + type); + } +} \ No newline at end of file diff --git a/src/resource/public/resourceManager.h b/src/resource/public/resourceManager.h new file mode 100644 index 0000000..b304d4c --- /dev/null +++ b/src/resource/public/resourceManager.h @@ -0,0 +1,47 @@ +#ifndef RESOURCE_MANAGER_H +#define RESOURCE_MANAGER_H + +#include +#include +#include +#include + +#include "resourceManagerTypes.h" +#include "config.h" +#include "probe.h" +#include "quill/LogMacros.h" + +class ResourceManager { +private: + ResourceManager(); + ResourceManager(const ResourceManager&) = delete; + ResourceManager& operator=(const ResourceManager&) = delete; + Config& m_config = Config::getInstance(); + Probe::LogManager& m_logManager = Probe::LogManager::getInstance(); + quill::Logger* m_logger = m_logManager.getLogger("log"); + + Config m_resourceConfig; + std::string m_dataDir; + std::unordered_map m_resources; + + bool load(const std::string& name); + +public: + static ResourceManager& getInstance() { + static ResourceManager instance; + return instance; + } + + std::vector getAvaliableResources(); + + const Resource& getResource(const std::string &name) const; + + bool loadResource(std::string& name); + + std::unordered_map loadAllResources(); + + +}; + + +#endif // RESOURCE_MANAGER_H \ No newline at end of file diff --git a/src/resource/public/resourceManagerTypes.h b/src/resource/public/resourceManagerTypes.h new file mode 100644 index 0000000..e0b343e --- /dev/null +++ b/src/resource/public/resourceManagerTypes.h @@ -0,0 +1,22 @@ +#ifndef RESOURCE_MANAGER_TYPES_H +#define RESOURCE_MANAGER_TYPES_H + +#include +#include + +#include "opatIO.h" +#include "helm.h" +#include "meshIO.h" +#include "eosIO.h" + +// -- Valid resource types +using Resource = std::variant< + std::unique_ptr, + std::unique_ptr, + std::unique_ptr>; + + +std::string getFirstSegment(const std::string& input); +Resource createResource(const std::string& type, const std::string& path); + +#endif // RESOURCE_MANAGER_TYPES_H \ No newline at end of file diff --git a/tests/resource/meson.build b/tests/resource/meson.build new file mode 100644 index 0000000..75571d8 --- /dev/null +++ b/tests/resource/meson.build @@ -0,0 +1,24 @@ +# Test files for const +test_sources = [ + 'resourceManagerTest.cpp', +] + +foreach test_file : test_sources + exe_name = test_file.split('.')[0] + message('Building test: ' + exe_name) + + # Create an executable target for each test + test_exe = executable( + exe_name, + test_file, + dependencies: [gtest_dep, resourceManager_dep, gtest_main, macros_dep], + include_directories: include_directories('../../src/resource/public'), + install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly + ) + + # Add the executable as a test + test( + exe_name, + test_exe, + env: ['MESON_SOURCE_ROOT=' + meson.project_source_root(), 'MESON_BUILD_ROOT=' + meson.project_build_root()]) +endforeach diff --git a/tests/resource/resourceManagerTest.cpp b/tests/resource/resourceManagerTest.cpp new file mode 100644 index 0000000..d0264d7 --- /dev/null +++ b/tests/resource/resourceManagerTest.cpp @@ -0,0 +1,61 @@ +#include +#include "resourceManager.h" +#include "config.h" +#include "eosIO.h" +#include "helm.h" +#include "resourceManagerTypes.h" + +#include +#include +#include +#include + +#include "debug.h" + +/** + * @file configTest.cpp + * @brief Unit tests for the resourceManager class. + */ + + +std::string TEST_CONFIG = std::string(getenv("MESON_SOURCE_ROOT")) + "/tests/testsConfig.yaml"; +/** + * @brief Test suite for the resourceManager class. + */ +class resourceManagerTest : public ::testing::Test {}; + +/** + * @brief Test the constructor of the resourceManager class. + */ +TEST_F(resourceManagerTest, constructor) { + Config::getInstance().loadConfig(TEST_CONFIG); + EXPECT_NO_THROW(ResourceManager::getInstance()); +} + +TEST_F(resourceManagerTest, getAvaliableResources) { + Config::getInstance().loadConfig(TEST_CONFIG); + ResourceManager& rm = ResourceManager::getInstance(); + std::vector resources = rm.getAvaliableResources(); + std::set expected = {"eos:helm", "mesh:sphere"}; + std::set actual(resources.begin(), resources.end()); + EXPECT_EQ(expected, actual); +} + +TEST_F(resourceManagerTest, getResource) { + Config::getInstance().loadConfig(TEST_CONFIG); + ResourceManager& rm = ResourceManager::getInstance(); + std::string name = "eos:helm"; + const Resource &r = rm.getResource(name); + // BREAKPOINT(); + const auto &eos = std::get>(r); + EXPECT_EQ("helm", eos->getFormat()); + EOSTable &table = eos->getTable(); + + // -- Extract the Helm table from the EOSTable + helmholtz::HELMTable &helmTable = *std::get>(table); + EXPECT_DOUBLE_EQ(helmTable.f[0][0], -1692098915534.8142); + + EXPECT_THROW(rm.getResource("opac:GS98:high:doesNotExist"), std::runtime_error); +} + + From 041a5a592c45a13d23469c74fa1530e30daf49af Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:27:11 -0400 Subject: [PATCH 09/15] test(tests/eos): updated eos test to use resource manager instead of env variable --- tests/eos/eosTest.cpp | 60 +++++++++++++++++++++++-------------------- tests/eos/meson.build | 2 +- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/tests/eos/eosTest.cpp b/tests/eos/eosTest.cpp index 2ff0be7..2db0d8a 100644 --- a/tests/eos/eosTest.cpp +++ b/tests/eos/eosTest.cpp @@ -1,11 +1,12 @@ #include #include +#include #include -#include -#include #include #include "helm.h" +#include "resourceManager.h" +#include "config.h" /** * @file constTest.cpp @@ -17,21 +18,21 @@ */ class eosTest : public ::testing::Test {}; -std::string HELM_FILENAME = std::string(getenv("MESON_SOURCE_ROOT")) + "/assets/eos/helm_table.dat"; +std::string TEST_CONFIG = std::string(getenv("MESON_SOURCE_ROOT")) + "/tests/testsConfig.yaml"; + /** * @test Verify default constructor initializes correctly. */ -TEST_F(eosTest, constructor) { - using namespace helmholtz; - EXPECT_NO_THROW(HELMTable table = read_helm_table(HELM_FILENAME)); -} TEST_F(eosTest, read_helm_table) { - using namespace helmholtz; - HELMTable table = read_helm_table(HELM_FILENAME); + Config::getInstance().loadConfig(TEST_CONFIG); // Capture the << operator output as a string + ResourceManager& rm = ResourceManager::getInstance(); + auto& eos = std::get>(rm.getResource("eos:helm")); + auto& table = eos->getTable(); + auto& helmTable = *std::get>(table); std::stringstream ss; - ss << table; + ss << helmTable; EXPECT_EQ(ss.str(), "HELMTable Data:\n imax: 541, jmax: 201\n Temperature Range: [1000, 1e+13]\n Density Range: [1e-12, 1e+15]\n"); } @@ -58,28 +59,31 @@ TEST_F(eosTest, get_helm_EOS) { eos1.abar = 1.0/asum; eos1.zbar = eos1.abar*zsum; - HELMTable table = read_helm_table(HELM_FILENAME); - EOS eos = get_helm_EOS(eos1, table); - // std::cout << eos << std::endl; + ResourceManager& rm = ResourceManager::getInstance(); + auto& eos = std::get>(rm.getResource("eos:helm")); + auto& table = eos->getTable(); + auto& helmTable = *std::get>(table); + EOS helmEos = get_helm_EOS(eos1, helmTable); + + const double absErr = 1e-12; //Check composition info - EXPECT_DOUBLE_EQ( eos.ye, 8.75e-01); + EXPECT_NEAR( helmEos.ye, 8.75e-01, absErr); //Check E, P, S and derivatives of each wrt Rho and T - EXPECT_DOUBLE_EQ( eos.etaele, 2.3043348231021554e+01); - EXPECT_DOUBLE_EQ( eos.etot, 1.1586558190936826e+17); - EXPECT_DOUBLE_EQ(eos.denerdd, 6.1893000468285858e+10); - EXPECT_DOUBLE_EQ(eos.denerdt, 1.2129708972542575e+08); - EXPECT_DOUBLE_EQ( eos.ptot, 6.9610135220017030e+22); - EXPECT_DOUBLE_EQ(eos.dpresdd, 1.0296440482849070e+17); - EXPECT_DOUBLE_EQ(eos.dpresdt, 7.7171347517311625e+13); - EXPECT_DOUBLE_EQ( eos.stot, 6.0647461970567346e+08); - EXPECT_DOUBLE_EQ(eos.dentrdd,-7.7171347517311645e+01); - EXPECT_DOUBLE_EQ(eos.dentrdt, 1.2129708972542577e+00); + EXPECT_NEAR( helmEos.etaele, 2.3043348231021554e+01, absErr); + EXPECT_NEAR( helmEos.etot, 1.1586558190936826e+17, 1e3); + EXPECT_NEAR(helmEos.denerdd, 6.1893000468285858e+10, 1e-2); + EXPECT_NEAR(helmEos.denerdt, 1.2129708972542575e+08, 1e-7); + EXPECT_NEAR( helmEos.ptot, 6.9610135220017030e+22, 1e10); + EXPECT_NEAR(helmEos.dpresdd, 1.0296440482849070e+17, 1e3); + EXPECT_NEAR(helmEos.dpresdt, 7.7171347517311625e+13, 1.0); + EXPECT_NEAR( helmEos.stot, 6.0647461970567346e+08, 1e-7); + EXPECT_NEAR(helmEos.dentrdd,-7.7171347517311645e+01, absErr); + EXPECT_NEAR(helmEos.dentrdt, 1.2129708972542577e+00, absErr); - const double abs_err = 1.0e-12; // Maxwell relations, should always be zero - EXPECT_NEAR( eos.dse, 0, abs_err); - EXPECT_NEAR( eos.dpe, 0, abs_err); - EXPECT_NEAR( eos.dsp, 0, abs_err); + EXPECT_NEAR( helmEos.dse, 0, absErr); + EXPECT_NEAR( helmEos.dpe, 0, absErr); + EXPECT_NEAR( helmEos.dsp, 0, absErr); } diff --git a/tests/eos/meson.build b/tests/eos/meson.build index 05d2f83..d8154e6 100644 --- a/tests/eos/meson.build +++ b/tests/eos/meson.build @@ -11,7 +11,7 @@ foreach test_file : test_sources test_exe = executable( exe_name, test_file, - dependencies: [gtest_dep, eos_dep, gtest_main], + dependencies: [gtest_dep, eos_dep, gtest_main, resourceManager_dep, config_dep], install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly ) From 18f3f6689d5a1718bd3e65ba760924f5d56d53e2 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:27:57 -0400 Subject: [PATCH 10/15] feat(config): added ability to get all keys and check if a key exists in the given config file also added the ability to get a config value without specifying a default (this is only avalible to freind classes) --- src/config/private/config.cpp | 43 +++++++++++++++++++++++++++++++++++ src/config/public/config.h | 43 ++++++++++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 1 deletion(-) diff --git a/src/config/private/config.cpp b/src/config/private/config.cpp index ffce7a3..76e7d43 100644 --- a/src/config/private/config.cpp +++ b/src/config/private/config.cpp @@ -46,6 +46,7 @@ bool Config::loadConfig(const std::string& configFile) { std::cerr << "Error: " << e.what() << std::endl; return false; } + m_loaded = true; return true; } @@ -60,3 +61,45 @@ void Config::addToCache(const std::string &key, const YAML::Node &node) { void Config::registerUnknownKey(const std::string &key) { unknownKeys.push_back(key); } + +bool Config::has(const std::string &key) { + if (!m_loaded) { + throw std::runtime_error("Error! Config file not loaded"); + } + if (isKeyInCache(key)) { return true; } + + YAML::Node node = YAML::Clone(yamlRoot); + std::istringstream keyStream(key); + std::string subKey; + while (std::getline(keyStream, subKey, ':')) { + if (!node[subKey]) { + registerUnknownKey(key); + return false; + } + node = node[subKey]; // go deeper + } + + // Key exists and is of the requested type + addToCache(key, node); + return true; +} + +void recurse_keys(const YAML::Node& node, std::vector& keyList, const std::string& path = "") { + if (node.IsMap()) { + for (const auto& it : node) { + std::string key = it.first.as(); + std::string new_path = path.empty() ? key : path + ":" + key; + recurse_keys(it.second, keyList, new_path); + } + } else { + keyList.push_back(path); + } + +} + +std::vector Config::keys() const { + std::vector keyList; + YAML::Node node = YAML::Clone(yamlRoot); + recurse_keys(node, keyList); + return keyList; +} \ No newline at end of file diff --git a/src/config/public/config.h b/src/config/public/config.h index e8b96a0..be33163 100644 --- a/src/config/public/config.h +++ b/src/config/public/config.h @@ -23,14 +23,18 @@ #include #include -#include #include #include #include #include +#include +// Required for YAML parsing #include "yaml-cpp/yaml.h" +// -- Forward Def of Resource manager to let it act as a friend of Config -- +class ResourceManager; + /** * @class Config * @brief Singleton class to manage configuration settings loaded from a YAML file. @@ -94,6 +98,21 @@ private: */ void registerUnknownKey(const std::string &key); + bool m_loaded = false; + + // Only friends can access get without a default value + template + T get(const std::string &key) { + if (!m_loaded) { + throw std::runtime_error("Error! Config file not loaded"); + } + if (has(key)) { + return getFromCache(key, T()); + } else { + throw std::runtime_error("Error! Key not found in config file"); + } + } + public: /** * @brief Get the singleton instance of the Config class. @@ -136,6 +155,9 @@ public: */ template T get(const std::string &key, T defaultValue) { + if (!m_loaded) { + throw std::runtime_error("Error! Config file not loaded"); + } // --- Check if the key has already been checked for existence if (std::find(unknownKeys.begin(), unknownKeys.end(), key) != unknownKeys.end()) { return defaultValue; // If the key has already been added to the unknown cache do not traverse the YAML tree or hit the cache @@ -171,6 +193,19 @@ public: } } + /** + * @brief Check if the key exists in the given config file + * @param key Key to check; + * @return boolean true or false + */ + bool has(const std::string &key); + + /** + * @brief Get all keys defined in the configuration file. + * @return Vector of all keys in the configuration file. + */ + std::vector keys() const; + /** * @brief Print the configuration file path and the YAML root node. * @param os Output stream. @@ -178,6 +213,10 @@ public: * @return Output stream. */ friend std::ostream& operator<<(std::ostream& os, const Config& config) { + if (!config.m_loaded) { + os << "Config file not loaded" << std::endl; + return os; + } if (!config.debug) { os << "Config file: " << config.configFilePath << std::endl; } else{ @@ -190,6 +229,8 @@ public: // Setup gTest class as a friend friend class configTestPrivateAccessor; + // -- Resource Manager is a friend of config so it can create a seperate instance + friend class ResourceManager; }; #endif \ No newline at end of file From cb5ac274dc77b0d8a05381b0c85cd189c67ed68b Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:29:43 -0400 Subject: [PATCH 11/15] build(build): updated build system to be compatible with resource manager The build system now passes compiler directives based on the mode being build. By default data is stored in the source root (and this is encoded into the compiled binary). However, if building in user mode then data is assumed to be at the meson install prefix data directory --- meson.build | 17 +++++++++++++++++ meson_options.txt | 1 + src/eos/meson.build | 15 +++++++++++++-- src/meshIO/meson.build | 12 ++++++++++-- src/meson.build | 23 +++++++++++++++-------- src/opatIO/meson.build | 4 ++++ tests/meson.build | 1 + 7 files changed, 61 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index f5476a9..bd29da1 100644 --- a/meson.build +++ b/meson.build @@ -2,11 +2,28 @@ project('4DSSE', 'cpp', version: '0.0.1a', default_options: ['cpp_std=c++23'], m # Add default visibility for all C++ targets add_project_arguments('-fvisibility=default', language: 'cpp') +# Determine the mode +mode = 1 +if get_option('user_mode') + mode = 0 +endif + +# Define DATA_DIR based on mode +if mode == 1 + data_dir = meson.project_source_root() + '/assets/dynamic' +else + data_dir = get_option('prefix') + '/' + get_option('datadir') + '/4DSSE' +endif + +# Pass the DATA_DIR definition to the compiler +add_project_arguments('-DDATA_DIR=' + data_dir, language : 'cpp') # Build external dependencies first so that all the embedded resources are available to the other targets subdir('build-config') subdir('subprojects/PicoSHA2') +subdir('assets/static') + # Build the main project subdir('src') if get_option('build_tests') diff --git a/meson_options.txt b/meson_options.txt index c3b5afd..56baeee 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,2 @@ option('build_tests', type: 'boolean', value: true, description: 'Build tests') +option('user_mode', type: 'boolean', value: false, description: 'Enable user mode (set mode = 0)') diff --git a/src/eos/meson.build b/src/eos/meson.build index ca3e18f..f9979b4 100644 --- a/src/eos/meson.build +++ b/src/eos/meson.build @@ -1,23 +1,34 @@ # Define the library eos_sources = files( 'private/helm.cpp', + 'private/eosIO.cpp' ) eos_headers = files( - 'public/helm.h' + 'public/helm.h', + 'public/eosIO.h' ) +dependencies = [ + const_dep, + quill_dep, + probe_dep, + config_dep, + mfem_dep, + macros_dep, +] # Define the libconst library so it can be linked against by other parts of the build system libeos = static_library('eos', eos_sources, include_directories: include_directories('public'), cpp_args: ['-fvisibility=default'], - dependencies: [const_dep, quill_dep, probe_dep, config_dep, mfem_dep], + dependencies: dependencies, install : true) eos_dep = declare_dependency( include_directories: include_directories('public'), link_with: libeos, + dependencies: dependencies ) # Make headers accessible install_headers(eos_headers, subdir : '4DSSE/eos') \ No newline at end of file diff --git a/src/meshIO/meson.build b/src/meshIO/meson.build index 1ea870a..a684138 100644 --- a/src/meshIO/meson.build +++ b/src/meshIO/meson.build @@ -6,14 +6,22 @@ meshIO_sources = files( meshIO_headers = files( 'public/meshIO.h' ) - +dependencies = [ + mfem_dep +] # Define the libmeshIO library so it can be linked against by other parts of the build system libmeshIO = static_library('meshIO', meshIO_sources, include_directories: include_directories('public'), cpp_args: ['-fvisibility=default'], - dependencies: [mfem_dep], + dependencies: dependencies, install : true) +meshio_dep = declare_dependency( + include_directories: include_directories('public'), + link_with: libmeshIO, + dependencies: dependencies +) + # Make headers accessible install_headers(meshIO_headers, subdir : '4DSSE/meshIO') \ No newline at end of file diff --git a/src/meson.build b/src/meson.build index 3547118..d2d2399 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,11 +1,18 @@ -# Build resources first so that all the embedded resources are available to the other targets -subdir('resources') +# Build the main source code in the correct order -# Build the main source code -subdir('dobj') -subdir('const') -subdir('opatIO') -subdir('meshIO') +# Utility Libraries +subdir('misc') subdir('config') subdir('probe') -subdir('eos') \ No newline at end of file +subdir('const') +subdir('dobj') + +# Asset Libraries +subdir('eos') +subdir('opatIO') +subdir('meshIO') + +# Resouce Manager Libraries +subdir('resource') + +# Physics Libraries \ No newline at end of file diff --git a/src/opatIO/meson.build b/src/opatIO/meson.build index c2229bc..238ee6f 100644 --- a/src/opatIO/meson.build +++ b/src/opatIO/meson.build @@ -16,5 +16,9 @@ libopatIO = library('opatIO', install : true, ) +opatio_dep = declare_dependency( + include_directories: include_directories('public'), + link_with: libopatIO, +) # Make headers accessible install_headers(opatIO_headers, subdir : '4DSSE/opatIO') \ No newline at end of file diff --git a/tests/meson.build b/tests/meson.build index e744e20..0d89e07 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -11,6 +11,7 @@ subdir('meshIO') subdir('config') subdir('probe') subdir('eos') +subdir('resource') # Subdirectories for sandbox tests subdir('dobj_sandbox') From ecbdba5216e4dfccc22a28790ec5e5685ab28864 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:30:40 -0400 Subject: [PATCH 12/15] refactor(opatIO-and-meshIO): removed unused header file includes --- src/meshIO/private/meshIO.cpp | 2 +- src/meshIO/public/meshIO.h | 2 +- src/opatIO/private/opatIO.cpp | 2 +- src/opatIO/public/opatIO.h | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/meshIO/private/meshIO.cpp b/src/meshIO/private/meshIO.cpp index 01619bb..a894a14 100644 --- a/src/meshIO/private/meshIO.cpp +++ b/src/meshIO/private/meshIO.cpp @@ -26,7 +26,7 @@ #include "meshIO.h" -MeshIO::MeshIO(const std::string &mesh_file) +MeshIO::MeshIO(const std::string mesh_file) { mesh_file_ = mesh_file; std::ifstream mesh_stream(mesh_file); diff --git a/src/meshIO/public/meshIO.h b/src/meshIO/public/meshIO.h index aad8bf7..1a2c4db 100644 --- a/src/meshIO/public/meshIO.h +++ b/src/meshIO/public/meshIO.h @@ -39,7 +39,7 @@ public: * @brief Constructor that initializes the MeshIO object with a mesh file. * @param mesh_file The name of the mesh file. */ - MeshIO(const std::string &mesh_file); + MeshIO(const std::string mesh_file); /** * @brief Destructor for the MeshIO class. diff --git a/src/opatIO/private/opatIO.cpp b/src/opatIO/private/opatIO.cpp index 43960f5..bdbf45b 100644 --- a/src/opatIO/private/opatIO.cpp +++ b/src/opatIO/private/opatIO.cpp @@ -56,7 +56,7 @@ T swap_bytes(T value) { // Constructor OpatIO::OpatIO() {} -OpatIO::OpatIO(std::string filename) : filename(filename) { +OpatIO::OpatIO(const std::string filename) : filename(filename) { load(); } diff --git a/src/opatIO/public/opatIO.h b/src/opatIO/public/opatIO.h index f822420..49b6bcf 100644 --- a/src/opatIO/public/opatIO.h +++ b/src/opatIO/public/opatIO.h @@ -21,7 +21,6 @@ #ifndef OPATIO_H #define OPATIO_H -#include #include #include #include From da8259e9401cfc919799b2ab5a5b445d00750395 Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:31:18 -0400 Subject: [PATCH 13/15] test(tests/meshIO): began preping to convert to resource manager --- tests/meshIO/meshIOTest.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/meshIO/meshIOTest.cpp b/tests/meshIO/meshIOTest.cpp index 07eec4f..23f845a 100644 --- a/tests/meshIO/meshIOTest.cpp +++ b/tests/meshIO/meshIOTest.cpp @@ -1,6 +1,5 @@ #include #include "meshIO.h" -#include #include #include "mfem.hpp" From ed0e0791506a937f36cae8d966abdc708c16cdaf Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:37:15 -0400 Subject: [PATCH 14/15] docs(src): added documentation to all changes related to the resource manager --- src/eos/public/eosIO.h | 46 ++++++++++++-- src/misc/macros/debug.h | 25 ++++++++ src/resource/public/resourceManager.h | 74 +++++++++++++++++++++- src/resource/public/resourceManagerTypes.h | 51 ++++++++++++++- 4 files changed, 187 insertions(+), 9 deletions(-) diff --git a/src/eos/public/eosIO.h b/src/eos/public/eosIO.h index 4087f9f..aab0c59 100644 --- a/src/eos/public/eosIO.h +++ b/src/eos/public/eosIO.h @@ -12,22 +12,58 @@ using EOSTable = std::variant< std::unique_ptr >; +/** + * @class EosIO + * @brief Handles the input/output operations for EOS tables. + * + * The EosIO class is responsible for loading and managing EOS tables from files. + * It supports different formats, currently only HELM format. + * + * Example usage: + * @code + * EosIO eosIO("path/to/file"); + * std::string format = eosIO.getFormat(); + * EOSTable& table = eosIO.getTable(); + * @endcode + */ class EosIO { private: - std::string m_filename; - bool m_loaded = false; - std::string m_format; - EOSTable m_table; + std::string m_filename; ///< The filename of the EOS table. + bool m_loaded = false; ///< Flag indicating if the table is loaded. + std::string m_format; ///< The format of the EOS table. + EOSTable m_table; ///< The EOS table data. + + /** + * @brief Loads the EOS table from the file. + */ void load(); - // Loaders for each format, right now just HELM + /** + * @brief Loads the HELM format EOS table. + */ void loadHelm(); public: + /** + * @brief Constructs an EosIO object with the given filename. + * @param filename The filename of the EOS table. + */ EosIO(const std::string filename); + + /** + * @brief Default destructor. + */ ~EosIO() = default; + /** + * @brief Gets the format of the EOS table. + * @return The format of the EOS table as a string. + */ std::string getFormat() const; + /** + * @brief Gets the EOS table. + * @return A reference to the EOS table. + */ EOSTable& getTable(); }; diff --git a/src/misc/macros/debug.h b/src/misc/macros/debug.h index b0f7d5b..284268d 100644 --- a/src/misc/macros/debug.h +++ b/src/misc/macros/debug.h @@ -1,11 +1,36 @@ +/** + * @file debug.h + * @brief Defines a macro for triggering a breakpoint in different compilers and platforms. + * + * This file provides a macro `BREAKPOINT()` that triggers a breakpoint + * in the debugger, depending on the compiler and platform being used. + * + * Usage: + * @code + * BREAKPOINT(); // Triggers a breakpoint in the debugger + * @endcode + */ + #ifdef __GNUC__ // GCC and Clang + /** + * @brief Triggers a breakpoint in GCC and Clang. + */ #define BREAKPOINT() __builtin_debugtrap() #elif defined(_MSC_VER) // MSVC + /** + * @brief Triggers a breakpoint in MSVC. + */ #define BREAKPOINT() __debugbreak() #elif defined(__APPLE__) && defined(__MACH__) // macOS with Clang and LLDB #include + /** + * @brief Triggers a breakpoint in macOS with Clang and LLDB. + */ #define BREAKPOINT() raise(SIGTRAP) #else #include + /** + * @brief Triggers a breakpoint in other platforms. + */ #define BREAKPOINT() std::raise(SIGTRAP) #endif diff --git a/src/resource/public/resourceManager.h b/src/resource/public/resourceManager.h index b304d4c..6c34635 100644 --- a/src/resource/public/resourceManager.h +++ b/src/resource/public/resourceManager.h @@ -11,11 +11,30 @@ #include "probe.h" #include "quill/LogMacros.h" +/** + * @class ResourceManager + * @brief Manages resources within the application. + * + * The ResourceManager class is responsible for loading, storing, and providing access to resources. + * It follows the Singleton design pattern to ensure only one instance of the manager exists. + */ class ResourceManager { private: + /** + * @brief Private constructor to prevent instantiation. + */ ResourceManager(); + + /** + * @brief Deleted copy constructor to prevent copying. + */ ResourceManager(const ResourceManager&) = delete; + + /** + * @brief Deleted assignment operator to prevent assignment. + */ ResourceManager& operator=(const ResourceManager&) = delete; + Config& m_config = Config::getInstance(); Probe::LogManager& m_logManager = Probe::LogManager::getInstance(); quill::Logger* m_logger = m_logManager.getLogger("log"); @@ -24,24 +43,73 @@ private: std::string m_dataDir; std::unordered_map m_resources; + /** + * @brief Loads a resource by name. + * @param name The name of the resource to load. + * @return True if the resource was loaded successfully, false otherwise. + */ bool load(const std::string& name); public: + /** + * @brief Gets the singleton instance of the ResourceManager. + * @return The singleton instance of the ResourceManager. + */ static ResourceManager& getInstance() { static ResourceManager instance; return instance; } + /** + * @brief Gets a list of available resources. + * @return A vector of strings containing the names of available resources. + * + * Example usage: + * @code + * ResourceManager& manager = ResourceManager::getInstance(); + * std::vector resources = manager.getAvaliableResources(); + * @endcode + */ std::vector getAvaliableResources(); + /** + * @brief Gets a resource by name. + * @param name The name of the resource to retrieve. + * @return A constant reference to the requested resource. + * @throws std::runtime_error if the resource is not found. + * + * Example usage: + * @code + * ResourceManager& manager = ResourceManager::getInstance(); + * const Resource& resource = manager.getResource("exampleResource"); + * @endcode + */ const Resource& getResource(const std::string &name) const; + /** + * @brief Loads a resource by name. + * @param name The name of the resource to load. + * @return True if the resource was loaded successfully, false otherwise. + * + * Example usage: + * @code + * ResourceManager& manager = ResourceManager::getInstance(); + * bool success = manager.loadResource("exampleResource"); + * @endcode + */ bool loadResource(std::string& name); + /** + * @brief Loads all resources. + * @return An unordered map with resource names as keys and load success as values. + * + * Example usage: + * @code + * ResourceManager& manager = ResourceManager::getInstance(); + * std::unordered_map results = manager.loadAllResources(); + * @endcode + */ std::unordered_map loadAllResources(); - - }; - #endif // RESOURCE_MANAGER_H \ No newline at end of file diff --git a/src/resource/public/resourceManagerTypes.h b/src/resource/public/resourceManagerTypes.h index e0b343e..7700e03 100644 --- a/src/resource/public/resourceManagerTypes.h +++ b/src/resource/public/resourceManagerTypes.h @@ -9,14 +9,63 @@ #include "meshIO.h" #include "eosIO.h" +/** + * @file resourceManagerTypes.h + * @brief Defines types and functions for managing resources. + * + * This file provides type definitions and functions for handling different + * types of resources in a unified manner. + */ + // -- Valid resource types +/** + * @brief A variant type that can hold different types of resources. + * + * The Resource type is a std::variant that can hold a unique pointer to + * an OpatIO, MeshIO, or EosIO object. + * + * Example usage: + * @code + * Resource resource = std::make_unique(...); + * @endcode + */ using Resource = std::variant< std::unique_ptr, std::unique_ptr, std::unique_ptr>; - +/** + * @brief Extracts the first segment of a given string. + * + * This function takes a string input and returns the first segment + * separated by a delimiter (default is '/'). + * + * @param input The input string to be processed. + * @return The first segment of the input string. + * + * Example usage: + * @code + * std::string segment = getFirstSegment("path/to/resource"); + * // segment == "path" + * @endcode + */ std::string getFirstSegment(const std::string& input); + +/** + * @brief Creates a resource based on the specified type and path. + * + * This function creates a resource object based on the provided type + * and initializes it using the given path. + * + * @param type The type of the resource to be created (e.g., "OpatIO", "MeshIO", "EosIO"). + * @param path The path to initialize the resource with. + * @return A Resource object initialized with the specified type and path. + * + * Example usage: + * @code + * Resource resource = createResource("OpatIO", "path/to/opat"); + * @endcode + */ Resource createResource(const std::string& type, const std::string& path); #endif // RESOURCE_MANAGER_TYPES_H \ No newline at end of file From 697c783c5d38e84beb0aedddc2e44868d727e98f Mon Sep 17 00:00:00 2001 From: Emily Boudreaux Date: Thu, 20 Mar 2025 14:37:34 -0400 Subject: [PATCH 15/15] docs(tests/eos): updated eos test documentation --- tests/eos/eosTest.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/eos/eosTest.cpp b/tests/eos/eosTest.cpp index 2db0d8a..b1a352b 100644 --- a/tests/eos/eosTest.cpp +++ b/tests/eos/eosTest.cpp @@ -26,7 +26,6 @@ std::string TEST_CONFIG = std::string(getenv("MESON_SOURCE_ROOT")) + "/tests/tes TEST_F(eosTest, read_helm_table) { Config::getInstance().loadConfig(TEST_CONFIG); - // Capture the << operator output as a string ResourceManager& rm = ResourceManager::getInstance(); auto& eos = std::get>(rm.getResource("eos:helm")); auto& table = eos->getTable();