18 #ifndef MH_DOFHANDLER_HH_
19 #define MH_DOFHANDLER_HH_
21 #include <ext/alloc_traits.h>
22 #include <sys/types.h>
24 #include <unordered_map>
48 void reinit(
Mesh *mesh);
50 void prepare_parallel();
51 void make_row_numberings();
53 void set_solution(
double time,
double * solution);
58 unsigned int side_dof(
const SideIter side)
const;
61 double side_flux(
const Side &side)
const;
64 double side_scalar(
const Side &side)
const;
103 template <
int spacedim>
108 : dh_cell_(dh_cell), global_indices_(dh_cell_.dh()->max_elem_dofs())
110 n_indices_ = dh_cell_.get_dof_indices(global_indices_);
118 return dh_cell_.dim();
122 return element_accessor()->n_sides();
126 return dh_cell_.elm();
130 return element_accessor().centre();
134 return element_accessor().measure();
138 return element_accessor().region();
142 return element_accessor().idx();
146 return dh_cell_.local_idx();
150 return global_indices_[n_indices_/2];
154 return dh_cell_.get_loc_dof_indices()[n_indices_/2];
158 return global_indices_[(n_indices_+1)/2+i];
162 return dh_cell_.get_loc_dof_indices()[(n_indices_+1)/2+i];
166 return element_accessor().side(i);
170 return global_indices_[i];
174 return dh_cell_.get_loc_dof_indices()[i];
187 template <
int spacedim,
int dim>
Cell accessor allow iterate over DOF handler cells.
Mixed-hybrid model of linear Darcy flow, possibly unsteady.
Mixed-hybrid model of linear Darcy flow, possibly unsteady.
const arma::vec3 centre() const
uint ele_local_idx() const
DHCellAccessor dh_cell() const
LocalElementAccessorBase(DHCellAccessor dh_cell)
std::vector< LongIdx > global_indices_
ElementAccessor< 3 > element_accessor() const
uint edge_local_row(uint i)
uint side_local_row(uint i)
LocalElementAccessor(MH_DofHandler &dh, uint loc_ele_idx)
std::unordered_map< unsigned int, unsigned int > edge_new_local_4_mesh_idx_
vector< vector< unsigned int > > elem_side_to_global
double time_changed() const
Edge lumped mixed-hybrid solution of unsteady Darcy flow.
Support classes for parallel programing.
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)