00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2001-2005 Stéphane Del Pino 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: ScalarDegreeOfFreedomPositionsSet.hpp,v 1.2 2007/08/02 23:11:53 delpinux Exp $ 00019 00020 #ifndef SCALAR_DEGREE_OF_FREEDOM_POSITIONS_SET_HPP 00021 #define SCALAR_DEGREE_OF_FREEDOM_POSITIONS_SET_HPP 00022 00023 #include <ScalarDiscretizationTypeBase.hpp> 00024 #include <Mesh.hpp> 00025 #include <Connectivity.hpp> 00026 00039 class ScalarDegreeOfFreedomPositionsSet 00040 { 00041 private: 00042 Vector<TinyVector<3,real_t> > 00043 __positions; 00045 Vector<size_t> __dofNumber; 00048 size_t __numberOfDOFPerCell; 00051 class Builder; 00052 friend class Builder; 00053 00061 void __build(const ScalarDiscretizationTypeBase& discretizationType, 00062 const Mesh& mesh); 00063 00064 public: 00072 const TinyVector<3,real_t>& 00073 vertex(const size_t& i) const 00074 { 00075 return __positions[i]; 00076 } 00077 00084 const size_t& operator()(const size_t& cellNumber, 00085 const size_t& localDOFNumber) const 00086 { 00087 return __dofNumber[cellNumber*__numberOfDOFPerCell + localDOFNumber]; 00088 } 00089 00095 const size_t& number() const 00096 { 00097 return __positions.size(); 00098 } 00099 00106 ScalarDegreeOfFreedomPositionsSet(const ScalarDiscretizationTypeBase& discretizationType, 00107 const Mesh& mesh) 00108 { 00109 this->__build(discretizationType, mesh); 00110 } 00111 00116 ~ScalarDegreeOfFreedomPositionsSet() 00117 { 00118 ; 00119 } 00120 }; 00121 00122 #endif // SCALAR_DEGREE_OF_FREEDOM_POSITIONS_SET_HPP
1.5.6