Skip to content

Commit

Permalink
Merge remote-tracking branch 'Trilinos/trilino:develop' into trilinos…
Browse files Browse the repository at this point in the history
…-sync
  • Loading branch information
dc-snl committed May 23, 2022
2 parents cd0d04b + 3fa9650 commit 3174ef3
Show file tree
Hide file tree
Showing 205 changed files with 4,217 additions and 1,806 deletions.
13 changes: 3 additions & 10 deletions packages/belos/src/BelosBiCGStabSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,6 @@ namespace Belos {
static constexpr int defQuorum_default_ = 1;
static constexpr const char * resScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_,achievedTol_;
Expand All @@ -298,7 +291,7 @@ namespace Belos {
// Empty Constructor
template<class ScalarType, class MV, class OP>
BiCGStabSolMgr<ScalarType,MV,OP>::BiCGStabSolMgr() :
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
maxIters_(maxIters_default_),
numIters_(0),
Expand All @@ -318,7 +311,7 @@ BiCGStabSolMgr<ScalarType,MV,OP>::
BiCGStabSolMgr (const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
const Teuchos::RCP<Teuchos::ParameterList> &pl ) :
problem_(problem),
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
maxIters_(maxIters_default_),
numIters_(0),
Expand Down Expand Up @@ -590,7 +583,7 @@ BiCGStabSolMgr<ScalarType,MV,OP>::getValidParameters() const
pl->set("Deflation Quorum", static_cast<int>(defQuorum_default_),
"The number of linear systems that need to converge before\n"
"they are deflated. This number should be <= block size.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Show Maximum Residual Norm Only", static_cast<bool>(showMaxResNormOnly_default_),
Expand Down
13 changes: 3 additions & 10 deletions packages/belos/src/BelosBlockCGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,6 @@ namespace Belos {
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
static constexpr bool assertPositiveDefiniteness_default_ = true;
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

//
// Current solver parameters and other values.
Expand Down Expand Up @@ -414,7 +407,7 @@ namespace Belos {
// Empty Constructor
template<class ScalarType, class MV, class OP>
BlockCGSolMgr<ScalarType,MV,OP,true>::BlockCGSolMgr() :
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
orthoKappa_(DefaultSolverParameters::orthoKappa),
achievedTol_(Teuchos::ScalarTraits<MagnitudeType>::zero()),
Expand Down Expand Up @@ -442,7 +435,7 @@ BlockCGSolMgr<ScalarType,MV,OP,true>::
BlockCGSolMgr(const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
const Teuchos::RCP<Teuchos::ParameterList> &pl) :
problem_(problem),
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
orthoKappa_(DefaultSolverParameters::orthoKappa),
achievedTol_(Teuchos::ScalarTraits<MagnitudeType>::zero()),
Expand Down Expand Up @@ -788,7 +781,7 @@ BlockCGSolMgr<ScalarType,MV,OP,true>::getValidParameters() const
pl->set("Output Frequency", static_cast<int>(outputFreq_default_),
"How often convergence information should be outputted\n"
"to the output stream.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Show Maximum Residual Norm Only", static_cast<bool>(showMaxResNormOnly_default_),
Expand Down
13 changes: 3 additions & 10 deletions packages/belos/src/BelosBlockGmresSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,6 @@ class BlockGmresSolMgr : public SolverManager<ScalarType,MV,OP> {
static constexpr const char * expResScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convtol_, orthoKappa_, achievedTol_;
Expand All @@ -361,7 +354,7 @@ class BlockGmresSolMgr : public SolverManager<ScalarType,MV,OP> {
// Empty Constructor
template<class ScalarType, class MV, class OP>
BlockGmresSolMgr<ScalarType,MV,OP>::BlockGmresSolMgr() :
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
orthoKappa_(DefaultSolverParameters::orthoKappa),
achievedTol_(Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<ScalarType>::magnitudeType>::zero()),
Expand Down Expand Up @@ -393,7 +386,7 @@ BlockGmresSolMgr<ScalarType,MV,OP>::
BlockGmresSolMgr (const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
const Teuchos::RCP<Teuchos::ParameterList> &pl) :
problem_(problem),
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
orthoKappa_(DefaultSolverParameters::orthoKappa),
achievedTol_(Teuchos::ScalarTraits<typename Teuchos::ScalarTraits<ScalarType>::magnitudeType>::zero()),
Expand Down Expand Up @@ -465,7 +458,7 @@ BlockGmresSolMgr<ScalarType,MV,OP>::getValidParameters() const
pl->set("Output Frequency", static_cast<int>(outputFreq_default_),
"How often convergence information should be outputted\n"
"to the output stream.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Show Maximum Residual Norm Only", static_cast<bool>(showMaxResNormOnly_default_),
Expand Down
13 changes: 3 additions & 10 deletions packages/belos/src/BelosFixedPointSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,6 @@ namespace Belos {
static constexpr int outputStyle_default_ = Belos::General;
static constexpr int outputFreq_default_ = -1;
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

//
// Current solver parameters and other values.
Expand Down Expand Up @@ -330,7 +323,7 @@ namespace Belos {
// Empty Constructor
template<class ScalarType, class MV, class OP>
FixedPointSolMgr<ScalarType,MV,OP>::FixedPointSolMgr() :
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
achievedTol_(Teuchos::ScalarTraits<MagnitudeType>::zero()),
maxIters_(maxIters_default_),
Expand All @@ -351,7 +344,7 @@ FixedPointSolMgr<ScalarType,MV,OP>::
FixedPointSolMgr(const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
const Teuchos::RCP<Teuchos::ParameterList> &pl) :
problem_(problem),
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
achievedTol_(Teuchos::ScalarTraits<MagnitudeType>::zero()),
maxIters_(maxIters_default_),
Expand Down Expand Up @@ -574,7 +567,7 @@ FixedPointSolMgr<ScalarType,MV,OP>::getValidParameters() const
pl->set("Output Frequency", static_cast<int>(outputFreq_default_),
"How often convergence information should be outputted\n"
"to the output stream.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Show Maximum Residual Norm Only", static_cast<bool>(showMaxResNormOnly_default_),
Expand Down
11 changes: 2 additions & 9 deletions packages/belos/src/BelosGCRODRSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,6 @@ Systems," SIAM Journal on Scientific Computing, 28(5), pp. 1651-1674,
static constexpr const char * expResScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType convTol_, orthoKappa_, achievedTol_;
Expand Down Expand Up @@ -592,7 +585,7 @@ GCRODRSolMgr(const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> >& problem,
// Common instructions executed in all constructors
template<class ScalarType, class MV, class OP>
void GCRODRSolMgr<ScalarType,MV,OP,true>::init () {
outputStream_ = Teuchos::rcp(outputStream_default_,false);
outputStream_ = Teuchos::rcpFromRef(std::cout);
convTol_ = DefaultSolverParameters::convTol;
orthoKappa_ = orthoKappa_default_;
maxRestarts_ = maxRestarts_default_;
Expand Down Expand Up @@ -1175,7 +1168,7 @@ GCRODRSolMgr<ScalarType,MV,OP,true>::getValidParameters() const
pl->set("Output Frequency", static_cast<int>(outputFreq_default_),
"How often convergence information should be outputted\n"
"to the output stream.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Implicit Residual Scaling", static_cast<const char *>(impResScale_default_),
Expand Down
9 changes: 1 addition & 8 deletions packages/belos/src/BelosGmresPolyOp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,6 @@ namespace Belos {
static constexpr const char * label_default_ = "Belos";
static constexpr const char * polyType_default_ = "Roots";
static constexpr const char * orthoType_default_ = "DGKS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif
static constexpr bool damp_default_ = false;
static constexpr bool addRoots_default_ = true;

Expand All @@ -319,7 +312,7 @@ namespace Belos {

// Output manager.
Teuchos::RCP<OutputManager<ScalarType> > printer_;
Teuchos::RCP<std::ostream> outputStream_ = Teuchos::rcp(outputStream_default_,false);
Teuchos::RCP<std::ostream> outputStream_ = Teuchos::rcpFromRef(std::cout);

// Orthogonalization manager.
Teuchos::RCP<MatOrthoManager<ScalarType,MV,OP> > ortho_;
Expand Down
13 changes: 3 additions & 10 deletions packages/belos/src/BelosGmresPolySolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,6 @@ class GmresPolySolMgr : public SolverManager<ScalarType,MV,OP> {
static constexpr bool addRoots_default_ = true;
static constexpr bool dampPoly_default_ = false;
static constexpr bool randomRHS_default_ = true;
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

// Current solver values.
MagnitudeType polyTol_, achievedTol_;
Expand Down Expand Up @@ -381,7 +374,7 @@ class GmresPolySolMgr : public SolverManager<ScalarType,MV,OP> {

template<class ScalarType, class MV, class OP>
GmresPolySolMgr<ScalarType,MV,OP>::GmresPolySolMgr () :
outputStream_ (Teuchos::rcp(outputStream_default_,false)),
outputStream_ (Teuchos::rcpFromRef(std::cout)),
polyTol_ (DefaultSolverParameters::polyTol),
achievedTol_(MTS::zero()),
maxDegree_ (maxDegree_default_),
Expand All @@ -406,7 +399,7 @@ GmresPolySolMgr<ScalarType,MV,OP>::
GmresPolySolMgr (const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
const Teuchos::RCP<Teuchos::ParameterList> &pl) :
problem_ (problem),
outputStream_ (Teuchos::rcp(outputStream_default_,false)),
outputStream_ (Teuchos::rcpFromRef(std::cout)),
polyTol_ (DefaultSolverParameters::polyTol),
maxDegree_ (maxDegree_default_),
numIters_ (0),
Expand Down Expand Up @@ -459,7 +452,7 @@ GmresPolySolMgr<ScalarType,MV,OP>::getValidParameters() const
pl->set("Verbosity", static_cast<int>(verbosity_default_),
"What type(s) of solver information should be outputted\n"
"to the output stream.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Timer Label", static_cast<const char *>(label_default_),
Expand Down
13 changes: 3 additions & 10 deletions packages/belos/src/BelosPCPGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,6 @@ namespace Belos {
static constexpr int outputFreq_default_ = -1;
static constexpr const char * label_default_ = "Belos";
static constexpr const char * orthoType_default_ = "ICGS";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif

//
// Current solver values.
Expand Down Expand Up @@ -425,7 +418,7 @@ namespace Belos {
// Empty Constructor
template<class ScalarType, class MV, class OP>
PCPGSolMgr<ScalarType,MV,OP,true>::PCPGSolMgr() :
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
orthoKappa_(DefaultSolverParameters::orthoKappa),
achievedTol_(Teuchos::ScalarTraits<MagnitudeType>::zero()),
Expand All @@ -449,7 +442,7 @@ PCPGSolMgr<ScalarType,MV,OP,true>::PCPGSolMgr(
const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
const Teuchos::RCP<Teuchos::ParameterList> &pl ) :
problem_(problem),
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),

convtol_(DefaultSolverParameters::convTol),
orthoKappa_(DefaultSolverParameters::orthoKappa),
Expand Down Expand Up @@ -720,7 +713,7 @@ PCPGSolMgr<ScalarType,MV,OP,true>::getValidParameters() const
pl->set("Output Frequency", static_cast<int>(outputFreq_default_),
"How often convergence information should be outputted\n"
"to the output stream.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Timer Label", static_cast<const char *>(label_default_),
Expand Down
13 changes: 3 additions & 10 deletions packages/belos/src/BelosPseudoBlockCGSolMgr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,6 @@ namespace Belos {
static constexpr bool foldConvergenceDetectionIntoAllreduce_default_ = false;
static constexpr const char * resScale_default_ = "Norm of Initial Residual";
static constexpr const char * label_default_ = "Belos";
// https://stackoverflow.com/questions/24398102/constexpr-and-initialization-of-a-static-const-void-pointer-with-reinterpret-cas
#if defined(_WIN32) && defined(__clang__)
static constexpr std::ostream * outputStream_default_ =
__builtin_constant_p(reinterpret_cast<const std::ostream*>(&std::cout));
#else
static constexpr std::ostream * outputStream_default_ = &std::cout;
#endif
static constexpr bool genCondEst_default_ = false;

// Current solver values.
Expand All @@ -370,7 +363,7 @@ namespace Belos {
// Empty Constructor
template<class ScalarType, class MV, class OP>
PseudoBlockCGSolMgr<ScalarType,MV,OP,true>::PseudoBlockCGSolMgr() :
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
maxIters_(maxIters_default_),
numIters_(0),
Expand All @@ -394,7 +387,7 @@ PseudoBlockCGSolMgr<ScalarType,MV,OP,true>::
PseudoBlockCGSolMgr (const Teuchos::RCP<LinearProblem<ScalarType,MV,OP> > &problem,
const Teuchos::RCP<Teuchos::ParameterList> &pl ) :
problem_(problem),
outputStream_(Teuchos::rcp(outputStream_default_,false)),
outputStream_(Teuchos::rcpFromRef(std::cout)),
convtol_(DefaultSolverParameters::convTol),
maxIters_(maxIters_default_),
numIters_(0),
Expand Down Expand Up @@ -723,7 +716,7 @@ PseudoBlockCGSolMgr<ScalarType,MV,OP,true>::getValidParameters() const
pl->set("Deflation Quorum", static_cast<int>(defQuorum_default_),
"The number of linear systems that need to converge before\n"
"they are deflated. This number should be <= block size.");
pl->set("Output Stream", Teuchos::rcp(outputStream_default_,false),
pl->set("Output Stream", Teuchos::rcpFromRef(std::cout),
"A reference-counted pointer to the output stream where all\n"
"solver output is sent.");
pl->set("Show Maximum Residual Norm Only", static_cast<bool>(showMaxResNormOnly_default_),
Expand Down
Loading

0 comments on commit 3174ef3

Please sign in to comment.