46 #include <Xyce_config.h>
55 #include "N_LAS_Vector.h"
56 #include "N_LAS_System.h"
57 #include "N_LAS_Builder.h"
58 #include "N_ERH_ErrorMgr.h"
79 lasSys_(source.lasSys_),
84 error(
"Vector Copy Constructor - unable to create vector");
87 if (type == NOX::DeepCopy)
97 #ifdef Xyce_NOX_SIZETYPE
103 return vectorPtr_->globalLength();
112 NOX::Abstract::Vector&
Vector::abs(
const NOX::Abstract::Vector& source)
114 return abs(dynamic_cast<const Vector&>(source));
125 return operator=(dynamic_cast<const Vector&>(source));
138 return reciprocal(dynamic_cast<const Vector&>(source));
155 return scale(dynamic_cast<const Vector&>(y));
164 NOX::Abstract::Vector&
Vector::update(
double alpha,
const NOX::Abstract::Vector& a,
167 return update(alpha, dynamic_cast<const Vector&>(a), gamma);
178 NOX::Abstract::Vector&
Vector::update(
double alpha,
const NOX::Abstract::Vector& a,
179 double beta,
const NOX::Abstract::Vector& b,
182 return update(alpha, dynamic_cast<const Vector&>(a),
183 beta, dynamic_cast<const Vector&>(b),
190 double beta,
const Vector& b,
205 Teuchos::RCP<NOX::Abstract::Vector>
208 Teuchos::RCP<Vector> ptr = Teuchos::rcp(
new Vector(*
this, type));
217 case NOX::Abstract::Vector::TwoNorm:
220 case NOX::Abstract::Vector::OneNorm:
223 case NOX::Abstract::Vector::MaxNorm:
227 error(
"Vector::norm - invalid norm type");
234 return norm(dynamic_cast<const Vector&>(weights));
239 error(
"N_NLS::NOX::Vector::norm with weights is not supported");
Teuchos::RCP< NOX::Abstract::Vector > clone(NOX::CopyType type=NOX::DeepCopy) const
NOX::Abstract::Vector & reciprocal(const Vector &source)
NOX::Abstract::Vector & random(bool useSeed=false, int seed=1)
NOX::Abstract::Vector & operator=(const Vector &source)
NOX::Abstract::Vector & init(double value)
const Xyce::Linear::Vector & getNativeVectorRef_() const
Pure virtual class to augment a linear system.
const T & value(const ParameterBase &entity, const Descriptor &descriptor)
Returns the value of the parameter for the entity.
NOX::Abstract::Vector & scale(double gamma)
Xyce::Linear::System & lasSys_
NOX::Abstract::Vector & update(double alpha, const Vector &a, double gamma=0.0)
Vector(Xyce::Linear::Vector &vector, Xyce::Linear::System &lasSys)
double norm(NOX::Abstract::Vector::NormType type=NOX::Abstract::Vector::TwoNorm) const
void error(const std::string &msg)
NOX::Abstract::Vector & abs(const Vector &source)
double innerProduct(const Vector &y) const
NOX::Abstract::Vector & operator=(const NOX::Abstract::Vector &source)
void print(std::ostream &os) const
Xyce::Linear::Vector * vectorPtr_