27 side_id_4_loc(nullptr),
28 side_row_4_id(nullptr),
56 unsigned int i_side_global=0;
58 for(
unsigned int i_lside=0; i_lside < ele->n_sides(); i_lside++)
98 loc_part =
new int[init_edge_ds.lsize()];
103 unsigned int i_edg = edg -
mesh_->
edges.begin();
106 if (init_edge_ds.is_local(i_edg)) {
111 id_4_old[i_edg] = i_edg;
119 unsigned int loc_edge_idx=0;
120 for (
unsigned int i_el_loc = 0; i_el_loc <
el_ds->
lsize(); i_el_loc++) {
122 for (
unsigned int i = 0; i < ele->n_sides(); i++) {
123 unsigned int mesh_edge_idx= ele->side(i)->edge_idx();
133 loc_part =
new int[init_side_ds.lsize()];
140 if (init_side_ds.is_local(is)) {
170 int edge_shift[np], el_shift[np], side_shift[np];
171 unsigned int rows_starts[np];
179 for (i = 0; i < np; i++) {
186 rows_starts[i] = shift;
189 for (i = 0; i < side_n_id; i++) {
194 for (i = 0; i < el_n_id; i++) {
200 for (i = 0; i < edge_n_id; i++) {
206 for (i = np - 1; i > 0; i--)
207 rows_starts[i] -= rows_starts[i - 1];
209 rows_ds = std::make_shared<Distribution>(&(rows_starts[0]), PETSC_COMM_WORLD);
214 #ifdef FLOW123D_HAVE_BDDCML 217 int side_row, edge_row;
225 for (
unsigned int i_loc = 0; i_loc <
el_ds->
lsize(); i_loc++) {
231 unsigned int nsides = el->
n_sides();
232 for (
unsigned int i = 0; i < nsides; i++) {
240 for (
unsigned int i_neigh = 0; i_neigh < el->
n_neighs_vb; i_neigh++) {
247 #endif // FLOW123D_HAVE_BDDCML 258 OLD_ASSERT( solution != NULL,
"Empty solution.\n");
271 unsigned int i_edg = side.
edge_idx();
unsigned int get_proc(unsigned int idx) const
get processor of the given index
void make_row_numberings()
void id_maps(int n_ids, int *id_4_old, Distribution *&new_ds, int *&id_4_loc, int *&new_4_id)
#define FOR_ELEMENTS(_mesh_, __i)
unsigned int edge_idx() const
int * get_el_4_loc() const
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.
unsigned int size() const
Returns size of the container. This is independent of the allocated space.
vector< vector< unsigned int > > elem_side_to_global
unsigned int n_elements() const
double element_scalar(ElementFullIter &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 index(const T *pointer) const
unsigned int side_dof(const SideIter side) const
SideIter side(const unsigned int loc_index)
unsigned int np() const
get num of processors
Distribution * get_el_ds() const
double side_flux(const Side &side) const
temporary replacement for DofHandler accessor, flux through given side
ElementFullIter element() const
int * get_row_4_el() const
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.
unsigned int el_idx() const
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
#define FOR_SIDES(_mesh_, it)
#define FOR_EDGES(_mesh_, __i)
ElementVector element
Vector of elements of the mesh.
unsigned int lsize(int proc) const
get local size