18 #ifndef MH_DOFHANDLER_HH_ 19 #define MH_DOFHANDLER_HH_ 23 #include <unordered_map> 40 template <
int spacedim>
49 void reinit(
Mesh *mesh);
51 void prepare_parallel();
52 void make_row_numberings();
53 void prepare_parallel_bddc();
55 void set_solution(
double time,
double * solution,
double precision);
60 unsigned int side_dof(
const SideIter side)
const;
63 double side_flux(
const Side &side)
const;
66 double side_scalar(
const Side &side)
const;
71 inline double precision()
const {
return solution_precision; };
112 template <
int spacedim>
116 : dh(dh), local_ele_idx_(loc_ele_idx), ele(dh->mesh_->element(ele_global_idx()))
124 return ele->n_sides();
132 return ele->element_accessor();
136 return ele->centre();
140 return ele->measure();
144 return ele->region();
148 return dh->el_4_loc[local_ele_idx_];
152 return local_ele_idx_;
156 return dh->row_4_el[ele_global_idx()];
160 return ele_row() - dh->rows_ds->begin();
164 return ele->side(i)->edge_idx();
168 return dh->edge_new_local_4_mesh_idx_[edge_global_idx(i)];
172 return dh->row_4_edge[edge_global_idx(i)];
176 return edge_row(i) - dh->rows_ds->begin();
180 for(
uint i=0; i< dim(); i++) edge_rows_[i] = edge_row(i);
189 return dh->elem_side_to_global[ ele->index() ][ i ];
193 return dh->side_row_4_id[side_global_idx(i)] - dh->rows_ds->begin();
197 return dh->side_row_4_id[side_global_idx(i)];
201 return side_row(i) - dh->rows_ds->begin();
205 for(
uint i=0; i< dim(); i++) side_rows_[i] = side_row(i);
221 template <
int spacedim,
int dim>
const arma::vec3 centre() const
uint edge_global_idx(uint i)
double time_changed() const
LocalElementAccessorBase(MH_DofHandler *dh, uint loc_ele_idx)
ElementAccessor< 3 > element_accessor()
uint edge_local_idx(uint i)
uint side_local_row(uint i)
uint side_local_idx(uint i)
std::unordered_map< unsigned int, unsigned int > edge_new_local_4_mesh_idx_
std::shared_ptr< LocalToGlobalMap > global_row_4_sub_row
Necessary only for BDDC solver.
vector< vector< unsigned int > > elem_side_to_global
uint edge_local_row(uint i)
uint side_global_idx(uint i)
Support classes for parallel programing.
LocalElementAccessor(MH_DofHandler &dh, uint loc_ele_idx)
std::shared_ptr< Distribution > rows_ds
double solution_precision
ElementFullIter full_iter()