Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
roccom_c++.h
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: roccom_c++.h,v 1.40 2008/12/06 08:43:24 mtcampbe Exp $
24 
31 /* Author: Xiangmin Jiao
32  * Last modified: May 9, 2001
33  */
34 
35 #ifndef __ROCCOM_CPP_H__
36 #define __ROCCOM_CPP_H__
37 #include <cstdlib>
38 #include <cstring>
39 #include <cassert>
40 
41 #ifndef __cplusplus
42 #error This header file is for C++. Include "roccom_c.h" instead for C.
43 #endif
44 
45 #include "Roccom_base.h"
46 
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48 
49 #ifdef C_ONLY
50 #define inline extern "C" /* Disable inlining */
51 #endif
52 
53 //==============================================================
54 // C++ API
55 // Initialization and finalization
56 //=============================================================
57 inline void COM_init( int *argc, char ***argv)
58 { COM::Roccom_base::init( argc, argv); }
59 inline void COM_finalize()
60 { COM::Roccom_base::finalize(); }
61 
62 inline int COM_initialized()
63 { return COM::Roccom_base::initialized(); }
64 inline void COM_abort( int ierr)
65 { COM::Roccom_base::abort( ierr); }
66 
67 inline void COM_set_default_communicator( MPI_Comm comm)
68 { COM::Roccom_base::set_default_communicator( comm); }
70 { return COM::Roccom_base::get_default_communicator(); }
71 
72 //================================================================
73 //================== Load and unload modules =====================
74 //================================================================
75 inline void COM_load_module( const char *libname, const char *winname)
76 { COM_get_roccom()->load_module( libname, winname); }
77 
78 inline void COM_unload_module( const char *libname, const char *winname=NULL)
79 { COM_get_roccom()->unload_module( libname, winname?winname:""); }
80 
81 inline void COM_close_module( const char *libname, const char *winname=NULL)
82 { COM_get_roccom()->unload_module( libname, winname?winname:"", 0); }
83 
84 // ======== Basic API for registering mesh and field data
85 // Creation and deletion of a window. str specifies a window's name.
86 inline void COM_new_window( const char *wname, MPI_Comm c=MPI_COMM_NULL)
87 { COM_get_roccom()->new_window(wname, c); }
88 
89 #if !defined(C_ONLY)
90 inline void COM_new_window( const std::string wname, MPI_Comm c=MPI_COMM_NULL)
91 { COM_get_roccom()->new_window(wname.c_str(), c); }
92 #endif
93 
94 inline void COM_delete_window( const char *wname)
95 { COM_get_roccom()->delete_window(wname); }
96 
97 #if !defined(C_ONLY)
98 inline void COM_delete_window( const std::string wname)
99 { COM_get_roccom()->delete_window(wname.c_str()); }
100 #endif
101 
102 inline void COM_window_init_done( const char *w_str, int pane_changed=true)
103 { COM_get_roccom()->window_init_done( w_str, pane_changed); }
104 
105 #if !defined(C_ONLY)
106 inline void COM_window_init_done( const std::string w_str, int pane_changed=true)
107 { COM_get_roccom()->window_init_done( w_str.c_str(), pane_changed); }
108 #endif
109 
110 inline void COM_delete_pane( const char *str, int pid)
111 { COM_get_roccom()->delete_pane( str, pid) ; }
112 
113 #if !defined(C_ONLY)
114 inline void COM_delete_pane( const std::string str, int pid)
115 { COM_get_roccom()->delete_pane( str.c_str(), pid) ; }
116 #endif
117 
118 inline void COM_new_attribute( const char *wa_str, const char loc,
119  const int type, int ncomp, const char *unit)
120 { COM_get_roccom()->new_attribute( wa_str, loc, type, ncomp, unit); }
121 
122 #if !defined(C_ONLY)
123 inline void COM_new_attribute( const std::string wa_str, const char loc,
124  const int type, int ncomp, const char *unit)
125 { COM_get_roccom()->new_attribute( wa_str.c_str(), loc, type, ncomp, unit); }
126 #endif
127 
128 inline void COM_delete_attribute( const char *wa_str)
129 { COM_get_roccom()->delete_attribute( wa_str); }
130 
131 #if !defined(C_ONLY)
132 inline void COM_delete_attribute( const std::string wa_str)
133 { COM_get_roccom()->delete_attribute( wa_str.c_str()); }
134 #endif
135 
136 inline void COM_set_size( const char *wa_str, int pane_id, int size, int ng=0)
137 { COM_get_roccom()->set_size( wa_str, pane_id, size, ng); }
138 
139 #if !defined(C_ONLY)
140 inline void COM_set_size( const std::string wa_str, int pane_id, int size, int ng=0)
141 { COM_get_roccom()->set_size( wa_str.c_str(), pane_id, size, ng); }
142 
143 template <class Type>
144 inline void COM_set_object( const char *wa_str, int pane_id, Type *addr) {
145  COM_assertion_msg( addr && COM_Object(*addr).validate_object()==0,
146  "Invalid casting");
147 
148  COM_get_roccom()->set_object( wa_str, pane_id, addr, (COM_Object*)(addr));
149 }
150 
151 template <class Type>
152 inline void COM_get_object( const char *wa_str, int pane_id, Type **addr)
153 { COM_get_roccom()->get_object( wa_str, pane_id, (void**)addr); }
154 #endif
155 
156 inline void COM_set_array( const char *wa_str, int pane_id,
157  void *addr, int strd=0, int cap=0)
158 { COM_get_roccom()->set_array( wa_str, pane_id, addr, strd, cap); }
159 
160 inline void COM_set_array_const( const char *wa_str, int pane_id,
161  const void *addr, int strd=0, int cap=0)
162 { COM_get_roccom()->set_array( wa_str, pane_id,
163  const_cast<void*>(addr), strd, cap, true); }
164 
165 #ifndef C_ONLY
166 inline void COM_set_array( const std::string wa_str, int pane_id,
167  void *addr, int strd=0, int cap=0)
168 { COM_get_roccom()->set_array( wa_str.c_str(), pane_id, addr, strd, cap); }
169 
170 inline void COM_set_array_const( const std::string wa_str, int pane_id,
171  const void *addr, int strd=0, int cap=0)
172 { COM_get_roccom()->set_array( wa_str.c_str(), pane_id,
173  const_cast<void*>(addr), strd, cap, true); }
174 #endif
175 
176 inline void COM_set_bounds( const char *wa_str, int pane_id,
177  const void *lbound, const void *ubound)
178 { COM_get_roccom()->set_bounds( wa_str, pane_id, lbound, ubound); }
179 
180 #ifndef C_ONLY
181 inline void COM_set_bounds( const std::string wa_str, int pane_id,
182  const void *lbound, const void *ubound)
183 { COM_get_roccom()->set_bounds( wa_str.c_str(), pane_id, lbound, ubound); }
184 
185 #define COM_set_bounds_prototype(type) \
186 inline void COM_set_bounds( const char *wa_str, int pane_id, \
187  type lbound, type ubound) \
188 { COM_get_roccom()->set_bounds( wa_str, pane_id, &lbound, &ubound); }
189 
194 #endif
195 
196 inline void COM_allocate_array( const char *wa_str, int pane_id=0,
197  void **addr=NULL, int strd=0, int cap=0)
198 { COM_get_roccom()->allocate_array( wa_str, pane_id, addr, strd, cap); }
199 
200 inline void COM_resize_array( const char *wa_str, int pane_id=0,
201  void **addr=NULL, int strd=-1, int cap=0)
202 { COM_get_roccom()->resize_array( wa_str, pane_id, addr, strd, cap); }
203 
204 #ifndef C_ONLY
205 inline void COM_allocate_array( const std::string wa_str, int pane_id=0,
206  void **addr=NULL, int strd=0, int cap=0)
207 { COM_get_roccom()->allocate_array( wa_str.c_str(), pane_id, addr, strd, cap); }
208 
209 inline void COM_resize_array( const std::string wa_str, int pane_id=0,
210  void **addr=NULL, int strd=-1, int cap=0)
211 { COM_get_roccom()->resize_array( wa_str.c_str(), pane_id, addr, strd, cap); }
212 #endif
213 
214 inline void COM_append_array( const char *wa_str, int pane_id,
215  const void *val, int v_strd, int v_size)
216 { COM_get_roccom()->append_array( wa_str, pane_id, val, v_strd, v_size); }
217 
218 #ifndef C_ONLY
219 inline void COM_append_array( const std::string wa_str, int pane_id,
220  const void *val, int v_strd, int v_size)
221 { COM_get_roccom()->append_array( wa_str.c_str(), pane_id, val, v_strd, v_size); }
222 #endif
223 
224 inline void COM_use_attribute( const char *wname, const char *attr,
225  int wg=1, const char *ptnname=0, int val=0)
226 { COM_get_roccom()->use_attribute(wname, attr, wg, ptnname, val); }
227 
228 #ifndef C_ONLY
229 inline void COM_use_attribute( const std::string wname, const std::string attr,
230  int wg=1, const char *ptnname=0, int val=0)
231 { COM_get_roccom()->use_attribute(wname.c_str(), attr.c_str(), wg, ptnname, val); }
232 #endif
233 
234 inline void COM_clone_attribute( const char *wname, const char *attr,
235  int wg=1, const char *ptnname=0, int val=0)
236 { COM_get_roccom()->clone_attribute(wname, attr, wg, ptnname, val); }
237 
238 #ifndef C_ONLY
239 inline void COM_clone_attribute( const std::string wname, const std::string attr,
240  int wg=1, const char *ptnname=0, int val=0)
241 { COM_get_roccom()->clone_attribute(wname.c_str(), attr.c_str(), wg, ptnname, val); }
242 #endif
243 
244 inline void COM_copy_attribute( const char *wname, const char *attr,
245  int wg=1, const char *ptnname=0, int val=0)
246 { COM_get_roccom()->copy_attribute(wname, attr, wg, ptnname, val); }
247 
248 #ifndef C_ONLY
249 inline void COM_copy_attribute( const std::string wname, const std::string attr,
250  int wg=1, const char *ptnname=0, int val=0)
251 { COM_get_roccom()->copy_attribute(wname.c_str(), attr.c_str(), wg, ptnname, val); }
252 
253 inline void COM_copy_attribute
254 ( int trg_hdl, int src_hdl, int wg=1, int ptn_hdl=0, int val=0)
255 { COM_get_roccom()->copy_attribute(trg_hdl, src_hdl, wg, ptn_hdl, val); }
256 #else
257 inline void COM_copy_attribute_handles
258 ( int trg_hdl, int src_hdl, int wg, int ptn_hdl, int val)
259 { COM_get_roccom()->copy_attribute(trg_hdl, src_hdl, wg, ptn_hdl, val); }
260 #endif
261 
262 inline void COM_deallocate_array( const char *wa_str, const int pid=0)
263 { COM_get_roccom()->deallocate_array(wa_str, pid); }
264 
265 #ifndef C_ONLY
266 inline void COM_deallocate_array( const std::string wa_str, const int pid=0)
267 { COM_get_roccom()->deallocate_array(wa_str.c_str(), pid); }
268 
269 inline void COM_get_attribute( const std::string wa_str, char *loc,
270  int *type, int *ncomp, std::string *unit)
271 { COM_get_roccom()->get_attribute( wa_str.c_str(), loc, type, ncomp, unit); }
272 #endif
273 
274 inline void COM_get_size(const char *wa_str, int pane_id, int *size, int *ng=0)
275 { COM_get_roccom()->get_size( wa_str, pane_id, size, ng); }
276 
277 #ifndef C_ONLY
278 inline void COM_get_size(const std::string wa_str, int pane_id, int *size, int *ng=0)
279 { COM_get_roccom()->get_size( wa_str.c_str(), pane_id, size, ng); }
280 #endif
281 
282 #define COM_get_array_prototype( type) \
283 inline void COM_get_array( const char *wa_str, int pane_id, \
284  type **addr, int *strd=NULL, int *cap=NULL) \
285 { COM_get_roccom()->get_array( wa_str, pane_id, (void**)addr, strd, cap); }
286 
288 
289 #ifndef C_ONLY
294 #endif
295 
296 #define COM_get_array_const_prototype( type) \
297 inline void COM_get_array_const( const char *wa_str, int pane_id, \
298  const type **addr, int *strd=NULL, int *cap=NULL) \
299 { COM_get_roccom()->get_array( wa_str, pane_id, \
300  (void**)addr, strd, cap, true); }
301 
303 
304 #ifndef C_ONLY
309 #endif
310 
311 inline void COM_copy_array( const char *wa_str, int pane_id,
312  void *val, int v_strd=0, int v_size=0,
313  int offset=0)
314 { COM_get_roccom()->copy_array( wa_str, pane_id, val, v_strd, v_size, offset); }
315 
316 inline void COM_get_bounds( const char *wa_str, int pane_id,
317  void *lbound, void *ubound)
318 { COM_get_roccom()->get_bounds( wa_str, pane_id, lbound, ubound); }
319 
320 inline int COM_check_bounds( const char *wa_str, int pane_id)
321 { return COM_get_roccom()->check_bounds( wa_str, pane_id); }
322 
323 inline void COM_set_function( const char *wf_str,
324  Func_ptr func,
325  const char *intents,
326  const COM_Type *types)
327 { COM_get_roccom()->set_function( wf_str, func, intents, types); }
328 
329 #ifndef C_ONLY
330 inline void COM_set_member_function( const char *wf_str,
331  Member_func_ptr func,
332  const char *wa_str,
333  const char *intents,
334  const COM_Type *types)
335 { COM_get_roccom()->set_member_function( wf_str, func,
336  wa_str, intents, types); }
337 #endif
338 
339 inline void COM_set_member_function( const char *wf_str,
340  Func_ptr func,
341  const char *wa_str,
342  const char *intents,
343  const COM_Type *types)
344 { COM_get_roccom()->set_member_function( wf_str, func, wa_str, intents, types); }
345 
346 inline void COM_get_communicator( const char *wname, MPI_Comm *comm)
347 { *comm = COM_get_roccom()->get_communicator( wname); }
348 
349 #ifndef C_ONLY
350 inline void COM_get_panes( const char *wname, std::vector<int> &pane_ids,
351  int rank=-2)
352 { COM_get_roccom()->get_panes( wname, pane_ids, rank); }
353 
354 inline void COM_get_windows( std::vector<std::string> &names )
355 { COM_get_roccom()->get_windows(names); }
356 
357 inline void COM_get_modules( std::vector<std::string> &names )
358 { COM_get_roccom()->get_modules(names); }
359 
360 inline void COM_get_attributes( const char *wname, int *na, std::string &names)
361 { COM_get_roccom()->get_attributes( wname, na, names); }
362 
363 inline void COM_get_connectivities( const char *wname, int pane_id,
364  int *nc, std::string &names)
365 { COM_get_roccom()->get_connectivities( wname, pane_id, nc, names); }
366 
367 inline void COM_get_parent( const char *waname, int pane_id,
368  std::string &parent)
369 { COM_get_roccom()->get_parent( waname, pane_id, parent); }
370 #endif
371 
372 inline void COM_get_panes( const char *wname, int *npanes,
373  int **pane_ids=NULL, int rank=-2) {
374  std::vector<int> vec;
375  COM_get_roccom()->get_panes( wname, vec, rank, pane_ids);
376  if ( npanes) *npanes = vec.size();
377 }
378 
379 inline void COM_get_attributes( const char *wname, int *na,
380  char **names=NULL) {
381  std::string str;
382  COM_get_roccom()->get_attributes( wname, na, str, names);
383 }
384 
385 inline void COM_get_connectivities( const char *wname, int pane_id,
386  int *nc, char **names=NULL) {
387  std::string str;
388  COM_get_roccom()->get_connectivities( wname, pane_id, nc, str, names);
389 }
390 
391 inline void COM_get_parent( const char *waname, int pane_id, char **parent) {
392  std::string str;
393  COM_get_roccom()->get_parent( waname, pane_id, str, parent);
394 }
395 
396 #ifndef C_ONLY
397 inline void COM_free_buffer( int **buf)
398 { COM_get_roccom()->free_buffer( buf); }
399 #endif
400 
401 inline void COM_free_buffer( char **buf)
402 { COM_get_roccom()->free_buffer( buf); }
403 
404 inline int COM_get_window_handle( const char *wname)
405 { return COM_get_roccom()->get_window_handle( wname); }
406 
407 #ifndef C_ONLY
408 inline int COM_get_window_handle( const std::string wname)
409 { return COM_get_roccom()->get_window_handle( wname.c_str()); }
410 #endif
411 
412 inline int COM_get_attribute_handle( const char *waname)
413 { return COM_get_roccom()->get_attribute_handle( waname); }
414 
415 #ifndef C_ONLY
416 inline int COM_get_attribute_handle( const std::string waname)
417 { return COM_get_roccom()->get_attribute_handle( waname.c_str()); }
418 #endif
419 
420 inline int COM_get_attribute_handle_const( const char *waname)
421 { return COM_get_roccom()->get_attribute_handle_const( waname); }
422 
423 #ifndef C_ONLY
424 inline int COM_get_attribute_handle_const( const std::string waname)
425 { return COM_get_roccom()->get_attribute_handle_const( waname.c_str()); }
426 #endif
427 
428 inline int COM_get_function_handle( const char *wfname)
429 { return COM_get_roccom()->get_function_handle( wfname); }
430 
431 inline int COM_get_status( const char *waname, const int pane_id)
432 { return COM_get_roccom()->get_status( waname, pane_id); }
433 
434 /* Invoke a function by a name registered to Roccom. */
435 extern "C" void COM_call_function( const int wf, int argc, ...);
436 
437 /* Non-blocking invocation of a function by a name registered to Roccom. */
438 extern "C" void COM_icall_function( const int wf, int argc, ...);
439 
440 #ifndef C_ONLY
441 // Blocking function calls
442 inline void COM_call_function( const int wf)
443 { COM_get_roccom()->call_function( wf, 0, 0); }
444 inline void COM_call_function( const int wf, const void *wa) {
445  COM_get_roccom()->call_function( wf, 1, (void**)&wa);
446 }
447 inline void COM_call_function( const int wf, const void *wa1,
448  const void *wa2) {
449  const void *args[] = { wa1, wa2};
450  COM_get_roccom()->call_function( wf, 2, (void **)args);
451 }
452 inline void COM_call_function( const int wf, const void *wa1,
453  const void *wa2, const void *wa3) {
454  const void *args[] = { wa1, wa2, wa3 };
455  COM_get_roccom()->call_function( wf, 3, (void**)args);
456 }
457 inline void COM_call_function( const int wf,
458  const void *wa1, const void *wa2,
459  const void *wa3, const void *wa4) {
460  const void *args[] = { wa1, wa2, wa3, wa4 };
461  COM_get_roccom()->call_function( wf, 4, (void**)args);
462 }
463 
464 inline void COM_call_function( const int wf, const void *wa1,
465  const void *wa2, const void *wa3,
466  const void *wa4, const void *wa5) {
467  const void *args[] = { wa1, wa2, wa3, wa4, wa5 };
468  COM_get_roccom()->call_function( wf, 5, (void**)args);
469 }
470 
471 inline void COM_call_function( const int wf, const void *wa1,
472  const void *wa2, const void *wa3,
473  const void *wa4, const void *wa5,
474  const void *wa6) {
475  const void *args[] = { wa1, wa2, wa3, wa4, wa5, wa6 };
476  COM_get_roccom()->call_function( wf, 6, (void**)args);
477 }
478 
479 inline void COM_call_function( const int wf, const void *wa1,
480  const void *wa2, const void *wa3,
481  const void *wa4, const void *wa5,
482  const void *wa6, const void *wa7) {
483  const void *args[] = { wa1, wa2, wa3, wa4, wa5, wa6, wa7 };
484  COM_get_roccom()->call_function( wf, 7, (void**)args);
485 }
486 
487 // Non-blocking function calls
488 inline void COM_icall_function( const int wf, int *id)
489 { COM_get_roccom()->icall_function( wf, 0, 0, id); }
490 inline void COM_icall_function( const int wf, const void *wa, int *id) {
491  COM_get_roccom()->icall_function( wf, 1, (void**)&wa, id);
492 }
493 inline void COM_icall_function( const int wf, const void *wa1,
494  const void *wa2, int *id) {
495  const void *args[] = { wa1, wa2};
496  COM_get_roccom()->icall_function( wf, 2, (void **)args, id);
497 }
498 inline void COM_icall_function( const int wf, const void *wa1,
499  const void *wa2, const void *wa3,
500  int *id) {
501  const void *args[] = { wa1, wa2, wa3 };
502  COM_get_roccom()->icall_function( wf, 3, (void **)args, id);
503 }
504 inline void COM_icall_function( const int wf, const void *wa1,
505  const void *wa2, const void *wa3,
506  const void *wa4, int *id) {
507  const void *args[] = { wa1, wa2, wa3, wa4 };
508  COM_get_roccom()->icall_function( wf, 4, (void **)args, id);
509 }
510 
511 inline void COM_icall_function( const int wf, const void *wa1,
512  const void *wa2, const void *wa3,
513  const void *wa4, const void *wa5,
514  int *id) {
515  const void *args[] = { wa1, wa2, wa3, wa4, wa5 };
516  COM_get_roccom()->icall_function( wf, 5, (void **)args, id);
517 }
518 
519 inline void COM_icall_function( const int wf, const void *wa1,
520  const void *wa2, const void *wa3,
521  const void *wa4, const void *wa5,
522  const void *wa6, int *id) {
523  const void *args[] = { wa1, wa2, wa3, wa4, wa5, wa6 };
524  COM_get_roccom()->icall_function( wf, 6, (void **)args, id);
525 }
526 
527 inline void COM_icall_function( const int wf, const void *wa1,
528  const void *wa2, const void *wa3,
529  const void *wa4, const void *wa5,
530  const void *wa6, const void *wa7,
531  int *id) {
532  const void *args[] = { wa1, wa2, wa3, wa4, wa5, wa6, wa7 };
533  COM_get_roccom()->icall_function( wf, 7, (void **)args, id);
534 }
535 #endif
536 
537 inline void COM_wait( const int id)
538 { COM_get_roccom()->wait( id); }
539 
540 inline int COM_test( const int id)
541 { return COM_get_roccom()->test( id); }
542 
543 inline void COM_set_verbose( int i)
544 { COM_get_roccom()->set_verbose( i); }
545 
546 inline void COM_set_debug( bool debug)
547 { COM_get_roccom()->set_debug( debug); }
548 
549 // Profiling tools
550 inline void COM_set_profiling( int i)
551 { COM_get_roccom()->set_profiling( i); }
552 
553 // Profiling tools
554 inline void COM_set_profiling_barrier( int hdl, MPI_Comm comm)
555 { COM_get_roccom()->set_profiling_barrier( hdl, comm); }
556 
557 inline void COM_print_profile( const char *fname, const char *header)
558 { COM_get_roccom()->print_profile( fname, header); }
559 
560 inline int COM_get_sizeof( const COM_Type type, int c)
561 { return COM::Attribute::get_sizeof( type, c); }
562 
563 inline int COM_compatible_types( COM_Type type1, COM_Type type2)
564 { return COM::Attribute::compatible_types( type1, type2); }
565 
566 inline int COM_get_error_code()
567 { return COM_get_roccom()->get_error_code(); }
568 
569 #endif
570 
571 #endif /* __ROCCOM_CPP_H__ */
572 
573 
574 
575 
576 
577 
void COM_wait(const int id)
Definition: roccom_c++.h:537
int COM_Type
Indices for derived data types.
Definition: roccom_basic.h:122
void COM_get_communicator(const char *wname, MPI_Comm *comm)
Definition: roccom_c++.h:346
void COM_set_debug(bool debug)
Definition: roccom_c++.h:546
void COM_abort(int ierr)
Definition: roccom_c++.h:64
void COM_delete_window(const char *wname)
Definition: roccom_c++.h:94
void COM_get_attribute(const std::string wa_str, char *loc, int *type, int *ncomp, std::string *unit)
Definition: roccom_c++.h:269
int COM_initialized()
Definition: roccom_c++.h:62
#define COM_assertion_msg(EX, msg)
void COM_get_modules(std::vector< std::string > &names)
Definition: roccom_c++.h:357
#define COM_set_bounds_prototype(type)
Definition: roccom_c++.h:185
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
void COM_set_default_communicator(MPI_Comm comm)
Definition: roccom_c++.h:67
void COM_set_function(const char *wf_str, Func_ptr func, const char *intents, const COM_Type *types)
Definition: roccom_c++.h:323
void COM_get_bounds(const char *wa_str, int pane_id, void *lbound, void *ubound)
Get the lower and upper bounds of an attribute.
Definition: roccom_c++.h:316
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
void COM_set_object(const char *wa_str, int pane_id, Type *addr)
Definition: roccom_c++.h:144
void COM_set_verbose(int i)
Definition: roccom_c++.h:543
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
void COM_delete_attribute(const char *wa_str)
Delete an existing attribute.
Definition: roccom_c++.h:128
void COM_get_windows(std::vector< std::string > &names)
Definition: roccom_c++.h:354
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
void COM_deallocate_array(const char *wa_str, const int pid=0)
Deallocate space for an attribute in a pane, asuming the memory was allocated allocate_mesh or alloca...
Definition: roccom_c++.h:262
int COM_get_error_code()
Definition: roccom_c++.h:566
void COM_get_connectivities(const char *wname, int pane_id, int *nc, std::string &names)
Definition: roccom_c++.h:363
int COM_test(const int id)
Definition: roccom_c++.h:540
void COM_get_object(const char *wa_str, int pane_id, Type **addr)
Definition: roccom_c++.h:152
void COM_set_bounds(const char *wa_str, int pane_id, const void *lbound, const void *ubound)
Set the lower and upper bounds of an attribute.
Definition: roccom_c++.h:176
void COM_get_attributes(const char *wname, int *na, std::string &names)
Definition: roccom_c++.h:360
void COM_finalize()
Definition: roccom_c++.h:59
void COM_load_module(const char *libname, const char *winname)
Definition: roccom_c++.h:75
void COM_use_attribute(const char *wname, const char *attr, int wg=1, const char *ptnname=0, int val=0)
Use the subset of panes of another window of which the given pane attribute has value val...
Definition: roccom_c++.h:224
#define COM_get_array_const_prototype(type)
Definition: roccom_c++.h:296
void COM_print_profile(const char *fname, const char *header)
Definition: roccom_c++.h:557
void(* Func_ptr)()
Pointer of functions.
Definition: roccom_basic.h:123
void COM_close_module(const char *libname, const char *winname=NULL)
Definition: roccom_c++.h:81
int COM_compatible_types(COM_Type type1, COM_Type type2)
Definition: roccom_c++.h:563
blockLoc i
Definition: read.cpp:79
int COM_check_bounds(const char *wa_str, int pane_id)
Check the lower and upper bounds of an attribute for a specific pane.
Definition: roccom_c++.h:320
#define COM_get_array_prototype(type)
Definition: roccom_c++.h:282
void COM_set_profiling_barrier(int hdl, MPI_Comm comm)
Definition: roccom_c++.h:554
void COM_window_init_done(const char *w_str, int pane_changed=true)
Definition: roccom_c++.h:102
static int get_sizeof(MPI_Datatype i)
Get the size of a given MPI data type.
Definition: commpi.C:44
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
int COM_get_sizeof(const COM_Type type, int c)
Definition: roccom_c++.h:560
void COM_clone_attribute(const char *wname, const char *attr, int wg=1, const char *ptnname=0, int val=0)
Clone the subset of panes of another window of which the given pane attribute has value val...
Definition: roccom_c++.h:234
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_set_profiling(int i)
Definition: roccom_c++.h:550
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
void COM_unload_module(const char *libname, const char *winname=NULL)
Definition: roccom_c++.h:78
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
void COM_set_array(const char *wa_str, int pane_id, void *addr, int strd=0, int cap=0)
Associates an array with an attribute for a specific pane.
Definition: roccom_c++.h:156
int COM_get_attribute_handle_const(const char *waname)
Definition: roccom_c++.h:420
int COM_get_window_handle(const char *wname)
Definition: roccom_c++.h:404
void COM_delete_pane(const char *str, int pid)
Definition: roccom_c++.h:110
void COM_init(int *argc, char ***argv)
Definition: roccom_c++.h:57
void COM_get_parent(const char *waname, int pane_id, std::string &parent)
Definition: roccom_c++.h:367
void COM_copy_attribute_handles(int trg_hdl, int src_hdl, int with_ghost, int ptn_hdl, int val)
void COM_copy_attribute(const char *wname, const char *attr, int wg=1, const char *ptnname=0, int val=0)
Copy an attribute onto another.
Definition: roccom_c++.h:244
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
void COM_get_panes(const char *wname, std::vector< int > &pane_ids, int rank=-2)
Definition: roccom_c++.h:350
void COM_free_buffer(int **buf)
Definition: roccom_c++.h:397
void COM_set_member_function(const char *wf_str, Member_func_ptr func, const char *wa_str, const char *intents, const COM_Type *types)
Definition: roccom_c++.h:330
static int rank
Definition: advectest.C:66
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
Definition: Roccom_base.h:537
MPI_Comm COM_get_default_communicator()
Definition: roccom_c++.h:69
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 COM_icall_function(const int wf, int argc,...)
Definition: roccom_c.C:64
void COM_resize_array(const char *wa_str, int pane_id=0, void **addr=NULL, int strd=-1, int cap=0)
Resize an attribute on a specific pane and return the address by setting addr.
Definition: roccom_c++.h:200
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428
int COM_get_status(const char *waname, const int pane_id)
Definition: roccom_c++.h:431
Contains declaration of the base class for Roccom implementations.