No longer use C++ UTF-8 string literals
They don’t bring any added value, and break compilation in C++20 mode (because they are then of type “const char8_t *” which is distinct from “const char *”).fix-tolerance-parameters
parent
63a116fb28
commit
ce2c1e0d30
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2005 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -39,7 +39,7 @@ FaaDiBruno::calculate(const StackContainer<FGSTensor> &cont,
|
|||
fine_cont.multAndAdd(l, f, out);
|
||||
JournalRecord recc(journal);
|
||||
recc << "dim=" << l << " avmem=" << mem_mb << " tmpmem=" << p_size_mb << " max=" << max
|
||||
<< " stacks=" << cont.numStacks() << u8"→" << fine_cont.numStacks() << endrec;
|
||||
<< " stacks=" << cont.numStacks() << "→" << fine_cont.numStacks() << endrec;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ FaaDiBruno::calculate(const StackContainer<UGSTensor> &cont,
|
|||
fine_cont.multAndAdd(l, f, out);
|
||||
JournalRecord recc(journal);
|
||||
recc << "dim=" << l << " avmem=" << mem_mb << " tmpmem=" << p_size_mb << " max=" << max
|
||||
<< " stacks=" << cont.numStacks() << u8"→" << fine_cont.numStacks() << endrec;
|
||||
<< " stacks=" << cont.numStacks() << "→" << fine_cont.numStacks() << endrec;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2004 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -275,7 +275,7 @@ FirstOrder::journalEigs()
|
|||
if (i == sdim || i == ypart.nys())
|
||||
{
|
||||
JournalRecord jr(journal);
|
||||
jr << u8"──────────────────────────────────────────────────── ";
|
||||
jr << "──────────────────────────────────────────────────── ";
|
||||
if (i == sdim)
|
||||
jr << "sdim";
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2004-2011 Ondra Kamenik
|
||||
* Copyright © 2019-2020 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -145,11 +145,11 @@ JournalRecord::writePrefix(const SystemResources &f)
|
|||
std::ostringstream s;
|
||||
s << std::setfill('0');
|
||||
writeFloatTabular(s, f.elapsed, 7);
|
||||
s << u8"│" << recChar << std::setw(5) << ord << u8"│";
|
||||
s << "│" << recChar << std::setw(5) << ord << "│";
|
||||
writeFloatTabular(s, f.load_avg, 3);
|
||||
s << u8"│";
|
||||
s << "│";
|
||||
writeFloatTabular(s, f.mem_avail/mb, 5);
|
||||
s << u8"│ │ ";
|
||||
s << "│ │ ";
|
||||
for (int i = 0; i < 2*journal.getDepth(); i++)
|
||||
s << ' ';
|
||||
prefix = s.str();
|
||||
|
@ -164,13 +164,13 @@ JournalRecordPair::writePrefixForEnd(const SystemResources &f)
|
|||
std::ostringstream s;
|
||||
s << std::setfill('0');
|
||||
writeFloatTabular(s, f.elapsed+difnow.elapsed, 7);
|
||||
s << u8"│E" << std::setw(5) << ord << u8"│";
|
||||
s << "│E" << std::setw(5) << ord << "│";
|
||||
writeFloatTabular(s, difnow.load_avg, 3);
|
||||
s << u8"│";
|
||||
s << "│";
|
||||
writeFloatTabular(s, difnow.mem_avail/mb, 5);
|
||||
s << u8"│";
|
||||
s << "│";
|
||||
writeFloatTabular(s, difnow.majflt/mb, 6);
|
||||
s << u8"│ ";
|
||||
s << "│ ";
|
||||
for (int i = 0; i < 2*journal.getDepth(); i++)
|
||||
s << ' ';
|
||||
prefix_end = s.str();
|
||||
|
@ -202,8 +202,8 @@ Journal::printHeader()
|
|||
{
|
||||
*this << "Dynare++ v. " << VERSION << '\n'
|
||||
<< '\n'
|
||||
<< u8"Copyright © 2004-2011 Ondra Kamenik\n"
|
||||
<< u8"Copyright © 2019-2020 Dynare Team\n"
|
||||
<< "Copyright © 2004-2011 Ondra Kamenik\n"
|
||||
<< "Copyright © 2019-2020 Dynare Team\n"
|
||||
<< "Dynare++ comes with ABSOLUTELY NO WARRANTY and is distributed under the GNU GPL,\n"
|
||||
<< "version 3 or later (see https://www.gnu.org/licenses/gpl.html)\n"
|
||||
<< "\n\n"
|
||||
|
@ -229,11 +229,11 @@ Journal::printHeader()
|
|||
#endif
|
||||
)
|
||||
<< "\n\n"
|
||||
<< u8" ┌────╼ elapsed time (seconds) \n"
|
||||
<< u8" │ ┌────╼ record unique identifier \n"
|
||||
<< u8" │ │ ┌────╼ load average \n"
|
||||
<< u8" │ │ │ ┌────╼ available memory (MB) \n"
|
||||
<< u8" │ │ │ │ ┌─────╼ major faults (MB)\n"
|
||||
<< u8" │ │ │ │ │ \n"
|
||||
<< u8" ╽ ╽ ╽ ╽ ╽ \n";
|
||||
<< " ┌────╼ elapsed time (seconds) \n"
|
||||
<< " │ ┌────╼ record unique identifier \n"
|
||||
<< " │ │ ┌────╼ load average \n"
|
||||
<< " │ │ │ ┌────╼ available memory (MB) \n"
|
||||
<< " │ │ │ │ ┌─────╼ major faults (MB)\n"
|
||||
<< " │ │ │ │ │ \n"
|
||||
<< " ╽ ╽ ╽ ╽ ╽ \n";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2004 Ondra Kamenik
|
||||
* Copyright © 2019-2021 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -420,7 +420,7 @@ std::unique_ptr<typename ctraits<t>::Ttensor>
|
|||
KOrder::faaDiBrunoZ(const Symmetry &sym) const
|
||||
{
|
||||
JournalRecordPair pa(journal);
|
||||
pa << u8"Faà Di Bruno Z container for " << sym << endrec;
|
||||
pa << "Faà Di Bruno Z container for " << sym << endrec;
|
||||
auto res = std::make_unique<typename ctraits<t>::Ttensor>(ny, TensorDimens(sym, nvs));
|
||||
FaaDiBruno bruno(journal);
|
||||
bruno.calculate(Zstack<t>(), f, *res);
|
||||
|
@ -434,7 +434,7 @@ std::unique_ptr<typename ctraits<t>::Ttensor>
|
|||
KOrder::faaDiBrunoG(const Symmetry &sym) const
|
||||
{
|
||||
JournalRecordPair pa(journal);
|
||||
pa << u8"Faà Di Bruno G container for " << sym << endrec;
|
||||
pa << "Faà Di Bruno G container for " << sym << endrec;
|
||||
TensorDimens tdims(sym, nvs);
|
||||
auto res = std::make_unique<typename ctraits<t>::Ttensor>(ypart.nyss(), tdims);
|
||||
FaaDiBruno bruno(journal);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2005 Ondra Kamenik
|
||||
* Copyright © 2019-2021 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -507,7 +507,7 @@ std::unique_ptr<typename ctraits<t>::Ttensor>
|
|||
KOrderStoch::faaDiBrunoZ(const Symmetry &sym) const
|
||||
{
|
||||
JournalRecordPair pa(journal);
|
||||
pa << u8"Faà Di Bruno ZX container for " << sym << endrec;
|
||||
pa << "Faà Di Bruno ZX container for " << sym << endrec;
|
||||
auto res = std::make_unique<typename ctraits<t>::Ttensor>(ypart.ny(), TensorDimens(sym, nvs));
|
||||
FaaDiBruno bruno(journal);
|
||||
bruno.calculate(Zstack<t>(), f, *res);
|
||||
|
@ -522,7 +522,7 @@ std::unique_ptr<typename ctraits<t>::Ttensor>
|
|||
KOrderStoch::faaDiBrunoG(const Symmetry &sym) const
|
||||
{
|
||||
JournalRecordPair pa(journal);
|
||||
pa << u8"Faà Di Bruno GX container for " << sym << endrec;
|
||||
pa << "Faà Di Bruno GX container for " << sym << endrec;
|
||||
TensorDimens tdims(sym, nvs);
|
||||
auto res = std::make_unique<typename ctraits<t>::Ttensor>(ypart.nyss(), tdims);
|
||||
FaaDiBruno bruno(journal);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2006 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -192,7 +192,7 @@ AtomAssignings::print() const
|
|||
expr.print();
|
||||
std::cout << "Left names:\n";
|
||||
for (auto it : lname2expr)
|
||||
std::cout << it.first << u8" ⇒ " << expr.formula(it.second) << " (t=" << order[it.second] << ")\n";
|
||||
std::cout << it.first << " ⇒ " << expr.formula(it.second) << " (t=" << order[it.second] << ")\n";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2006 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -87,12 +87,12 @@ AtomSubstitutions::get_new4old(const string &oldname, int tshift) const
|
|||
void
|
||||
AtomSubstitutions::print() const
|
||||
{
|
||||
std::cout << u8"Atom Substitutions:\nOld ⇒ New:\n";
|
||||
std::cout << "Atom Substitutions:\nOld ⇒ New:\n";
|
||||
for (const auto &it : old2new)
|
||||
for (const auto &itt : it.second)
|
||||
std::cout << " " << it.first << u8" ⇒ [" << itt.first << ", " << itt.second << "]\n";
|
||||
std::cout << " " << it.first << " ⇒ [" << itt.first << ", " << itt.second << "]\n";
|
||||
|
||||
std::cout << u8"Old ⇐ New:\n";
|
||||
std::cout << "Old ⇐ New:\n";
|
||||
for (const auto &it : new2old)
|
||||
std::cout << " [" << it.second.first << ", " << it.second.second << "] ⇐ " << it.first << '\n';
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2005 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -380,7 +380,7 @@ DynamicAtoms::print() const
|
|||
}
|
||||
std::cout << "indices:\n";
|
||||
for (auto indice : indices)
|
||||
std::cout << "t=" << indice.first << u8" ⇒ " << indice.second << "\n";
|
||||
std::cout << "t=" << indice.first << " ⇒ " << indice.second << "\n";
|
||||
}
|
||||
|
||||
/** Note that the str has been parsed by the lexicographic
|
||||
|
@ -606,7 +606,7 @@ VarOrdering::print() const
|
|||
std::cout << " " << der_atom;
|
||||
std::cout << "\nmap:\n";
|
||||
for (auto position : positions)
|
||||
std::cout << " [" << position.first << u8"→" << position.second << "]";
|
||||
std::cout << " [" << position.first << "→" << position.second << "]";
|
||||
std::cout << "\ny2outer:\n";
|
||||
for (int i : y2outer)
|
||||
std::cout << " " << i;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2005 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -529,8 +529,8 @@ FineAtoms::print() const
|
|||
|
||||
std::cout << "endo atoms map:\n";
|
||||
for (unsigned int i = 0; i < endo_atoms_map.size(); i++)
|
||||
std::cout << i << u8" → " << endo_atoms_map[i] << "\n";
|
||||
std::cout << i << " → " << endo_atoms_map[i] << "\n";
|
||||
std::cout << "exo atoms map:\n";
|
||||
for (unsigned int i = 0; i < exo_atoms_map.size(); i++)
|
||||
std::cout << i << u8" → " << exo_atoms_map[i] << "\n";
|
||||
std::cout << i << " → " << exo_atoms_map[i] << "\n";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2006 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -106,5 +106,5 @@ StaticAtoms::print() const
|
|||
varnames.print();
|
||||
std::cout << "map to tree indices:\n";
|
||||
for (auto var : vars)
|
||||
std::cout << var.first << u8"\t→\t" << var.second << "\n";
|
||||
std::cout << var.first << "\t→\t" << var.second << "\n";
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2006 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -179,10 +179,10 @@ StaticFineAtoms::print() const
|
|||
StaticAtoms::print();
|
||||
std::cout << "endo atoms map:\n";
|
||||
for (unsigned int i = 0; i < endo_atoms_map.size(); i++)
|
||||
std::cout << i << u8" → " << endo_atoms_map[i] << "\n";
|
||||
std::cout << i << " → " << endo_atoms_map[i] << "\n";
|
||||
std::cout << "exo atoms map:\n";
|
||||
for (unsigned int i = 0; i < exo_atoms_map.size(); i++)
|
||||
std::cout << i << u8" → " << exo_atoms_map[i] << "\n";
|
||||
std::cout << i << " → " << exo_atoms_map[i] << "\n";
|
||||
std::cout << "der atoms:\n";
|
||||
for (unsigned int i = 0; i < der_atoms.size(); i++)
|
||||
std::cout << i << "\t" << der_atoms[i] << "\n";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2005-2011 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -714,12 +714,12 @@ EvalTree::eval(int t)
|
|||
void
|
||||
EvalTree::print() const
|
||||
{
|
||||
std::cout << "last_op=" << last_operation << '\n'
|
||||
<< " 0 1 2 3 4 5 6 7 8 9\n"
|
||||
<< u8"────────────────────────────────────────────────────────────────\n";
|
||||
std::cout << "last_op=" << last_operation << '\n'
|
||||
<< " 0 1 2 3 4 5 6 7 8 9\n"
|
||||
<< "────────────────────────────────────────────────────────────────\n";
|
||||
for (int i = 0; i <= (last_operation+1)/10; i++)
|
||||
{
|
||||
std::cout << std::setw(3) << i << u8"│";
|
||||
std::cout << std::setw(3) << i << "│";
|
||||
int j = 0;
|
||||
while (j < 10 && 10*i+j < last_operation+1)
|
||||
{
|
||||
|
@ -727,7 +727,7 @@ EvalTree::print() const
|
|||
if (flags[k])
|
||||
std::cout << " " << std::setw(5) << std::setprecision(1) << values[k];
|
||||
else
|
||||
std::cout << u8" ─────";
|
||||
std::cout << " ─────";
|
||||
j++;
|
||||
}
|
||||
std::cout << "\n";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2004-2011 Ondra Kamenik
|
||||
* Copyright © 2019-2020 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -46,8 +46,8 @@ main(int argc, char **argv)
|
|||
{
|
||||
std::cout << "Dynare++ v. " << VERSION << '\n'
|
||||
<< '\n'
|
||||
<< u8"Copyright © 2004-2011 Ondra Kamenik\n"
|
||||
<< u8"Copyright © 2019-2020 Dynare Team\n"
|
||||
<< "Copyright © 2004-2011 Ondra Kamenik\n"
|
||||
<< "Copyright © 2019-2020 Dynare Team\n"
|
||||
<< "Dynare++ comes with ABSOLUTELY NO WARRANTY and is distributed under the GNU GPL,\n"
|
||||
<< "version 3 or later (see https://www.gnu.org/licenses/gpl.html)\n";
|
||||
return EXIT_SUCCESS;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2006 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -219,7 +219,7 @@ NLSolver::solve(Vector &xx, int &iter)
|
|||
JournalRecord rec(journal);
|
||||
rec << "Iter lambda residual" << endrec;
|
||||
JournalRecord rec1(journal);
|
||||
rec1 << u8"───────────────────────────" << endrec;
|
||||
rec1 << "───────────────────────────" << endrec;
|
||||
|
||||
x = const_cast<const Vector &>(xx);
|
||||
iter = 0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2004-2011 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -474,7 +474,7 @@ void
|
|||
ConstGeneralMatrix::multInvLeft(Vector &d) const
|
||||
{
|
||||
if (d.skip() != 1)
|
||||
throw SYLV_MES_EXCEPTION(u8"Skip≠1 not implemented in ConstGeneralMatrix::multInvLeft(Vector&)");
|
||||
throw SYLV_MES_EXCEPTION("Skip≠1 not implemented in ConstGeneralMatrix::multInvLeft(Vector&)");
|
||||
|
||||
multInvLeft("N", d.length(), 1, d.length(), d.base());
|
||||
}
|
||||
|
@ -484,7 +484,7 @@ void
|
|||
ConstGeneralMatrix::multInvLeftTrans(Vector &d) const
|
||||
{
|
||||
if (d.skip() != 1)
|
||||
throw SYLV_MES_EXCEPTION(u8"Skip≠1 not implemented in ConstGeneralMatrix::multInvLeft(Vector&)");
|
||||
throw SYLV_MES_EXCEPTION("Skip≠1 not implemented in ConstGeneralMatrix::multInvLeft(Vector&)");
|
||||
|
||||
multInvLeft("T", d.length(), 1, d.length(), d.base());
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2004-2011 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -31,20 +31,20 @@ SylvParams::print(const std::string &prefix) const
|
|||
void
|
||||
SylvParams::print(std::ostream &fdesc, const std::string &prefix) const
|
||||
{
|
||||
method.print(fdesc, prefix, "method ");
|
||||
rcondA1.print(fdesc, prefix, "reci. cond1 A ");
|
||||
rcondAI.print(fdesc, prefix, u8"reci. cond∞ A ");
|
||||
bs_norm.print(fdesc, prefix, u8"log₁₀ diag norm ");
|
||||
f_err1.print(fdesc, prefix, "abs. err 1 F diag ");
|
||||
f_errI.print(fdesc, prefix, u8"abs. err ∞ F diag ");
|
||||
viv_err1.print(fdesc, prefix, u8"abs. err 1 V·V⁻¹ ");
|
||||
viv_errI.print(fdesc, prefix, u8"abs. err ∞ V·V⁻¹ ");
|
||||
ivv_err1.print(fdesc, prefix, u8"abs. err 1 V⁻¹·V ");
|
||||
ivv_errI.print(fdesc, prefix, u8"abs. err ∞ V⁻¹·V ");
|
||||
f_blocks.print(fdesc, prefix, "num blocks in F ");
|
||||
f_largest.print(fdesc, prefix, "largest block in F ");
|
||||
f_zeros.print(fdesc, prefix, "num zeros in F ");
|
||||
f_offdiag.print(fdesc, prefix, "num offdiag in F ");
|
||||
method.print(fdesc, prefix, "method ");
|
||||
rcondA1.print(fdesc, prefix, "reci. cond1 A ");
|
||||
rcondAI.print(fdesc, prefix, "reci. cond∞ A ");
|
||||
bs_norm.print(fdesc, prefix, "log₁₀ diag norm ");
|
||||
f_err1.print(fdesc, prefix, "abs. err 1 F diag ");
|
||||
f_errI.print(fdesc, prefix, "abs. err ∞ F diag ");
|
||||
viv_err1.print(fdesc, prefix, "abs. err 1 V·V⁻¹ ");
|
||||
viv_errI.print(fdesc, prefix, "abs. err ∞ V·V⁻¹ ");
|
||||
ivv_err1.print(fdesc, prefix, "abs. err 1 V⁻¹·V ");
|
||||
ivv_errI.print(fdesc, prefix, "abs. err ∞ V⁻¹·V ");
|
||||
f_blocks.print(fdesc, prefix, "num blocks in F ");
|
||||
f_largest.print(fdesc, prefix, "largest block in F ");
|
||||
f_zeros.print(fdesc, prefix, "num zeros in F ");
|
||||
f_offdiag.print(fdesc, prefix, "num offdiag in F ");
|
||||
if (*method == solve_method::iter)
|
||||
{
|
||||
converged.print(fdesc, prefix, "converged ");
|
||||
|
@ -56,12 +56,12 @@ SylvParams::print(std::ostream &fdesc, const std::string &prefix) const
|
|||
else
|
||||
eig_min.print(fdesc, prefix, "minimum eigenvalue ");
|
||||
|
||||
mat_err1.print(fdesc, prefix, "rel. matrix norm1 ");
|
||||
mat_errI.print(fdesc, prefix, u8"rel. matrix norm∞ ");
|
||||
mat_errF.print(fdesc, prefix, "rel. matrix normFro");
|
||||
vec_err1.print(fdesc, prefix, "rel. vector norm1 ");
|
||||
vec_errI.print(fdesc, prefix, u8"rel. vector norm∞ ");
|
||||
cpu_time.print(fdesc, prefix, "time (CPU secs) ");
|
||||
mat_err1.print(fdesc, prefix, "rel. matrix norm1 ");
|
||||
mat_errI.print(fdesc, prefix, "rel. matrix norm∞ ");
|
||||
mat_errF.print(fdesc, prefix, "rel. matrix normFro");
|
||||
vec_err1.print(fdesc, prefix, "rel. vector norm1 ");
|
||||
vec_errI.print(fdesc, prefix, "rel. vector norm∞ ");
|
||||
cpu_time.print(fdesc, prefix, "time (CPU secs) ");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright © 2004-2011 Ondra Kamenik
|
||||
* Copyright © 2019 Dynare Team
|
||||
* Copyright © 2019-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -447,10 +447,10 @@ TestRunnable::eig_bubble(const std::string &aname, int from, int to)
|
|||
double normInf = check.getNormInf();
|
||||
double onorm1 = orig.getNorm1();
|
||||
double onormInf = orig.getNormInf();
|
||||
std::cout << "\tabs. error1 = " << norm1 << std::endl
|
||||
<< u8"\tabs. error∞ = " << normInf << std::endl
|
||||
<< "\trel. error1 = " << norm1/onorm1 << std::endl
|
||||
<< u8"\trel. error∞ = " << normInf/onormInf << std::endl;
|
||||
std::cout << "\tabs. error1 = " << norm1 << std::endl
|
||||
<< "\tabs. error∞ = " << normInf << std::endl
|
||||
<< "\trel. error1 = " << norm1/onorm1 << std::endl
|
||||
<< "\trel. error∞ = " << normInf/onormInf << std::endl;
|
||||
return (norm1 < eps_norm*onorm1 && normInf < eps_norm*onormInf);
|
||||
}
|
||||
|
||||
|
@ -476,20 +476,20 @@ TestRunnable::block_diag(const std::string &aname, double log10norm)
|
|||
double normInf = check.getNormInf();
|
||||
double onorm1 = orig.getNorm1();
|
||||
double onormInf = orig.getNormInf();
|
||||
std::cout << u8"\terror Q·B·Q⁻¹:" << std::endl
|
||||
<< "\tabs. error1 = " << norm1 << std::endl
|
||||
<< u8"\tabs. error∞ = " << normInf << std::endl
|
||||
<< "\trel. error1 = " << norm1/onorm1 << std::endl
|
||||
<< u8"\trel. error∞ = " << normInf/onormInf << std::endl;
|
||||
std::cout << "\terror Q·B·Q⁻¹:" << std::endl
|
||||
<< "\tabs. error1 = " << norm1 << std::endl
|
||||
<< "\tabs. error∞ = " << normInf << std::endl
|
||||
<< "\trel. error1 = " << norm1/onorm1 << std::endl
|
||||
<< "\trel. error∞ = " << normInf/onormInf << std::endl;
|
||||
SqSylvMatrix check2(dec.getQ() * dec.getInvQ());
|
||||
SqSylvMatrix in(n);
|
||||
in.setUnit();
|
||||
check2.add(-1, in);
|
||||
double nor1 = check2.getNorm1();
|
||||
double norInf = check2.getNormInf();
|
||||
std::cout << u8"\terror Q·Q⁻¹:" << std::endl
|
||||
<< "\tabs. error1 = " << nor1 << std::endl
|
||||
<< u8"\tabs. error∞ = " << norInf << std::endl;
|
||||
std::cout << "\terror Q·Q⁻¹:" << std::endl
|
||||
<< "\tabs. error1 = " << nor1 << std::endl
|
||||
<< "\tabs. error∞ = " << norInf << std::endl;
|
||||
return (norm1 < eps_norm*pow(10, log10norm)*onorm1);
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ public:
|
|||
class QuasiZeroSmallTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
QuasiZeroSmallTest() : TestRunnable(u8"quasi tr. zero small test (2×1)")
|
||||
QuasiZeroSmallTest() : TestRunnable("quasi tr. zero small test (2×1)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -625,7 +625,7 @@ public:
|
|||
class MultKronSmallTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
MultKronSmallTest() : TestRunnable(u8"kronecker small mult (2=2×1)")
|
||||
MultKronSmallTest() : TestRunnable("kronecker small mult (2=2×1)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -634,7 +634,7 @@ public:
|
|||
class MultKronTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
MultKronTest() : TestRunnable(u8"kronecker mult (245=7×7×5)")
|
||||
MultKronTest() : TestRunnable("kronecker mult (245=7×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -643,7 +643,7 @@ public:
|
|||
class MultKronSmallTransTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
MultKronSmallTransTest() : TestRunnable(u8"kronecker small trans mult (2=2×1)")
|
||||
MultKronSmallTransTest() : TestRunnable("kronecker small trans mult (2=2×1)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -652,7 +652,7 @@ public:
|
|||
class MultKronTransTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
MultKronTransTest() : TestRunnable(u8"kronecker trans mult (245=7×7×5)")
|
||||
MultKronTransTest() : TestRunnable("kronecker trans mult (245=7×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -661,7 +661,7 @@ public:
|
|||
class LevelKronTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
LevelKronTest() : TestRunnable(u8"kronecker level mult (1715=7×[7]×7×5)")
|
||||
LevelKronTest() : TestRunnable("kronecker level mult (1715=7×[7]×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -670,7 +670,7 @@ public:
|
|||
class LevelKronTransTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
LevelKronTransTest() : TestRunnable(u8"kronecker level trans mult (1715=7×[7]×7×5)")
|
||||
LevelKronTransTest() : TestRunnable("kronecker level trans mult (1715=7×[7]×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -679,7 +679,7 @@ public:
|
|||
class LevelZeroKronTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
LevelZeroKronTest() : TestRunnable(u8"kronecker level mult (1715=7×7×7×[5])")
|
||||
LevelZeroKronTest() : TestRunnable("kronecker level mult (1715=7×7×7×[5])")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -688,7 +688,7 @@ public:
|
|||
class LevelZeroKronTransTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
LevelZeroKronTransTest() : TestRunnable(u8"kronecker level trans mult (1715=7×7×7×[5])")
|
||||
LevelZeroKronTransTest() : TestRunnable("kronecker level trans mult (1715=7×7×7×[5])")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -697,7 +697,7 @@ public:
|
|||
class KronPowerTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
KronPowerTest() : TestRunnable(u8"kronecker power mult (1715=7×7×7×5)")
|
||||
KronPowerTest() : TestRunnable("kronecker power mult (1715=7×7×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -706,7 +706,7 @@ public:
|
|||
class SmallLinEvalTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
SmallLinEvalTest() : TestRunnable(u8"lin eval (24=2 × 2×2×3)")
|
||||
SmallLinEvalTest() : TestRunnable("lin eval (24=2 × 2×2×3)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -715,7 +715,7 @@ public:
|
|||
class LinEvalTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
LinEvalTest() : TestRunnable(u8"lin eval (490=2 × 7×7×5)")
|
||||
LinEvalTest() : TestRunnable("lin eval (490=2 × 7×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -724,7 +724,7 @@ public:
|
|||
class SmallQuaEvalTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
SmallQuaEvalTest() : TestRunnable(u8"qua eval (24=2 × 2×2×3)")
|
||||
SmallQuaEvalTest() : TestRunnable("qua eval (24=2 × 2×2×3)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -733,7 +733,7 @@ public:
|
|||
class QuaEvalTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
QuaEvalTest() : TestRunnable(u8"qua eval (490=2 × 7×7×5)")
|
||||
QuaEvalTest() : TestRunnable("qua eval (490=2 × 7×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -742,7 +742,7 @@ public:
|
|||
class TriSylvSmallRealTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
TriSylvSmallRealTest() : TestRunnable(u8"triangular sylvester small real solve (12=2×2×3)")
|
||||
TriSylvSmallRealTest() : TestRunnable("triangular sylvester small real solve (12=2×2×3)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -751,7 +751,7 @@ public:
|
|||
class TriSylvSmallComplexTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
TriSylvSmallComplexTest() : TestRunnable(u8"triangular sylvester small complx solve (12=2×2×3)")
|
||||
TriSylvSmallComplexTest() : TestRunnable("triangular sylvester small complx solve (12=2×2×3)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -760,7 +760,7 @@ public:
|
|||
class TriSylvTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
TriSylvTest() : TestRunnable(u8"triangular sylvester solve (245=7×7×5)")
|
||||
TriSylvTest() : TestRunnable("triangular sylvester solve (245=7×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -769,7 +769,7 @@ public:
|
|||
class TriSylvBigTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
TriSylvBigTest() : TestRunnable(u8"triangular sylvester big solve (48000=40×40×30)")
|
||||
TriSylvBigTest() : TestRunnable("triangular sylvester big solve (48000=40×40×30)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -778,7 +778,7 @@ public:
|
|||
class TriSylvLargeTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
TriSylvLargeTest() : TestRunnable(u8"triangular sylvester large solve (1920000=40×40×40×30)")
|
||||
TriSylvLargeTest() : TestRunnable("triangular sylvester large solve (1920000=40×40×40×30)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -787,7 +787,7 @@ public:
|
|||
class IterSylvTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
IterSylvTest() : TestRunnable(u8"iterative sylvester solve (245=7×7×5)")
|
||||
IterSylvTest() : TestRunnable("iterative sylvester solve (245=7×7×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -796,7 +796,7 @@ public:
|
|||
class IterSylvLargeTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
IterSylvLargeTest() : TestRunnable(u8"iterative sylvester large solve (1920000=40×40×40×30)")
|
||||
IterSylvLargeTest() : TestRunnable("iterative sylvester large solve (1920000=40×40×40×30)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -805,7 +805,7 @@ public:
|
|||
class GenSylvSmallTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
GenSylvSmallTest() : TestRunnable(u8"general sylvester small solve (18=3×3×2)")
|
||||
GenSylvSmallTest() : TestRunnable("general sylvester small solve (18=3×3×2)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -814,7 +814,7 @@ public:
|
|||
class GenSylvTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
GenSylvTest() : TestRunnable(u8"general sylvester solve (12000=20×20×30)")
|
||||
GenSylvTest() : TestRunnable("general sylvester solve (12000=20×20×30)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -823,7 +823,7 @@ public:
|
|||
class GenSylvSingTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
GenSylvSingTest() : TestRunnable(u8"general sylvester solve for sing. C (2500000=50×50×50×20)")
|
||||
GenSylvSingTest() : TestRunnable("general sylvester solve for sing. C (2500000=50×50×50×20)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -832,7 +832,7 @@ public:
|
|||
class GenSylvLargeTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
GenSylvLargeTest() : TestRunnable(u8"general sylvester solve (2500000=50×50×50×20)")
|
||||
GenSylvLargeTest() : TestRunnable("general sylvester solve (2500000=50×50×50×20)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -841,7 +841,7 @@ public:
|
|||
class EigBubFrankTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
EigBubFrankTest() : TestRunnable(u8"eig. bubble frank test (12×12)")
|
||||
EigBubFrankTest() : TestRunnable("eig. bubble frank test (12×12)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -851,7 +851,7 @@ class EigBubSplitTest : public TestRunnable
|
|||
{
|
||||
// complex eigenvalue is split by swapping it with real
|
||||
public:
|
||||
EigBubSplitTest() : TestRunnable(u8"eig. bubble complex split test (3×3)")
|
||||
EigBubSplitTest() : TestRunnable("eig. bubble complex split test (3×3)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -861,7 +861,7 @@ class EigBubSameTest : public TestRunnable
|
|||
{
|
||||
// complex eigenevalue bypasses the same complex eigenvalue
|
||||
public:
|
||||
EigBubSameTest() : TestRunnable(u8"eig. bubble same test (5×5)")
|
||||
EigBubSameTest() : TestRunnable("eig. bubble same test (5×5)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -870,7 +870,7 @@ public:
|
|||
class BlockDiagSmallTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
BlockDiagSmallTest() : TestRunnable(u8"block diagonalization small test (7×7)")
|
||||
BlockDiagSmallTest() : TestRunnable("block diagonalization small test (7×7)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -879,7 +879,7 @@ public:
|
|||
class BlockDiagFrankTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
BlockDiagFrankTest() : TestRunnable(u8"block diagonalization of frank (12×12)")
|
||||
BlockDiagFrankTest() : TestRunnable("block diagonalization of frank (12×12)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -888,7 +888,7 @@ public:
|
|||
class BlockDiagIllCondTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
BlockDiagIllCondTest() : TestRunnable(u8"block diagonalization of ill conditioned (15×15)")
|
||||
BlockDiagIllCondTest() : TestRunnable("block diagonalization of ill conditioned (15×15)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
@ -897,7 +897,7 @@ public:
|
|||
class BlockDiagBigTest : public TestRunnable
|
||||
{
|
||||
public:
|
||||
BlockDiagBigTest() : TestRunnable(u8"block diagonalization big test (50×50)")
|
||||
BlockDiagBigTest() : TestRunnable("block diagonalization big test (50×50)")
|
||||
{
|
||||
}
|
||||
bool run() const override;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright © 2021 Dynare Team
|
||||
* Copyright © 2021-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -324,7 +324,7 @@ KOrderWelfare::KOrderWelfare(int num_stat, int num_pred,
|
|||
for (int ord = 1; ord <= order; ord++)
|
||||
{
|
||||
JournalRecordPair pa(journal);
|
||||
pa << u8"Unconditional welfare : performing step for order = " << ord << "\n" << endrec;
|
||||
pa << "Unconditional welfare : performing step for order = " << ord << "\n" << endrec;
|
||||
for (int j = 0; j <= ord; j++)
|
||||
for (int i = 0; i <= j; i++)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright © 2021 Dynare Team
|
||||
* Copyright © 2021-2022 Dynare Team
|
||||
*
|
||||
* This file is part of Dynare.
|
||||
*
|
||||
|
@ -245,7 +245,7 @@ std::unique_ptr<typename ctraits<t>::Ttensor>
|
|||
KOrderWelfare::faaDiBrunoU(const Symmetry &sym) const
|
||||
{
|
||||
JournalRecordPair pa(journal);
|
||||
pa << u8"Faà Di Bruno U container for " << sym << endrec;
|
||||
pa << "Faà Di Bruno U container for " << sym << endrec;
|
||||
auto res = std::make_unique<typename ctraits<t>::Ttensor>(1, TensorDimens(sym, nvs));
|
||||
FaaDiBruno bruno(journal);
|
||||
bruno.calculate(Xstack<t>(), u, *res);
|
||||
|
@ -258,7 +258,7 @@ std::unique_ptr<typename ctraits<t>::Ttensor>
|
|||
KOrderWelfare::faaDiBrunoW(const Symmetry &sym) const
|
||||
{
|
||||
JournalRecordPair pa(journal);
|
||||
pa << u8"Faà Di Bruno G container for " << sym << endrec;
|
||||
pa << "Faà Di Bruno G container for " << sym << endrec;
|
||||
TensorDimens tdims(sym, nvs);
|
||||
auto res = std::make_unique<typename ctraits<t>::Ttensor>(1, tdims);
|
||||
FaaDiBruno bruno(journal);
|
||||
|
|
Loading…
Reference in New Issue