Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
splash.hpp
Go to the documentation of this file.
1//This file is part of Bertini 2.
2//
3//bertini2/io/splash.hpp is free software: you can redistribute it and/or modify
4//it under the terms of the GNU General Public License as published by
5//the Free Software Foundation, either version 3 of the License, or
6//(at your option) any later version.
7//
8//bertini2/io/splash.hpp is distributed in the hope that it will be useful,
9//but WITHOUT ANY WARRANTY; without even the implied warranty of
10//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11//GNU General Public License for more details.
12//
13//You should have received a copy of the GNU General Public License
14//along with bertini2/io/splash.hpp. If not, see <http://www.gnu.org/licenses/>.
15//
16// Copyright(C) Bertini2 Development Team
17//
18// See <http://www.gnu.org/licenses/> for a copy of the license,
19// as well as COPYING. Bertini2 is provided with permitted
20// additional terms in the b2/licenses/ directory.
21
27
28#pragma once
29
30#include "bertini2/config.hpp"
31
32#include <Eigen/Core>
33#include <gmp.h>
34#include <mpfr.h>
35
36#include "boost/version.hpp"
37
38#ifdef BERTINI2_HAVE_MPI
40#endif
41
42#include <sstream>
43
45#define BERTINI2_PACKAGE_URL "https://github.com/bertiniteam/b2"
46namespace bertini{
47
49inline
50std::string LicenseInfo()
51{
52 std::stringstream ss;
53 ss << "Bertini 2 is available under the GPL 3 license,\nwith additional terms as permitted under Section 7.\n\nPlease see the full text of the licenses for Bertini and its dependencies in the source code at b2/licenses.\n\n";
54 ss << "Bertini 2 depends on the following software and libraries:"
55 "\n"
56 "==\n"
57 "Eigen\n"
58 "--\n"
59 "Eigen is available from http://eigen.tuxfamily.org/index.php?title=Main_Page\n"
60 "\n"
61 "Eigen's license as of April 12, 2016 is MPL2, with some LGPL scattered in.\nFor more information, please consult\n"
62 "http://eigen.tuxfamily.org/index.php?title=FAQ#Licensing\n"
63 "\n"
64 "The Mozilla Public License 2.0 has been included at b2/licenses/\n"
65 "\n"
66 "==\n"
67 "GMP\n"
68 "--\n"
69 "The GNU Multiple Precision Library is available from https://gmplib.org/.\n"
70 "\n"
71 "Since version 6, GMP is distributed under the dual licenses, GNU LGPL v3 and GNU GPL v2.\n"
72 "\n"
73 "The GNU LGPL license has been included in Bertini 2 at b2/licenses/\n"
74 "\n"
75 "==\n"
76 "MPFR\n"
77 "--\n"
78 "The GNU MPFR library is available from http://www.mpfr.org/.\n"
79 "\n"
80 "MPFR is free.\nIt is distributed under the GNU Lesser General Public License (GNU Lesser GPL),\nversion 3 or later (2.1 or later for MPFR versions until 2.4.x).\n"
81 "\n"
82 "==\n"
83 "Boost\n"
84 "--\n"
85 "The Boost C++ libraries are available from http://www.boost.org/.\n"
86 "\n"
87 "Boost is available under the Boost License 1.0.\nPlease see http://www.boost.org/users/license.html.\nA copy of the BPL has been included in b2/licenses.\n";
88
89 return ss.str();
90}
91
93inline
94std::string SourceURL()
95{
97}
98
100inline
101std::string WikiURL()
102{
103 return "https://github.com/bertiniteam/b2/wiki";
104}
105
112inline
113std::string Version()
114{
115 return BERTINI2_VERSION_FULL;
116}
117
119inline
120std::string Owners()
121{
122 std::stringstream ss;
123 ss << "D.J. Bates, S. Amethyst, J.D. Hauenstein,\nA.J. Sommese, C.W. Wampler";
124 return ss.str();
125}
126
128inline
129std::string SplashScreen()
130{
131 std::stringstream ss;
132
133 ss << " Bertini(TM) 2\n\n";
134 ss << " The Bertini Trademark is owned by\n" << Owners() << "\n\n";
135 ss << " Source available online at\n" << SourceURL() << "\n\n";
136 ss << " Wiki online at\n" << WikiURL() << "\n\n";
137 ss << " This is version\n" << Version() << "\n";
138 ss << " Bertini2 is GPL3 Free/Libre Open Source Software, please contribute!\n\n";
139 return ss.str();
140}
141
142
144inline
145std::string GenericHelp()
146{
147 return "";
148}
149
150
152inline
154{
155 std::stringstream ss;
156 ss << EIGEN_WORLD_VERSION << "."
157 << EIGEN_MAJOR_VERSION << "."
158 << EIGEN_MINOR_VERSION;
159 return ss.str();
160}
161
163inline
164std::string GMPVersion()
165{
166 return gmp_version;
167}
168
170inline
171std::string MPFRVersion()
172{
173 return mpfr_get_version();
174}
175
177inline
178std::string MPIVersion()
179{
180#ifdef BERTINI2_HAVE_MPI
181 char buf[MPI_MAX_LIBRARY_VERSION_STRING];
182 int len = 0;
183 MPI_Get_library_version(buf, &len);
184 return std::string(buf, static_cast<size_t>(len));
185#else
186 return "not available (serial build)";
187#endif
188}
189
191inline
193{
194 std::stringstream ss;
195 ss << BOOST_VERSION / 100000 << "."
196 << BOOST_VERSION / 100 % 1000 << "."
197 << BOOST_VERSION % 100;
198 return ss.str();
199}
200
201
202
204inline
206{
207 std::stringstream ss;
208 ss << "Compiled against Boost headers " << BoostHeaderVersion() << "\n";
209 ss << "Compiled against Eigen " << EigenHeaderVersion() << "\n";
210 ss << "Linked against GMP " << GMPVersion() << "\n";
211 ss << "Linked against MPFR " << MPFRVersion() << "\n";
212 ss << "MPI: " << MPIVersion() << "\n\n";
213 return ss.str();
214}
215
216
217}// re: namespace bertini
Single include point for the MPI C API.
Definition algorithm_builder.hpp:36
std::string Version()
Get the Bertini2 version string.
Definition splash.hpp:113
std::string LicenseInfo()
Get a short description of Bertini2's licensing.
Definition splash.hpp:50
std::string WikiURL()
Get the URL of the Bertini2 wiki.
Definition splash.hpp:101
std::string SplashScreen()
Get the multi-line splash screen text (trademark, URLs, version, license).
Definition splash.hpp:129
std::string SourceURL()
Get the URL of the Bertini2 source repository.
Definition splash.hpp:94
std::string MPFRVersion()
Get the version of the MPFR library linked against.
Definition splash.hpp:171
std::string BoostHeaderVersion()
Get the version of the Boost headers compiled against.
Definition splash.hpp:192
std::string GMPVersion()
Get the version of the GMP library linked against.
Definition splash.hpp:164
std::string Owners()
Get the names of the Bertini trademark owners.
Definition splash.hpp:120
std::string EigenHeaderVersion()
Get the version of the Eigen headers compiled against.
Definition splash.hpp:153
std::string GenericHelp()
Get the generic help text (currently empty).
Definition splash.hpp:145
std::string DependencyVersions()
Get a multi-line summary of the versions of Bertini2's dependencies (Boost, Eigen,...
Definition splash.hpp:205
std::string MPIVersion()
Get the version of the MPI library linked against (or a note if serial).
Definition splash.hpp:178
#define BERTINI2_PACKAGE_URL
The URL of the Bertini2 source repository.
Definition splash.hpp:45