31 #ifndef __ROCCOM_CONNECTIVITY_H__
32 #define __ROCCOM_CONNECTIVITY_H__
91 const int sizes[],
int type=
COM_INT)
99 const std::string &
name,
int id)
229 return aname[0] ==
':';
249 bool is_const) throw(COM_exception);
void inherit(Attribute *a, bool clone, bool withghost, int depth=0)
Inherit from parent. If depth>0, then the procedure is for the subcomponents.
Attribute * _parent
Parent attribute being used.
int * pointer()
Get a pointer to the connectivity array.
Size size_of_ghost_elements() const
Get the number of ghost elements.
A Pane object contains a mesh, pane attribute, and field variables.
bool initialized() const
Returns whether the array for the attribute has been set or allocated.
int maxsize_of_real_items() const
Obtain the maximum allowed number of real items in the attribute.
const int * pointer() const
Get a constant pointer to the connectivity array.
An Attribute object is a data member of a window.
const Connectivity * root() const
bool is_structured() const
Determine whether the mesh is quadratic.
int dimension() const
Get the dimension of the mesh.
Connectivity * parent()
Parent attribute being used.
static Size size_of_edges_pe(int type)
Get the number of edges per element of the given type of element.
int status() const
Obtain the status of the attribute.
Size size_of_corners_pe() const
Get the number of corners per element of the current connectivity table.
real *8 function offset(vNorm, x2, y2, z2)
const Window * window() const
Obtain a constant pointer to the parent window of the attribute.
bool is_quadratic() const
Determine whether the element type is quadratic.
Size size_of_ghost_nodes() const
Get the number of ghost nodes of the owner pane.
int maxsize_of_items() const
Obtain the maximum allowed number of items in the attribute.
Shorter_size location() const
Obtain the location of the attribute.
static const int * get_size_info(const std::string &aname)
Obtain the size info of pre-defined connectivity.
Encapsulates the states of an exception.
int deallocate()
Deallocate memory if it was allocated by allocate().
Size size_k() const
Get the number of nodes in k-dimension if the mesh is structured.
Connectivity * root()
Root of use-inheritance.
int capacity() const
Obtain the capacity of the array.
Attribute * root()
Root of use-inheritance.
unsigned int Size
Unsighed int.
const void * pointer() const
Obtain a constant pointer to the physical address.
Size index_offset() const
Get the index of the first element.
const Connectivity * parent() const
int size_of_ghost_items() const
Obtain the number of ghost items in the attribute.
Size size_of_nodes() const
Get the total number of nodes (including ghost nodes) of the owner pane.
int _offset
Offset of the first element.
Connectivity(Pane *pane, Connectivity *con, const std::string &name, int id)
Construct from another connectivity table.
Size size_of_real_elements() const
Get the number of real elements.
void set_pointer(void *p, int strd, int cap, bool is_const)
Set pointer of connectivity table.
const std::string & name() const
Obtain the name of the attribute.
static bool is_element_name(const std::string &aname)
static Size size_of_nodes_pe(int type)
Get the number of nodes per element of the given type of element.
void set_offset(Size offset)
Set the index of the first element.
Size size_of_edges_pe() const
Get the number of edges per element of the current connectivity table.
int stride() const
Obtain the stride of the attribute in base datatype.
int maxsize_of_ghost_items() const
Obtain the maximum allowed number of items in the attribute.
int size_of_real_items() const
Obtain the number of real items in the attribute.
void set_size(int nitems, int ngitems=0)
Set the size of items and ghost items.
const Pane * pane() const
Obtain a constant pointer to the owner pane of the attribute.
bool is_const() const
Returns whether the array is set to be read-only.
static Size size_of_corners_pe(int type)
Get the number of corners per element of the given type of element.
static Size size_of_faces_pe(int type)
Get the number of faces per element of the given type of element.
bool is_staggered() const
Check how the attribute values are organized.
Size size_of_nodes_pe() const
Get the number of nodes per element of the current connectivity table.
Size size_j() const
Get the number of nodes in j-dimension if the mesh is structured.
const int * get_addr(int i, int j=0) const
Obtain the address of the jth component of the ith item, where 0<=i<size_of_items.
void * allocate(int strd, int cap, bool force)
Allocate memory for the attribute.
void inherit(Connectivity *parent, bool clone, bool withghost)
Inherit a connectivity table.
Size size_of_elements() const
Get the total number of elements (including ghost elements) in the table.
int element_type() const
Obtain element type ID.
void copy_array(void *buf, int strd, int nitem, int offset=0, int direction=COPY_IN)
void * allocate(int strd, int cap, bool force)
Allocate memory for unstructured mesh.
Contains the prototype of Attriubte.
unsigned char Shorter_size
One byte unsighed int.
COM_Type data_type() const
Obtain the data type of each component of the attribute.
int id() const
Obtain the id (or index) of the attribute.
static const int _sizes[TYPE_MAX_CONN][SIZE_MAX_CONN]
Size size_of_real_nodes() const
Get the number of real nodes of the owner pane.
Size size_of_faces_pe() const
Get the number of faces per element of the current connectivity table.
bool empty() const
Check whether the number of items of the attribute is zero.
bool is_const() const
Returns whether the array is set to be read-only.
Connectivity(Pane *pane, const std::string &name, int id, const int sizes[], int type=COM_INT)
Create an attribute with name n in window w.
Encapsulates an element-connectivity of a mesh.
int size_of_items() const
Obtain the number of items in the attribute.
std::string fullname() const
Obtain the full name of the attribute including window name suitable for printing out error messages...
Size size_i() const
Get the number of nodes in i-dimension if the mesh is structured.
int size_of_components() const
Obtain the number of components in the attribute.