22 #include "rheolef/config.h"
24 #ifdef _RHEOLEF_HAVE_MPI
26 #include "rheolef/space.h"
27 #include "rheolef/space_mult.h"
32 space_rep<T,distributed>::space_rep (
33 const space_constitution<T,distributed>& constit)
34 : space_base_rep<
T,distributed>::space_base_rep (constit),
40 base::get_constitution().set_ios_permutations (_idof2ios_dis_idof, _ios_idof2dis_idof);
43 space_rep<T,distributed>::space_rep (
44 const geo_basic<T,distributed>& omega_in,
47 : space_base_rep<
T,distributed>::space_base_rep (omega_in, approx, valued),
53 if (approx ==
"")
return;
54 base::get_constitution().set_ios_permutations (_idof2ios_dis_idof, _ios_idof2dis_idof);
57 space_rep<T,distributed>::space_rep (
58 const geo_basic<T,distributed>& omega_in,
59 const basis_basic<T>&
b)
60 : space_base_rep<
T,distributed>::space_base_rep (omega_in,
b),
66 if (!
b.is_initialized())
return;
67 base::get_constitution().set_ios_permutations (_idof2ios_dis_idof, _ios_idof2dis_idof);
70 space_rep<T,distributed>::space_rep (
const space_mult_list<T,distributed>&
expr)
71 : space_base_rep<
T,distributed>::space_base_rep (
expr),
77 base::get_constitution().set_ios_permutations (_idof2ios_dis_idof, _ios_idof2dis_idof);
81 space_rep<T,distributed>::freeze_body ()
const
83 base::base_freeze_body();
92 size_type first_dis_iu = base::_iu_ownership.first_index();
93 size_type first_dis_ib = base::_ib_ownership.first_index();
94 for (
size_type idof = 0,
ndof = base::_idof2blk_dis_iub.size(); idof <
ndof; idof++) {
95 size_type first_dis_iub = base::_idof2blk_dis_iub [idof].is_blocked() ? first_dis_ib : first_dis_iu;
96 base::_idof2blk_dis_iub [idof].set_dis_iub (base::_idof2blk_dis_iub[idof].dis_iub() + first_dis_iub);
101 std::set<size_type> ext_dof_set;
102 base::get_constitution().compute_external_dofs (ext_dof_set);
103 base::_idof2blk_dis_iub.set_dis_indexes (ext_dof_set);
107 for (
typename std::set<size_type>::const_iterator iter = ext_dof_set.begin(), last = ext_dof_set.end();
108 iter != last; iter++) {
110 const space_pair_type& blk_dis_iub = base::_idof2blk_dis_iub.dis_at (
dis_idof);
111 if (! blk_dis_iub.is_blocked()) {
112 _ext_iu_set.insert (blk_dis_iub.dis_iub());
114 _ext_ib_set.insert (blk_dis_iub.dis_iub());
125 base::freeze_guard();
126 return base::_idof2blk_dis_iub.dis_at (
dis_idof).dis_iub();
132 base::freeze_guard();
133 return base::_idof2blk_dis_iub.dis_at (
dis_idof).is_blocked();
138 template class space_rep<Float,distributed>;
field::size_type size_type
void dis_idof(const basis_basic< T > &b, const geo_size &gs, const geo_element &K, typename std::vector< size_type >::iterator dis_idof_tab)
size_type ndof(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
This file is part of Rheolef.