00001 // $Id: LOCA_Epetra_IdentityOp.C,v 1.5 2007/06/21 16:22:55 rhoope Exp $ 00002 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src-epetra/LOCA_Epetra_IdentityOp.C,v $ 00003 00004 //@HEADER 00005 // ************************************************************************ 00006 // 00007 // NOX: An Object-Oriented Nonlinear Solver Package 00008 // Copyright (2002) Sandia Corporation 00009 // 00010 // LOCA: Library of Continuation Algorithms Package 00011 // Copyright (2005) Sandia Corporation 00012 // 00013 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00014 // license for use of this work by or on behalf of the U.S. Government. 00015 // 00016 // This library is free software; you can redistribute it and/or modify 00017 // it under the terms of the GNU Lesser General Public License as 00018 // published by the Free Software Foundation; either version 2.1 of the 00019 // License, or (at your option) any later version. 00020 // 00021 // This library is distributed in the hope that it will be useful, but 00022 // WITHOUT ANY WARRANTY; without even the implied warranty of 00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00024 // Lesser General Public License for more details. 00025 // 00026 // You should have received a copy of the GNU Lesser General Public 00027 // License along with this library; if not, write to the Free Software 00028 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00029 // USA 00030 // 00031 // Questions? Contact Roger Pawlowski (rppawlo@sandia.gov) or 00032 // Eric Phipps (etphipp@sandia.gov), Sandia National Laboratories. 00033 // ************************************************************************ 00034 // CVS Information 00035 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src-epetra/LOCA_Epetra_IdentityOp.C,v $ 00036 // $Author: rhoope $ 00037 // $Date: 2007/06/21 16:22:55 $ 00038 // $Revision: 1.5 $ 00039 // ************************************************************************ 00040 //@HEADER 00041 00042 #include "Epetra_config.h" 00043 #include "Epetra_MultiVector.h" 00044 #include "Epetra_Map.h" 00045 #include "Epetra_Comm.h" 00046 #include "LOCA_Epetra_IdentityOp.H" 00047 00048 LOCA::Epetra::IdentityOp::IdentityOp( 00049 const Teuchos::RCP<const Epetra_Comm>& comm_, 00050 const Teuchos::RCP<const Epetra_Map>& map_) : 00051 label("LOCA::Epetra::IdentityOp"), 00052 comm(comm_), 00053 map(map_), 00054 useTranspose(false) 00055 { 00056 } 00057 00058 LOCA::Epetra::IdentityOp::~IdentityOp() 00059 { 00060 } 00061 00062 int 00063 LOCA::Epetra::IdentityOp::SetUseTranspose(bool UseTranspose) 00064 { 00065 useTranspose = UseTranspose; 00066 return 0; 00067 } 00068 00069 int 00070 LOCA::Epetra::IdentityOp::Apply(const Epetra_MultiVector& Input, 00071 Epetra_MultiVector& Result) const 00072 { 00073 Result.Scale(1.0, Input); 00074 00075 return 0; 00076 } 00077 00078 int 00079 LOCA::Epetra::IdentityOp::ApplyInverse(const Epetra_MultiVector& Input, 00080 Epetra_MultiVector& Result) const 00081 { 00082 Result.Scale(1.0, Input); 00083 00084 return 0; 00085 } 00086 00087 double 00088 LOCA::Epetra::IdentityOp::NormInf() const 00089 { 00090 return 1.0; 00091 } 00092 00093 00094 const char* 00095 LOCA::Epetra::IdentityOp::Label () const 00096 { 00097 return const_cast<char*>(label.c_str()); 00098 } 00099 00100 bool 00101 LOCA::Epetra::IdentityOp::UseTranspose() const 00102 { 00103 return useTranspose; 00104 } 00105 00106 bool 00107 LOCA::Epetra::IdentityOp::HasNormInf() const 00108 { 00109 return true; 00110 } 00111 00112 const Epetra_Comm & 00113 LOCA::Epetra::IdentityOp::Comm() const 00114 { 00115 return *comm; 00116 } 00117 const Epetra_Map& 00118 LOCA::Epetra::IdentityOp::OperatorDomainMap() const 00119 { 00120 return *map; 00121 } 00122 00123 const Epetra_Map& 00124 LOCA::Epetra::IdentityOp::OperatorRangeMap() const 00125 { 00126 return *map; 00127 }