#include <SearchCritical.h>
Inheritance diagram for SearchCritical:


Simply call the search() method to invoke Newton's method for finding roots. The roots will be stored in the fRoots list (found in Newton.h). You can also print out the found roots to stdout by calling the print() method. Also, since SearchCritical inherits NewtonClassify, you can classify all of the roots found by "search()" and get their eigenvalues and eigenvectors.
Definition at line 27 of file SearchCritical.h.
Public Member Functions | |
| SearchCritical () | |
| Default constructor. | |
| SearchCritical (Implicit *) | |
| Constructs an object containing critical points for a given Implicit. | |
| virtual void | setSurface (Implicit *) |
| Changes the surface to search. | |
| virtual Implicit * | getSurface () |
| Returns the current surface being searched. | |
| void | setBoxBounds (double) |
| Sets the internal value of the bounds for a cubic box. | |
| void | setBoxBounds (Box3d) |
| Sets the internal value of the bounds for a Box. | |
| Box3d | getBoxBounds () |
| Returns the current bounds for a Box for critical points. | |
| void | search () |
| Finds all of the critical points of the given surface. | |
| void | classify () |
| Classifies the critical points (eigen vectors/values). | |
| void | print () |
| Prints all critical points to stdout. | |
| void | display () |
| Displays all critical points in an OpenGL window. | |
Protected Member Functions | |
| virtual bool | NewtonPostProcess (Box< double > &X) |
| Overridden NewtonPostProcess method to try to prevent critical sets. | |
Protected Attributes | |
| Implicit * | surface |
| Find critical points for this Implicit surface. | |
Private Member Functions | |
| void | saveGLStateVariables () |
| Saves the OpenGL state variables which are changed by display() so they can be restored to their former values. | |
| void | restoreGLStateVariables () |
| Restores the previously saved OpenGL state variables which were modified within display(). | |
Private Attributes | |
| Box3d | theBoxBounds |
| GLfloat | savedPointSize |
| GLfloat | savedColor [5] |
| GLboolean | lightingOn |
| int | savedfMaxRoots |
| If we change fMaxRoots, save the original value for restoration. | |
| double | savedfSameTolerance |
| If we change fSameTolerance, save the original value for restoration. | |
|
|
Default constructor. This method isn't very useful since it sets the surface to be NULL which means that there is no surface for which to find critical points. This is just here so that you can declare a SearchCritical value without having to initialize it at the same time. Definition at line 16 of file SearchCritical.cpp. References setSurface(). |
|
|
Constructs an object containing critical points for a given Implicit. You MUST pass in an Implicit surface. This method assumes that you are going to use the standard 3D Newton solver when finding critical points.
Definition at line 27 of file SearchCritical.cpp. References CP_CUBE_BOUNDS, setSurface(), surf, and theBoxBounds. |
|
|
Classifies the critical points (eigen vectors/values). This is simply a convenience method to call classify(fRoots). Make sure that you have actually FOUND the roots before trying to classify them.
Definition at line 171 of file SearchCritical.cpp. References NewtonClassify::classify(), Newton::fRoots, and getSurface(). Referenced by CriticalPointInterrogator::findCriticalPoints(), and CriticalMesh::initialMesh(). |
|
|
Displays all critical points in an OpenGL window.
Definition at line 233 of file SearchCritical.cpp. References CP_MAX, CP_MIN, CP_POINT_SIZE, CP_SADDLE1, CP_SADDLE2, NewtonClassify::fKinds, Newton::fRoots, getSurface(), Newton::plIter, Implicit::proc(), restoreGLStateVariables(), and saveGLStateVariables(). |
|
|
Returns the current bounds for a Box for critical points.
Definition at line 89 of file SearchCritical.cpp. References theBoxBounds. Referenced by search(). |
|
|
Returns the current surface being searched. This method is virtual and should be overridden (along with setSurface(Implicit*)) to keep the surface variable consistent.
Reimplemented from NewtonClassify. Definition at line 54 of file SearchCritical.cpp. References surface. Referenced by classify(), display(), CriticalMesh::initialMesh(), print(), and search(). |
|
|
Overridden NewtonPostProcess method to try to prevent critical sets. This is pretty much a hack, but maybe it will help in the long run. We check to see if we have reached the maximum number of roots we want to store. If so, we first increase the size of the interval used for checking to see if two roots are the same, and then we double the number of allowable roots.
Reimplemented from Newton. Definition at line 106 of file SearchCritical.cpp. References Newton::fMaxRoots, Newton::fRoots, Newton::fSameTolerance, Newton::SameRoot(), savedfMaxRoots, savedfSameTolerance, and X. |
|
|
Prints all critical points to stdout. The first line lists the name of the Implicit object, and subsequent lines list the coordinates of the critical points. Definition at line 184 of file SearchCritical.cpp. References Newton::fRoots, Surface::getObjectName(), getSurface(), and Newton::plIter. |
|
|
Restores the previously saved OpenGL state variables which were modified within display().
Definition at line 223 of file SearchCritical.cpp. References lightingOn, savedColor, and savedPointSize. Referenced by display(). |
|
|
Saves the OpenGL state variables which are changed by display() so they can be restored to their former values.
Definition at line 212 of file SearchCritical.cpp. References lightingOn, savedColor, and savedPointSize. Referenced by display(). |
|
|
Finds all of the critical points of the given surface. Use this method to do the actual work of finding the critical points of the Implicit surface that you passed in at construction time. The resulting critical points will be stored in the fRoots list (found in Newton.h). If you change the parameters of your Implicit surface, you will have to completely redo the finding process. Definition at line 144 of file SearchCritical.cpp. References Newton::FindZeros(), Newton::fMaxRoots, Newton::fNewtonTolerance, Newton::fSameTolerance, getBoxBounds(), getSurface(), savedfMaxRoots, and savedfSameTolerance. Referenced by CriticalPointInterrogator::findCriticalPoints(), and CriticalMesh::initialMesh(). |
|
|
Sets the internal value of the bounds for a Box. You must pass in a positive value for this method to do anything.
Definition at line 80 of file SearchCritical.cpp. References theBoxBounds. |
|
|
Sets the internal value of the bounds for a cubic box. You must pass in a positive value for this method to do anything. The value you pass in the the length of a side of the box. So if you want a box with mincorner = (-1,-1,-1) and maxcorner = (1,1,1), you should pass in bounds = 2.
Definition at line 68 of file SearchCritical.cpp. References theBoxBounds. Referenced by CriticalPointInterrogator::findCriticalPoints(), and CriticalMesh::initialMesh(). |
|
|
Changes the surface to search. This method is called by the constructors to set up the private surface variable. It is also virtual and should be overridden (along with getSurface()) to keep the surface variable consistent.
Reimplemented from NewtonClassify. Definition at line 42 of file SearchCritical.cpp. Referenced by SearchCritical(). |
|
|
Definition at line 34 of file SearchCritical.h. Referenced by restoreGLStateVariables(), and saveGLStateVariables(). |
|
|
Definition at line 33 of file SearchCritical.h. Referenced by restoreGLStateVariables(), and saveGLStateVariables(). |
|
|
If we change fMaxRoots, save the original value for restoration.
Definition at line 36 of file SearchCritical.h. Referenced by NewtonPostProcess(), and search(). |
|
|
If we change fSameTolerance, save the original value for restoration.
Definition at line 38 of file SearchCritical.h. Referenced by NewtonPostProcess(), and search(). |
|
|
Definition at line 32 of file SearchCritical.h. Referenced by restoreGLStateVariables(), and saveGLStateVariables(). |
|
|
Find critical points for this Implicit surface.
Reimplemented from NewtonClassify. Definition at line 41 of file SearchCritical.h. Referenced by getSurface(), and setSurface(). |
|
|
Definition at line 31 of file SearchCritical.h. Referenced by getBoxBounds(), SearchCritical(), and setBoxBounds(). |
1.3.4