Hermes2D  3.0
Hermes::Hermes2D::H1Space< Scalar > Class Template Reference

#include <space_h1.h>

+ Inheritance diagram for Hermes::Hermes2D::H1Space< Scalar >:

Public Member Functions

 H1Space (MeshSharedPtr mesh, EssentialBCs< Scalar > *boundary_conditions, int p_init=1, Shapeset *shapeset=nullptr)
 
 H1Space (MeshSharedPtr mesh, int p_init=1, Shapeset *shapeset=nullptr)
 
virtual void set_shapeset (Shapeset *shapeset, bool clone=false)
 Sets the shapeset.
 
virtual Scalar * get_bc_projection (SurfPos *surf_pos, int order, EssentialBoundaryCondition< Scalar > *bc)
 
virtual void copy (SpaceSharedPtr< Scalar > space, MeshSharedPtr new_mesh)
 Copy from Space instance 'space'.
 
- Public Member Functions inherited from Hermes::Hermes2D::Space< Scalar >
 Space (MeshSharedPtr mesh, Shapeset *shapeset, EssentialBCs< Scalar > *essential_bcs)
 
void init ()
 Common code for constructors.
 
virtual ~Space ()
 Destructor.
 
void free ()
 Freeing the data.
 
void free_bc_data ()
 Free BC data.
 
int get_element_order (int id) const
 Returns element polynomial order.
 
int get_num_dofs () const
 Returns the number of basis functions contained in the space.
 
MeshSharedPtr get_mesh () const
 
int get_vertex_functions_count ()
 
int get_edge_functions_count ()
 Returns the total (global) number of edge functions.
 
int get_bubble_functions_count ()
 Returns the total (global) number of bubble functions.
 
int get_seq () const
 Internal. Used by DiscreteProblem to detect changes in the space.
 
EssentialBCs< Scalar > * get_essential_bcs () const
 Obtains an boundary conditions.
 
virtual void get_element_assembly_list (Element *e, AsmList< Scalar > *al) const
 Obtains an assembly list for the given element.
 
virtual int get_edge_order (Element *e, int edge) const
 Internal. Obtains the order of an edge, according to the minimum rule.
 
int get_max_dof () const
 Returns the DOF number of the last basis function.
 
void get_boundary_assembly_list (Element *e, int surf_num, AsmList< Scalar > *al) const
 Obtains an edge assembly list (contains shape functions that are nonzero on the specified edge).
 
Shapesetget_shapeset () const
 
void set_mesh (MeshSharedPtr mesh)
 Sets a (new) mesh and calls assign_dofs().
 
void set_mesh_seq (int seq)
 Sets a (new) mesh seq, and mesh_seq.
 
void set_essential_bcs (EssentialBCs< Scalar > *essential_bcs)
 Sets the boundary condition.
 
virtual void set_element_order (int id, int order, int order_v=-1)
 
void set_uniform_order (int order, std::string marker=HERMES_ANY)
 
void adjust_element_order (int order_change, int min_order)
 
void adjust_element_order (int horizontal_order_change, int vertical_order_change, unsigned int horizontal_min_order, unsigned int vertical_min_order)
 Version for quads.
 
void set_uniform_order_internal (int order, int marker)
 
virtual int assign_dofs (int first_dof=0)
 Builds basis functions and assigns DOF numbers to them. More...
 
void unrefine_all_mesh_elements (bool keep_initial_refinements=true)
 
void update_essential_bc_values ()
 
void save (const char *filename) const
 Saves this space into a file.
 
void load (const char *filename)
 This method is here for rapid re-loading.
 
- Public Member Functions inherited from Hermes::Hermes2D::Mixins::XMLParsing
 XMLParsing ()
 Constructor.
 
void set_validation (bool to_set)
 Set to validate / not to validate.
 

Protected Member Functions

virtual SpaceType get_type () const
 Internal. Return type of this space. See enum SpaceType.
 
void init (Shapeset *shapeset, int p_init, bool assign_dofs_init=true)
 Common code for the constructors.
 
virtual void assign_vertex_dofs ()
 
virtual void assign_edge_dofs ()
 
virtual void assign_bubble_dofs ()
 
virtual void get_vertex_assembly_list (Element *e, int iv, AsmList< Scalar > *al) const
 
virtual void get_boundary_assembly_list_internal (Element *e, int ie, AsmList< Scalar > *al) const
 
void output_component (typename Space< Scalar >::BaseComponent *&current, typename Space< Scalar >::BaseComponent *&last, typename Space< Scalar >::BaseComponent *min, Node *&edge, typename Space< Scalar >::BaseComponent *&edge_dofs)
 
Space< Scalar >::BaseComponentmerge_baselists (typename Space< Scalar >::BaseComponent *l1, int n1, typename Space< Scalar >::BaseComponent *l2, int n2, Node *edge, typename Space< Scalar >::BaseComponent *&edge_dofs, int &ncomponents)
 
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)
 
virtual void update_constraints ()
 
- Protected Member Functions inherited from Hermes::Hermes2D::Space< Scalar >
virtual void set_element_order_internal (int id, int order, int order_v=-1)
 
