Provided by: librheolef-dev_6.7-6_amd64
NAME
geo - finite element mesh (rheolef-6.7)
SYNOPSYS
Distributed finite element mesh.
IMPLEMENTATION
template <class T> class geo_basic<T,sequential> : public smart_pointer_clone<geo_abstract_rep<T,sequential> > { public: // typedefs: typedef sequential memory_type; typedef geo_abstract_rep<T,sequential> rep; typedef geo_rep<T,sequential> rep_geo_rep; typedef smart_pointer_clone<rep> base; typedef typename rep::size_type size_type; typedef typename rep::node_type node_type; typedef typename rep::variant_type variant_type; typedef typename rep::reference reference; typedef typename rep::const_reference const_reference; typedef typename rep::iterator iterator; typedef typename rep::const_iterator const_iterator; typedef typename rep::iterator_by_variant iterator_by_variant; typedef typename rep::const_iterator_by_variant const_iterator_by_variant; typedef typename rep::coordinate_type coordinate_type; // allocators: geo_basic (); geo_basic (std::string name, const communicator& comm = communicator()); void load (std::string name, const communicator& comm = communicator()); geo_basic (const domain_indirect_basic<sequential>& dom, const geo_basic<T,sequential>& omega); // build from_list (for level set) geo_basic ( const geo_basic<T,sequential>& lambda, const disarray<point_basic<T>,sequential>& node_list, const std::array<disarray<geo_element_auto<heap_allocator<size_type> >,sequential>, reference_element::max_variant>& elt_list) : base (new_macro(rep_geo_rep(lambda,node_list,elt_list))) {} // accessors: std::string name() const { return base::data().name(); } std::string familyname() const { return base::data().familyname(); } size_type dimension() const { return base::data().dimension(); } size_type map_dimension() const { return base::data().map_dimension(); } size_type serial_number() const { return base::data().serial_number(); } size_type variant() const { return base::data().variant(); } coordinate_type coordinate_system() const { return base::data().coordinate_system(); } std::string coordinate_system_name() const { return space_constant::coordinate_system_name(coordinate_system()); } const basis_basic<T>& get_piola_basis() const { return base::data().get_piola_basis(); } size_type order() const { return base::data().get_piola_basis().degree(); } const node_type& xmin() const { return base::data().xmin(); } const node_type& xmax() const { return base::data().xmax(); } const T& hmin() const { return base::data().hmin(); } const T& hmax() const { return base::data().hmax(); } const distributor& geo_element_ownership(size_type dim) const { return base::data().geo_element_ownership(dim); } const geo_size& sizes() const { return base::data().sizes(); } const geo_size& ios_sizes() const { return base::data().ios_sizes(); } const_reference get_geo_element (size_type dim, size_type ige) const { return base::data().get_geo_element (dim, ige); } reference get_geo_element (size_type dim, size_type ige) { return base::data().get_geo_element (dim, ige); } const_reference dis_get_geo_element (size_type dim, size_type dis_ige) const { return get_geo_element (dim, dis_ige); } const geo_element& bgd2dom_geo_element (const geo_element& bgd_K) const { return base::data().bgd2dom_geo_element (bgd_K); } const geo_element& dom2bgd_geo_element (const geo_element& dom_K) const { return base::data().dom2bgd_geo_element (dom_K); } size_type neighbour (size_type ie, size_type loc_isid) const { return base::data().neighbour (ie, loc_isid); } void neighbour_guard() const { base::data().neighbour_guard(); } size_type n_node() const { return base::data().n_node(); } const node_type& node(size_type inod) const { return base::data().node(inod); } const node_type& dis_node(size_type dis_inod) const { return base::data().dis_node(dis_inod); } void dis_inod (const geo_element& K, std::vector<size_type>& dis_inod) const { return base::data().dis_inod(K,dis_inod); } node_type piola (const geo_element& K, const node_type& hat_x) const { return base::data().piola (K, hat_x); } const disarray<node_type,sequential>& get_nodes() const { return base::data().get_nodes(); } size_type dis_inod2dis_iv (size_type dis_inod) const { return base::data().dis_inod2dis_iv(dis_inod); } size_type n_domain_indirect () const { return base::data().n_domain_indirect (); } bool have_domain_indirect (const std::string& name) const { return base::data().have_domain_indirect (name); } const domain_indirect_basic<sequential>& get_domain_indirect (size_type i) const { return base::data().get_domain_indirect (i); } const domain_indirect_basic<sequential>& get_domain_indirect (const std::string& name) const { return base::data().get_domain_indirect (name); } void insert_domain_indirect (const domain_indirect_basic<sequential>& dom) const { base::data().insert_domain_indirect (dom); } size_type n_domain () const { return base::data().n_domain_indirect (); } geo_basic<T,sequential> get_domain (size_type i) const; geo_basic<T,sequential> operator[] (const std::string& name) const; geo_basic<T,sequential> boundary() const; geo_basic<T,sequential> internal_sides() const; geo_basic<T,sequential> sides() const; size_type seq_locate ( const point_basic<T>& x, size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const { return base::data().seq_locate (x, dis_ie_guest); } size_type dis_locate ( const point_basic<T>& x, size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const { return base::data().dis_locate (x, dis_ie_guest); } void locate ( const disarray<point_basic<T>, sequential>& x, disarray<size_type, sequential>& dis_ie) const { return base::data().locate (x, dis_ie); } size_type seq_trace_move ( const point_basic<T>& x, const point_basic<T>& v, point_basic<T>& y) const { return base::data().seq_trace_move (x,v,y); } size_type dis_trace_move ( const point_basic<T>& x, const point_basic<T>& v, point_basic<T>& y) const { return base::data().dis_trace_move (x,v,y); } void trace_ray_boundary ( const disarray<point_basic<T>,sequential>& x, const disarray<point_basic<T>,sequential>& v, disarray<size_type, sequential>& dis_ie, disarray<point_basic<T>,sequential>& y) const { return base::data().trace_ray_boundary (x,v,dis_ie,y); } void trace_move ( const disarray<point_basic<T>,sequential>& x, const disarray<point_basic<T>,sequential>& v, disarray<size_type, sequential>& dis_ie, disarray<point_basic<T>,sequential>& y) const { return base::data().trace_move (x,v,dis_ie,y); } size_type seq_nearest ( const point_basic<T>& x, point_basic<T>& x_nearest) const { return base::data().seq_nearest (x, x_nearest); } size_type dis_nearest ( const point_basic<T>& x, point_basic<T>& x_nearest) const { return base::data().dis_nearest (x, x_nearest); } void nearest ( const disarray<point_basic<T>,sequential>& x, disarray<point_basic<T>,sequential>& x_nearest, disarray<size_type, sequential>& dis_ie) const { base::data().nearest (x, x_nearest, dis_ie); } // modifiers: void set_name (std::string name); void set_dimension (size_type dim); void set_serial_number (size_type i); void reset_order (size_type order); void set_coordinate_system (coordinate_type sys_coord); void set_coordinate_system (std::string sys_coord_name) { set_coordinate_system (space_constant::coordinate_system(sys_coord_name)); } void set_nodes (const disarray<node_type,sequential>& x); void build_by_subdividing (const geo_basic<T,sequential>& omega, size_type k); void build_from_data ( const geo_header& hdr, const disarray<node_type, sequential>& node, std::array<disarray<geo_element_auto<heap_allocator<size_type> >,sequential, heap_allocator<size_type> >, reference_element::max_variant>& tmp_geo_element, bool do_upgrade); // extended accessors: const communicator& comm() const { return geo_element_ownership (0).comm(); } size_type size(size_type dim) const { return base::data().geo_element_ownership(dim).size(); } size_type dis_size(size_type dim) const { return base::data().geo_element_ownership(dim).dis_size(); } size_type size() const { return size (map_dimension()); } size_type dis_size() const { return dis_size (map_dimension()); } size_type n_vertex() const { return size (0); } size_type dis_n_vertex() const { return dis_size (0); } const_reference operator[] (size_type ie) const { return get_geo_element (map_dimension(), ie); } reference operator[] (size_type ie) { return get_geo_element (map_dimension(), ie); } const_iterator begin (size_type dim) const { return base::data().begin(dim); } const_iterator end (size_type dim) const { return base::data().end (dim); } const_iterator begin () const { return begin(map_dimension()); } const_iterator end () const { return end (map_dimension()); } const_iterator_by_variant begin_by_variant (variant_type variant) const { return base::data().begin_by_variant (variant); } const_iterator_by_variant end_by_variant (variant_type variant) const { return base::data(). end_by_variant (variant); } const geo_basic<T,sequential>& get_background_geo() const; // code in geo_domain.h geo_basic<T,sequential> get_background_domain() const; // for compatibility with distributed interface: size_type ige2ios_dis_ige (size_type dim, size_type ige) const { return ige; } size_type dis_ige2ios_dis_ige (size_type dim, size_type dis_ige) const { return dis_ige; } size_type ios_ige2dis_ige (size_type dim, size_type ios_ige) const { return ios_ige; } // comparator: bool operator== (const geo_basic<T,sequential>& omega2) const { return base::data().operator== (omega2.data()); } // i/o: idiststream& get (idiststream& ips); odiststream& put (odiststream& ops) const; void save (std::string filename = "") const; void dump (std::string name) const { base::data().dump (name); } bool check (bool verbose = true) const { return base::data().check(verbose); } };
IMPLEMENTATION
template <class T> class geo_basic<T,distributed> : public smart_pointer_clone<geo_abstract_rep<T,distributed> > { public: // typedefs: typedef distributed memory_type; typedef geo_abstract_rep<T,distributed> rep; typedef geo_rep<T,distributed> rep_geo_rep; typedef smart_pointer_clone<rep> base; typedef typename rep::size_type size_type; typedef typename rep::node_type node_type; typedef typename rep::variant_type variant_type; typedef typename rep::node_map_type node_map_type; typedef typename rep::reference reference; typedef typename rep::const_reference const_reference; typedef typename rep::iterator iterator; typedef typename rep::const_iterator const_iterator; typedef typename rep::iterator_by_variant iterator_by_variant; typedef typename rep::const_iterator_by_variant const_iterator_by_variant; typedef typename rep::coordinate_type coordinate_type; // allocators: geo_basic (); geo_basic (std::string name, const communicator& comm = communicator()); void load (std::string name, const communicator& comm = communicator()); geo_basic (const domain_indirect_basic<distributed>& dom, const geo_basic<T,distributed>& omega); // build from_list (for level set) geo_basic ( const geo_basic<T,distributed>& lambda, const disarray<point_basic<T>,distributed>& node_list, const std::array<disarray<geo_element_auto<heap_allocator<size_type> >,distributed>, reference_element::max_variant>& elt_list) : base (new_macro(rep_geo_rep(lambda,node_list,elt_list))) {} // accessors: std::string name() const { return base::data().name(); } std::string familyname() const { return base::data().familyname(); } size_type dimension() const { return base::data().dimension(); } size_type map_dimension() const { return base::data().map_dimension(); } size_type serial_number() const { return base::data().serial_number(); } size_type variant() const { return base::data().variant(); } coordinate_type coordinate_system() const { return base::data().coordinate_system(); } std::string coordinate_system_name() const { return space_constant::coordinate_system_name(coordinate_system()); } const basis_basic<T>& get_piola_basis() const { return base::data().get_piola_basis(); } size_type order() const { return base::data().get_piola_basis().degree(); } const node_type& xmin() const { return base::data().xmin(); } const node_type& xmax() const { return base::data().xmax(); } const T& hmin() const { return base::data().hmin(); } const T& hmax() const { return base::data().hmax(); } const distributor& geo_element_ownership(size_type dim) const { return base::data().geo_element_ownership (dim); } const geo_size& sizes() const { return base::data().sizes(); } const geo_size& ios_sizes() const { return base::data().ios_sizes(); } const_reference get_geo_element (size_type dim, size_type ige) const { return base::data().get_geo_element (dim, ige); } const_reference dis_get_geo_element (size_type dim, size_type dis_ige) const { return base::data().dis_get_geo_element (dim, dis_ige); } const geo_element& bgd2dom_geo_element (const geo_element& bgd_K) const { return base::data().bgd2dom_geo_element (bgd_K); } const geo_element& dom2bgd_geo_element (const geo_element& dom_K) const { return base::data().dom2bgd_geo_element (dom_K); } size_type neighbour (size_type ie, size_type loc_isid) const { return base::data().neighbour (ie, loc_isid); } void neighbour_guard() const { base::data().neighbour_guard(); } distributor geo_element_ios_ownership (size_type dim) const { return base::data().geo_element_ios_ownership (dim); } size_type ige2ios_dis_ige (size_type dim, size_type ige) const { return base::data().ige2ios_dis_ige (dim,ige); } size_type dis_ige2ios_dis_ige (size_type dim, size_type dis_ige) const { return base::data().dis_ige2ios_dis_ige (dim,dis_ige); } size_type ios_ige2dis_ige (size_type dim, size_type ios_ige) const { return base::data().ios_ige2dis_ige (dim, ios_ige); } size_type n_node() const { return base::data().n_node(); } const node_type& node(size_type inod) const { return base::data().node(inod); } const node_type& dis_node(size_type dis_inod) const { return base::data().dis_node(dis_inod); } void dis_inod (const geo_element& K, std::vector<size_type>& dis_inod) const { return base::data().dis_inod(K,dis_inod); } node_type piola (const geo_element& K, const node_type& hat_x) const { return base::data().piola (K, hat_x); } const disarray<node_type,distributed>& get_nodes() const { return base::data().get_nodes(); } size_type n_domain_indirect () const { return base::data().n_domain_indirect (); } bool have_domain_indirect (const std::string& name) const { return base::data().have_domain_indirect (name); } const domain_indirect_basic<distributed>& get_domain_indirect (size_type i) const { return base::data().get_domain_indirect (i); } const domain_indirect_basic<distributed>& get_domain_indirect (const std::string& name) const { return base::data().get_domain_indirect (name); } void insert_domain_indirect (const domain_indirect_basic<distributed>& dom) const { base::data().insert_domain_indirect (dom); } size_type n_domain () const { return base::data().n_domain_indirect (); } geo_basic<T,distributed> get_domain (size_type i) const; geo_basic<T,distributed> operator[] (const std::string& name) const; geo_basic<T,distributed> boundary() const; geo_basic<T,distributed> internal_sides() const; geo_basic<T,distributed> sides() const; size_type seq_locate ( const point_basic<T>& x, size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const { return base::data().seq_locate (x, dis_ie_guest); } size_type dis_locate ( const point_basic<T>& x, size_type dis_ie_guest = std::numeric_limits<size_type>::max()) const { return base::data().dis_locate (x, dis_ie_guest); } void locate (const disarray<point_basic<T>, distributed>& x, disarray<size_type, distributed>& dis_ie) const { return base::data().locate (x, dis_ie); } size_type seq_trace_move ( const point_basic<T>& x, const point_basic<T>& v, point_basic<T>& y) const { return base::data().seq_trace_move (x,v,y); } size_type dis_trace_move ( const point_basic<T>& x, const point_basic<T>& v, point_basic<T>& y) const { return base::data().dis_trace_move (x,v,y); } void trace_ray_boundary ( const disarray<point_basic<T>,distributed>& x, const disarray<point_basic<T>,distributed>& v, disarray<size_type, distributed>& dis_ie, disarray<point_basic<T>,distributed>& y) const { return base::data().trace_ray_boundary (x,v,dis_ie,y); } void trace_move ( const disarray<point_basic<T>,distributed>& x, const disarray<point_basic<T>,distributed>& v, disarray<size_type, distributed>& dis_ie, disarray<point_basic<T>,distributed>& y) const { return base::data().trace_move (x,v,dis_ie,y); } size_type seq_nearest ( const point_basic<T>& x, point_basic<T>& x_nearest) const { return base::data().seq_nearest (x, x_nearest); } size_type dis_nearest ( const point_basic<T>& x, point_basic<T>& x_nearest) const { return base::data().dis_nearest (x, x_nearest); } void nearest ( const disarray<point_basic<T>,distributed>& x, disarray<point_basic<T>,distributed>& x_nearest, disarray<size_type, distributed>& dis_ie) const { base::data().nearest (x, x_nearest, dis_ie); } // modifiers: void set_nodes (const disarray<node_type,distributed>& x); void reset_order (size_type order); size_type dis_inod2dis_iv (size_type dis_inod) const { return base::data().dis_inod2dis_iv(dis_inod); } void set_coordinate_system (coordinate_type sys_coord); void set_coordinate_system (std::string sys_coord_name) { set_coordinate_system (space_constant::coordinate_system(sys_coord_name)); } void set_dimension (size_type dim); void set_serial_number (size_type i); void set_name (std::string name); void build_by_subdividing (const geo_basic<T,distributed>& omega, size_type k); // extended accessors: size_type size(size_type dim) const { return base::data().geo_element_ownership(dim).size(); } size_type dis_size(size_type dim) const { return base::data().geo_element_ownership(dim).dis_size(); } const communicator& comm() const { return geo_element_ownership (0).comm(); } size_type size() const { return size (map_dimension()); } size_type dis_size() const { return dis_size (map_dimension()); } size_type n_vertex() const { return size (0); } size_type dis_n_vertex() const { return dis_size (0); } const_reference operator[] (size_type ie) const { return get_geo_element (map_dimension(), ie); } const_iterator begin (size_type dim) const { return base::data().begin(dim); } const_iterator end (size_type dim) const { return base::data().end (dim); } const_iterator begin () const { return begin(map_dimension()); } const_iterator end () const { return end (map_dimension()); } const_iterator_by_variant begin_by_variant (variant_type variant) const { return base::data().begin_by_variant (variant); } const_iterator_by_variant end_by_variant (variant_type variant) const { return base::data(). end_by_variant (variant); } const geo_basic<T,distributed>& get_background_geo() const; // code in geo_domain.h geo_basic<T,distributed> get_background_domain() const; // comparator: bool operator== (const geo_basic<T,distributed>& omega2) const { return base::data().operator== (omega2.data()); } // i/o: odiststream& put (odiststream& ops) const { return base::data().put (ops); } idiststream& get (idiststream& ips); void save (std::string filename = "") const; bool check (bool verbose = true) const { return base::data().check(verbose); } // utilities: void set_ios_permutation ( std::array<size_type,reference_element::max_variant>& loc_ndof_by_variant, disarray<size_type,distributed>& idof2ios_dis_idof) const { base::data().set_ios_permutation (loc_ndof_by_variant, idof2ios_dis_idof); } };