Hermes2D  3.0
space_hdiv.h
1 // This file is part of Hermes2D.
2 //
3 // Hermes2D is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 2 of the License, or
6 // (at your option) any later version.
7 //
8 // Hermes2D is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with Hermes2D. If not, see <http://www.gnu.org/licenses/>.
15 
16 #ifndef __H2D_SPACE_HDIV_H
17 #define __H2D_SPACE_HDIV_H
18 
19 #include "space.h"
20 
21 namespace Hermes
22 {
23  namespace Hermes2D
24  {
34  template<typename Scalar>
35  class HERMES_API HdivSpace : public Space < Scalar >
36  {
37  public:
38  HdivSpace();
39  HdivSpace(MeshSharedPtr mesh, EssentialBCs<Scalar>* boundary_conditions, int p_init = 1,
40  Shapeset* shapeset = nullptr);
41 
42  HdivSpace(MeshSharedPtr mesh, int p_init = 1,
43  Shapeset* shapeset = nullptr);
44 
45  virtual ~HdivSpace();
46 
47  virtual void set_shapeset(Shapeset* shapeset, bool clone = false);
48 
49  virtual Scalar* get_bc_projection(SurfPos* surf_pos, int order, EssentialBoundaryCondition<Scalar> *bc);
50 
52  virtual void copy(SpaceSharedPtr<Scalar> space, MeshSharedPtr new_mesh);
53  protected:
55  void init(Shapeset* shapeset, int p_init, bool assign_dofs_init = true);
56 
57  virtual SpaceType get_type() const { return HERMES_HDIV_SPACE; }
58 
59  virtual void assign_vertex_dofs() {}
60  virtual void assign_edge_dofs();
61  virtual void assign_bubble_dofs();
62 
63  virtual void get_vertex_assembly_list(Element* e, int iv, AsmList<Scalar>* al) const {}
64  virtual void get_boundary_assembly_list_internal(Element* e, int surf_num, AsmList<Scalar>* al) const;
65  virtual void get_bubble_assembly_list(Element* e, AsmList<Scalar>* al) const;
66 
67  void update_constrained_nodes(Element* e, typename Space<Scalar>::EdgeInfo* ei0, typename Space<Scalar>::EdgeInfo* ei1, typename Space<Scalar>::EdgeInfo* ei2, typename Space<Scalar>::EdgeInfo* ei3);
68  virtual void update_constraints();
69  };
70  }
71 }
72 #endif
Definition: adapt.h:24
virtual SpaceType get_type() const
Internal. Return type of this space. See enum SpaceType.
Definition: space_hdiv.h:57