00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MATRIX_MANAGEMENT_HPP
00021 #define MATRIX_MANAGEMENT_HPP
00022
00023 #include <cctype>
00024
00025 #include <ReferenceCounting.hpp>
00026 #include <ParametrizableObject.hpp>
00027
00028 #include <SurfaceMesh.hpp>
00029
00030 #include <ErrorHandler.hpp>
00031
00032 class BaseMatrix;
00033 class BaseVector;
00034
00035 class MemoryRepository
00036 {
00037 private:
00038 std::map<int, ReferenceCounting<BaseMatrix> > __matrices;
00039 public:
00040
00041 void store(int i,ReferenceCounting<BaseMatrix>& matrix);
00042
00043 ReferenceCounting<BaseMatrix>& getMatrix(int i);
00044
00045 bool stored(int i) const;
00046
00047 ~MemoryRepository()
00048 {
00049 ;
00050 }
00051 };
00052
00053 #warning REARANGE AND RENAME THIS FILE.
00054
00055 class Structured3DMesh;
00056 class PDESystem;
00057
00058 extern MemoryRepository *memoryRepository;
00059
00060 #include <GetParameter.hpp>
00061 #include <MemoryManagerOptions.hpp>
00062
00063 class MemoryManager
00064 {
00065 private:
00066 MemoryRepository& __mr;
00067
00068 GetParameter<MemoryManagerOptions> __options;
00069 public:
00070 bool ReserveMatrix(ReferenceCounting<BaseMatrix>& A,
00071 const size_t dimension,
00072 const size_t nbDegreeOfFreefom);
00073
00074 void ReserveVector(ReferenceCounting<BaseVector>& b,
00075 const size_t dimension,
00076 const size_t nbDegreeOfFreefom);
00077
00078 MemoryManager()
00079 : __mr(*memoryRepository)
00080 {
00081 ;
00082 }
00083 };
00084
00085 #include <Vector.hpp>
00086 #include <DoubleHashedMatrix.hpp>
00087
00088 #include <Index.hpp>
00089 #include <Dirichlet.hpp>
00090 #include <PDEProblem.hpp>
00091
00092 #include <Structured3DMesh.hpp>
00093 class BoundaryConditionSurfaceMeshAssociation;
00094
00095 template<class VectType>
00096 void computesDirichletMatrix(DoubleHashedMatrix& DM,
00097 const DoubleHashedMatrix& A,
00098 const PDEProblem& pdePb,
00099 BoundaryConditionSurfaceMeshAssociation& bcMeshAssociation,
00100 const Structured3DMesh& SMesh)
00101 {
00102 throw ErrorHandler(__FILE__,__LINE__,
00103 "not implemented",
00104 ErrorHandler::unexpected);
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160 }
00161
00162 #endif // MATRIX_MANAGEMENT_HPP