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> 45 void reinit(
Mesh *mesh);
47 void prepare_parallel();
48 void make_row_numberings();
49 void prepare_parallel_bddc();
51 void set_solution(
double time,
double * solution,
double precision);
56 unsigned int side_dof(
const SideIter side)
const;
59 double side_flux(
const Side &side)
const;
62 double side_scalar(
const Side &side)
const;
67 inline double precision()
const {
return solution_precision; };
108 template <
int spacedim>
113 : dh(dh), local_ele_idx_(loc_ele_idx), ele( dh->mesh_->element_accessor(ele_global_idx()) )
118 local_ele_idx_=loc_ele_idx;
119 ele=dh->mesh_->element_accessor(ele_global_idx());
127 return ele->n_sides();
139 return ele.measure();
147 return dh->el_4_loc[local_ele_idx_];
151 return local_ele_idx_;
155 return dh->row_4_el[ele_global_idx()];
159 return ele_row() - dh->rows_ds->begin();
163 return ele.side(i)->edge_idx();
167 return dh->edge_new_local_4_mesh_idx_[edge_global_idx(i)];
171 return dh->row_4_edge[edge_global_idx(i)];
175 return edge_row(i) - dh->rows_ds->begin();
179 for(
uint i=0; i< dim(); i++) edge_rows_[i] = edge_row(i);
188 return dh->elem_side_to_global[ ele.idx() ][ i ];
192 return dh->side_row_4_id[side_global_idx(i)] - dh->rows_ds->begin();
196 return dh->side_row_4_id[side_global_idx(i)];
200 return side_row(i) - dh->rows_ds->begin();
204 for(
uint i=0; i< dim(); i++) side_rows_[i] = side_row(i);
220 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