~chaffra/+junk/trilinos

« back to all changes in this revision

Viewing changes to packages/nox/src-loca/src/LOCA_TurningPoint_MinimallyAugmented_Constraint.H

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme, Johannes Ring
  • Date: 2009-12-13 12:53:22 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091213125322-in0nrdjc55deqsw9
Tags: 10.0.3.dfsg-1
[Christophe Prud'homme]
* New upstream release

[Johannes Ring]
* debian/patches/libname.patch: Add prefix 'libtrilinos_' to all
  libraries. 
* debian/patches/soname.patch: Add soversion to libraries.
* debian/watch: Update download URL.
* debian/control:
  - Remove python-numeric from Build-Depends (virtual package).
  - Remove automake and autotools from Build-Depends and add cmake to
    reflect switch to CMake.
  - Add python-support to Build-Depends.
* debian/rules: 
  - Cleanup and updates for switch to CMake.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: LOCA_TurningPoint_MinimallyAugmented_Constraint.H,v 1.6 2007/06/21 16:22:52 rhoope Exp $
2
 
// $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/LOCA_TurningPoint_MinimallyAugmented_Constraint.H,v $
 
1
// $Id$
 
2
// $Source$
3
3
 
4
4
//@HEADER
5
5
// ************************************************************************
32
32
// Eric Phipps (etphipp@sandia.gov), Sandia National Laboratories.
33
33
// ************************************************************************
34
34
//  CVS Information
35
 
//  $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/LOCA_TurningPoint_MinimallyAugmented_Constraint.H,v $
36
 
//  $Author: rhoope $
37
 
//  $Date: 2007/06/21 16:22:52 $
38
 
//  $Revision: 1.6 $
 
35
//  $Source$
 
36
//  $Author$
 
37
//  $Date$
 
38
//  $Revision$
39
39
// ************************************************************************
40
40
//@HEADER
41
41
 
59
59
  namespace BorderedSolver {
60
60
    class AbstractStrategy;
61
61
  }
 
62
  namespace TimeDependent {
 
63
    class AbstractGroup;
 
64
  }
62
65
}
63
66
 
64
67
namespace LOCA { 
119
122
       * The class is intialized via the \c tpParams parameter list argument 
120
123
       * to the constructor.  The parameters this class recognizes are:
121
124
       * <ul>
 
125
       * <li> "Symmetric Jacobian"  -- [bool] (default: false) - 
 
126
       *    Flag indicating whether Jacobian matrix \f$J\f$ is symmetric,
 
127
       *    in which case we force \f$a = b\f$ and therefore the second
 
128
       *    tranpose solve for \f$w\f$ is unnecessary
 
129
       * <li> "Initial Null Vector Compuation" -- [string] 
 
130
       *      (default: "User Provided") - Method to compute initial \f$a\f$ 
 
131
       *      and \f$b\f$ vectors.  Valid choices are:
 
132
       *      <ul>
 
133
       *      <li> "User Provided" - Initial vectors are provided in the
 
134
       *           parameter list, in which case the following parameters
 
135
       *           are relevant:
 
136
       *           <ul>
 
137
       *           <li> "Initial A Vector"  -- 
 
138
       *                [Teuchos::RCP<NOX::Abstract::Vector>] 
 
139
       *                (Must be supplied) - 
 
140
       *                 Vector storing initial value for \f$a\f$ vector
 
141
       *           <li> "Initial B Vector"  -- 
 
142
       *                 [Teuchos::RCP<NOX::Abstract::Vector>] 
 
143
       *                 (Must be supplied for nonsymmetric Jacobians) - 
 
144
       *                 Vector storing initial value for \f$b\f$ vector
 
145
       *           </ul>
 
146
       *      <li> "Solve df/dp" - Compute \f$a = J^{-T}df/dp\f$ and 
 
147
       *           \f$b = J^{-1} df/dp\f$ where \f$p\f$ is the bifurcation
 
148
       *           parameter.
 
149
       *      <li> "Constant" - Entries of \f$a\f$ and \f$b\f$ are set to 1.0
 
150
       *      </ul>
 
151
       * <li> "Null Vector Scaling" -- [string] (default:  "Order N") - 
 
152
       *      Method to scale \f$a\f$ and \f$b\f$.  This determines the norm of
 
153
       *      these vectors and the scaling of \f$\sigma\f$.  Valid choices are:
 
154
       *      <ul>
 
155
       *      <li> "None" -- Use initial scaling
 
156
       *      <li> "Order 1" -- Scale to unit norm
 
157
       *      <li> "Order N" -- Use vector length scaling
 
158
       *      </ul>
122
159
       * <li> "Update Null Vectors Every Continuation Step"  -- 
123
160
       *    [bool] (default: true) - 
124
161
       *    Flag indicating whether to update \f$a\f$ and \f$b\f$ vectors via
127
164
       *    [bool] (default: false) - 
128
165
       *    Flag indicating whether to update \f$a\f$ and \f$b\f$ vectors via
129
166
       *    \f$a = w\f$ and \f$b = v\f$ every nonlinear iteration
 
167
       * <li> "Multiply Null Vectors by Mass Matrix"  -- 
 
168
       *    [bool] (default: false) - 
 
169
       *    Flag indicating whether to multiply \f$a\f$ and \f$b\f$ vectors by
 
170
       *    the mass matrix \f$M = \partial f/\partial\dot{x}\f$ at the strart
 
171
       *    of a turning point calculation, and each time \f$a\f$ and \f$b\f$
 
172
       *    are updated.  This can improve the scaling of these vectors, and
 
173
       *    may orthogonalize them against structural null spaces (i.e., 
 
174
       *    pressure null space for incompressible Navier-Stokes).
130
175
       * </ul>
131
176
       */
132
177
      class Constraint : 
140
185
         const Teuchos::RCP<LOCA::Parameter::SublistParser>& topParams,
141
186
         const Teuchos::RCP<Teuchos::ParameterList>& tpParams,
142
187
         const Teuchos::RCP<LOCA::TurningPoint::MinimallyAugmented::AbstractGroup>& g,
143
 
