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> 47 void reinit(
Mesh *mesh);
49 void prepare_parallel();
50 void make_row_numberings();
51 void prepare_parallel_bddc();
53 void set_solution(
double time,
double * solution,
double precision);
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;
69 inline double precision()
const {
return solution_precision; };
110 template <
int spacedim>
115 : dh(dh), local_ele_idx_(loc_ele_idx), ele( dh->mesh_->element_accessor(ele_global_idx()) )
120 local_ele_idx_=loc_ele_idx;
121 ele=dh->mesh_->element_accessor(ele_global_idx());
129 return ele->n_sides();
141 return ele.measure();
149 return dh->el_4_loc[local_ele_idx_];
153 return local_ele_idx_;
157 return dh->row_4_el[ele_global_idx()];
161 return ele_row() - dh->rows_ds->begin();
165 return ele.side(i)->edge_idx();
169 return dh->edge_new_local_4_mesh_idx_[edge_global_idx(i)];
173 return dh->row_4_edge[edge_global_idx(i)];
177 return edge_row(i) - dh->rows_ds->begin();
181 for(
uint i=0; i< dim(); i++) edge_rows_[i] = edge_row(i);
190 return dh->elem_side_to_global[ ele.idx() ][ i ];
194 return dh->side_row_4_id[side_global_idx(i)] - dh->rows_ds->begin();
198 return dh->side_row_4_id[side_global_idx(i)];
202 return side_row(i) - dh->rows_ds->begin();
206 for(
uint i=0; i< dim(); i++) side_rows_[i] = side_row(i);
222 template <
int spacedim,
int dim>
const arma::vec3 centre() const
uint edge_global_idx(uint i)
int LongIdx
Define type that represents indices of 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)
class to manage local indices on sub-domain to global indices on domain
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