Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

volume.h

00001 //
00002 // volume.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifndef _math_isosurf_volume_h
00029 #define _math_isosurf_volume_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <math/optimize/function.h>
00036 #include <math/scmat/matrix.h>
00037 #include <math/scmat/vector3.h>
00038 
00040 class Volume: public Function {
00041   private:
00042     double _interp_acc;
00043   protected:
00044     double& interpolation_accuracy();
00045 
00046     virtual void compute() = 0;
00047 
00048     virtual void failure(const char*);
00049   public:
00050     Volume();
00051     Volume(const Ref<KeyVal>&);
00052     ~Volume();
00053 
00054     void set_gradient(const SCVector3& g);
00055     void set_gradient(RefSCVector& g);
00056     void get_gradient(SCVector3& g);
00057     void set_x(const SCVector3& x);
00058     void set_x(const RefSCVector& x);
00059     void get_x(SCVector3& x);
00060 
00061     // find the corners of a bounding box which approximately
00062     // contains all points with a value between valuemin and valuemax
00063     // the result must satisfy p1[i] < p2[i]
00064     virtual void boundingbox(double valuemin,
00065                              double valuemax,
00066                              SCVector3& p1, SCVector3& p2) = 0;
00067 
00068     virtual void interpolate(const SCVector3& p1,
00069                              const SCVector3& p2,
00070                              double value,
00071                              SCVector3& result);
00072     virtual void solve(const SCVector3& p,
00073                        const SCVector3& grad,
00074                        double value,
00075                        SCVector3& result);
00076 };
00077 
00078 
00079 
00080 #ifdef INLINE_FUNCTIONS
00081 #include <math/isosurf/volume_i.h>
00082 #endif
00083 
00084 #endif
00085 
00086 // Local Variables:
00087 // mode: c++
00088 // c-file-style: "CLJ"
00089 // End:

Generated at Thu Oct 4 18:08:48 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.