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>
117 : dh(dh), local_ele_idx_(loc_ele_idx), ele(dh->mesh_->element(ele_global_idx()))
122 local_ele_idx_=loc_ele_idx;
123 ele=dh->mesh_->element(ele_global_idx());
131 return ele->n_sides();
139 return ele->element_accessor();
143 return ele->centre();
147 return ele->measure();
151 return ele->region();
155 return dh->el_4_loc[local_ele_idx_];
159 return local_ele_idx_;
163 return dh->row_4_el[ele_global_idx()];
167 return ele_row() - dh->rows_ds->begin();
171 return ele->side(i)->edge_idx();
175 return dh->edge_new_local_4_mesh_idx_[edge_global_idx(i)];
179 return dh->row_4_edge[edge_global_idx(i)];
183 return edge_row(i) - dh->rows_ds->begin();
187 for(
uint i=0; i< dim(); i++) edge_rows_[i] = edge_row(i);
196 return dh->elem_side_to_global[ ele->index() ][ i ];
200 return dh->side_row_4_id[side_global_idx(i)] - dh->rows_ds->begin();
204 return dh->side_row_4_id[side_global_idx(i)];
208 return side_row(i) - dh->rows_ds->begin();
212 for(
uint i=0; i< dim(); i++) side_rows_[i] = side_row(i);
228 template <
int spacedim,
int dim>
const arma::vec3 centre() const
uint edge_global_idx(uint i)
int IdxInt
Define integers that are indices into large arrays (elements, nodes, dofs etc.)
double time_changed() const
void reinit(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
LocalElementAccessorBase(MH_DofHandler *dh, uint loc_ele_idx=0)
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()