         bool is_symmetric,
144
 
         const NOX::Abstract::Vector& a,
145
 
         const NOX::Abstract::Vector* b,
146
188
         int bif_param);
147
189
 
148
190
        //! Copy constructor
168
210
        virtual Teuchos::RCP<const NOX::Abstract::Vector>
169
211
        getRightNullVec() const;
170
212
 
 
213
        //! Returns a vector
 
214
        virtual Teuchos::RCP<const NOX::Abstract::Vector>
 
215
        getAVec() const;
 
216
 
 
217
        //! Returns b vector
 
218
        virtual Teuchos::RCP<const NOX::Abstract::Vector>
 
219
        getBVec() const;
 
220
 
171
221
        //! Returns sigma
172
222
        virtual double getSigma() const;
173
223
 
251
301
 
252
302
        //@}
253
303
 
 
304
      protected:
 
305
 
 
306
        //! Enumerated type determining type of scaling
 
307
        enum NullVectorScaling {
 
308
          NVS_None,      //! No scaling
 
309
          NVS_OrderOne,  //! Scale to O(1)
 
310
          NVS_OrderN     //! Scale to O(N) when N is the vector length
 
311
        };
 
312
 
 
313
        //! Scale a & b vectors
 
314
        virtual void scaleNullVectors(NOX::Abstract::Vector& a,
 
315
                                      NOX::Abstract::Vector& b);
 
316
 
 
317
        //! Get initial a & b vectors
 
318
        virtual void getInitialVectors(NOX::Abstract::Vector& a,
 
319
                                       NOX::Abstract::Vector& b);
 
320
 
254
321
      private:
255
322
 
256
323
        //! Prohibit generation and use of operator=()
285
352
        //! Stores J*v
286
353
        Teuchos::RCP<NOX::Abstract::MultiVector> Jv_vector;
287
354
 
 
355
        //! Stores J^T*w
 
356
        Teuchos::RCP<NOX::Abstract::MultiVector> Jtw_vector;
 
357
 
288
358
        //! Stores sigma_x
289
359
        Teuchos::RCP<NOX::Abstract::MultiVector> sigma_x;
290
360
 
326
396
         */
327
397
        bool updateVectorsEveryIteration;
328
398
 
 
399
        //! Null vector scaling method
 
400
        NullVectorScaling nullVecScaling;
 
401
 
 
402
        //! Multiply null vectors by mass matrix
 
403
        bool multiplyMass;
 
404
 
 
405
        //! Time dependent group interface for multiplying by mass matrix
 
406
        Teuchos::RCP<LOCA::TimeDependent::AbstractGroup> tdGrp;
 
407
 
 
408
        //! Temporary vector for mulplying null vectors by mass matrix
 
409
        Teuchos::RCP<NOX::Abstract::Vector> tmp_mass;
 
410
 
329
411
      }; // Class Constraint
330
412
 
331
413
    } // namespace MinimallyAugmented