Belos  Version of the Day
BelosSimpleOrthoManager.hpp
Go to the documentation of this file.
1 //@HEADER
2 // ************************************************************************
3 //
4 // Belos: Block Linear Solvers Package
5 // Copyright 2004 Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
38 //
39 // ************************************************************************
40 //@HEADER
41 
45 #ifndef __Belos_SimpleOrthoManager_hpp
46 #define __Belos_SimpleOrthoManager_hpp
47 
48 #include <BelosConfigDefs.hpp>
49 #include <BelosMultiVecTraits.hpp>
50 #include <BelosOrthoManager.hpp>
51 #include <BelosOutputManager.hpp>
52 #include <Teuchos_ParameterList.hpp>
53 #include <Teuchos_ParameterListAcceptorDefaultBase.hpp>
54 #include <Teuchos_StandardCatchMacros.hpp>
55 #include <Teuchos_TimeMonitor.hpp>
56 
57 namespace Belos {
58 
67  template<class Scalar, class MV>
69  public OrthoManager<Scalar, MV>,
70  public Teuchos::ParameterListAcceptorDefaultBase
71  {
72  public:
73  typedef Scalar scalar_type;
74  typedef typename Teuchos::ScalarTraits<Scalar>::magnitudeType magnitude_type;
75  typedef Teuchos::SerialDenseMatrix<int, Scalar> mat_type;
76  typedef Teuchos::RCP<Teuchos::SerialDenseMatrix<int, Scalar> > mat_ptr;
77 
78  private:
80  typedef Teuchos::ScalarTraits<Scalar> STS;
81  typedef Teuchos::ScalarTraits<magnitude_type> STM;
82 
84  std::string label_;
86  Teuchos::RCP<OutputManager<Scalar> > outMan_;
88  bool reorthogonalize_;
90  bool useMgs_;
92  mutable Teuchos::RCP<Teuchos::ParameterList> defaultParams_;
93 
94 #ifdef BELOS_TEUCHOS_TIME_MONITOR
95  Teuchos::RCP<Teuchos::Time> timerOrtho_;
98  Teuchos::RCP<Teuchos::Time> timerProject_;
100  Teuchos::RCP<Teuchos::Time> timerNormalize_;
101 
110  static Teuchos::RCP<Teuchos::Time>
111  makeTimer (const std::string& prefix,
112  const std::string& timerName)
113  {
114  const std::string timerLabel =
115  prefix.empty() ? timerName : (prefix + ": " + timerName);
116  return Teuchos::TimeMonitor::getNewCounter (timerLabel);
117  }
118 #endif // BELOS_TEUCHOS_TIME_MONITOR
119 
120  public:
121 
128  Teuchos::RCP<const Teuchos::ParameterList>
130  {
131  using Teuchos::ParameterList;
132  using Teuchos::parameterList;
133  using Teuchos::RCP;
134 
135  const std::string defaultNormalizationMethod ("MGS");
136  const bool defaultReorthogonalization = false;
137 
138  if (defaultParams_.is_null()) {
139  RCP<ParameterList> params = parameterList ("Simple");
140  params->set ("Normalization", defaultNormalizationMethod,
141  "Which normalization method to use. Valid values are \"MGS\""
142  " (for Modified Gram-Schmidt) and \"CGS\" (for Classical "
143  "Gram-Schmidt).");
144  params->set ("Reorthogonalization", defaultReorthogonalization,
145  "Whether to perform one (unconditional) reorthogonalization "
146  "pass.");
147  defaultParams_ = params;
148  }
149  return defaultParams_;
150  }
151 
161  static TEUCHOS_DEPRECATED Teuchos::RCP<const Teuchos::ParameterList>
163  {
164  using Teuchos::ParameterList;
165  using Teuchos::parameterList;
166  using Teuchos::RCP;
167 
168  const std::string defaultNormalizationMethod ("MGS");
169  const bool defaultReorthogonalization = false;
170 
171  RCP<ParameterList> params = parameterList ("Simple");
172  params->set ("Normalization", defaultNormalizationMethod,
173  "Which normalization method to use. Valid values are \"MGS\""
174  " (for Modified Gram-Schmidt) and \"CGS\" (for Classical "
175  "Gram-Schmidt).");
176  params->set ("Reorthogonalization", defaultReorthogonalization,
177  "Whether to perform one (unconditional) reorthogonalization "
178  "pass.");
179  return params;
180  }
181 
187  Teuchos::RCP<const Teuchos::ParameterList>
189  {
190  using Teuchos::ParameterList;
191  using Teuchos::parameterList;
192  using Teuchos::RCP;
193  using Teuchos::rcp;
194 
195  const std::string fastNormalizationMethod ("CGS");
196  const bool fastReorthogonalization = false;
197 
198  // Start with a clone of the default parameters.
199  RCP<ParameterList> fastParams = parameterList (*getValidParameters());
200  fastParams->set ("Normalization", fastNormalizationMethod);
201  fastParams->set ("Reorthogonalization", fastReorthogonalization);
202 
203  return fastParams;
204  }
205 
206  void
207  setParameterList (const Teuchos::RCP<Teuchos::ParameterList>& plist)
208  {
209  using Teuchos::ParameterList;
210  using Teuchos::parameterList;
211  using Teuchos::RCP;
212  using Teuchos::Exceptions::InvalidParameter;
213 
214  RCP<const ParameterList> defaultParams = getValidParameters();
215  RCP<ParameterList> params;
216  if (plist.is_null ()) {
217  params = parameterList (*defaultParams);
218  } else {
219  params = plist;
220  params->validateParametersAndSetDefaults (*defaultParams);
221  }
222  const std::string normalizeImpl = params->get<std::string>("Normalization");
223  const bool reorthogonalize = params->get<bool>("Reorthogonalization");
224 
225  if (normalizeImpl == "MGS" ||
226  normalizeImpl == "Mgs" ||
227  normalizeImpl == "mgs") {
228  useMgs_ = true;
229  params->set ("Normalization", std::string ("MGS")); // Standardize.
230  } else {
231  useMgs_ = false;
232  params->set ("Normalization", std::string ("CGS")); // Standardize.
233  }
234  reorthogonalize_ = reorthogonalize;
235 
236  setMyParamList (params);
237  }
238 
249  SimpleOrthoManager (const Teuchos::RCP<OutputManager<Scalar> >& outMan,
250  const std::string& label,
251  const Teuchos::RCP<Teuchos::ParameterList>& params) :
252  label_ (label),
253  outMan_ (outMan)
254  {
255 #ifdef BELOS_TEUCHOS_TIME_MONITOR
256  timerOrtho_ = makeTimer (label, "All orthogonalization");
257  timerProject_ = makeTimer (label, "Projection");
258  timerNormalize_ = makeTimer (label, "Normalization");
259 #endif // BELOS_TEUCHOS_TIME_MONITOR
260 
261  setParameterList (params);
262  if (! outMan_.is_null ()) {
263  using std::endl;
264  std::ostream& dbg = outMan_->stream(Debug);
265  dbg << "Belos::SimpleOrthoManager constructor:" << endl
266  << "-- Normalization method: "
267  << (useMgs_ ? "MGS" : "CGS") << endl
268  << "-- Reorthogonalize (unconditionally)? "
269  << (reorthogonalize_ ? "Yes" : "No") << endl;
270  }
271  }
272 
276  SimpleOrthoManager (const std::string& label) :
277  label_ (label)
278  {
279 #ifdef BELOS_TEUCHOS_TIME_MONITOR
280  timerOrtho_ = makeTimer (label, "All orthogonalization");
281  timerProject_ = makeTimer (label, "Projection");
282  timerNormalize_ = makeTimer (label, "Normalization");
283 #endif // BELOS_TEUCHOS_TIME_MONITOR
284 
285  setParameterList (Teuchos::null);
286  }
287 
289  virtual ~SimpleOrthoManager() {}
290 
291  void innerProd (const MV &X, const MV &Y, mat_type& Z) const {
292  MVT::MvTransMv (STS::one (), X, Y, Z);
293  }
294 
295  void norm (const MV& X, std::vector<magnitude_type>& normVec) const {
296  const int numCols = MVT::GetNumberVecs (X);
297  // std::vector<T>::size_type is unsigned; int is signed. Mixed
298  // unsigned/signed comparisons trigger compiler warnings.
299  if (normVec.size () < static_cast<size_t> (numCols)) {
300  normVec.resize (numCols); // Resize normvec if necessary.
301  }
302  MVT::MvNorm (X, normVec);
303  }
304 
305  void
306  project (MV &X,
307  Teuchos::Array<mat_ptr> C,
308  Teuchos::ArrayView<Teuchos::RCP<const MV> > Q) const
309  {
310 #ifdef BELOS_TEUCHOS_TIME_MONITOR
311  Teuchos::TimeMonitor timerMonitorOrtho(*timerOrtho_);
312  Teuchos::TimeMonitor timerMonitorProject(*timerProject_);
313 #endif // BELOS_TEUCHOS_TIME_MONITOR
314 
315  allocateProjectionCoefficients (C, Q, X, true);
316  rawProject (X, Q, C);
317  if (reorthogonalize_) { // Unconditional reorthogonalization
318  Teuchos::Array<Teuchos::RCP<Teuchos::SerialDenseMatrix<int,Scalar> > > C2;
319  allocateProjectionCoefficients (C2, Q, X, false);
320  for (int k = 0; k < Q.size(); ++k)
321  *C[k] += *C2[k];
322  }
323  }
324 
325  int
326  normalize (MV &X, mat_ptr B) const
327  {
328 #ifdef BELOS_TEUCHOS_TIME_MONITOR
329  Teuchos::TimeMonitor timerMonitorOrtho(*timerOrtho_);
330  Teuchos::TimeMonitor timerMonitorProject(*timerNormalize_);
331 #endif // BELOS_TEUCHOS_TIME_MONITOR
332 
333  if (useMgs_) {
334  return normalizeMgs (X, B);
335  } else {
336  return normalizeCgs (X, B);
337  }
338  }
339 
340  int
342  Teuchos::Array<mat_ptr> C,
343  mat_ptr B,
344  Teuchos::ArrayView<Teuchos::RCP<const MV> > Q) const
345  {
346  // Don't need time monitors here: project() and normalize() have
347  // their own.
348  project (X, C, Q);
349  return normalize (X, B);
350  }
351 
352  magnitude_type
353  orthonormError(const MV &X) const
354  {
355  const Scalar ONE = STS::one();
356  const int ncols = MVT::GetNumberVecs(X);
357  mat_type XTX (ncols, ncols);
358  innerProd (X, X, XTX);
359  for (int k = 0; k < ncols; ++k) {
360  XTX(k,k) -= ONE;
361  }
362  return XTX.normFrobenius();
363  }
364 
365  magnitude_type
366  orthogError(const MV &X1, const MV &X2) const
367  {
368  const int ncols_X1 = MVT::GetNumberVecs (X1);
369  const int ncols_X2 = MVT::GetNumberVecs (X2);
370  mat_type X1_T_X2 (ncols_X1, ncols_X2);
371  innerProd (X1, X2, X1_T_X2);
372  return X1_T_X2.normFrobenius();
373  }
374 
375  void setLabel (const std::string& label) { label_ = label; }
376  const std::string& getLabel() const { return label_; }
377 
378  private:
379 
380  int
381  normalizeMgs (MV &X,
382  Teuchos::RCP<Teuchos::SerialDenseMatrix<int,Scalar> > B) const
383  {
384  using Teuchos::Range1D;
385  using Teuchos::RCP;
386  using Teuchos::rcp;
387  using Teuchos::View;
388 
389  const int numCols = MVT::GetNumberVecs (X);
390  if (numCols == 0) {
391  return 0;
392  }
393 
394  if (B.is_null ()) {
395  B = rcp (new mat_type (numCols, numCols));
396  } else if (B->numRows () != numCols || B->numCols () != numCols) {
397  B->shape (numCols, numCols);
398  }
399 
400  // Modified Gram-Schmidt orthogonalization
401  std::vector<magnitude_type> normVec (1);
402  for (int j = 0; j < numCols; ++j) {
403  RCP<MV> X_cur = MVT::CloneViewNonConst (X, Range1D(j, j));
404  MV& X_j = *X_cur;
405  for (int i = 0; i < j; ++i) {
406  RCP<const MV> X_prv = MVT::CloneView (X, Range1D(i, i));
407  const MV& X_i = *X_prv;
408  mat_type B_ij (View, *B, 1, 1, i, j);
409  innerProd (X_i, X_j, B_ij);
410  MVT::MvTimesMatAddMv (-STS::one(), X_i, B_ij, STS::one(), X_j);
411  if (reorthogonalize_) { // Unconditional reorthogonalization
412  // innerProd() overwrites B(i,j), so save the
413  // first-pass projection coefficient and update
414  // B(i,j) afterwards.
415  const Scalar B_ij_first = (*B)(i, j);
416  innerProd (X_i, X_j, B_ij);
417  MVT::MvTimesMatAddMv (-STS::one(), X_i, B_ij, STS::one(), X_j);
418  (*B)(i, j) += B_ij_first;
419  }
420  }
421  // Normalize column j of X
422  norm (X_j, normVec);
423  const magnitude_type theNorm = normVec[0];
424  (*B)(j, j) = theNorm;
425  if (normVec[0] != STM::zero()) {
426  MVT::MvScale (X_j, STS::one() / theNorm);
427  } else {
428  return j; // break out early
429  }
430  }
431  return numCols; // full rank, as far as we know
432  }
433 
434 
435  int
436  normalizeCgs (MV &X, mat_ptr B) const
437  {
438  using Teuchos::Range1D;
439  using Teuchos::RCP;
440  using Teuchos::rcp;
441  using Teuchos::View;
442 
443  const int numCols = MVT::GetNumberVecs (X);
444  if (numCols == 0) {
445  return 0;
446  }
447 
448  if (B.is_null ()) {
449  B = rcp (new mat_type (numCols, numCols));
450  } else if (B->numRows() != numCols || B->numCols() != numCols) {
451  B->shape (numCols, numCols);
452  }
453  mat_type& B_ref = *B;
454 
455  // Classical Gram-Schmidt orthogonalization
456  std::vector<magnitude_type> normVec (1);
457 
458  // Space for reorthogonalization
459  mat_type B2 (numCols, numCols);
460 
461  // Do the first column first.
462  {
463  RCP<MV> X_cur = MVT::CloneViewNonConst (X, Range1D(0, 0));
464  // Normalize column 0 of X
465  norm (*X_cur, normVec);
466  const magnitude_type theNorm = normVec[0];
467  B_ref(0,0) = theNorm;
468  if (theNorm != STM::zero ()) {
469  const Scalar invNorm = STS::one () / theNorm;
470  MVT::MvScale (*X_cur, invNorm);
471  }
472  else {
473  return 0; // break out early
474  }
475  }
476 
477  // Orthogonalize the remaining columns of X
478  for (int j = 1; j < numCols; ++j) {
479  RCP<MV> X_cur = MVT::CloneViewNonConst (X, Range1D(j, j));
480  RCP<const MV> X_prv = MVT::CloneView (X, Range1D(0, j-1));
481  mat_type B_prvcur (View, B_ref, j, 1, 0, j);
482 
483  // Project X_cur against X_prv (first pass)
484  innerProd (*X_prv, *X_cur, B_prvcur);
485  MVT::MvTimesMatAddMv (-STS::one(), *X_prv, B_prvcur, STS::one(), *X_cur);
486  // Unconditional reorthogonalization:
487  // project X_cur against X_prv (second pass)
488  if (reorthogonalize_) {
489  mat_type B2_prvcur (View, B2, j, 1, 0, j);
490  innerProd (*X_prv, *X_cur, B2_prvcur);
491  MVT::MvTimesMatAddMv (-STS::one(), *X_prv, B2_prvcur, STS::one(), *X_cur);
492  B_prvcur += B2_prvcur;
493  }
494  // Normalize column j of X
495  norm (*X_cur, normVec);
496  const magnitude_type theNorm = normVec[0];
497  B_ref(j,j) = theNorm;
498  if (theNorm != STM::zero ()) {
499  const Scalar invNorm = STS::one () / theNorm;
500  MVT::MvScale (*X_cur, invNorm);
501  }
502  else {
503  return j; // break out early
504  }
505  }
506  return numCols; // full rank, as far as we know
507  }
508 
509 
510  void
511  allocateProjectionCoefficients (Teuchos::Array<mat_ptr>& C,
512  Teuchos::ArrayView<Teuchos::RCP<const MV> > Q,
513  const MV& X,
514  const bool attemptToRecycle = true) const
515  {
516  using Teuchos::rcp;
517 
518  const int num_Q_blocks = Q.size();
519  const int ncols_X = MVT::GetNumberVecs (X);
520  C.resize (num_Q_blocks);
521  // # of block(s) that had to be (re)allocated (either allocated
522  // freshly, or resized).
523  int numAllocated = 0;
524  if (attemptToRecycle) {
525  for (int i = 0; i < num_Q_blocks; ++i) {
526  const int ncols_Qi = MVT::GetNumberVecs (*Q[i]);
527  // Create a new C[i] if necessary, otherwise resize if
528  // necessary, otherwise fill with zeros.
529  if (C[i].is_null ()) {
530  C[i] = rcp (new mat_type (ncols_Qi, ncols_X));
531  numAllocated++;
532  }
533  else {
534  mat_type& Ci = *C[i];
535  if (Ci.numRows() != ncols_Qi || Ci.numCols() != ncols_X) {
536  Ci.shape (ncols_Qi, ncols_X);
537  numAllocated++;
538  }
539  else {
540  Ci.putScalar (STS::zero());
541  }
542  }
543  }
544  }
545  else { // Just allocate; don't try to check if we can recycle
546  for (int i = 0; i < num_Q_blocks; ++i) {
547  const int ncols_Qi = MVT::GetNumberVecs (*Q[i]);
548  C[i] = rcp (new mat_type (ncols_Qi, ncols_X));
549  numAllocated++;
550  }
551  }
552  if (! outMan_.is_null()) {
553  using std::endl;
554  std::ostream& dbg = outMan_->stream(Debug);
555  dbg << "SimpleOrthoManager::allocateProjectionCoefficients: "
556  << "Allocated " << numAllocated << " blocks out of "
557  << num_Q_blocks << endl;
558  }
559  }
560 
561  void
562  rawProject (MV& X,
563  Teuchos::ArrayView<Teuchos::RCP<const MV> > Q,
564  Teuchos::ArrayView<mat_ptr> C) const
565  {
566  // "Modified Gram-Schmidt" version of Block Gram-Schmidt.
567  const int num_Q_blocks = Q.size();
568  for (int i = 0; i < num_Q_blocks; ++i) {
569  mat_type& Ci = *C[i];
570  const MV& Qi = *Q[i];
571  innerProd (Qi, X, Ci);
572  MVT::MvTimesMatAddMv (-STS::one(), Qi, Ci, STS::one(), X);
573  }
574  }
575 
576  };
577 } // namespace Belos
578 
579 #endif // __Belos_SimpleOrthoManager_hpp
void project(MV &X, Teuchos::Array< mat_ptr > C, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const
Project X against the (orthogonal) entries of Q.
void innerProd(const MV &X, const MV &Y, mat_type &Z) const
Provides the inner product defining the orthogonality concepts.
Belos&#39;s basic output manager for sending information of select verbosity levels to the appropriate ou...
magnitude_type orthonormError(const MV &X) const
This method computes the error in orthonormality of a multivector.
virtual ~SimpleOrthoManager()
Virtual destructor for memory safety of derived classes.
Class which manages the output and verbosity of the Belos solvers.
int normalize(MV &X, mat_ptr B) const
This method takes a multivector X and attempts to compute an orthonormal basis for ...
Teuchos::ScalarTraits< Scalar >::magnitudeType magnitude_type
Teuchos::RCP< Teuchos::SerialDenseMatrix< int, Scalar > > mat_ptr
SimpleOrthoManager(const std::string &label)
Constructor.
static Teuchos::RCP< const MV > CloneView(const MV &mv, const std::vector< int > &index)
Creates a new const MV that shares the selected contents of mv (shallow copy).
Declaration of basic traits for the multivector type.
void setLabel(const std::string &label)
This method sets the label used by the timers in the orthogonalization manager.
SimpleOrthoManager(const Teuchos::RCP< OutputManager< Scalar > > &outMan, const std::string &label, const Teuchos::RCP< Teuchos::ParameterList > &params)
Constructor.
static void MvTransMv(const ScalarType alpha, const MV &A, const MV &mv, Teuchos::SerialDenseMatrix< int, ScalarType > &B)
Compute a dense matrix B through the matrix-matrix multiply .
static int GetNumberVecs(const MV &mv)
Obtain the number of vectors in mv.
Traits class which defines basic operations on multivectors.
Belos&#39;s templated virtual class for providing routines for orthogonalization and orthonormzalition of...
Teuchos::RCP< const Teuchos::ParameterList > getFastParameters()
Get a "fast" list of parameters.
static Teuchos::RCP< MV > CloneViewNonConst(MV &mv, const std::vector< int > &index)
Creates a new MV that shares the selected contents of mv (shallow copy).
Simple OrthoManager implementation for benchmarks.
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Get a default list of parameters.
int projectAndNormalize(MV &X, Teuchos::Array< mat_ptr > C, mat_ptr B, Teuchos::ArrayView< Teuchos::RCP< const MV > > Q) const
Project X against the Q[i] and normalize X.
void norm(const MV &X, std::vector< magnitude_type > &normVec) const
Teuchos::SerialDenseMatrix< int, Scalar > mat_type
static void MvTimesMatAddMv(const ScalarType alpha, const MV &A, const Teuchos::SerialDenseMatrix< int, ScalarType > &B, const ScalarType beta, MV &mv)
Update mv with .
Templated virtual class for providing orthogonalization/orthonormalization methods.
static TEUCHOS_DEPRECATED Teuchos::RCP< const Teuchos::ParameterList > getDefaultParameters()
Get a default list of parameters.
static void MvNorm(const MV &mv, std::vector< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > &normvec, NormType type=TwoNorm)
Compute the 2-norm of each individual vector of mv. Upon return, normvec[i] holds the value of ...
static void MvScale(MV &mv, const ScalarType alpha)
Scale each element of the vectors in mv with alpha.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &plist)
magnitude_type orthogError(const MV &X1, const MV &X2) const
This method computes the error in orthogonality of two multivectors.
Belos header file which uses auto-configuration information to include necessary C++ headers...
const std::string & getLabel() const
This method returns the label being used by the timers in the orthogonalization manager.