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
00036
00037
00038
00039
00040
00041
00042 #include "LOCA_TurningPoint_MooreSpence_ExtendedMultiVector.H"
00043 #include "LOCA_TurningPoint_MooreSpence_ExtendedVector.H"
00044
00045 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::ExtendedMultiVector(
00046 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00047 const NOX::Abstract::Vector& cloneVec,
00048 int nColumns) :
00049 LOCA::Extended::MultiVector(global_data, nColumns, 2, 1)
00050 {
00051 Teuchos::RCP<NOX::Abstract::MultiVector> mv1 =
00052 cloneVec.createMultiVector(nColumns, NOX::ShapeCopy);
00053 Teuchos::RCP<NOX::Abstract::MultiVector> mv2 =
00054 cloneVec.createMultiVector(nColumns, NOX::ShapeCopy);
00055 LOCA::Extended::MultiVector::setMultiVectorPtr(0, mv1);
00056 LOCA::Extended::MultiVector::setMultiVectorPtr(1, mv2);
00057 }
00058
00059 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::ExtendedMultiVector(
00060 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00061 const NOX::Abstract::MultiVector& xVec,
00062 const NOX::Abstract::MultiVector& nullVec,
00063 const NOX::Abstract::MultiVector::DenseMatrix& bifParams) :
00064 LOCA::Extended::MultiVector(global_data, xVec.numVectors(), 2, 1)
00065 {
00066 LOCA::Extended::MultiVector::setMultiVectorPtr(0, xVec.clone(NOX::DeepCopy));
00067 LOCA::Extended::MultiVector::setMultiVectorPtr(1,
00068 nullVec.clone(NOX::DeepCopy));
00069 LOCA::Extended::MultiVector::getScalars()->assign(bifParams);
00070 }
00071
00072 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::ExtendedMultiVector(
00073 const LOCA::TurningPoint::MooreSpence::ExtendedMultiVector& source,
00074 NOX::CopyType type) :
00075 LOCA::Extended::MultiVector(source, type)
00076 {
00077 }
00078
00079 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::ExtendedMultiVector(
00080 const LOCA::TurningPoint::MooreSpence::ExtendedMultiVector& source,
00081 int nColumns) :
00082 LOCA::Extended::MultiVector(source, nColumns)
00083 {
00084 }
00085
00086 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::ExtendedMultiVector(
00087 const LOCA::TurningPoint::MooreSpence::ExtendedMultiVector& source,
00088 const vector<int>& index, bool view) :
00089 LOCA::Extended::MultiVector(source, index, view)
00090 {
00091 }
00092
00093 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::~ExtendedMultiVector()
00094 {
00095 }
00096
00097 LOCA::Extended::MultiVector&
00098 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::operator=(
00099 const LOCA::Extended::MultiVector& y)
00100 {
00101 operator=(dynamic_cast<const LOCA::TurningPoint::MooreSpence::ExtendedMultiVector&>(y));
00102 return *this;
00103 }
00104
00105 NOX::Abstract::MultiVector&
00106 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::operator=(
00107 const NOX::Abstract::MultiVector& y)
00108 {
00109 operator=(dynamic_cast<const LOCA::TurningPoint::MooreSpence::ExtendedMultiVector&>(y));
00110 return *this;
00111 }
00112
00113 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector&
00114 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::operator=(const
00115 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector& y)
00116 {
00117 LOCA::Extended::MultiVector::operator=(y);
00118 return *this;
00119 }
00120
00121 Teuchos::RCP<NOX::Abstract::MultiVector>
00122 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::clone(NOX::CopyType type) const
00123 {
00124 return
00125 Teuchos::rcp(new LOCA::TurningPoint::MooreSpence::ExtendedMultiVector(*this, type));
00126 }
00127
00128 Teuchos::RCP<NOX::Abstract::MultiVector>
00129 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::clone(int numvecs) const
00130 {
00131 return
00132 Teuchos::rcp(new LOCA::TurningPoint::MooreSpence::ExtendedMultiVector(*this, numvecs));
00133 }
00134
00135 Teuchos::RCP<NOX::Abstract::MultiVector>
00136 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::subCopy(
00137 const vector<int>& index) const
00138 {
00139 return
00140 Teuchos::rcp(new LOCA::TurningPoint::MooreSpence::ExtendedMultiVector(*this, index, false));
00141 }
00142
00143 Teuchos::RCP<NOX::Abstract::MultiVector>
00144 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::subView(
00145 const vector<int>& index) const
00146 {
00147 return
00148 Teuchos::rcp(new LOCA::TurningPoint::MooreSpence::ExtendedMultiVector(*this, index, true));
00149 }
00150
00151 Teuchos::RCP<const NOX::Abstract::MultiVector>
00152 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::getXMultiVec() const
00153 {
00154 return LOCA::Extended::MultiVector::getMultiVector(0);
00155 }
00156
00157 Teuchos::RCP<NOX::Abstract::MultiVector>
00158 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::getXMultiVec()
00159 {
00160 return LOCA::Extended::MultiVector::getMultiVector(0);
00161 }
00162
00163 Teuchos::RCP<const NOX::Abstract::MultiVector>
00164 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::getNullMultiVec() const
00165 {
00166 return LOCA::Extended::MultiVector::getMultiVector(1);
00167 }
00168
00169 Teuchos::RCP<NOX::Abstract::MultiVector>
00170 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::getNullMultiVec()
00171 {
00172 return LOCA::Extended::MultiVector::getMultiVector(1);
00173 }
00174
00175 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::ExtendedMultiVector(
00176 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00177 int nColumns) :
00178 LOCA::Extended::MultiVector(global_data, nColumns, 2, 1)
00179 {
00180 }
00181
00182 Teuchos::RCP<LOCA::Extended::Vector>
00183 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::generateVector(
00184 int nVecs,
00185 int nScalarRows) const
00186 {
00187 return
00188 Teuchos::rcp(new LOCA::TurningPoint::MooreSpence::ExtendedVector(
00189 globalData));
00190 }
00191
00192 Teuchos::RCP<LOCA::TurningPoint::MooreSpence::ExtendedVector>
00193 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::getColumn(int i)
00194 {
00195 return Teuchos::rcp_dynamic_cast<LOCA::TurningPoint::MooreSpence::ExtendedVector>(getVector(i),true);
00196 }
00197
00198 Teuchos::RCP<const LOCA::TurningPoint::MooreSpence::ExtendedVector>
00199 LOCA::TurningPoint::MooreSpence::ExtendedMultiVector::getColumn(int i) const
00200 {
00201 return Teuchos::rcp_dynamic_cast<const LOCA::TurningPoint::MooreSpence::ExtendedVector>(getVector(i),true);
00202 }