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_Hopf_ComplexMultiVector.H"
00043 #include "LOCA_Hopf_ComplexVector.H"
00044
00045 LOCA::Hopf::ComplexMultiVector::ComplexMultiVector(
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, 0)
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::Hopf::ComplexMultiVector::ComplexMultiVector(
00060 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00061 const NOX::Abstract::MultiVector& realVec,
00062 const NOX::Abstract::MultiVector& imagVec) :
00063 LOCA::Extended::MultiVector(global_data, realVec.numVectors(), 2, 0)
00064 {
00065 LOCA::Extended::MultiVector::setMultiVectorPtr(0,
00066 realVec.clone(NOX::DeepCopy));
00067 LOCA::Extended::MultiVector::setMultiVectorPtr(1,
00068 imagVec.clone(NOX::DeepCopy));
00069 }
00070
00071 LOCA::Hopf::ComplexMultiVector::ComplexMultiVector(
00072 const LOCA::Hopf::ComplexMultiVector& source,
00073 NOX::CopyType type) :
00074 LOCA::Extended::MultiVector(source, type)
00075 {
00076 }
00077
00078 LOCA::Hopf::ComplexMultiVector::ComplexMultiVector(
00079 const LOCA::Hopf::ComplexMultiVector& source,
00080 int nColumns) :
00081 LOCA::Extended::MultiVector(source, nColumns)
00082 {
00083 }
00084
00085 LOCA::Hopf::ComplexMultiVector::ComplexMultiVector(
00086 const LOCA::Hopf::ComplexMultiVector& source,
00087 const vector<int>& index, bool view) :
00088 LOCA::Extended::MultiVector(source, index, view)
00089 {
00090 }
00091
00092 LOCA::Hopf::ComplexMultiVector::~ComplexMultiVector()
00093 {
00094 }
00095
00096 LOCA::Extended::MultiVector&
00097 LOCA::Hopf::ComplexMultiVector::operator=(const LOCA::Extended::MultiVector& y)
00098 {
00099 operator=(dynamic_cast<const LOCA::Hopf::ComplexMultiVector&>(y));
00100 return *this;
00101 }
00102
00103 NOX::Abstract::MultiVector&
00104 LOCA::Hopf::ComplexMultiVector::operator=(const NOX::Abstract::MultiVector& y)
00105 {
00106 operator=(dynamic_cast<const LOCA::Hopf::ComplexMultiVector&>(y));
00107 return *this;
00108 }
00109
00110 LOCA::Hopf::ComplexMultiVector&
00111 LOCA::Hopf::ComplexMultiVector::operator=(
00112 const LOCA::Hopf::ComplexMultiVector& y)
00113 {
00114 LOCA::Extended::MultiVector::operator=(y);
00115 return *this;
00116 }
00117
00118 Teuchos::RCP<NOX::Abstract::MultiVector>
00119 LOCA::Hopf::ComplexMultiVector::clone(NOX::CopyType type) const
00120 {
00121 return
00122 Teuchos::rcp(new LOCA::Hopf::ComplexMultiVector(*this, type));
00123 }
00124
00125 Teuchos::RCP<NOX::Abstract::MultiVector>
00126 LOCA::Hopf::ComplexMultiVector::clone(int numvecs) const
00127 {
00128 return
00129 Teuchos::rcp(new LOCA::Hopf::ComplexMultiVector(*this, numvecs));
00130 }
00131
00132 Teuchos::RCP<NOX::Abstract::MultiVector>
00133 LOCA::Hopf::ComplexMultiVector::subCopy(const vector<int>& index) const
00134 {
00135 return
00136 Teuchos::rcp(new LOCA::Hopf::ComplexMultiVector(*this, index, false));
00137 }
00138
00139 Teuchos::RCP<NOX::Abstract::MultiVector>
00140 LOCA::Hopf::ComplexMultiVector::subView(const vector<int>& index) const
00141 {
00142 return
00143 Teuchos::rcp(new LOCA::Hopf::ComplexMultiVector(*this, index, true));
00144 }
00145
00146 Teuchos::RCP<const NOX::Abstract::MultiVector>
00147 LOCA::Hopf::ComplexMultiVector::getRealMultiVec() const
00148 {
00149 return LOCA::Extended::MultiVector::getMultiVector(0);
00150 }
00151
00152 Teuchos::RCP<NOX::Abstract::MultiVector>
00153 LOCA::Hopf::ComplexMultiVector::getRealMultiVec()
00154 {
00155 return LOCA::Extended::MultiVector::getMultiVector(0);
00156 }
00157
00158 Teuchos::RCP<const NOX::Abstract::MultiVector>
00159 LOCA::Hopf::ComplexMultiVector::getImagMultiVec() const
00160 {
00161 return LOCA::Extended::MultiVector::getMultiVector(1);
00162 }
00163
00164 Teuchos::RCP<NOX::Abstract::MultiVector>
00165 LOCA::Hopf::ComplexMultiVector::getImagMultiVec()
00166 {
00167 return LOCA::Extended::MultiVector::getMultiVector(1);
00168 }
00169
00170 LOCA::Hopf::ComplexMultiVector::ComplexMultiVector(
00171 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00172 int nColumns) :
00173 LOCA::Extended::MultiVector(global_data, nColumns, 2, 0)
00174 {
00175 }
00176
00177 Teuchos::RCP<LOCA::Extended::Vector>
00178 LOCA::Hopf::ComplexMultiVector::generateVector(int nVecs,
00179 int nScalarRows) const
00180 {
00181 return
00182 Teuchos::rcp(new LOCA::Hopf::ComplexVector(globalData));
00183 }
00184
00185 Teuchos::RCP<LOCA::Hopf::ComplexVector>
00186 LOCA::Hopf::ComplexMultiVector::getColumn(int i)
00187 {
00188 return Teuchos::rcp_dynamic_cast<LOCA::Hopf::ComplexVector>(getVector(i),true);
00189 }
00190
00191 Teuchos::RCP<const LOCA::Hopf::ComplexVector>
00192 LOCA::Hopf::ComplexMultiVector::getColumn(int i) const
00193 {
00194 return Teuchos::rcp_dynamic_cast<const LOCA::Hopf::ComplexVector>(getVector(i),true);
00195 }