Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
includeLinks/ConjugateGradient.hpp
Go to the documentation of this file.
1 /* *****************************************************************
2  MESQUITE -- The Mesh Quality Improvement Toolkit
3 
4  Copyright 2004 Sandia Corporation and Argonne National
5  Laboratory. Under the terms of Contract DE-AC04-94AL85000
6  with Sandia Corporation, the U.S. Government retains certain
7  rights in this software.
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  (lgpl.txt) along with this library; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 
23  diachin2@llnl.gov, djmelan@sandia.gov, mbrewer@sandia.gov,
24  pknupp@sandia.gov, tleurent@mcs.anl.gov, tmunson@mcs.anl.gov
25 
26  ***************************************************************** */
37 #ifndef Mesquite_ConjugateGradient_hpp
38 #define Mesquite_ConjugateGradient_hpp
39 #include "Mesquite.hpp"
40 #include "VertexMover.hpp"
41 #include "ObjectiveFunction.hpp"
42 #include "MsqMeshEntity.hpp"
43 #include "PatchData.hpp"
44 #include "QualityImprover.hpp"
45 
46 
47 namespace Mesquite
48 {
49 
54  {
55  public:
57 
58  virtual ~ConjugateGradient();
59 
61  virtual void set_patch_type(PatchData::PatchType type, MsqError &err,
62  int patch_param1=0, int patch_param2=0);
65  void set_debugging_level(int new_lev)
66  {
67  conjGradDebug=new_lev;
68  }
69 
70  protected:
71 
73  virtual void initialize(PatchData &pd, MsqError &err);
74 
75  virtual void optimize_vertex_positions(PatchData &pd, MsqError &err);
76 
77  virtual void initialize_mesh_iteration(PatchData &pd, MsqError &err);
78 
79  virtual void terminate_mesh_iteration(PatchData &pd, MsqError &err);
80 
82  virtual void cleanup();
83 
85  double get_step(PatchData &pd, double f0,int &j, MsqError &err);
86 
88  //void cull_list(PatchData &pd, double beta, MsqError &err);
89 
90 
91 private:
96  int arraySize;
97  //just for debugging
99  };
100 
101 
102 
103 }
104 
105 #endif
void set_debugging_level(int new_lev)
Just for debugging purposes or for obtaining more data during the optimization process.
Optimizes the objective function using the Polack-Ribiere scheme.
Used to hold the error state and return it to the application.
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
double get_step(PatchData &pd, double f0, int &j, MsqError &err)
Returns the step distance to take in the search direction.
virtual void set_patch_type(PatchData::PatchType type, MsqError &err, int patch_param1=0, int patch_param2=0)
Set the patch type.
virtual void cleanup()
Delete arrays initially created in initialize().
PatchType
Tells MeshSet how to retrieve the mesh entities that will be stored in PatchData. ...
Vector3D * fGrad
Culls the vertex list free_vertex_list.
virtual void initialize(PatchData &pd, MsqError &err)
Initialize data for smoothing process.
j indices j
Definition: Indexing.h:6
Contains a copy of the coordinates of a PatchData.
Base class for concrete Objective Functions ObjectiveFunction contains a pointer to a QualityMetric...