22 #include "rheolef/geo.h"
23 #include "rheolef/geo_domain.h"
24 #include "rheolef/dis_macros.h"
25 #include "rheolef/rheostream.h"
26 #include "rheolef/iorheo.h"
27 #include "rheolef/index_set.h"
34 template <
class T,
class M>
46 _name =
"level_set_from_" +
lambda.name();
48 _dimension =
lambda.dimension();
49 _piola_basis =
lambda.get_piola_basis();
50 _sys_coord =
lambda.coordinate_system();
51 _have_connectivity =
true;
54 _gs._map_dimension = 0;
56 if (ge_list[
variant].dis_size() != 0) {
63 communicator comm =
lambda.sizes().node_ownership.comm();
65 _gs.node_ownership = _node.ownership();
79 _geo_element [
variant].resize (_gs.ownership_by_variant [
variant], param);
90 _gs.ownership_by_dimension [0] = _gs.node_ownership;
94 size_type first_dis_iv = _gs.ownership_by_dimension [0].first_index();
95 for (
size_type iv = 0, nv = _gs.ownership_by_dimension [0].size(); iv < nv; iv++) {
106 size_type first_dis_ie = _gs.ownership_by_dimension [_gs._map_dimension].first_index();
111 size_type first_dis_igev = _gs.ownership_by_variant [
variant].first_index();
115 iter = ge_list[
variant].begin(),
117 iter != last; iter++, ge_iter++, dis_ie++, dis_igev++) {
119 size_type ios_dis_ie = first_dis_v + dis_igev;
120 (*ge_iter).set_dis_ie (dis_ie);
121 (*ge_iter).set_ios_dis_ie (ios_dis_ie);
123 first_dis_v += _gs.ownership_by_variant[
variant].dis_size();
125 if (_gs._map_dimension >= 2) {
126 _have_connectivity =
false;
141 base::build_from_list (
lambda, node_list, ge_list);
146 #ifdef _RHEOLEF_HAVE_MPI
154 _inod2ios_dis_inod(),
155 _ios_inod2dis_inod(),
158 _igev2ios_dis_igev(),
161 base::build_from_list (
lambda, node_list, ge_list);
165 build_external_entities ();
170 communicator comm =
lambda.sizes().node_ownership.comm();
171 if (comm.size() > 1) {
dis_trace_macro (
"ios: not yet fully computed"); }
176 _inod2ios_dis_inod.resize (base::_node.ownership());
177 size_type first_dis_inod = base::_node.ownership().first_index();
178 for (
size_type inod = 0,
nnod = _inod2ios_dis_inod.size(); inod <
nnod; inod++) {
179 _inod2ios_dis_inod [inod] = first_dis_inod + inod;
181 _ios_inod2dis_inod = _inod2ios_dis_inod;
194 _ios_ige2dis_ige[base::_gs._map_dimension].resize (base::_gs.ownership_by_dimension [base::_gs._map_dimension]);
195 size_type first_dis_ige = base::_gs.ownership_by_dimension [base::_gs._map_dimension].first_index();
199 _igev2ios_dis_igev[
variant].resize (base::_gs.ownership_by_variant [
variant]);
200 size_type first_dis_igev = base::_gs.ownership_by_variant [
variant].first_index();
201 for (
size_type igev = 0, ngev = base::_geo_element[
variant].size(); igev < ngev; igev++, ige++) {
203 _ios_ige2dis_ige [base::_gs._map_dimension][ige] = first_dis_ige + ige;
204 _igev2ios_dis_igev [
variant][igev] = first_dis_igev + igev;
213 #define _RHEOLEF_instanciation(T,M) \
216 geo_base_rep<T,M>::build_from_list ( \
217 const geo_basic<T,M>& lambda, \
218 const disarray<point_basic<T>,M>& node_list, \
219 const std::array<disarray<geo_element_auto<heap_allocator<size_type> >,M>, \
220 reference_element::max_variant>& ge_list); \
222 geo_rep<T,M>::geo_rep ( \
223 const geo_basic<T,M>& lambda, \
224 const disarray<point_basic<T>,M>& node_list, \
225 const std::array<disarray<geo_element_auto<heap_allocator<size_type> >,M>, \
226 reference_element::max_variant>& ge_list); \
229 #ifdef _RHEOLEF_HAVE_MPI
see the Float page for the full documentation
see the disarray page for the full documentation
rep::base::const_iterator const_iterator
see the distributor page for the full documentation
static const size_type decide
base class for M=sequential or distributed meshes representations
void build_from_list(const geo_basic< T, M > &lambda, const disarray< point_basic< T >, M > &node_list, const std::array< disarray< geo_element_auto< heap_allocator< size_type > >, M >, reference_element::max_variant > &elt_list)
base::size_type size_type
distributed mesh with rerefence counting
see the geo_element page for the full documentation
void set_ios_dis_ie(size_type ios_dis_ie)
void set_dis_ie(size_type dis_ie)
base::size_type size_type
sequential mesh representation
std::vector< T, A >::iterator iterator
static const variant_type max_variant
static variant_type last_variant_by_dimension(size_type dim)
size_type dimension() const
static variant_type first_variant_by_dimension(size_type dim)
static const variant_type p
#define trace_macro(message)
#define dis_trace_macro(message)
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
size_type nnod(const basis_basic< T > &b, const geo_size &gs, size_type map_dim)
This file is part of Rheolef.
void compute_bbox(const geo_base_rep< T, M > &omega, const geo_element &K, point_basic< T > &xmin, point_basic< T > &xmax)
_RHEOLEF_instanciation(Float, sequential, std::allocator< Float >) _RHEOLEF_instanciation(Float