00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef BOUNDARY_CONDITION_DISCRETIZATION_SPECTRAL_NON_CONFORM_HPP
00021 #define BOUNDARY_CONDITION_DISCRETIZATION_SPECTRAL_NON_CONFORM_HPP
00022
00023 #include <Problem.hpp>
00024 #include <DegreeOfFreedomSet.hpp>
00025
00026 #include <BoundaryConditionDiscretization.hpp>
00027 #include <BoundaryConditionSurfaceMeshAssociation.hpp>
00028
00029 #include <ConformTransformation.hpp>
00030 #include <LegendreBasis.hpp>
00031
00032 #include <DiscretizationType.hpp>
00033 #include <ScalarDiscretizationTypeSpectral.hpp>
00034
00035 #include <BaseMatrix.hpp>
00036 #include <BaseVector.hpp>
00037
00038 #include <OctreeMesh.hpp>
00039
00040 class BoundaryConditionDiscretizationSpectralNonConform
00041 : public BoundaryConditionDiscretization
00042 {
00043 private:
00044 const DegreeOfFreedomSet& __degreeOfFreedomSet;
00045 const OctreeMesh& __mesh;
00046
00047 ReferenceCounting<BoundaryConditionSurfaceMeshAssociation>
00048 __bcMeshAssociation;
00050 const DiscretizationType& __discretizationType;
00051
00052 Vector<TinyVector<3,size_t> > __dofShape;
00053
00054 public:
00059 void associatesMeshesToBoundaryConditions()
00060 {
00061 BoundaryMeshAssociation bma(__problem, __mesh);
00062 __bcMeshAssociation = new BoundaryConditionSurfaceMeshAssociation(__problem,bma);
00063 }
00064
00065 void getDiagonal(BaseVector& X) const;
00066
00067 void setMatrix(ReferenceCounting<BaseMatrix> A,
00068 ReferenceCounting<BaseVector> b) const;
00069
00070 void setSecondMember(ReferenceCounting<BaseMatrix> A,
00071 ReferenceCounting<BaseVector> b) const;
00072
00073
00074 void timesX(const BaseVector& X, BaseVector& Z) const;
00075
00076 void transposedTimesX(const BaseVector& X, BaseVector& Z) const;
00077
00078
00079 BoundaryConditionDiscretizationSpectralNonConform(const Problem& problem,
00080 const OctreeMesh& mesh,
00081 const DegreeOfFreedomSet& dof,
00082 const DiscretizationType& discretizationType)
00083 : BoundaryConditionDiscretization(problem,dof),
00084 __degreeOfFreedomSet(dof),
00085 __mesh(mesh),
00086 __discretizationType(discretizationType),
00087 __dofShape(this->problem().numberOfUnknown())
00088 {
00089 for (size_t i=0; i < this->problem().numberOfUnknown(); i++) {
00090 const ScalarDiscretizationTypeSpectral& discretization
00091 = dynamic_cast<const ScalarDiscretizationTypeSpectral&>(discretizationType[i]);
00092
00093 __dofShape[i] = discretization.degrees()+TinyVector<3,size_t>(1,1,1);
00094 }
00095 }
00096
00097 ~BoundaryConditionDiscretizationSpectralNonConform()
00098 {
00099 ;
00100 }
00101 };
00102
00103 #endif // BOUNDARY_CONDITION_DISCRETIZATION_SPECTRAL_NON_CONFORM_HPP