MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
volume.h
1//
2// volume.h
3//
4// Copyright (C) 1996 Limit Point Systems, Inc.
5//
6// Author: Curtis Janssen <cljanss@limitpt.com>
7// Maintainer: LPS
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _math_isosurf_volume_h
29#define _math_isosurf_volume_h
30
31#include <math/optimize/function.h>
32#include <math/scmat/matrix.h>
33#include <math/scmat/vector3.h>
34
35namespace sc {
36
38class Volume: public Function {
39 private:
40 double _interp_acc;
41 protected:
42 double& interpolation_accuracy();
43
44 virtual void compute() = 0;
45
46 virtual void failure(const char*);
47 public:
48 Volume();
49 Volume(const Ref<KeyVal>&);
50 ~Volume();
51
52 void set_gradient(const SCVector3& g);
53 void set_gradient(RefSCVector& g);
54 void get_gradient(SCVector3& g);
55 void set_x(const SCVector3& x);
56 void set_x(const RefSCVector& x);
57 void get_x(SCVector3& x);
58
59 // find the corners of a bounding box which approximately
60 // contains all points with a value between valuemin and valuemax
61 // the result must satisfy p1[i] < p2[i]
62 virtual void boundingbox(double valuemin,
63 double valuemax,
64 SCVector3& p1, SCVector3& p2) = 0;
65
66 virtual void interpolate(const SCVector3& p1,
67 const SCVector3& p2,
68 double value,
69 SCVector3& result);
70 virtual void solve(const SCVector3& p,
71 const SCVector3& grad,
72 double value,
73 SCVector3& result);
74};
75
76}
77
78#ifdef INLINE_FUNCTIONS
79#include <math/isosurf/volume_i.h>
80#endif
81
82#endif
83
84// Local Variables:
85// mode: c++
86// c-file-style: "CLJ"
87// End:
The Function class is an abstract base class that, given a set of coordinates, will compute a value a...
Definition function.h:44
virtual double value()
Return the value of the function.
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition matrix.h:55
A template class that maintains references counts.
Definition ref.h:361
a 3-element version of SCVector
Definition vector3.h:44
A Volume is a Function of three variables.
Definition volume.h:38
virtual void compute()=0
Recompute at least the results that have compute true and are not already computed.
void set_x(const RefSCVector &x)
Set and retrieve the coordinate values.
Contains all MPQC code up to version 3.
Definition mpqcin.h:14

Generated at Wed Sep 25 2024 02:45:30 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.