//=========================================================================== // GoTools Core - SINTEF Geometry Tools Core library, version 2.0.1 // // Copyright (C) 2000-2007, 2010 SINTEF ICT, Applied Mathematics, Norway. // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation version 2 of the License. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., // 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. // // Contact information: E-mail: tor.dokken@sintef.no // SINTEF ICT, Department of Applied Mathematics, // P.O. Box 124 Blindern, // 0314 Oslo, Norway. // // Other licenses are also available for this software, notably licenses // for: // - Building commercial software. // - Building software whose source code you wish to keep private. //=========================================================================== 00015 #ifndef _CONSTRAINTDEFINITIONS_H 00016 #define _CONSTRAINTDEFINITIONS_H 00017 00018 #include <vector> 00019 00020 00021 namespace Go 00022 { 00023 00029 typedef struct sideConstraint 00030 { 00031 int dim_; // Dimension of coefficient (max 3). 00032 // For each coefficient involved in the constraint, the 00033 // index of the coefficient is given and the factor corresponding 00034 // to the coefficient in the equation. 00035 std::vector<std::pair<int, double> > factor_; 00036 double constant_term_[3]; // The constant term in the current equation. 00037 } sideConstraint; 00038 00039 00045 typedef struct sideConstraintSet 00046 { 00047 int dim_; // Dimension of coefficient (max 3). 00048 // For each coefficient involved in the constraint, the index 00049 // of the surface, the index of the coefficient and the 00050 // factor corresponding to the coefficient in the equation is given. 00051 std::vector<std::pair<std::pair<int,int>, double> > factor_; 00052 // The constant term in the current equation, on the right side of the 00053 // equation. For dim < 3 not all elements are used. 00054 double constant_term_[3]; 00056 sideConstraintSet() 00057 { 00058 dim_ = 3; 00059 constant_term_[0] = constant_term_[1] = constant_term_[2] = 0.0; 00060 } 00061 00064 sideConstraintSet(int dim) 00065 { 00066 dim_ = dim; 00067 constant_term_[0] = constant_term_[1] = constant_term_[2] = 0.0; 00068 } 00069 } sideConstraintSet; 00070 00071 } 00072 00073 #endif // _CONSTRAINTDEFINITIONS_H 00074