A Pane object contains a mesh, pane attribute, and field variables. More...
#include <Pane.h>
Classes | |
class | Attribute_friend |
class | Connectivity_friend |
Public Types | |
enum | OP_Init { OP_SET =1, OP_SET_CONST, OP_ALLOC, OP_RESIZE, OP_DEALLOC } |
enum | Inherit_Modes { INHERIT_USE =0, INHERIT_CLONE, INHERIT_COPY } |
typedef std::vector< Attribute * > | Attr_set |
Vector of attributs. More... | |
typedef std::vector < Connectivity * > | Cnct_set |
Vector of connectivities. More... | |
typedef unsigned int | Size |
Unsighed int. More... | |
Public Member Functions | |
Constructor and destructor | |
Pane (Window *w, int i) | |
Create a pane in window w with ID i. More... | |
Pane (Pane *p, int i) | |
Create a pane by copying from attribute descriptions from another pane. More... | |
virtual | ~Pane () |
Default destructor. More... | |
Initialization | |
void | init_done () throw (COM_exception) |
Finalize the initialization of a pane. More... | |
Identification | |
const Window * | window () const |
Obtain a constant pointer to its owner window object. More... | |
Window * | window () |
Obtain a pointer to its owner window object. More... | |
int | id () const |
Get the ID of the pane. More... | |
int | dimension () const |
Dimension of the pane. More... | |
bool | is_unstructured () const |
Is mesh of the pane unstructured? More... | |
bool | is_mixed () const |
Does the pane contain more than one type of elements? More... | |
bool | is_structured () const |
Is mesh of the pane structured? More... | |
Mesh management | |
Size | size_of_nodes () const |
Get the total number of nodes in the pane (including ghost nodes). More... | |
Size | maxsize_of_nodes () const |
Get the maximum number of real nodes in the pane (excluding ghost nodes). More... | |
Size | size_of_ghost_nodes () const |
Get the number of ghost nodes. More... | |
Size | maxsize_of_ghost_nodes () const |
Get the maximum number of real nodes in the pane (excluding ghost nodes). More... | |
Size | size_of_real_nodes () const |
Get the number of real nodes in the pane (excluding ghost nodes). More... | |
Size | maxsize_of_real_nodes () const |
Get the maximum number of real nodes in the pane (excluding ghost nodes). More... | |
Size | size_of_elements () const |
Get the total number of elements in the pane (including ghost elements). More... | |
Size | maxsize_of_elements () const |
Get the maximum number of elements allowed in the pane (including ghost elements) More... | |
Size | size_of_ghost_elements () const |
Get the total number of ghost elements. More... | |
Size | maxsize_of_ghost_elements () const |
Get the maximum number of elements allowed in the pane (including ghost elements) More... | |
Size | size_of_real_elements () const |
Get the number of real elements in the pane (excluding ghost elements). More... | |
Size | maxsize_of_real_elements () const |
Get the maximum number of real elements allowed in the pane (excluding ghost elements). More... | |
double * | coordinates () |
Get the pointer to the values of the coordinates. More... | |
double * | x_coordinates () |
Get the pointer to the values of the x-coordinates, if the coordinates are staggered. More... | |
double * | y_coordinates () |
Get the pointer to the values of the y-coordinates, if the coordinates are staggered. More... | |
double * | z_coordinates () |
Get the pointer to the values of the z-coordinates, if the coordinates are staggered. More... | |
const double * | coordinates () const |
Get a constant pointer to the values of the coordinates. More... | |
const double * | x_coordinates () const |
Get a constant pointer to the values of the x-coordinates, if the coordinates are staggered. More... | |
const double * | y_coordinates () const |
Get a constant pointer to the values of the y-coordinates, if the coordinates are staggered. More... | |
const double * | z_coordinates () const |
Get a constant pointer to the values of the z-coordinates, if the coordinates are staggered. More... | |
int * | pane_connectivity () |
Get a pointer to the values of the pane connectivity. More... | |
const int * | pane_connectivity () const |
Get a const pointer to the values of the pane connectivity. More... | |
bool | ignore_ghost () const |
void | set_ignore_ghost (bool ignore) |
Structured meshes | |
Size | size_of_ghost_layers () const |
Dimension of the pane. More... | |
Size | size_i () const |
Get the number of nodes in i-dimension if the mesh is structured. More... | |
Size | size_j () const |
Get the number of nodes in j-dimension if the mesh is structured. More... | |
Size | size_k () const |
Get the number of nodes in k-dimension if the mesh is structured. More... | |
Attribute management | |
void | attributes (std::vector< Attribute * > &as) |
Obtain all the attributes of the pane. More... | |
void | attributes (std::vector< const Attribute * > &as) const |
Obtain all the attributes of the pane. More... | |
Attribute * | attribute (const std::string &a) |
Obtain the attribute from given name. More... | |
const Attribute * | attribute (const std::string &a) const |
Obtain the attribute from given name. More... | |
Attribute * | attribute (int i) |
Obtain the attribute from its ID. More... | |
const Attribute * | attribute (int i) const |
Obtain the attribute from its ID. More... | |
Connectivity management | |
void | connectivities (std::vector< Connectivity * > &es) |
Obtain all the element connectivities of the pane. More... | |
void | connectivities (std::vector< const Connectivity * > &es) const |
Connectivity * | connectivity (Size i) throw (COM_exception) |
Obtain the connectivity table containing the element with the given ID. More... | |
const Connectivity * | connectivity (Size i) const throw (COM_exception) |
void | elements (std::vector< Connectivity * > &es) |
Obtain all the element connectivities of the pane. More... | |
void | elements (std::vector< const Connectivity * > &es) const |
void | refresh_connectivity () throw (COM_exception) |
Update offsets and sizes of connectivity of an unstructured mesh. More... | |
Protected Member Functions | |
Attribute * | new_attribute (const std::string &aname, int aid, const char loc, const int type, int ncomp, const std::string &unit) throw (COM_exception) |
void | insert (Attribute *attr) throw (COM_exception) |
Insert an attribute onto the pane. More... | |
void | delete_attribute (int id) throw (COM_exception) |
Delete an existing attribute with given id. More... | |
void | reinit_attr (int aid, OP_Init op, void **addr, int strd, int cap) throw (COM_exception) |
const Connectivity * | connectivity (const std::string &a) const throw (COM_exception) |
Obtain the connectivity with the given name. More... | |
Connectivity * | connectivity (const std::string &a, bool insert=false) throw (COM_exception) |
void | reinit_conn (Connectivity *con, OP_Init op, int **addr, int strd, int cap) throw (COM_exception) |
Attribute * | inherit (Attribute *from, const std::string &aname, int mode, bool withghost) throw (COM_exception) |
Inherit an attribute from another pane onto the current pane: More... | |
void | set_size (Attribute *a, int nitems, int ng) throw ( COM_exception) |
Set the size of an attribute. More... | |
void | set_size (Connectivity *con, int nitems, int ng) throw ( COM_exception) |
Set the size of a connectivity table. More... | |
Protected Attributes | |
Window * | _window |
Point to the parent window. More... | |
int | _id |
Pane id. More... | |
Attr_set | _attr_set |
Set of attributes. More... | |
Cnct_set | _cnct_set |
Set of element connectivity. More... | |
bool | _ignore_ghost |
Whether the ghosts were ignored. More... | |
Private Member Functions | |
Pane (const Pane &) | |
Pane & | operator= (const Pane &) |
A Pane object contains a mesh, pane attribute, and field variables.
Mesh data include nodal coordinates and element connectivity.
typedef std::vector<Connectivity*> Cnct_set |
enum Inherit_Modes |
enum OP_Init |
Create a pane in window w with ID i.
Definition at line 33 of file Pane.C.
References _attr_set, COM_NUM_KEYWORDS, and i.
Create a pane by copying from attribute descriptions from another pane.
Definition at line 45 of file Pane.C.
References _attr_set, COM_NUM_KEYWORDS, i, INHERIT_USE, Attribute::is_windowed(), k, n, nk, Attribute::pane(), and Attribute::size_of_components().
|
virtual |
Default destructor.
Definition at line 75 of file Pane.C.
References _attr_set, _cnct_set, COM_ATTS, delete_attribute(), i, and n.
Attribute * attribute | ( | const std::string & | a | ) |
Obtain the attribute from given name.
Definition at line 148 of file Pane.C.
References _window, Window::attribute(), and Attribute::id().
Referenced by attribute(), Window::attribute(), Window::copy_array(), Window::get_array(), Window::get_parent(), Window::get_size(), Window::get_status(), Window::inherit(), inherit(), Attribute::maxsize_of_ghost_items(), Attribute::maxsize_of_items(), Attribute::maxsize_of_real_items(), Attribute::size_of_ghost_items(), Attribute::size_of_items(), Attribute::size_of_real_items(), Attribute::size_set(), Window::Window(), and write_attr_CGNS().
|
inline |
Obtain the attribute from given name.
Definition at line 239 of file Pane.h.
References attribute().
Attribute * attribute | ( | int | i | ) |
Obtain the attribute from its ID.
Definition at line 156 of file Pane.C.
References _attr_set, i, and Attribute::id().
|
inline |
Obtain the attribute from its ID.
Definition at line 246 of file Pane.h.
References attribute().
void attributes | ( | std::vector< Attribute * > & | as | ) |
Obtain all the attributes of the pane.
Definition at line 165 of file Pane.C.
References _attr_set, COM_NUM_KEYWORDS, i, Attribute::pane(), and Attribute::size_of_components().
Referenced by attributes(), Window::attributes(), and write_attr_CGNS().
|
inline |
Obtain all the attributes of the pane.
Definition at line 233 of file Pane.h.
References attributes().
|
inline |
Obtain all the element connectivities of the pane.
Definition at line 254 of file Pane.h.
Referenced by connectivities(), and elements().
|
inline |
Definition at line 257 of file Pane.h.
References connectivities().
Connectivity * connectivity | ( | Size | i | ) | |
throw | ( | COM_exception | |||
) |
Obtain the connectivity table containing the element with the given ID.
Definition at line 99 of file Pane.C.
References COM_assertion, COM_assertion_msg, i, Connectivity::index_offset(), and Connectivity::size_of_elements().
Referenced by connectivity(), Window::copy_array(), Window::get_array(), Window::get_parent(), Window::get_size(), Window::get_status(), Element_node_enumerator::next(), Element_node_enumerator_uns::next(), and Window::set_size().
|
inline |
Definition at line 263 of file Pane.h.
References connectivity(), and i.
|
inlineprotected |
Obtain the connectivity with the given name.
Definition at line 292 of file Pane.h.
References connectivity().
|
protected |
Definition at line 120 of file Pane.C.
References append_frame, COM_ERR_INVALID_ATTRIBUTE_NAME, COM_ERR_PANE_NOTEXIST, connectivity(), and Connectivity::get_size_info().
|
inline |
Get the pointer to the values of the coordinates.
It returns NULL if the coordinates are staggered.
Definition at line 167 of file Pane.h.
References _attr_set, and COM_NC.
|
inline |
Get a constant pointer to the values of the coordinates.
Definition at line 179 of file Pane.h.
References _attr_set, and COM_NC.
|
protected |
Delete an existing attribute with given id.
Definition at line 240 of file Pane.C.
References COM_assertion, COM_ATTS, COM_NUM_KEYWORDS, i, id(), n, Attribute::pane(), and Attribute::size_of_components().
Referenced by Window::delete_attribute(), and ~Pane().
|
inline |
Dimension of the pane.
Definition at line 99 of file Pane.h.
References _cnct_set.
Referenced by Pane_node_enumerator::dimension(), Element_node_enumerator::dimension(), Element_node_enumerator::Element_node_enumerator(), Pane_node_enumerator::next(), Element_node_enumerator::next(), Pane_node_enumerator::Pane_node_enumerator(), Element_node_enumerator::size_of_corners(), Element_node_enumerator::size_of_edges(), Element_node_enumerator::size_of_faces(), Element_node_enumerator::size_of_nodes(), Element_node_enumerator::type(), and write_attr_CGNS().
|
inline |
Obtain all the element connectivities of the pane.
Kept for backward compatibility
Definition at line 268 of file Pane.h.
References connectivities().
Referenced by write_attr_CGNS().
|
inline |
Definition at line 269 of file Pane.h.
References connectivities().
|
inline |
Get the ID of the pane.
Definition at line 96 of file Pane.h.
References _id.
Referenced by Rocblas::gen2arg(), Window::inherit(), Window::reinit_attr(), Window::reinit_conn(), Element_node_vectors_k_const< Value >::set(), Element_vectors_k_const< Value >::set(), and write_attr_CGNS().
|
inline |
Definition at line 202 of file Pane.h.
References _ignore_ghost.
Referenced by Attribute::maxsize_of_ghost_items(), Attribute::maxsize_of_items(), Connectivity::size_of_elements(), Attribute::size_of_ghost_items(), Attribute::size_of_items(), and Connectivity::size_of_nodes().
|
protected |
Inherit an attribute from another pane onto the current pane:
Definition at line 451 of file Pane.C.
References append_frame, attribute(), CATCHBADALLOC_APPEND, CATCHEXP_APPEND, COM_ALL, COM_assertion, COM_assertion_msg, COM_ATTS, COM_CONN, COM_ERR_ATTRIBUTE_NOTEXIST, COM_ERR_GHOST_LAYERS, COM_ERR_INCOMPATIBLE_TYPES, COM_MESH, COM_NC, COM_NUM_KEYWORDS, COM_PCONN, COM_PMESH, COM_RIDGES, Attribute::compatible_types(), Attribute::copy_array(), Attribute::data_type(), Attribute::fullname(), i, Attribute::id(), iend, Attribute::inherit(), Attribute::is_windowed(), j, Attribute::location(), n, ni, nj, Attribute::pane(), Attribute::pointer(), Connectivity::pointer(), Attribute::size_of_components(), Attribute::size_of_items(), Attribute::size_of_real_items(), and Attribute::stride().
Referenced by Window::inherit().
void init_done | ( | ) | ||
throw | ( | COM_exception | ||
) |
Finalize the initialization of a pane.
Definition at line 85 of file Pane.C.
References _attr_set, _window, append_frame, Attribute::capacity(), COM_ERR_INVALID_CAPACITY, Attribute::fullname(), i, Attribute::initialized(), Window::last_attribute_id(), Attribute::pane(), s, and Attribute::size_of_items().
|
protected |
Insert an attribute onto the pane.
Definition at line 224 of file Pane.C.
References COM_assertion, id(), and s.
Referenced by rflu_modrepair3d::putpnt(), and rflu_modrepair3d::volput().
|
inline |
|
inline |
Is mesh of the pane structured?
Definition at line 110 of file Pane.h.
References _cnct_set.
Referenced by Element_node_enumerator::Element_node_enumerator(), Element_node_enumerator::id(), refresh_connectivity(), size_i(), size_j(), size_k(), Element_node_enumerator::vertex(), and write_attr_CGNS().
|
inline |
Is mesh of the pane unstructured?
Definition at line 103 of file Pane.h.
References _cnct_set.
Referenced by Element_node_enumerator::Element_node_enumerator(), Pane_node_enumerator::next(), Pane_node_enumerator::Pane_node_enumerator(), and write_attr_CGNS().
|
inline |
Get the maximum number of elements allowed in the pane (including ghost elements)
Definition at line 146 of file Pane.h.
References _attr_set, and COM_CONN.
|
inline |
Get the maximum number of elements allowed in the pane (including ghost elements)
Definition at line 154 of file Pane.h.
References _attr_set, and COM_CONN.
|
inline |
Get the maximum number of real nodes in the pane (excluding ghost nodes).
Definition at line 130 of file Pane.h.
References _attr_set, and COM_NC.
|
inline |
Get the maximum number of real nodes in the pane (excluding ghost nodes).
Definition at line 122 of file Pane.h.
References _attr_set, and COM_NC.
|
inline |
Get the maximum number of real elements allowed in the pane (excluding ghost elements).
Definition at line 162 of file Pane.h.
References _attr_set, and COM_CONN.
|
inline |
Get the maximum number of real nodes in the pane (excluding ghost nodes).
Definition at line 138 of file Pane.h.
References _attr_set, and COM_NC.
|
protected |
Definition at line 178 of file Pane.C.
References append_frame, COM_assertion, COM_ERR_INVALID_ATTRIBUTE_NAME, i, n, and Attribute::name().
Referenced by Window::new_attribute().
|
inline |
Get a pointer to the values of the pane connectivity.
Definition at line 195 of file Pane.h.
References _attr_set, and COM_PCONN.
|
inline |
Get a const pointer to the values of the pane connectivity.
Definition at line 199 of file Pane.h.
References _attr_set, and COM_PCONN.
void refresh_connectivity | ( | ) | ||
throw | ( | COM_exception | ||
) |
Update offsets and sizes of connectivity of an unstructured mesh.
Definition at line 667 of file Pane.C.
References _attr_set, _cnct_set, _window, append_frame, COM_CONN, COM_ERR_INVALID_SIZE, COM_NC, is_structured(), Window::name(), Connectivity::set_offset(), Connectivity::size_of_elements(), Connectivity::size_of_ghost_elements(), size_of_ghost_nodes(), and size_of_nodes().
|
protected |
Definition at line 265 of file Pane.C.
References Attribute::allocate(), append_frame, Attribute::capacity(), COM_ALL, COM_assertion, COM_ATTS, COM_CONN, COM_ERR_ATTRIBUTE_NOTEXIST, COM_ERR_INVALID_SIZE, COM_ERR_PANE_NOTEXIST, COM_ERR_WAS_INITIALIZED, COM_MESH, COM_NC, COM_NUM_KEYWORDS, COM_PCONN, COM_PMESH, COM_RIDGES, Attribute::deallocate(), Attribute::fullname(), i, Attribute::is_digit(), Attribute::is_windowed(), n, Attribute::name(), Attribute::pane(), Attribute::set_size(), Attribute::size_of_components(), Attribute::size_of_items(), Attribute::size_set(), and Attribute::stride().
Referenced by Window::reinit_attr().
|
protected |
Definition at line 400 of file Pane.C.
References append_frame, COM_ERR_ALLOC_STRUCTURED, and COM_ERR_PANE_NOTEXIST.
|
inline |
|
protected |
Set the size of an attribute.
Definition at line 630 of file Pane.C.
References append_frame, COM_assertion_msg, COM_CONN, COM_ERR_INVALID_SIZE, COM_ERR_PANE_NOTEXIST, and COM_NC.
Referenced by Window::set_size(), and set_size().
|
protected |
Set the size of a connectivity table.
Definition at line 659 of file Pane.C.
References append_frame, COM_ERR_INVALID_SIZE, and set_size().
|
inline |
Get the number of nodes in i-dimension if the mesh is structured.
Definition at line 216 of file Pane.h.
References _cnct_set, and is_structured().
Referenced by Element_node_enumerator::Element_node_enumerator(), Element_node_enumerator::id(), Element_node_enumerator::next(), Element_node_enumerator_str_2::next(), Element_node_enumerator::operator[](), Element_node_enumerator_str_2::operator[](), Pane_node_enumerator::Pane_node_enumerator(), Element_node_enumerator::vertex(), and write_attr_CGNS().
|
inline |
Get the number of nodes in j-dimension if the mesh is structured.
Definition at line 219 of file Pane.h.
References _cnct_set, and is_structured().
Referenced by Element_node_enumerator::Element_node_enumerator(), Pane_node_enumerator::Pane_node_enumerator(), Element_node_enumerator::vertex(), and write_attr_CGNS().
|
inline |
Get the number of nodes in k-dimension if the mesh is structured.
Definition at line 222 of file Pane.h.
References _cnct_set, and is_structured().
Referenced by Pane_node_enumerator::Pane_node_enumerator(), and write_attr_CGNS().
|
inline |
Get the total number of elements in the pane (including ghost elements).
Definition at line 142 of file Pane.h.
References _attr_set, and COM_CONN.
Referenced by Element_node_enumerator::Element_node_enumerator().
|
inline |
Get the total number of ghost elements.
Definition at line 150 of file Pane.h.
References _attr_set, and COM_CONN.
|
inline |
Dimension of the pane.
Get the number of ghost layers for structured mesh
Definition at line 212 of file Pane.h.
Referenced by Pane_node_enumerator::Pane_node_enumerator(), and write_attr_CGNS().
|
inline |
Get the number of ghost nodes.
Definition at line 126 of file Pane.h.
References _attr_set, and COM_NC.
Referenced by refresh_connectivity(), Connectivity::size_of_ghost_nodes(), and write_attr_CGNS().
|
inline |
Get the total number of nodes in the pane (including ghost nodes).
Definition at line 118 of file Pane.h.
Referenced by Pane_node_enumerator::Pane_node_enumerator(), refresh_connectivity(), Connectivity::size_of_nodes(), and write_attr_CGNS().
|
inline |
Get the number of real elements in the pane (excluding ghost elements).
Definition at line 158 of file Pane.h.
References _attr_set, and COM_CONN.
Referenced by write_attr_CGNS().
|
inline |
Get the number of real nodes in the pane (excluding ghost nodes).
Definition at line 134 of file Pane.h.
References _attr_set, and COM_NC.
Referenced by Connectivity::size_of_real_nodes(), and write_attr_CGNS().
|
inline |
Obtain a constant pointer to its owner window object.
Definition at line 91 of file Pane.h.
Referenced by Attribute::window().
|
inline |
|
inline |
Get the pointer to the values of the x-coordinates, if the coordinates are staggered.
Definition at line 170 of file Pane.h.
References _attr_set, and COM_NC1.
|
inline |
Get a constant pointer to the values of the x-coordinates, if the coordinates are staggered.
Definition at line 183 of file Pane.h.
References _attr_set, and COM_NC1.
|
inline |
Get the pointer to the values of the y-coordinates, if the coordinates are staggered.
Definition at line 173 of file Pane.h.
References _attr_set, and COM_NC2.
|
inline |
Get a constant pointer to the values of the y-coordinates, if the coordinates are staggered.
Definition at line 187 of file Pane.h.
References _attr_set, and COM_NC2.
|
inline |
Get the pointer to the values of the z-coordinates, if the coordinates are staggered.
Definition at line 176 of file Pane.h.
References _attr_set, and COM_NC3.
|
inline |
Get a constant pointer to the values of the z-coordinates, if the coordinates are staggered.
Definition at line 191 of file Pane.h.
References _attr_set, and COM_NC3.
|
protected |
Set of attributes.
Definition at line 315 of file Pane.h.
Referenced by attribute(), attributes(), coordinates(), init_done(), maxsize_of_elements(), maxsize_of_ghost_elements(), maxsize_of_ghost_nodes(), maxsize_of_nodes(), maxsize_of_real_elements(), maxsize_of_real_nodes(), Pane(), pane_connectivity(), refresh_connectivity(), size_of_elements(), size_of_ghost_elements(), size_of_ghost_nodes(), size_of_real_elements(), size_of_real_nodes(), x_coordinates(), y_coordinates(), z_coordinates(), and ~Pane().
|
protected |
Set of element connectivity.
Definition at line 316 of file Pane.h.
Referenced by dimension(), is_mixed(), is_structured(), is_unstructured(), refresh_connectivity(), size_i(), size_j(), size_k(), and ~Pane().
|
protected |
Whether the ghosts were ignored.
Definition at line 317 of file Pane.h.
Referenced by ignore_ghost(), and set_ignore_ghost().
|
protected |
Point to the parent window.
Definition at line 313 of file Pane.h.
Referenced by attribute(), init_done(), refresh_connectivity(), and window().