Add files

This commit is contained in:
2025-01-14 01:15:48 +01:00
commit 2f9fcec55b
406 changed files with 87154 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
//This file is part of Bertini 2.
//
//test/blackbox/blackbox.cpp 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.
//
//test/blackbox/blackbox.cpp 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 test/blackbox/blackbox.cpp. If not, see <http://www.gnu.org/licenses/>.
//
// Copyright(C) 2017-2021 by Bertini2 Development Team
//
// See <http://www.gnu.org/licenses/> for a copy of the license,
// as well as COPYING. Bertini2 is provided with permitted
// additional terms in the b2/licenses/ directory.
// individual authors of this file include:
// silviana amethyst, university of wisconsin eau claire
//test/blackbox/blackbox.cpp
//
#define BOOST_TEST_DYN_LINK 1
//this #define MUST appear before #include <boost/test/unit_test.hpp>
#define BOOST_TEST_MODULE "Bertini 2 Blackbox Testing"
#include <boost/test/unit_test.hpp>
#define BERTINI_TEST_MODULE "blackbox"
#include "test/utility/enable_logging.hpp"

View File

@@ -0,0 +1,85 @@
//This file is part of Bertini 2.
//
//test/blackbox/parsing.cpp 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.
//
//test/blackbox/parsing.cpp 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 test/blackbox/parsing.cpp. If not, see <http://www.gnu.org/licenses/>.
//
// Copyright(C) 2017-2021 by Bertini2 Development Team
//
// See <http://www.gnu.org/licenses/> for a copy of the license,
// as well as COPYING. Bertini2 is provided with permitted
// additional terms in the b2/licenses/ directory.
// individual authors of this file include:
// silviana amethyst, university of notre dame
#include <boost/test/unit_test.hpp>
#include "bertini2/system/precon.hpp"
#include "bertini2/blackbox/global_configs.hpp"
#include "bertini2/io/parsing.hpp"
BOOST_AUTO_TEST_SUITE(blackbox_test)
BOOST_AUTO_TEST_SUITE(parsing_configs)
using namespace bertini;
using mpfr = bertini::mpfr_complex;
using dbl = bertini::dbl;
BOOST_AUTO_TEST_CASE(parse1)
{
using AllConfsD = blackbox::config::Configs::All<dbl>::type;
using AllConfsMP = blackbox::config::Configs::All<mpfr>::type;
std::string config =
R"(outputlevel: 0;
randomseed: 72;
tracktype: 1;
odepredictor: 8;
finaltol: 1e-12;
endgamenum: 2;
numsamplepoints: 8;
samplefactor: 0.8;
maxcyclenum: 6;
ampmaxprec: 3096;
ampsafetydigits1: 0;
ampsafetydigits2: 0;
maxstepsize: 0.05;
maxnumbersteps: 20000;
securitylevel: 1;
EndpointFiniteThreshold: 1e10;
pathtruncationthreshold: 1e10;
endgamebdry: 0.001;
stepsforincrease: 10;
stepfailfactor: 0.45;
stepsuccessfactor: 1.5;
functiontolerance: 1e-7;
tracktolbeforeeg: 1e-8;
tracktolduringeg: 1e-8;
sharpendigits: 60;
condnumthreshold: 1e300;
maxstepsbeforenewton: 0;
maxnewtonits: 1;)";
auto results_double = bertini::parsing::classic::ConfigParser<AllConfsD>::Parse(config);
auto results_mp = bertini::parsing::classic::ConfigParser<AllConfsMP>::Parse(config);
}
BOOST_AUTO_TEST_SUITE_END() // end the parsing sub-suite
BOOST_AUTO_TEST_SUITE_END() // end the blackbox suite

View File

@@ -0,0 +1,61 @@
//This file is part of Bertini 2.
//
//test/blackbox/zerodim.cpp 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.
//
//test/blackbox/zerodim.cpp 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 test/blackbox/zerodim.cpp. If not, see <http://www.gnu.org/licenses/>.
//
// Copyright(C) 2017-2021 by Bertini2 Development Team
//
// See <http://www.gnu.org/licenses/> for a copy of the license,
// as well as COPYING. Bertini2 is provided with permitted
// additional terms in the b2/licenses/ directory.
// individual authors of this file include:
// silviana amethyst, university of notre dame
#include <boost/test/unit_test.hpp>
#include "bertini2/blackbox/switches_zerodim.hpp"
#include "bertini2/system/precon.hpp"
#include "bertini2/blackbox/user_homotopy.hpp"
BOOST_AUTO_TEST_SUITE(blackbox_test)
BOOST_AUTO_TEST_SUITE(user_hom)
using namespace bertini;
using mpfr = bertini::mpfr_complex;
BOOST_AUTO_TEST_CASE(make_user_hom_dim_nondefaults)
{
auto sys1 = system::Precon::GriewankOsborn();
SampCont<mpfr> start_solns;
auto sys2 = start_system::User(sys1, start_solns);
auto sys3 = system::Precon::GriewankOsborn();
blackbox::ZeroDimRT my_runtime_type_options; // make defaults
my_runtime_type_options.start = bertini::blackbox::type::Start::User;
my_runtime_type_options.tracker = bertini::blackbox::type::Tracker::FixedDouble;
my_runtime_type_options.endgame = bertini::blackbox::type::Endgame::Cauchy;
auto zd_ptr = blackbox::MakeUserHom(my_runtime_type_options, sys1, sys2, sys3);
// zd_ptr->DefaultSetup();
}
BOOST_AUTO_TEST_SUITE_END() // end the user_hom sub-suite
BOOST_AUTO_TEST_SUITE_END() // end the blackbox suite

View File

@@ -0,0 +1,62 @@
//This file is part of Bertini 2.
//
//test/blackbox/zerodim.cpp 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.
//
//test/blackbox/zerodim.cpp 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 test/blackbox/zerodim.cpp. If not, see <http://www.gnu.org/licenses/>.
//
// Copyright(C) 2017-2021 by Bertini2 Development Team
//
// See <http://www.gnu.org/licenses/> for a copy of the license,
// as well as COPYING. Bertini2 is provided with permitted
// additional terms in the b2/licenses/ directory.
// individual authors of this file include:
// silviana amethyst, university of notre dame
#include <boost/test/unit_test.hpp>
#include "bertini2/blackbox/switches_zerodim.hpp"
#include "bertini2/system/precon.hpp"
BOOST_AUTO_TEST_SUITE(blackbox_test)
BOOST_AUTO_TEST_SUITE(zero_dim)
using namespace bertini;
BOOST_AUTO_TEST_CASE(make_zero_dim_defaults)
{
auto sys = system::Precon::GriewankOsborn();
blackbox::ZeroDimRT my_runtime_type_options; // make defaults
auto zd_ptr = blackbox::MakeZeroDim(my_runtime_type_options, sys);
}
BOOST_AUTO_TEST_CASE(make_zero_dim_nondefaults)
{
auto sys = system::Precon::GriewankOsborn();
blackbox::ZeroDimRT my_runtime_type_options; // make defaults
my_runtime_type_options.start = bertini::blackbox::type::Start::MHom;
my_runtime_type_options.tracker = bertini::blackbox::type::Tracker::FixedDouble;
my_runtime_type_options.endgame = bertini::blackbox::type::Endgame::Cauchy;
auto zd_ptr = blackbox::MakeZeroDim(my_runtime_type_options, sys);
// zd_ptr->DefaultSetup();
}
BOOST_AUTO_TEST_SUITE_END() // end the zerodim sub-suite
BOOST_AUTO_TEST_SUITE_END() // end the blackbox suite