Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RFC_Window_base_IO.C
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: RFC_Window_base_IO.C,v 1.33 2009/10/08 15:35:59 mtcampbe Exp $
24 
25 #include "RFC_Window_base.h"
26 #include <cstdio>
27 #include <cstdlib>
28 #include <fstream>
29 #include <iostream>
30 #include <cassert>
31 #include <sstream>
32 #include <cstring>
33 
35 
36 // New attributes in the given window for output using Rocout.
38 new_sdv_attributes( const std::string &wname) const {
39 
40  // New attributes for v2b and b2v.
41  COM_new_attribute( (wname+".v2b").c_str(), 'p', COM_INT, 1, "");
42  COM_new_attribute( (wname+".b2v").c_str(), 'p', COM_INT, 1, "");
43 
44  // New attributes for subnode parents
45  COM_new_attribute( (wname+".sn_parent_fcID").c_str(), 'n', COM_INT, 1, "");
46  COM_new_attribute( (wname+".sn_parent_ncs").c_str(), 'n', COM_FLOAT, 2, "");
47 
48  // New attributes for natural coordinates
49  COM_new_attribute( (wname+".sn_permu_edID").c_str(), 'n', COM_INT, 1, "");
50  COM_new_attribute( (wname+".sn_permu_ncs").c_str(), 'n', COM_FLOAT, 2, "");
51 
52  // New attributes for counterpart of each subnode
53  COM_new_attribute( (wname+".sn_cntpt_pnID").c_str(), 'n', COM_INT, 1, "");
54  COM_new_attribute( (wname+".sn_cntpt_ndID").c_str(), 'n', COM_INT, 1, "");
55 
56  // New attributes for the mapping from node IDs to sub-node IDs.
57  COM_new_attribute( (wname+".sn_subID").c_str(), 'p', COM_INT, 1, "");
58 
59  // New attributes for the parent of each subface
60  COM_new_attribute( (wname+".sf_parent").c_str(), 'e', COM_INT, 1, "");
61 
62  // Register the natural coordinates of subnodes in each subface
63  COM_new_attribute( (wname+".sf_ncs").c_str(), 'e', COM_FLOAT, 6, "");
64 
65  // New attributes for the counterpart in the other mesh of each subface
66  COM_new_attribute( (wname+".sf_cntpt_pnID").c_str(), 'e', COM_INT, 1, "");
67  COM_new_attribute( (wname+".sf_cntpt_fcID").c_str(), 'e', COM_INT, 1, "");
68 
69  // New attributes for the offset of the subface ID for each input facet
70  COM_new_attribute( (wname+".sf_offset").c_str(), 'p', COM_INT, 1, "");
71 }
72 
73 // Register the attributes for the pane for output using Rocout.
74 void RFC_Pane_base::
75 register_sdv_attributes( const std::string &wname) const {
76  // Register the mesh
77  const int pid = id();
78 
79  // Pack coordinates into double precision buffers
80  int nnodes = size_of_subnodes();
81  COM_set_size( (wname+".nc").c_str(), pid, nnodes);
82 
83  Point_3 *coor;
84  COM_allocate_array( (wname+".nc").c_str(), pid, &(void*&)coor);
85  for ( int i=0; i<nnodes; ++i)
86  coor[i] = get_point_of_subnode( i+1);
87 
88  // Register subface connectivity, parents, and counterparts
89  COM_set_size( (wname+".:t3").c_str(), pid, _subfaces.size());
90  COM_set_array_const( (wname+".:t3").c_str(), pid, &_subfaces[0]);
91 
92  // Pack pane connectivity v2b of the pane into integer buffers
93  // allocated in Roccom.
94  int *v2b_buf;
95  COM_set_size( (wname+".v2b").c_str(), pid, _v2b_table.size()*3);
96  COM_allocate_array( (wname+".v2b").c_str(), pid, &(void*&)v2b_buf);
97 
98  for ( V2b_table::const_iterator
99  it = _v2b_table.begin(), iend=_v2b_table.end(); it!=iend; ++it) {
100  *(v2b_buf++) = it->first;
101  *(v2b_buf++) = it->second.first;
102  *(v2b_buf++) = it->second.second;
103  }
104 
105  // Pack b2v into an integer buffer.
106  std::string b2v_name=wname+".b2v";
107  for ( B2v_table::const_iterator
108  it=_b2v_table.begin(), iend=_b2v_table.end(); it != iend; ++it) {
109  const B2v &b2v = it->second;
110  int n=b2v.size();
111 
112  COM_append_array( b2v_name.c_str(), pid, &it->first, 0, 1);
113  COM_append_array( b2v_name.c_str(), pid, &n, 0, 1);
114  COM_append_array( b2v_name.c_str(), pid, &b2v[0], 0, b2v.size());
115  }
116 
117  COM_set_array_const( (wname+".sn_parent_fcID").c_str(),
118  pid, &_subnode_parents[0].face_id, 2);
119  COM_set_array_const( (wname+".sn_parent_ncs").c_str(),
120  pid, &_subnode_normalized_nc[0], 2);
121 
122  // Permuted local coordinates within parent face
123  COM_set_array_const( (wname+".sn_permu_edID").c_str(),
124  pid, &_subnode_parents[0].edge_id, 2);
125  COM_set_array_const( (wname+".sn_permu_ncs").c_str(),
126  pid, &_subnode_nat_coors[0][0], 2);
127 
128  // Register the counterpart of each subnode
129  COM_set_array_const( (wname+".sn_cntpt_pnID").c_str(),
130  pid, &_subnode_counterparts[0].pane_id, 2);
131  COM_set_array_const( (wname+".sn_cntpt_ndID").c_str(),
132  pid, &_subnode_counterparts[0].node_id, 2);
133 
134  // Register the parent of each subface
135  COM_set_array_const( (wname+".sf_parent").c_str(),
136  pid, &_subface_parents[0]);
137 
138  // Register the natural coordinates of subnodes in each subface
139  COM_set_array_const( (wname+".sf_ncs").c_str(),
140  pid, &_subface_nat_coors[0]);
141 
142  // Register the counterpart in the other mesh of each subface
143  COM_set_array_const( (wname+".sf_cntpt_pnID").c_str(),
144  pid, &_subface_counterparts[0].pane_id, 2);
145  COM_set_array_const( (wname+".sf_cntpt_fcID").c_str(),
146  pid, &_subface_counterparts[0].face_id, 2);
147 
148  // Register the offset of the subface ID for each input facet
149  COM_set_size( (wname+".sn_subID").c_str(), pid, _subnode_subID.size());
150  COM_set_array_const( (wname+".sn_subID").c_str(),
151  pid, &_subnode_subID[0]);
152 
153  // Register the offset of the subface ID for each input facet
154  COM_set_size( (wname+".sf_offset").c_str(), pid, size_of_faces());
155  COM_set_array_const( (wname+".sf_offset").c_str(),
156  pid, &_subface_offsets[0]);
157 
158  COM_window_init_done( wname.c_str());
159 }
160 
161 class Pane_friend : public COM::Pane {
162  explicit Pane_friend( COM::Pane&);
163 public:
164  using Pane::inherit;
165 };
166 
167 // Read in the subdivision using Rocin.
168 void RFC_Pane_base::
169 read_rocin( const std::string &sdv_wname,
170  const std::string &parent_wname,
171  COM::Pane *pn_base) {
172 
173  const int pid = id();
174 
175  // If pn_base is not NULL, then inherit from parent pane.
176  if ( pn_base) {
177  // Obtain the mesh object in the corresponding pane in the parent window
178  COM::Roccom_base *rcom = COM_get_roccom();
179  int win_handle = rcom->get_window_handle( parent_wname.c_str());
180  COM::Window *parent_win = rcom->get_window_object(win_handle);
181 
182  COM::Attribute *mesh = parent_win->pane(pid).attribute( COM::COM_PMESH);
183 
184  // Clone the mesh from parent pane onto pn_base.
185  ((Pane_friend*)pn_base)->inherit( mesh, "", COM::Pane::INHERIT_CLONE, 0);
186  }
187 
188  // Obtain v2b_table
189  int nv2b; const int *v2b_ptr;
190  COM_get_size( (sdv_wname+".v2b").c_str(), pid, &nv2b);
191  COM_get_array_const( (sdv_wname+".v2b").c_str(), pid, &v2b_ptr);
192 
193  for ( int i=0; i<nv2b; i+=3)
194  _v2b_table[ v2b_ptr[i]] = std::make_pair( v2b_ptr[i+1], v2b_ptr[i+2]);
195 
196  // Obtain b2v mapping
197  int nb2v; const int *b2v_ptr;
198  COM_get_size( (sdv_wname+".b2v").c_str(), pid, &nb2v);
199 
200  COM_get_array_const( (sdv_wname+".b2v").c_str(), pid, &b2v_ptr);
201 
202  int nsubn, nsubf;
203  COM_get_size( (sdv_wname+".nc").c_str(), pid, &nsubn);
204  COM_get_size( (sdv_wname+".:t3").c_str(), pid, &nsubf);
205 
206  _subfaces.resize( nsubf);
207  COM_copy_array( (sdv_wname+".:t3").c_str(), pid, &_subfaces[0]);
208 
209  if ( COM_get_attribute_handle((sdv_wname+".sn_parent_fcID").c_str())>0) {
210  // This is the new HDF file format!
211 
212  // Obtain subnode_parents, subnode_natcoor, and subnode_counterparts
213  _subnode_parents.resize( nsubn);
214  COM_copy_array( (sdv_wname+".sn_parent_fcID").c_str(),
215  pid, &_subnode_parents[0].face_id, 2);
216  _subnode_normalized_nc.resize( nsubn);
217  COM_copy_array( (sdv_wname+".sn_parent_ncs").c_str(),
218  pid, &_subnode_normalized_nc[0], 2);
219  _subnode_subID.resize( size_of_nodes());
220  COM_copy_array( (sdv_wname+".sn_subID").c_str(),
221  pid, &_subnode_subID[0], 1);
222 
223  COM_copy_array( (sdv_wname+".sn_permu_edID").c_str(),
224  pid, &_subnode_parents[0].edge_id, 2);
225  _subnode_nat_coors.resize( nsubn);
226  COM_copy_array( (sdv_wname+".sn_permu_ncs").c_str(),
227  pid, &_subnode_nat_coors[0][0], 2);
228 
229  _subnode_counterparts.resize( nsubn);
230  COM_copy_array( (sdv_wname+".sn_cntpt_pnID").c_str(),
231  pid, &_subnode_counterparts[0].pane_id, 2);
232  COM_copy_array( (sdv_wname+".sn_cntpt_ndID").c_str(),
233  pid, &_subnode_counterparts[0].node_id, 2);
234 
235  _subface_parents.resize( nsubf);
236  COM_copy_array( (sdv_wname+".sf_parent").c_str(), pid,
237  &_subface_parents[0]);
238 
239  _subface_counterparts.resize( nsubf);
240  COM_copy_array( (sdv_wname+".sf_cntpt_pnID").c_str(), pid,
241  &_subface_counterparts[0].pane_id, 2);
242  COM_copy_array( (sdv_wname+".sf_cntpt_fcID").c_str(), pid,
243  &_subface_counterparts[0].face_id, 2);
244 
245  _subface_nat_coors.resize( nsubf);
246  COM_copy_array( (sdv_wname+".sf_ncs").c_str(), pid,
247  &_subface_nat_coors[0], 6);
248 
249  // Obtain subface_offsets
250  _subface_offsets.resize( size_of_faces()+1);
251  COM_copy_array( (sdv_wname+".sf_offset").c_str(), pid,
252  &_subface_offsets[0]);
253  _subface_offsets[size_of_faces()] = nsubf;
254  }
255  else { // This is old file format
256  // Obtain subnode_parents, subnode_natcoor, and subnode_counterparts
257  _subnode_parents.resize( nsubn);
258  COM_copy_array( (sdv_wname+".sn_parents_fcID").c_str(),
259  pid, &_subnode_parents[0].face_id, 2);
260  COM_copy_array( (sdv_wname+".sn_parents_edID").c_str(),
261  pid, &_subnode_parents[0].edge_id, 2);
262 
263  _subnode_nat_coors.resize( nsubn);
264  COM_copy_array( (sdv_wname+".sn_xi").c_str(),
265  pid, &_subnode_nat_coors[0][0], 2);
266  COM_copy_array( (sdv_wname+".sn_eta").c_str(),
267  pid, &_subnode_nat_coors[0][1], 2);
268 
269  _subnode_counterparts.resize( nsubn);
270  COM_copy_array( (sdv_wname+".sn_cntpt_pnID").c_str(),
271  pid, &_subnode_counterparts[0].pane_id, 2);
272  COM_copy_array( (sdv_wname+".sn_cntpt_ndID").c_str(),
273  pid, &_subnode_counterparts[0].node_id, 2);
274 
275  _subface_parents.resize( nsubf);
276  COM_copy_array( (sdv_wname+".sf_parents").c_str(), pid,
277  &_subface_parents[0]);
278 
279  _subface_counterparts.resize( nsubf);
280  COM_copy_array( (sdv_wname+".sf_cntpt_pnID").c_str(), pid,
281  &_subface_counterparts[0].pane_id, 2);
282  COM_copy_array( (sdv_wname+".sf_cntpt_fcID").c_str(), pid,
283  &_subface_counterparts[0].face_id, 2);
284 
285  // Obtain subface_offsets
286  _subface_offsets.resize( size_of_faces()+1);
287  COM_copy_array( (sdv_wname+".sf_offsets").c_str(), pid, &_subface_offsets[0]);
288 
289  // Compute the natural coordinates.
290  comp_nat_coors();
291  }
292 }
293 
294 extern "C" void Rocin_load_module(const char *);
295 extern "C" void Rocin_unload_module(const char *);
296 
303 void
304 RFC_Window_base::read_sdv( const char *prefix, const char *format) {
305 
306  // Determine the format
307  int IO_format = get_sdv_format( format);
308 
309  if ( IO_format == SDV_BINARY) {
310  // Read in native format binary format.
311  for ( Pane_set::iterator
312  it=_pane_set.begin(), iend=_pane_set.end();it!=iend; ++it) {
313  std::string fname = get_sdv_fname( prefix, it->first, IO_format);
314 
315  std::ifstream is( fname.c_str());
316  if ( !is) {
317  std::cerr << "Rocface: Could not open input file " << fname
318  << "\nAbortting..." << std::endl;
319  RFC_assertion(is); exit(-1);
320  }
321 
322  RFC_Pane_base &pane = *it->second;
323  pane.read_binary( is);
324  }
325  }
326  else {
327  // Read in using Rocin.
328  Rocin_load_module( "RFC_IN");
329  int hdl_read = COM_get_function_handle( "RFC_IN.read_windows");
330  int hdl_obtain = COM_get_function_handle( "RFC_IN.obtain_attribute");
331 
332  // Define the base-window and sdv-window names
333  std::string base_material = get_prefix_base( prefix);
334  std::string sdv_material = base_material+"_sdv";
335 
336  std::string buf_wname(_bufwin_prefix); buf_wname.append( base_material);
337  std::string sdv_wname=buf_wname+"_sdv";
338  MPI_Comm comm_self = MPI_COMM_SELF;
339 
340  // Loop through the panes to obtain the attributes.
341  for ( Pane_set::iterator
342  it=_pane_set.begin(), iend=_pane_set.end(); it!=iend; ++it) {
343 
344  int pane_id = it->first;
345  std::string fname = get_sdv_fname( prefix, pane_id, IO_format);
346 
347  // Read the pane from the given file. Note that the file contains both
348  // the parent and the subdivided windows. Read only the subdivided one.
349  COM_call_function( hdl_read, fname.c_str(), _bufwin_prefix,
350  sdv_material.c_str(), &comm_self);
351 
352  int hdl_all = COM_get_attribute_handle( (sdv_wname+".all").c_str());
353  COM_call_function( hdl_obtain, &hdl_all, &hdl_all, &pane_id);
354  it->second->read_rocin( sdv_wname);
355 
356  // Delete the window created by Rocin.
357  COM_delete_window( sdv_wname.c_str());
358  }
359 
360  // Unload Rocin
361  Rocin_unload_module( "RFC_IN");
362  }
363 }
364 
365 extern "C" void Rocout_load_module(const char *);
366 extern "C" void Rocout_unload_module(const char *);
367 
374 void
375 RFC_Window_base::write_sdv( const char* prefix, const char *format) const {
376 
377  // Determine the format
378  int IO_format = get_sdv_format( format);
379 
380  if ( IO_format == SDV_BINARY) {
381  // Output using native file format
382  for ( Pane_set::const_iterator
383  it=_pane_set.begin(), iend=_pane_set.end(); it!=iend; ++it) {
384  std::string fname = get_sdv_fname( prefix, it->first, IO_format);
385 
386  std::ofstream os( fname.c_str());
387  if ( !os) {
388  std::cerr << "Rocface: Could not open output file " << fname
389  << "\nAbortting..." << std::endl;
390  RFC_assertion(os); exit(-1);
391  }
392 
393  RFC_Pane_base &pane = *it->second;
394  pane.write_binary( os);
395  }
396  }
397  else {
398  // Output using Rocout's format
399  Rocout_load_module( "RFC_OUT");
400  int hdl_set_option = COM_get_function_handle( "RFC_OUT.set_option");
401  int hdl_write = COM_get_function_handle( "RFC_OUT.write_attribute");
402 
403  COM_call_function( hdl_set_option, "rankwidth", "0");
404  COM_call_function( hdl_set_option, "format", format);
405 
406  int parent_mesh = COM_get_attribute_handle( (name()+".pmesh").c_str());
407 
408  // Define the base-window and sdv-window names
409  std::string base_material = get_prefix_base( prefix);
410  std::string sdv_material = base_material+"_sdv";
411 
412  std::string buf_wname(_bufwin_prefix); buf_wname.append( base_material);
413  std::string sdv_wname=buf_wname+"_sdv";
414 
415  // Create a window for calling Rocout.
416  COM_new_window( sdv_wname.c_str());
417  new_sdv_attributes( sdv_wname);
418  int win_all = COM_get_attribute_handle( (sdv_wname+".all").c_str());
419 
420  const char *time_level = "000";
421  for ( Pane_set::const_iterator
422  it=_pane_set.begin(), iend=_pane_set.end(); it!=iend; ++it) {
423  int pane_id = it->first;
424 
425  // Define a file name name
426  std::string fname = get_sdv_fname( prefix, pane_id, IO_format);
427 
428  // Initialize the attributes for the subdivision pane
429  it->second->register_sdv_attributes( sdv_wname);
430 
431  // write parent mesh of the given pane into the file
432  COM_call_function( hdl_set_option, "mode", "w");
433  COM_call_function( hdl_write, fname.c_str(), &parent_mesh,
434  base_material.c_str(), time_level,
435  NULL, NULL, &pane_id);
436 
437  // append the subdivision pane into the file.
438  COM_call_function( hdl_set_option, "mode", "a");
439  COM_call_function( hdl_write, fname.c_str(), &win_all,
440  sdv_material.c_str(), time_level,
441  NULL, NULL, &pane_id);
442 
443  // remove the subdivision pane after output it.
444  COM_delete_pane( sdv_wname.c_str(), pane_id);
445  COM_window_init_done( sdv_wname.c_str());
446  }
447 
448  // Unload Rocout
449  COM_delete_window( sdv_wname.c_str());
450  Rocout_unload_module( "RFC_OUT");
451  }
452 }
453 
454 // Get the basename of the prefix without the directory part and no suffix.
455 const char *RFC_Window_base::
456 get_prefix_base(const char *prefix)
457 {
458  const char *last_slash = std::strrchr( prefix, '/');
459 
460  if ( last_slash == NULL) return prefix;
461  else return last_slash+1;
462 }
463 
465 get_sdv_format( const char *format)
466 {
467  if ( !format || std::strcmp( format, "BIN") ==0)
468  return SDV_BINARY;
469  if ( std::strcmp( format, "HDF") ==0)
470  return SDV_HDF;
471  if (std::strcmp( format, "CGNS") ==0)
472  return SDV_CGNS;
473 
474  RFC_assertion_msg( false, (std::string("Unknown format ")+format).c_str());
475  return SDV_BINARY; // Default is SDV_BINARY.
476 }
477 
478 std::string RFC_Window_base::
479 get_sdv_fname(const char *prefix, int pane_id, const int format)
480 {
481  // Define a file name name
482  std::ostringstream fname;
483 
484 
485  switch (format) {
486  case SDV_BINARY: fname << prefix << pane_id << ".sdv"; break;
487  case SDV_HDF: fname << prefix << '_' << pane_id << "_sdv.hdf"; break;
488  case SDV_CGNS: fname << prefix << '_' << pane_id << "_sdv.cgns"; break;
489  default: COM_assertion_msg( false, "Unknown file format");
490  }
491 
492  return fname.str();
493 }
494 
495 const char *RFC_Window_base::_bufwin_prefix = "buf_";
496 
498 
499 
500 
501 
502 
503 
std::string name() const
The name of the window.
void Rocin_load_module(const char *name)
Load the module Rocin into Roccom using the given module name.
Definition: Rocin.C:3063
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_SELF
void write_binary(std::ostream &os) const
void COM_delete_window(const char *wname)
Definition: roccom_c++.h:94
void comp_nat_coors()
Compute the natural coordinates.
#define COM_assertion_msg(EX, msg)
void COM_set_size(const char *wa_str, int pane_id, int size, int ng=0)
Set sizes of for a specific attribute.
Definition: roccom_c++.h:136
const RFC_Pane_base & pane(const int pid) const
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
int size_of_faces() const
The total number of faces in the pane.
std::vector< Three_tuple< int > > _subfaces
void COM_copy_array(const char *wa_str, int pane_id, void *val, int v_strd=0, int v_size=0, int offset=0)
Copy an array from an attribute on a specific pane into a given buffer.
Definition: roccom_c++.h:311
int size_of_subnodes() const
The total number of nodes in the subdivision of the pane.
static const char * _bufwin_prefix
std::vector< Edge_ID > _subnode_parents
Edge ids of parents.
The base implementation of RFC_Pane.
std::vector< int > _subnode_subID
Sub-node ID of nodes in the pane.
#define RFC_END_NAME_SPACE
Definition: rfc_basic.h:29
void write_sdv(const char *prefix, const char *format=NULL) const
Write out panes in native binary format or using Rocout.
void read_binary(std::istream &is, std::vector< int > *b2v_all=NULL, COM::Pane *p=NULL)
**********************************************************************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< Point_2S > _subnode_normalized_nc
Natual coordinates in the parent face.
int size_of_nodes() const
The total number of nodes in the pane.
void new_sdv_attributes(const std::string &wname) const
New attributes.
blockLoc i
Definition: read.cpp:79
#define RFC_BEGIN_NAME_SPACE
Definition: rfc_basic.h:28
Point_3 get_point_of_subnode(int id) const
#define RFC_assertion_msg
Definition: rfc_basic.h:67
void COM_window_init_done(const char *w_str, int pane_changed=true)
Definition: roccom_c++.h:102
const NT & n
B2v_table _b2v_table
void COM_get_size(const char *wa_str, int pane_id, int *size, int *ng=0)
Get the sizes of an attribute.
Definition: roccom_c++.h:274
Pane_friend(COM::Pane &)
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
Definition: roccom_c++.h:86
void COM_set_array_const(const char *wa_str, int pane_id, const void *addr, int strd=0, int cap=0)
Definition: roccom_c++.h:160
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
void COM_allocate_array(const char *wa_str, int pane_id=0, void **addr=NULL, int strd=0, int cap=0)
Allocate space for an attribute on a specific pane and return the address by setting addr...
Definition: roccom_c++.h:196
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.
void register_sdv_attributes(const std::string &wname) const
void Rocout_load_module(const char *name)
Load the module Rocout into Roccom using the given module name.
Definition: Rocout.C:934
Pane_set _pane_set
The set of panes contained in the window.
void COM_delete_pane(const char *str, int pid)
Definition: roccom_c++.h:110
static const char * get_prefix_base(const char *prefix)
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.
V2b_table _v2b_table
void read_rocin(const std::string &sdv_wname, const std::string &parent_wname="", COM::Pane *p=NULL)
Read in using Rocin.
Attribute * inherit(Attribute *from, const std::string &aname, int mode, bool withghost)
Inherit an attribute from another pane onto the current pane:
Definition: Pane.C:451
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
Definition: roccom_c++.h:118
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
Definition: Roccom_base.h:537
std::vector< Point_2S > _subnode_nat_coors
Natual coordinates in the parent face.
int id() const
std::vector< int > B2v
From local boundary ids to node ids.
void COM_append_array(const char *wa_str, int pane_id, const void *val, int v_strd, int v_size)
Append an array to the end of the attribute on a specific pane and return the new address by setting ...
Definition: roccom_c++.h:214
void read_sdv(const char *prefix, const char *format=NULL)
Read in local panes in native binary format or using Rocin.
#define RFC_assertion
Definition: rfc_basic.h:65
static std::string get_sdv_fname(const char *prefix, int pane_id, const int format=SDV_BINARY)
void Rocout_unload_module(const char *name)
Unload the module Rocout from Roccom.
Definition: Rocout.C:937
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428
std::vector< Face_ID > _subface_counterparts
Ids of counterparts of faces.
void Rocin_unload_module(const char *name)
Unload the module Rocin from Roccom.
Definition: Rocin.C:3066
static int get_sdv_format(const char *format)