29 #include "../Rocmap/include/Pane_connectivity.h"
30 #include "../Rocmap/include/Pane_boundary.h"
31 #include "../Rocsurf/include/Generic_element_2.h"
40 : _base(b), _is_master(true), _quadratic(false),
41 _n_border(0), _n_isolated(0), _color(color) {}
47 if ( !
_base->is_structured()) {
51 for ( std::vector<const COM::Connectivity*>::const_iterator
54 const int ne = (*it)->size_of_edges_pe();
55 const int nn = (*it)->size_of_nodes_pe();
60 MAP::Pane_boundary pb(
_base);
72 if ( v1==v2)
return true;
73 V2b_table::const_iterator it1 =
_v2b_table.find( v1);
74 V2b_table::const_iterator it2 =
_v2b_table.find( v2);
77 return it2->second.first ==
id() &&
78 _b2v_table.find(
id())->second[it2->second.second] == v1;
80 return it1->second.first ==
id() &&
81 _b2v_table.find(
id())->second[it1->second.second] == v2;
83 RFC_assertion( it1->second.first==
id() && it2->second.first==
id());
84 B2v_table::const_iterator bit=
_b2v_table.find(
id());
85 return bit->second[it1->second.second]==bit->second[it2->second.second];
100 nc[0]=p[0]; nc[1]=p[1];
104 nc[0] = 1.-p[0]; nc[1]=0;
110 if ( i<0) i=num_edges-1;
120 if ( nc[0]==0 && nc[1]==0)
161 if (
_base->is_structured()) {
163 for (
int k=0;
k<4; ++
k)
164 if ( ene[
k] == vertex_lid)
return Edge_ID( face_lid,
k);
168 for ( std::vector<const COM::Connectivity*>::const_iterator
170 const int ne = (*it)->size_of_edges_pe();
171 if ( face_lid >
int((*it)->index_offset()) &&
172 face_lid <=
int((*it)->index_offset()+(*it)->size_of_elements())) {
175 for (
int k=0;
k<ne; ++
k)
176 if ( ene[
k] == vertex_lid)
return Edge_ID(face_lid,
k);
186 const int vid)
const {
204 V2b_table::const_iterator it =
_v2b_table.find( vid);
222 for ( B2v_table::iterator
224 for (
int i=0, size=it->second.size();
i<size; ++
i) {
227 std::pair<int,int> p(it->first,
i);
228 if ( it->first==
id()) {
230 (
i&1)==0 && it->second[
i] < it->second[
i+1]);
248 : _base(b), _verbose(1), _color(c), _map_comm( b, comm) {}
261 for ( ; pit != piend; ++pit) {
262 n += pit->second->size_of_primary_nodes();
273 for ( ; pit != piend; ++pit) {
274 n += pit->second->size_of_faces();
284 for ( ; it !=
iend; ++it)
285 b += it->second->get_bounding_box();
296 Pane_set::iterator pane_it, pane_iend=
_pane_set.end();
298 for ( pane_it=
_pane_set.begin(); pane_it != pane_iend; ++pane_it) {
299 const COM::Attribute *pconn =
302 int count=pc.pconn_offset(),
s = pconn->size_of_real_items();
303 const int *buf= ((
const int*)pconn->pointer())+count;
306 const int r_pid = *buf;
307 const int r_size = *(buf+1);
308 count += 2; buf += 2;
310 Pane::B2v &b2 = pane_it->second->_b2v_table[ r_pid];
312 b2.insert( b2.end(), buf, buf+r_size);
320 for ( pane_it=
_pane_set.begin(); pane_it != pane_iend; ++pane_it) {
333 for (
int i=0;
i<nsn; ++
i) {
351 for (
int i=0;
i<nsf; ++
i) {
358 for (
int j=0;
j<3; ++
j) {
368 Pane_set::const_iterator pane_it, pane_iend=
_pane_set.end();
370 for ( pane_it=
_pane_set.begin(); pane_it != pane_iend; ++pane_it) {
int face_id
local face id.
MAP::Pane_communicator _map_comm
An adaptor for enumerating node IDs of an element.
void build_pc_tables()
Build the pane connectivity table.
int vertex(int lvid, bool level=false) const
Get the vertex index of an vertex within the element.
void comp_nat_coors()
Compute the natural coordinates.
std::vector< const COM::Connectivity * > _elem_conns
void normalize_nat_coor(int idx, int e, Point &nc) const
Base * base()
The id of its base COM::Pane object.
Adpator for element-wise data container.
SURF::Point_2< float > Point_2S
const Point_3 & get_point(int id) const
Get the physical coordinates of the node with given local id.
Base * _base
Reference to its base object.
bool coincident(int i, int j) const
Report whether the two given nodes are coincident.
const RFC_Pane_base & pane(const int pid) const
int parent_type_of_subnode(int) const
Determine the parent type of a subnode of given tyep.
std::vector< Three_tuple< int > > _subfaces
int get_lvid(const Element_node_enumerator &ene, const int v) const
bool _quadratic
Does it contain quadratic elements?
int id() const
Get the local id of the element within the pane.
int size_of_subnodes() const
The total number of nodes in the subdivision of the pane.
std::vector< Edge_ID > _subnode_parents
Edge ids of parents.
Base * _base
A reference to its base COM::Window object.
void build_v2b_from_b2v(const RFC_Window_base *w)
Build pane connectivity.
std::vector< int > _elem_offsets
The base implementation of RFC_Pane.
std::vector< int > _subnode_subID
Sub-node ID of nodes in the pane.
#define RFC_END_NAME_SPACE
int get_parent_node(int) const
Get the local parent node id of a given subnode.
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
std::vector< bool > _is_isolated
Is a node isolated?
int size_of_faces() const
Get the total number of faces contained the window.
std::vector< Point_2S > _subnode_normalized_nc
Natual coordinates in the parent face.
int size_of_nodes() const
The total number of nodes in the pane.
A window is a collection of panes.
int size_of_edges() const
Number of edges per element.
Bbox_3 get_bounding_box() const
Get the bounding box of the pane.
int edge_id
edge id within the face.
#define RFC_BEGIN_NAME_SPACE
Point_3 get_point_of_subnode(int id) const
std::vector< bool > _is_border
Is a node on border?
void get_nat_coor_in_element(const int eid, const int lid, Point_2 &nc) const
Take a subface id and a local subnode id, return the natual coordinates of the subnode within the par...
int size_of_nodes() const
Number of nodes per element.
int size_of_subfaces() const
The total number of faces in the subdivision of the pane.
Edge_ID get_edge_id(const int face_lid, const int vertex_lid) const
Get the edge id within a given face.
std::vector< Node_ID > _subnode_counterparts
Ids of counterparts of subnodes.
std::vector< Three_tuple< Point_2S > > _subface_nat_coors
Element connectivity of the subfaces.
int size_of_nodes() const
Get the total number of nodes contained the window.
Pane_set _pane_set
The set of panes contained in the window.
const Real * coordinates() const
void get_host_element_of_subface(int i, Element_node_enumerator &ene) const
bool is_border_node(int i) const
Is a give node on the boundary of the pane?
std::vector< int > _subface_parents
Face ids of the parents of the subfaces.
std::vector< int > _subface_offsets
Offsets of first subfaces contained in a face.
An const adaptor for accessing nodal coordinates of a pane.
void next()
Go to the next element within the connectivity tables of a pane.
bool is_isolated_node(int i) const
Is a give node an isolated node not belong to any element?
void export_window(RFC_Window_base *) const
int size_of_primary_nodes() const
Get total number of primary nodes contained in the pane.
Bbox_3 get_bounding_box() const
Get the bounding box of the window.
std::vector< Point_2S > _subnode_nat_coors
Natual coordinates in the parent face.
std::vector< int > B2v
From local boundary ids to node ids.
std::vector< Face_ID > _subface_counterparts
Ids of counterparts of faces.
const Pane * pane() const
virtual ~RFC_Window_base()
Default destructor.
bool is_primary_node(const int vid) const
Is the node with given local id a primary one?