Tpetra parallel linear algebra Version of the Day
Loading...
Searching...
No Matches
Tpetra_Details_makeValidVerboseStream.cpp
1// ***********************************************************************
2//
3// Tpetra: Templated Linear Algebra Services Package
4// Copyright (2008) Sandia Corporation
5//
6// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7// the U.S. Government retains certain rights in this software.
8//
9// Redistribution and use in source and binary forms, with or without
10// modification, are permitted provided that the following conditions are
11// met:
12//
13// 1. Redistributions of source code must retain the above copyright
14// notice, this list of conditions and the following disclaimer.
15//
16// 2. Redistributions in binary form must reproduce the above copyright
17// notice, this list of conditions and the following disclaimer in the
18// documentation and/or other materials provided with the distribution.
19//
20// 3. Neither the name of the Corporation nor the names of the
21// contributors may be used to endorse or promote products derived from
22// this software without specific prior written permission.
23//
24// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
25// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
28// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35//
36// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
37//
38// ************************************************************************
39// @HEADER
40
41#include "Tpetra_Details_makeValidVerboseStream.hpp"
42#include <iostream>
43
44namespace Tpetra {
45namespace Details {
46
47Teuchos::RCP<Teuchos::FancyOStream>
48makeValidVerboseStream (const Teuchos::RCP<Teuchos::FancyOStream>& out)
49{
50 if (out.is_null ()) {
51 return Teuchos::getFancyOStream (Teuchos::rcpFromRef (std::cerr));
52 }
53 else {
54 return out;
55 }
56}
57
58} // namespace Details
59} // namespace Tpetra
Implementation details of Tpetra.
Namespace Tpetra contains the class and methods constituting the Tpetra library.