34 side_id_4_loc(nullptr),
35 side_row_4_id(nullptr),
63 unsigned int i_side_global=0;
65 for(
unsigned int i_lside=0; i_lside < ele->n_sides(); i_lside++)
105 loc_part =
new LongIdx[init_edge_ds.lsize()];
110 unsigned int i_edg = edg -
mesh_->
edges.begin();
112 e_idx = edg->side(0)->element().idx();
113 if (init_edge_ds.is_local(i_edg)) {
118 id_4_old[i_edg] = i_edg;
126 unsigned int loc_edge_idx=0;
127 for (
unsigned int i_el_loc = 0; i_el_loc <
el_ds->
lsize(); i_el_loc++) {
129 for (
unsigned int i = 0; i < ele->n_sides(); i++) {
140 loc_part =
new LongIdx[init_side_ds.lsize()];
146 for(
SideIter side = ele.side(0); side->
side_idx() < ele->n_sides(); ++side) {
148 if (init_side_ds.is_local(is)) {
178 int edge_shift[np], el_shift[np], side_shift[np];
179 unsigned int rows_starts[np];
187 for (i = 0; i < np; i++) {
194 rows_starts[i] = shift;
197 for (i = 0; i < side_n_id; i++) {
202 for (i = 0; i < el_n_id; i++) {
208 for (i = 0; i < edge_n_id; i++) {
214 for (i = np - 1; i > 0; i--)
215 rows_starts[i] -= rows_starts[i - 1];
217 rows_ds = std::make_shared<Distribution>(&(rows_starts[0]), PETSC_COMM_WORLD);
222 #ifdef FLOW123D_HAVE_BDDCML 233 for (
unsigned int i_loc = 0; i_loc <
el_ds->
lsize(); i_loc++) {
239 unsigned int nsides = el->
n_sides();
240 for (
unsigned int i = 0; i < nsides; i++) {
248 for (
unsigned int i_neigh = 0; i_neigh < el->
n_neighs_vb(); i_neigh++) {
255 #endif // FLOW123D_HAVE_BDDCML 266 OLD_ASSERT( solution != NULL,
"Empty solution.\n");
279 unsigned int i_edg = side.
edge_idx();
int LongIdx
Define type that represents indices of large arrays (elements, nodes, dofs etc.)
unsigned int get_proc(unsigned int idx) const
get processor of the given index
void make_row_numberings()
LongIdx * get_row_4_el() const
unsigned int side_idx() const
unsigned int edge_idx() const
SideIter side(const unsigned int loc_index)
ElementAccessor< 3 > element() const
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
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
double element_scalar(ElementAccessor< 3 > &ele) const
temporary replacement for DofHandler accessor, scalar (pressure) on element
unsigned int begin(int proc) const
get starting local index
unsigned int n_sides() const
#define START_TIMER(tag)
Starts a timer with specified tag.
unsigned int side_dof(const SideIter side) const
virtual Range< ElementAccessor< 3 > > elements_range() const
Returns range of bulk elements.
unsigned int np() const
get num of processors
unsigned int n_sides() const
Distribution * get_el_ds() const
void id_maps(int n_ids, LongIdx *id_4_old, Distribution *&new_ds, LongIdx *&id_4_loc, LongIdx *&new_4_id)
double side_flux(const Side &side) const
temporary replacement for DofHandler accessor, flux through given side
virtual unsigned int n_elements(bool boundary=false) const
Returns count of boundary or bulk elements.
std::shared_ptr< Distribution > rows_ds
LocalElementAccessorBase< 3 > accessor(uint local_ele_idx)
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
void prepare_parallel_bddc()
void set_solution(double time, double *solution, double precision)
unsigned int n_edges() const
double side_scalar(const Side &side) const
temporary replacement for DofHandler accessor, scalar (pressure) on edge of the side ...
double solution_precision
const Mesh * mesh() const
unsigned int n_neighs_vb() const
Return number of neighbours.
unsigned int idx() const
Return local idx of element in boundary / bulk part of element vector.
LongIdx * get_el_4_loc() const
Implementation of range helper class.
unsigned int lsize(int proc) const
get local size