00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2001, 2002, 2003 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: ThreadStaticCenter.cpp,v 1.11 2008/03/10 21:58:10 delpinux Exp $ 00019 00020 #include <ThreadStaticCenter.hpp> 00021 #include <ThreadStaticBase.hpp> 00022 00023 #include <StreamCenter.hpp> 00024 #include <Console.hpp> 00025 00026 // language utils 00027 #include <VariableLexerRepository.hpp> 00028 #include <VariableRepository.hpp> 00029 00030 // reader utils 00031 #include <XMLFileReader.hpp> 00032 00033 // Quadrarure formulae 00034 #include <QuadratureFormula.hpp> 00035 #include <GaussLobattoManager.hpp> 00036 00037 // Finite elements 00038 #include <Q0HexahedronFiniteElement.hpp> 00039 #include <Q1HexahedronFiniteElement.hpp> 00040 #include <Q2HexahedronFiniteElement.hpp> 00041 00042 #include <P0TetrahedronFiniteElement.hpp> 00043 #include <P1TetrahedronFiniteElement.hpp> 00044 #include <P2TetrahedronFiniteElement.hpp> 00045 00046 #include <Q0Quadrangle3DFiniteElement.hpp> 00047 #include <Q1Quadrangle3DFiniteElement.hpp> 00048 #include <Q2Quadrangle3DFiniteElement.hpp> 00049 00050 #include <P0Triangle3DFiniteElement.hpp> 00051 #include <P1Triangle3DFiniteElement.hpp> 00052 #include <P2Triangle3DFiniteElement.hpp> 00053 00054 #include <SolverInformationCenter.hpp> 00055 00056 #include <config.h> 00057 00058 #ifdef HAVE_PTHREAD 00059 #include <pthread.h> 00060 #endif // HAVE_PTHREAD 00061 00062 #include <ReferenceCounting.hpp> 00063 00064 #include <Information.hpp> 00065 #include <ParameterCenter.hpp> 00066 #include <DegreeOfFreedomSetManager.hpp> 00067 #include <NormalManager.hpp> 00068 00069 ThreadStaticCenter:: 00070 ThreadStaticCenter() 00071 { 00072 Console::create(); 00073 StreamCenter::create(); 00074 00075 ReferenceCountingCenter::create(); 00076 00078 QuadratureFormulaP0Tetrahedron::create(); 00079 QuadratureFormulaQ0Hexahedron::create(); 00080 QuadratureFormulaP1Tetrahedron::create(); 00081 QuadratureFormulaQ1Hexahedron::create(); 00082 QuadratureFormulaP2Tetrahedron::create(); 00083 QuadratureFormulaQ2Hexahedron::create(); 00084 00085 QuadratureFormulaP0Triangle3D::create(); 00086 QuadratureFormulaQ0Quadrangle3D::create(); 00087 QuadratureFormulaP1Triangle3D::create(); 00088 QuadratureFormulaQ1Quadrangle3D::create(); 00089 QuadratureFormulaP2Triangle3D::create(); 00090 QuadratureFormulaQ2Quadrangle3D::create(); 00091 00092 GaussLobattoManager::create(); 00093 00095 P0TetrahedronFiniteElement::create(); 00096 Q0HexahedronFiniteElement::create(); 00097 P1TetrahedronFiniteElement::create(); 00098 Q1HexahedronFiniteElement::create(); 00099 P2TetrahedronFiniteElement::create(); 00100 Q2HexahedronFiniteElement::create(); 00101 00102 P0Triangle3DFiniteElement::create(); 00103 Q0Quadrangle3DFiniteElement::create(); 00104 P1Triangle3DFiniteElement::create(); 00105 Q1Quadrangle3DFiniteElement::create(); 00106 P2Triangle3DFiniteElement::create(); 00107 Q2Quadrangle3DFiniteElement::create(); 00108 00109 // file utils 00110 XMLFileReader::create(); 00111 00113 Information::create(); 00114 ParameterCenter::create(); 00115 DegreeOfFreedomSetManager::create(); 00116 NormalManager::create(); 00117 00119 VariableLexerRepository::create(); 00120 VariableRepository::create(); 00121 00122 // Solver information manager 00123 SolverInformationCenter::create(); 00124 } 00125 00126 ThreadStaticCenter:: 00127 ~ThreadStaticCenter() 00128 { 00129 // Solver information manager 00130 SolverInformationCenter::destroy(); 00131 00133 VariableRepository::destroy(); 00134 VariableLexerRepository::destroy(); 00135 00136 NormalManager::destroy(); 00137 DegreeOfFreedomSetManager::destroy(); 00139 ParameterCenter::destroy(); 00140 Information::destroy(); 00141 00142 // file utils 00143 XMLFileReader::destroy(); 00144 00146 Q2HexahedronFiniteElement::destroy(); 00147 P2TetrahedronFiniteElement::destroy(); 00148 Q1HexahedronFiniteElement::destroy(); 00149 P1TetrahedronFiniteElement::destroy(); 00150 Q0HexahedronFiniteElement::destroy(); 00151 P0TetrahedronFiniteElement::destroy(); 00152 00153 Q2Quadrangle3DFiniteElement::destroy(); 00154 P2Triangle3DFiniteElement::destroy(); 00155 Q1Quadrangle3DFiniteElement::destroy(); 00156 P1Triangle3DFiniteElement::destroy(); 00157 Q0Quadrangle3DFiniteElement::destroy(); 00158 P0Triangle3DFiniteElement::destroy(); 00159 00161 GaussLobattoManager::destroy(); 00162 00163 QuadratureFormulaQ2Hexahedron::destroy(); 00164 QuadratureFormulaP2Tetrahedron::destroy(); 00165 QuadratureFormulaP1Tetrahedron::destroy(); 00166 QuadratureFormulaQ1Hexahedron::destroy(); 00167 QuadratureFormulaP0Tetrahedron::destroy(); 00168 QuadratureFormulaQ0Hexahedron::destroy(); 00169 00170 QuadratureFormulaQ2Quadrangle3D::destroy(); 00171 QuadratureFormulaP2Triangle3D::destroy(); 00172 QuadratureFormulaQ1Quadrangle3D::destroy(); 00173 QuadratureFormulaP1Triangle3D::destroy(); 00174 QuadratureFormulaQ0Quadrangle3D::destroy(); 00175 QuadratureFormulaP0Triangle3D::destroy(); 00176 00177 ReferenceCountingCenter::destroy(); 00178 00179 StreamCenter::destroy(); 00180 Console::destroy(); 00181 }
1.5.6