00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SOLVER_DRIVER_HPP
00022 #define SOLVER_DRIVER_HPP
00023
00024 #include <SolverDriverOptions.hpp>
00025 #include <GetParameter.hpp>
00026
00027 #include <DiscretizationType.hpp>
00028
00029 #include <Solution.hpp>
00030 #include <DegreeOfFreedomSet.hpp>
00031
00032 #include <Problem.hpp>
00033
00034 #include <Mesh.hpp>
00035
00045 class SolverDriver
00046 {
00047 public:
00048 enum MethodClass {
00049 fem,
00050 fictitiousFEM,
00051 spectral,
00052 fictitiousSpectral
00053 };
00054
00055 private:
00056
00057 ConstReferenceCounting<Problem> __p;
00058
00059 Solution& __u;
00060
00061 DiscretizationType __discretizationType;
00062
00063 ConstReferenceCounting<Mesh> __mesh;
00064
00065 const DegreeOfFreedomSet& __degreeOfFreedomSet;
00066 const MethodClass __methodClass;
00067
00068 SolverDriverOptions::MethodType __methodType;
00069
00070 GetParameter<SolverDriverOptions> __options;
00071 public:
00072
00073 SolverDriver(ConstReferenceCounting<Problem> aProblem,
00074 Solution& anUnknown,
00075 const DiscretizationType& discretizationType,
00076 ConstReferenceCounting<Mesh> aMesh,
00077 const DegreeOfFreedomSet& dof,
00078 const MethodClass methodClass)
00079 : __p(aProblem),
00080 __u(anUnknown),
00081 __discretizationType(discretizationType),
00082 __mesh(aMesh),
00083 __degreeOfFreedomSet(dof),
00084 __methodClass(methodClass)
00085 {
00086 __methodType = __options.value().type();
00087 }
00088
00089 void run();
00090
00091 ~SolverDriver()
00092 {
00093 ;
00094 }
00095 };
00096
00097 #endif // SOLVER_DRIVER_HPP