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 #ifndef LOCA_TURNINGPOINT_MINIMALLYAUGMENTED_CONSTRAINT_H
00043 #define LOCA_TURNINGPOINT_MINIMALLYAUGMENTED_CONSTRAINT_H
00044
00045 #include "LOCA_MultiContinuation_ConstraintInterfaceMVDX.H"
00046 #include "NOX_Abstract_MultiVector.H"
00047
00048
00049 namespace LOCA {
00050 class GlobalData;
00051 namespace Parameter {
00052 class SublistParser;
00053 }
00054 namespace TurningPoint {
00055 namespace MinimallyAugmented {
00056 class AbstractGroup;
00057 }
00058 }
00059 namespace BorderedSolver {
00060 class AbstractStrategy;
00061 }
00062 }
00063
00064 namespace LOCA {
00065
00066 namespace TurningPoint {
00067
00068 namespace MinimallyAugmented {
00069
00132 class Constraint :
00133 public LOCA::MultiContinuation::ConstraintInterfaceMVDX {
00134
00135 public:
00136
00138 Constraint(
00139 const Teuchos::RCP<LOCA::GlobalData>& global_data,
00140 const Teuchos::RCP<LOCA::Parameter::SublistParser>& topParams,
00141 const Teuchos::RCP<Teuchos::ParameterList>& tpParams,
00142 const Teuchos::RCP<LOCA::TurningPoint::MinimallyAugmented::AbstractGroup>& g,
00143 bool is_symmetric,
00144 const NOX::Abstract::Vector& a,
00145 const NOX::Abstract::Vector* b,
00146 int bif_param);
00147
00149 Constraint(const Constraint& source,
00150 NOX::CopyType type = NOX::DeepCopy);
00151
00153 virtual ~Constraint();
00154
00156
00161 virtual void setGroup(const Teuchos::RCP<LOCA::TurningPoint::MinimallyAugmented::AbstractGroup>& g);
00162
00164 virtual Teuchos::RCP<const NOX::Abstract::Vector>
00165 getLeftNullVec() const;
00166
00168 virtual Teuchos::RCP<const NOX::Abstract::Vector>
00169 getRightNullVec() const;
00170
00172 virtual double getSigma() const;
00173
00179
00181 virtual void
00182 copy(const LOCA::MultiContinuation::ConstraintInterface& source);
00183
00185 virtual
00186 Teuchos::RCP<LOCA::MultiContinuation::ConstraintInterface>
00187 clone(NOX::CopyType type = NOX::DeepCopy) const;
00188
00190 virtual int numConstraints() const;
00191
00193 virtual void setX(const NOX::Abstract::Vector& y);
00194
00196 virtual void setParam(int paramID, double val);
00197
00199 virtual void setParams(
00200 const vector<int>& paramIDs,
00201 const NOX::Abstract::MultiVector::DenseMatrix& vals);
00202
00204 virtual NOX::Abstract::Group::ReturnType
00205 computeConstraints();
00206
00208 virtual NOX::Abstract::Group::ReturnType
00209 computeDX();
00210
00212
00217 virtual NOX::Abstract::Group::ReturnType
00218 computeDP(const vector<int>& paramIDs,
00219 NOX::Abstract::MultiVector::DenseMatrix& dgdp,
00220 bool isValidG);
00221
00223 virtual bool isConstraints() const;
00224
00226 virtual bool isDX() const;
00227
00229 virtual const NOX::Abstract::MultiVector::DenseMatrix&
00230 getConstraints() const;
00231
00233 virtual const NOX::Abstract::MultiVector*
00234 getDX() const;
00235
00240 virtual bool isDXZero() const;
00241
00243
00248 virtual void
00249 postProcessContinuationStep(
00250 LOCA::Abstract::Iterator::StepStatus stepStatus);
00251
00253
00254 private:
00255
00257 Constraint& operator=(const Constraint& source);
00258
00259 protected:
00260
00262 Teuchos::RCP<LOCA::GlobalData> globalData;
00263
00265 Teuchos::RCP<LOCA::Parameter::SublistParser> parsedParams;
00266
00268 Teuchos::RCP<Teuchos::ParameterList> turningPointParams;
00269
00271 Teuchos::RCP<LOCA::TurningPoint::MinimallyAugmented::AbstractGroup> grpPtr;
00272
00274 Teuchos::RCP<NOX::Abstract::MultiVector> a_vector;
00275
00277 Teuchos::RCP<NOX::Abstract::MultiVector> b_vector;
00278
00280 Teuchos::RCP<NOX::Abstract::MultiVector> w_vector;
00281
00283 Teuchos::RCP<NOX::Abstract::MultiVector> v_vector;
00284
00286 Teuchos::RCP<NOX::Abstract::MultiVector> Jv_vector;
00287
00289 Teuchos::RCP<NOX::Abstract::MultiVector> sigma_x;
00290
00292 NOX::Abstract::MultiVector::DenseMatrix constraints;
00293
00295 Teuchos::RCP<LOCA::BorderedSolver::AbstractStrategy> borderedSolver;
00296
00298 double dn;
00299
00301 double sigma_scale;
00302
00306 bool isSymmetric;
00307
00309 bool isValidConstraints;
00310
00312 bool isValidDX;
00313
00315 vector<int> bifParamID;
00316
00321 bool updateVectorsEveryContinuationStep;
00322
00327 bool updateVectorsEveryIteration;
00328
00329 };
00330
00331 }
00332
00333 }
00334
00335 }
00336
00337 #endif // LOCA_MULTICONTINUATION_ARCLENGTHCONSTRAINT_H