31 #ifndef __ROCCOM_PANE_H__
32 #define __ROCCOM_PANE_H__
229 void attributes( std::vector<Attribute*> &as);
234 {
const_cast<Pane*
>(
this)->
attributes((std::vector<Attribute*>&)as); }
259 ( (std::vector<Connectivity*> &)es); }
269 void elements( std::vector< const Connectivity*> &es)
const
279 const
char loc, const
int type,
int ncomp,
280 const std::
string &unit) throw(COM_exception);
289 int strd,
int cap) throw(COM_exception);
293 const throw(COM_exception)
300 int strd,
int cap) throw (COM_exception);
304 int mode,
bool withghost) throw(COM_exception);
const double * z_coordinates() const
Get a constant pointer to the values of the z-coordinates, if the coordinates are staggered...
void inherit(Attribute *a, bool clone, bool withghost, int depth=0)
Inherit from parent. If depth>0, then the procedure is for the subcomponents.
Size maxsize_of_ghost_elements() const
Get the maximum number of elements allowed in the pane (including ghost elements) ...
Size size_of_real_elements() const
Get the number of real elements in the pane (excluding ghost elements).
const Window * window() const
Obtain a constant pointer to its owner window object.
A Pane object contains a mesh, pane attribute, and field variables.
int * pane_connectivity()
Get a pointer to the values of the pane connectivity.
Size maxsize_of_elements() const
Get the maximum number of elements allowed in the pane (including ghost elements) ...
Connectivity_friend(Connectivity &)
void set_pointer(void *p, int strd, int cap, int offset, bool is_const)
Set the physical address of the attribute values.
Size maxsize_of_real_elements() const
Get the maximum number of real elements allowed in the pane (excluding ghost elements).
An Attribute object is a data member of a window.
bool _ignore_ghost
Whether the ghosts were ignored.
const Attribute * attribute(const std::string &a) const
Obtain the attribute from given name.
Size maxsize_of_nodes() const
Get the maximum number of real nodes in the pane (excluding ghost nodes).
void reinit_conn(Connectivity *con, OP_Init op, int **addr, int strd, int cap)
A Window object contains multiple panes and multiple data attributes.
const double * x_coordinates() const
Get a constant pointer to the values of the x-coordinates, if the coordinates are staggered...
void set_size(Attribute *a, int nitems, int ng)
Set the size of an attribute.
bool is_structured() const
Is mesh of the pane structured?
Window * window()
Obtain a pointer to its owner window object.
const double * y_coordinates() const
Get a constant pointer to the values of the y-coordinates, if the coordinates are staggered...
Pane(Window *w, int i)
Create a pane in window w with ID i.
Size maxsize_of_ghost_nodes() const
Get the maximum number of real nodes in the pane (excluding ghost nodes).
Size size_of_ghost_nodes() const
Get the number of ghost nodes.
void delete_attribute(int id)
Delete an existing attribute with given id.
void attributes(std::vector< const Attribute * > &as) const
Obtain all the attributes of the pane.
Size size_of_ghost_elements() const
Get the total number of ghost elements.
Size size_k() const
Get the number of nodes in k-dimension if the mesh is structured.
bool is_mixed() const
Does the pane contain more than one type of elements?
void connectivities(std::vector< const Connectivity * > &es) const
double * x_coordinates()
Get the pointer to the values of the x-coordinates, if the coordinates are staggered.
Encapsulates the states of an exception.
void init_done()
Finalize the initialization of a pane.
Attribute * attribute(const std::string &a)
Obtain the attribute from given name.
Size size_of_elements() const
Get the total number of elements in the pane (including ghost elements).
Attribute_friend(Attribute &)
Window * _window
Point to the parent window.
const Attribute * attribute(int i) const
Obtain the attribute from its ID.
Attribute_friend(Pane *p, int i)
bool ignore_ghost() const
Size size_of_ghost_layers() const
Dimension of the pane.
void set_pointer(void *p, int strd, int cap, bool is_const)
Set pointer of connectivity table.
Size maxsize_of_real_nodes() const
Get the maximum number of real nodes in the pane (excluding ghost nodes).
void reinit_attr(int aid, OP_Init op, void **addr, int strd, int cap)
Size size_j() const
Get the number of nodes in j-dimension if the mesh is structured.
virtual ~Pane()
Default destructor.
void connectivities(std::vector< Connectivity * > &es)
Obtain all the element connectivities of the pane.
std::vector< Attribute * > Attr_set
Vector of attributs.
void set_offset(Size offset)
Set the index of the first element.
bool is_unstructured() const
Is mesh of the pane unstructured?
unsigned int Size
Unsighed int.
Contains the prototype of Connectivity.
void elements(std::vector< Connectivity * > &es)
Obtain all the element connectivities of the pane.
Size size_of_real_nodes() const
Get the number of real nodes in the pane (excluding ghost nodes).
void set_ignore_ghost(bool ignore)
Cnct_set _cnct_set
Set of element connectivity.
const double * coordinates() const
Get a constant pointer to the values of the coordinates.
double * y_coordinates()
Get the pointer to the values of the y-coordinates, if the coordinates are staggered.
Size size_of_nodes() const
Get the total number of nodes in the pane (including ghost nodes).
int dimension() const
Dimension of the pane.
std::vector< Connectivity * > Cnct_set
Vector of connectivities.
Connectivity * connectivity(Size i)
Obtain the connectivity table containing the element with the given ID.
double * coordinates()
Get the pointer to the values of the coordinates.
void refresh_connectivity()
Update offsets and sizes of connectivity of an unstructured mesh.
double * z_coordinates()
Get the pointer to the values of the z-coordinates, if the coordinates are staggered.
void inherit(Connectivity *parent, bool clone, bool withghost)
Inherit a connectivity table.
const int * pane_connectivity() const
Get a const pointer to the values of the pane connectivity.
Pane & operator=(const Pane &)
void elements(std::vector< const Connectivity * > &es) const
Attribute * new_attribute(const std::string &aname, int aid, const char loc, const int type, int ncomp, const std::string &unit)
Attribute * inherit(Attribute *from, const std::string &aname, int mode, bool withghost)
Inherit an attribute from another pane onto the current pane:
const Connectivity * connectivity(Size i) const
Size size_i() const
Get the number of nodes in i-dimension if the mesh is structured.
Attr_set _attr_set
Set of attributes.
void attributes(std::vector< Attribute * > &as)
Obtain all the attributes of the pane.
void insert(Attribute *attr)
Insert an attribute onto the pane.
Encapsulates an element-connectivity of a mesh.
int id() const
Get the ID of the pane.