SCIRun  5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StreamLineIntegrators.h
Go to the documentation of this file.
1 /*
2  For more information, please see: http://software.sci.utah.edu
3 
4  The MIT License
5 
6  Copyright (c) 2009 Scientific Computing and Imaging Institute,
7  University of Utah.
8 
9 
10  Permission is hereby granted, free of charge, to any person obtaining a
11  copy of this software and associated documentation files (the "Software"),
12  to deal in the Software without restriction, including without limitation
13  the rights to use, copy, modify, merge, publish, distribute, sublicense,
14  and/or sell copies of the Software, and to permit persons to whom the
15  Software is furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included
18  in all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26  DEALINGS IN THE SOFTWARE.
27 */
28 
29 
30 // File : StreamLineIntergrators.h
31 // Author : Allen R. Sanderson
32 // Date : July 2006
33 
34 
35 #ifndef CORE_ALGORITHMS_FIELDS_STREAMLINES_STREAMLINEINTEGRATORS_H
36 #define CORE_ALGORITHMS_FIELDS_STREAMLINES_STREAMLINEINTEGRATORS_H 1
37 
38 #include <string>
39 #include <vector>
40 
41 #include <Core/Datatypes/Field.h>
42 #include <Core/Geometry/Point.h>
43 #include <Core/Geometry/Vector.h>
44 
45 #include <Core/Algorithms/Fields/share.h>
46 
47 namespace SCIRunAlgo {
48 
49 using namespace SCIRun;
50 
52 {
53 public:
54  void FindAdamsBashforth();
55  void FindAdamsMoulton();
56  void FindHeun();
57  void FindRK4();
58  void FindRKF();
59 
60  int ComputeRKFTerms(Vector v[6], // storage for terms
61  const Point &p, // previous point
62  double s ); // current step size
63 
64  void integrate( unsigned int method );
65 
66 protected:
67  inline bool interpolate( const Point &p, Vector &v);
68 
69 public:
70  Point seed_; // initial point
71  double tolerance2_; // square error tolerance
72  double step_size_; // initial step size
73  unsigned int max_steps_; // max number of steps
74  VField* vfield_; // the field
75 
76  std::vector<Point> nodes_; // storage for points
77 };
78 
79 } // End namespace SCIRun
80 
81 #endif
82 
unsigned int max_steps_
Definition: StreamLineIntegrators.h:73
Definition: StreamLineIntegrators.h:51
std::vector< Point > nodes_
Definition: StreamLineIntegrators.h:76
Definition: Point.h:49
#define SCISHARE
Definition: share.h:39
Point seed_
Definition: StreamLineIntegrators.h:70
Definition: Vector.h:63
double step_size_
Definition: StreamLineIntegrators.h:72
v
Definition: readAllFields.py:42
double tolerance2_
Definition: StreamLineIntegrators.h:71
Definition: VField.h:46
VField * vfield_
Definition: StreamLineIntegrators.h:74