Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef NOX_TSF_VECTOR_H
00036 #define NOX_TSF_VECTOR_H
00037
00038 #include "NOX_Abstract_Vector.H"
00039 #include "NOX_Common.H"
00040 #include "TSFVectorDecl.hpp"
00041 #include "TSFVectorSpaceDecl.hpp"
00042
00043 namespace NOX
00044 {
00045
00046
00047 namespace TSF
00048 {
00049 using Teuchos::RCP;
00050
00051
00052
00053
00054
00055
00056 class Vector : public NOX::Abstract::Vector
00057 {
00058
00059 public:
00060
00061
00062 Vector(const NOX::TSF::Vector& source,
00063 NOX::CopyType type = DeepCopy);
00064
00065
00066 Vector(const TSFExtended::Vector<double>& source,
00067 NOX::CopyType type = DeepCopy);
00068
00069
00070 Vector(const NOX::TSF::Vector& source,
00071 int numdigits,
00072 NOX::CopyType type = DeepCopy);
00073
00074
00075 Vector(const TSFExtended::Vector<double>& source,
00076 int numdigits,
00077 NOX::CopyType type = DeepCopy);
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 TSFExtended::Vector<double>& getTSFVector();
00088
00089
00090 const TSFExtended::Vector<double>& getTSFVector() const;
00091
00092
00093 int getPrecision() const;
00094
00095
00096
00097
00098 NOX::Abstract::Vector& init(double value);
00099
00100
00101 NOX::Abstract::Vector& operator=(const NOX::TSF::Vector& y);
00102
00103 NOX::Abstract::Vector& operator=(const NOX::Abstract::Vector& y);
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116 NOX::Abstract::Vector& abs(const NOX::TSF::Vector& y);
00117
00118 NOX::Abstract::Vector& abs(const NOX::Abstract::Vector& y);
00119
00120
00121 NOX::Abstract::Vector& reciprocal(const NOX::TSF::Vector& y);
00122
00123 NOX::Abstract::Vector& reciprocal(const NOX::Abstract::Vector& y);
00124
00125
00126
00127
00128
00129
00130 NOX::Abstract::Vector& scale(double gamma);
00131
00132
00133 NOX::Abstract::Vector& scale(const NOX::TSF::Vector& a);
00134 NOX::Abstract::Vector& scale(const NOX::Abstract::Vector& a);
00135
00136
00137 NOX::Abstract::Vector& update(double alpha, const NOX::TSF::Vector& a, double gamma = 0.0);
00138 NOX::Abstract::Vector& update(double alpha, const NOX::Abstract::Vector& a, double gamma = 0.0);
00139
00140
00141 NOX::Abstract::Vector& update(double alpha, const NOX::TSF::Vector& a,
00142 double beta, const NOX::TSF::Vector& b,
00143 double gamma = 0.0);
00144 NOX::Abstract::Vector& update(double alpha, const NOX::Abstract::Vector& a,
00145 double beta, const NOX::Abstract::Vector& b,
00146 double gamma = 0.0);
00147
00148
00149
00150
00151
00152
00153 #ifdef TRILINOS_6
00154 NOX::Abstract::Vector* clone(NOX::CopyType type = NOX::DeepCopy) const;
00155 #else
00156 RCP<NOX::Abstract::Vector> clone(NOX::CopyType type = NOX::DeepCopy) const ;
00157 #endif
00158
00159
00160
00161
00162
00163
00164 double norm(NOX::Abstract::Vector::NormType type = NOX::Abstract::Vector::TwoNorm) const;
00165
00166
00167 double norm(const NOX::TSF::Vector& weights) const;
00168 double norm(const NOX::Abstract::Vector& weights) const;
00169
00170
00171
00172
00173
00174
00175 double dot(const NOX::TSF::Vector& y) const;
00176 double dot(const NOX::Abstract::Vector& y) const;
00177 double innerProduct(const NOX::Abstract::Vector& y) const;
00178
00179
00180
00181
00182
00183
00184 int length() const;
00185
00186
00187
00188
00189
00190
00191
00192 ostream& leftshift(std::ostream& stream) const;
00193
00194
00195 void print() const;
00196
00197 private:
00198
00199
00200 int precision;
00201
00202
00203 TSFExtended::Vector<double> x;
00204 };
00205
00206 }
00207 }
00208
00209
00210 namespace std{
00211 ostream& operator<<(std::ostream& stream, const NOX::TSF::Vector& v);
00212 }
00213
00214 #endif