void distribute_orders (MeshSharedPtr mesh, int *parents)
 Sets polynomial orders to elements created by Mesh::regularize() using "parents".
 
bool is_up_to_date () const
 Returns true if the space is ready for computation, false otherwise.
 
virtual bool isOkay () const
 State querying helpers.
 
std::string getClassName () const
 
virtual int get_edge_order_internal (Node *en) const
 Internal.
 
void unrefine_all_mesh_elements_internal (bool keep_initial_refinements, bool only_unrefine_space_data)
 
virtual void resize_tables ()
 Updates internal node and element tables. More...
 
void update_orders_recurrent (Element *e, int order)
 
virtual void reset_dof_assignment ()
 Resets assignment of DOF to an unassigned state.
 
virtual void get_bubble_assembly_list (Element *e, AsmList< Scalar > *al) const
 
void precalculate_projection_matrix (int nv, double **&mat, double *&p)
 
void update_edge_bc (Element *e, SurfPos *surf_pos)
 
virtual void post_assign ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Hermes::Hermes2D::Space< Scalar >
static int get_num_dofs (std::vector< SpaceSharedPtr< Scalar > > spaces)
 Returns the number of basis functions contained in the spaces.
 
static int get_num_dofs (SpaceSharedPtr< Scalar > space)
 Returns the number of basis functions contained in the space.
 
static int assign_dofs (std::vector< SpaceSharedPtr< Scalar > > spaces)
 Assings the degrees of freedom to all Spaces in the std::vector.
 
static void unrefine_all_mesh_elements (std::vector< SpaceSharedPtr< Scalar > > spaces, bool keep_initial_refinements=true)
 
static void update_essential_bc_values (std::vector< SpaceSharedPtr< Scalar > > spaces, double time)
 
static void update_essential_bc_values (SpaceSharedPtr< Scalar > space, double time)
 
static SpaceSharedPtr< Scalar > load (const char *filename, MeshSharedPtr mesh, bool validate=false, EssentialBCs< Scalar > *essential_bcs=nullptr, Shapeset *shapeset=nullptr)
 Loads a space from a file in XML format.
 
- Static Protected Member Functions inherited from Hermes::Hermes2D::Space< Scalar >
static Nodeget_mid_edge_vertex_node (Element *e, unsigned char i, unsigned char j)
 
static SpaceSharedPtr< Scalar > init_empty_space (SpaceType spaceType, MeshSharedPtr mesh, Shapeset *shapeset)
 
- Protected Attributes inherited from Hermes::Hermes2D::Space< Scalar >
int ndof
 Number of degrees of freedom (dimension of the space).
 
Shapesetshapeset
 
bool own_shapeset
 true if default shapeset is created in the constructor, false if shapeset is supplied by user.
 
EssentialBCs< Scalar > * essential_bcs
 Boundary conditions.
 
MeshSharedPtr mesh
 FE mesh.
 
int vertex_functions_count
 For statistics.
 
int edge_functions_count
 
int bubble_functions_count
 
int first_dof
 For equation systems.
 
int next_dof
 
unsigned int seq
 Tracking changes.
 
unsigned int seq_assigned
 Tracking changes - mark call to assign_dofs().
 
int mesh_seq
 Tracking changes - mesh.
 
NodeDatandata
 node data table
 
int nsize
 node data table size
 
ElementDataedata
 element data table
 
int esize
 element data table size
 
double ** proj_mat
 
double * chol_p
 
std::vector< Scalar * > bc_data_projections
 Used for bc projection.
 
std::vector< typename Space
< Scalar >::BaseComponent * > 
bc_data_base_components
 
- Protected Attributes inherited from Hermes::Hermes2D::Mixins::XMLParsing
bool validate
 Internal.
 
- Static Protected Attributes inherited from Hermes::Hermes2D::Space< Scalar >
static const int H2D_UNASSIGNED_DOF = -2
 DOF which was not assigned yet.
 
static const int H2D_CONSTRAINED_DOF = -1
 DOF which is constrained.
 

Detailed Description

template<typename Scalar>
class Hermes::Hermes2D::H1Space< Scalar >

H1Space represents a space of continuous Scalar functions over a domain (mesh).
Typical usage:
...
Hermes::Hermes2D::EssentialBCs<double> bcs(&bc_essential1, &bc_essential2, ...);

// Initialize space.
int globalPolynomialOrder = 4;
SpaceSharedPtr<double> space(&mesh, &bcs, globalPolynomialOrder);

Definition at line 76 of file space.h.

Member Function Documentation

template<typename Scalar >
void Hermes::Hermes2D::H1Space< Scalar >::update_constraints ( )
protectedvirtual

Called by Space to update constraining relationships between shape functions due to hanging nodes in the mesh. As this is space-specific, this function is reimplemented in H1Space and HcurlSpace.

Reimplemented from Hermes::Hermes2D::Space< Scalar >.

Definition at line 581 of file space_h1.cpp.


The documentation for this class was generated from the following files: