.TH "geo" 2rheolef "Version 7.2" "rheolef" \" -*- nroff -*- .ad l .nh .SH NAME geo \- finite element mesh (rheolef-7\&.2) .SH "DESCRIPTION" .PP This class is a container for distributed finite element meshes\&. It is mainly a table of \fBgeo_element(6)\fP\&. Let \fComega\fP be a \fCgeo\fP: then, its \fCi\fP-th element is \fCK = omega[i]\fP\&. .PP In addition, the \fCgeo\fP class provides accessors to \fInodes\fP\&. Let \fCjv = K[j]\fP be the vertex index of the \fCj\fP-th vertex of the \fBgeo_element(6)\fP \fCK\fP\&. Then, the physical coordinates of this vertex are given by \fComega\&.node(jv)\fP\&. .PP Finally, the \fCgeo\fP class provides a list of domains, e\&.g\&. some parts of the boundary\&. A domain named \fC'left'\fP obtain via \fComega['left']\fP and this accessor returns the domain as a \fCgeo\fP object, i\&.e\&. a table of \fBgeo_element(6)\fP\&. .PP Lower dimension \fBgeo_element(6)\fP could be acceded via \fComega\&.get_geo_element (subdim, i)\fP\&. E\&.g\&. when \fCsubdim=1\fP we obtain the \fCi\fP-th edge of the mesh\&. .SH "EXAMPLE" .PP The following code lists all elements and nodes of the mesh\&. .PP .nf cout << omega\&.size() << " " << omega\&.n_node() << endl; for (size_t i = 0, n = omega\&.size(); i < n; ++i) { const geo_element& K = omega[i]; cout << K\&.name(); for (size_t j = 0, m = K\&.size(); j < m; ++j) cout << " " << K[j]; cout << endl; } for (size_t jv = 0, nv = omega\&.n_node(); jv < nv; ++jv) cout << omega\&.node(jv) << endl; .fi .PP .SH "DISTRIBUTED MESH" .PP In a distributed environment, the accessors are similar to those of the \fBdisarray(4)\fP class\&. Let \fCdis_i\fP be the index of an element in the global mesh\&. Then \fComega\&.dis_get_geo_element (dim, dis_i)\fP returns the corresponding \fBgeo_element(6)\fP\&. Elements at the neighbour of partition boundaries are available for such a global access\&. For others elements, that belong to others partitions, communications should be organized as for the \fBdisarray(4)\fP class\&. .SH "IMPLEMENTATION" .PP This documentation has been generated from file main/lib/geo\&.h .PP The \fCgeo\fP class is an alias to the \fC\fBgeo_basic\fP\fP class .PP .PP .nf typedef geo_basic geo; .fi .PP .PP \fB\fP .RS 4 .RE .PP The \fBgeo_basic\fP class provides an interface, via the \fBsmart_pointer(7)\fP class family, to a mesh container: .PP .PP .nf template class geo_basic : public smart_pointer_clone > { public: // typedefs: typedef sequential memory_type; typedef geo_abstract_rep rep; typedef geo_rep rep_geo_rep; typedef smart_pointer_clone 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; typedef typename rep::geo_element_map_type geo_element_map_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& dom, const geo_basic& omega); // build from_list (for level set) geo_basic ( const geo_basic& lambda, const disarray,sequential>& node_list, const std::array >,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(); } bool is_broken() const { return base::data()\&.is_broken(); } 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& 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 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& dis_inod) const { return base::data()\&.dis_inod(K,dis_inod); } const disarray& 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& get_domain_indirect (size_type i) const { return base::data()\&.get_domain_indirect (i); } const domain_indirect_basic& get_domain_indirect (const std::string& name) const { return base::data()\&.get_domain_indirect (name); } void insert_domain_indirect (const domain_indirect_basic& dom) const { base::data()\&.insert_domain_indirect (dom); } size_type n_domain () const { return base::data()\&.n_domain_indirect (); } geo_basic get_domain (size_type i) const; geo_basic operator[] (const std::string& name) const; geo_basic boundary() const; geo_basic internal_sides() const; geo_basic sides() const; // 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& x); // 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); } 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()); } // comparator: bool operator== (const geo_basic& omega2) const { return base::data()\&.operator== (omega2\&.data()); } // i/o: void save (std::string filename = "") const; .fi .PP .PP .nf }; template idiststream& operator>> (idiststream& ips, geo_basic& omega); template odiststream& operator<< (odiststream& ops, const geo_basic& omega); .fi .PP .SH AUTHOR Pierre Saramito .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.