DOKK / manpages / debian 10 / librheolef-dev / geo_element.7rheolef.en
geo_element(7rheolef) rheolef-7.0 geo_element(7rheolef)

geo_element - element of a mesh

Defines geometrical elements and sides as a set of vertice and edge indexes. This element is obtained after a Piola transformation from a reference element (see reference_element(2)). Indexes are related to arrays of edges and vertices. These arrays are included in the description of the mesh. Thus, this class is related of a given mesh instance (see geo(2)).

This is the test of geo_element:


geo_element_auto<> K;
K.set_name('t') ;
cout << "n_vertices: " << K.size() << endl
<< "n_edges : " << K.n_edges() << endl
<< "dimension : " << K.dimension() << endl << endl;
for(geo_element::size_type i = 0; i < K.size(); i++)
K[i] = i*10 ;
for(geo_element::size_type i = 0; i < K.n_edges(); i++)
K.set_edge(i, i*10+5) ;
cout << "vertices: local -> global" << endl;
for (geo_element::size_type vloc = 0; vloc < K.size(); vloc++)
cout << vloc << "-> " << K[vloc] << endl;
cout << endl
<< "edges: local -> global" << endl;
for (geo_element::size_type eloc = 0; eloc < K.n_edges(); eloc++) {
geo_element::size_type vloc1 = subgeo_local_vertex(1, eloc, 0);
geo_element::size_type vloc2 = subgeo_local_vertex(1, eloc, 1);
cout << eloc << "-> " << K.edge(eloc) << endl
<< "local_vertex_from_edge(" << eloc
<< ") -> (" << vloc1 << ", " << vloc2 << ")" << endl;
}

reference_element(2), geo(2)

Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr> GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

rheolef-7.0 rheolef-7.0