00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef BOUNDARY_CONDITION_FDM_DISCRETIZATION_HPP
00022 #define BOUNDARY_CONDITION_FDM_DISCRETIZATION_HPP
00023
00024 #include <BoundaryConditionCommonFEMDiscretization.hpp>
00025
00036 template <typename MeshType,
00037 ScalarDiscretizationTypeBase::Type TypeOfDiscretization>
00038 class BoundaryConditionFDMDiscretization
00039 : public BoundaryConditionCommonFEMDiscretization<MeshType,
00040 TypeOfDiscretization>
00041 {
00042 private:
00043 void __markFictitiousCells(const BoundaryMeshAssociation& bma)
00044 {
00045 for (BoundaryMeshAssociation::const_iterator i = bma.begin();
00046 i != bma.end(); ++i) {
00047 (*i->second).computesFictitiousCells();
00048 }
00049 }
00050
00051 public:
00052 void associatesMeshesToBoundaryConditions()
00053 {
00054 BoundaryMeshAssociation bma(this->__problem, this->__mesh);
00055
00056 if (bma.hasPOVReferences()) {
00057 const Domain& omega = *(this->__problem).domain();
00058 ReferenceCounting<SurfaceMeshOfTriangles>
00059 omegaMesh = new SurfaceMeshOfTriangles();
00060
00061 ffout(3) << "Generating Surface Meshes\n";
00062
00063 SurfaceMeshGenerator S;
00064 S.generateSurfacicMesh(omega, this->__mesh, *omegaMesh);
00065 bma.setPOVMeshes(omega, omegaMesh);
00066 }
00067 this->__checkBoundaryMeshAssociation(bma);
00068 this->__markFictitiousCells(bma);
00069 this->__associatesDefinedMeshToBoundaryConditions(bma);
00070 }
00071
00072 BoundaryConditionFDMDiscretization(const Problem& problem,
00073 const MeshType& givenMesh,
00074 const DegreeOfFreedomSet& dof)
00075 : BoundaryConditionCommonFEMDiscretization<MeshType,
00076 TypeOfDiscretization>(problem,
00077 givenMesh,
00078 dof)
00079 {
00080 ;
00081 }
00082
00083 virtual ~BoundaryConditionFDMDiscretization()
00084 {
00085 ;
00086 }
00087 };
00088
00089 #endif // BOUNDARY_CONDITION_FDM_DISCRETIZATION_HPP
00090