DUBeat
1.0.1
High-order discontinuous Galerkin methods and applications to cardiac electrophysiology
|
Class to work with global and local degrees of freedom and their mapping. More...
#include <dof_handler_DG.hpp>
Public Member Functions | |
DoFHandlerDG () | |
Constructor. More... | |
DoFHandlerDG (DoFHandlerDG< basis > &DoFHandlerDG)=default | |
Default copy constructor. More... | |
DoFHandlerDG (const DoFHandlerDG< basis > &DOFHandlerDG)=default | |
Default const copy constructor. More... | |
DoFHandlerDG (DoFHandlerDG< basis > &&DoFHandlerDG)=default | |
Default move constructor. More... | |
unsigned int | n_dofs_per_cell () const |
Return copy of n_dofs_per_cell. More... | |
unsigned int | n_dofs () const |
Return copy of n_dofs. More... | |
void | distribute_dofs (const dealii::FE_SimplexDGP< lifex::dim > &fe) |
Distribute dofs through the elements. More... | |
void | distribute_dofs (const unsigned int degree) |
Same method but avoids to use FiniteElement classes that might be invalid with higher order polynomials. More... | |
std::vector< lifex::types::global_dof_index > | get_dof_indices (active_cell_iterator cell) const |
Returns the global dofs referred to the input cell. More... | |
dealii::IndexSet | locally_owned_dofs () const |
Return a set of all the locally owned dofs (for the time being, it is equivalent to return all the dofs). More... | |
void | distribute_dofs (const dealii::FE_SimplexDGP< lifex::dim > &fe) |
Specialized version for Lagrangian basis, it does not use dof_map but exploits instead the deal.II original distribute_dofs. More... | |
void | distribute_dofs (const dealii::FE_SimplexDGP< lifex::dim > &fe) |
Specialized version for Dubiner basis, this version uses instead the internal dof_map. More... | |
void | distribute_dofs (const unsigned int degree) |
Specialized version for Lagrangian basis, it exploits the original distribute_dofs and so it is limited to space order at most 2. More... | |
void | distribute_dofs (const unsigned int degree) |
Specialized version for Dubiner basis. More... | |
std::vector< lifex::types::global_dof_index > | get_dof_indices (active_cell_iterator cell) const |
Specialized version for Lagrangian basis. More... | |
std::vector< lifex::types::global_dof_index > | get_dof_indices (active_cell_iterator cell) const |
Specialized version for Dubiner basis. More... | |
Private Attributes | |
unsigned int | degree |
Polynomial space degree. More... | |
std::map< active_cell_iterator, std::vector< unsigned int > > | dof_map |
Local to global dof map. More... | |
Class to work with global and local degrees of freedom and their mapping.
DUBeat exploits this class instead of the deal.II DoFHandler class because the latter, at the moment, cannot distribute dofs on tethraedra with polynomial orders greater than 2. This implementation permits to overcome this issue thanks to the use of an internal dof_map and the definition of Dubiner basis of every order (even >2) from DUBValues. On the other hand, it is not possible to do the same with nodal basis functions since they come directly from the deal.II FiniteElement classes. From the previous observations, it is then clear that Dubiner basis can be used with every order while Lagrangian basis with order at most 2.
Definition at line 65 of file dof_handler_DG.hpp.
|
inline |
Constructor.
Definition at line 72 of file dof_handler_DG.hpp.
|
default |
Default copy constructor.
|
default |
Default const copy constructor.
|
default |
Default move constructor.
void DoFHandlerDG< basis >::distribute_dofs | ( | const dealii::FE_SimplexDGP< lifex::dim > & | fe | ) |
Distribute dofs through the elements.
It overwrites the method in dealii::DoFHandler in order to let higher order polynomials available in the case of Dubiner basis.
void DoFHandlerDG< dealii::FE_SimplexDGP< lifex::dim > >::distribute_dofs | ( | const dealii::FE_SimplexDGP< lifex::dim > & | fe | ) |
Specialized version for Lagrangian basis, it does not use dof_map but exploits instead the deal.II original distribute_dofs.
Limited to order 2.
Definition at line 168 of file dof_handler_DG.hpp.
void DoFHandlerDG< DUBValues< lifex::dim > >::distribute_dofs | ( | const dealii::FE_SimplexDGP< lifex::dim > & | fe | ) |
Specialized version for Dubiner basis, this version uses instead the internal dof_map.
Because of the input argument, the space order is still limited to 2.
Definition at line 184 of file dof_handler_DG.hpp.
void DoFHandlerDG< basis >::distribute_dofs | ( | const unsigned int | degree | ) |
Same method but avoids to use FiniteElement classes that might be invalid with higher order polynomials.
void DoFHandlerDG< dealii::FE_SimplexDGP< lifex::dim > >::distribute_dofs | ( | const unsigned int | degree | ) |
Specialized version for Lagrangian basis, it exploits the original distribute_dofs and so it is limited to space order at most 2.
Definition at line 210 of file dof_handler_DG.hpp.
void DoFHandlerDG< DUBValues< lifex::dim > >::distribute_dofs | ( | const unsigned int | degree | ) |
Specialized version for Dubiner basis.
Since the input is the polynomial order and it works only with the internal dof_map (no FiniteElement classes), this version of distribute_dofs is the only one to accept every polynomial order.
Definition at line 229 of file dof_handler_DG.hpp.
std::vector<lifex::types::global_dof_index> DoFHandlerDG< basis >::get_dof_indices | ( | active_cell_iterator | cell | ) | const |
Returns the global dofs referred to the input cell.
std::vector< lifex::types::global_dof_index > DoFHandlerDG< dealii::FE_SimplexDGP< lifex::dim > >::get_dof_indices | ( | active_cell_iterator | cell | ) | const |
Specialized version for Lagrangian basis.
Hence, it exploits the original deal.II methods.
Definition at line 252 of file dof_handler_DG.hpp.
std::vector< lifex::types::global_dof_index > DoFHandlerDG< DUBValues< lifex::dim > >::get_dof_indices | ( | active_cell_iterator | cell | ) | const |
Specialized version for Dubiner basis.
Hence, the dof_indices are obtained directly from the internal dof_map.
Definition at line 266 of file dof_handler_DG.hpp.
dealii::IndexSet DoFHandlerDG< basis >::locally_owned_dofs |
Return a set of all the locally owned dofs (for the time being, it is equivalent to return all the dofs).
Definition at line 277 of file dof_handler_DG.hpp.
unsigned int DoFHandlerDG< basis >::n_dofs |
Return copy of n_dofs.
Definition at line 146 of file dof_handler_DG.hpp.
unsigned int DoFHandlerDG< basis >::n_dofs_per_cell |
Return copy of n_dofs_per_cell.
Definition at line 121 of file dof_handler_DG.hpp.
|
private |
Polynomial space degree.
Definition at line 69 of file dof_handler_DG.hpp.
|
private |
Local to global dof map.
Definition at line 72 of file dof_handler_DG.hpp.