Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Roccom_base.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_base.h,v 1.44 2008/12/06 08:43:24 mtcampbe Exp $
24 
29 /* Author: Xiangmin Jiao */
30 
31 #ifndef __ROCCOM_BASE_H__
32 #define __ROCCOM_BASE_H__
33 
34 #include "roccom_devel.h"
35 #include "maps.h"
36 #include <set>
37 
38 #ifdef __CHARMC__
39 #include "tcharm.h"
40 #endif
41 
44 
45 COM_BEGIN_NAME_SPACE
46 
49 class Roccom_base {
53 public:
55 
59  Roccom_base( int *argc, char ***argv) throw( COM_exception, int);
61 
63  ~Roccom_base();
64 
65  static void init( int *argc, char ***argv) throw(int);
66  static void finalize() throw(int);
67  static void abort( int ierr);
68 
71  static void set_default_communicator( MPI_Comm comm)
72  { get_roccom()->_comm = comm; }
73 
75  static MPI_Comm get_default_communicator()
76  { return get_roccom()->_comm; }
77 
78  static void set_roccom( Roccom_base *);
79  inline static Roccom_base *get_roccom();
80 
82  static bool initialized() { return get_roccom()!=NULL; }
83  //\}
84 
88  void load_module( const std::string &lname,
90  const std::string &wname) throw(int);
91 
93  void unload_module( const std::string &lname,
94  const std::string &wname, int dodl=1) throw(int);
95  //\}
96 
100  void new_window( const std::string &wname,
102  MPI_Comm comm) throw(int);
103 
105  void delete_window( const std::string &wname) throw(int);
106 
108  void window_init_done( const std::string &wname,
109  bool panechanged = true) throw(int);
110 
112  void delete_pane(const std::string &wname, const int pid) throw(int);
113 
114  //\}
115 
119  void new_attribute( const std::string &wa, const char loc,
121  const int data_type, int size,
122  const std::string &unit) throw(int);
123 
125  void delete_attribute( const std::string &wa) throw(int);
126 
129  void set_size( const std::string &wa_str,
130  int pane_id, int nitems, int ng=0) throw(int);
131 
133  void set_object( const std::string &wa, const int pane_id,
134  void *obj_addr, void *casted_obj) throw(int);
135 
137  void get_object( const std::string &wa, const int pane_id,
138  void **ptr) throw(int);
139 
141  void set_array( const std::string &wa, const int pane_id,
142  void *addr, int strd=0, int cap=0,
143  bool is_const=false) throw(int);
144 
145  template <class T>
146  void set_bounds( const std::string &wa, const int pane_id,
147  T lbnd, T ubnd) throw(int)
148  { set_bounds( wa, pane_id, (const void*)&lbnd, (const void*)&ubnd); }
149 
150  template <class T>
151  void set_bounds( const std::string &wa, const int pane_id,
152  const T* lbnd, const T* ubnd) throw(int)
153  { set_bounds( wa, pane_id, (const void*)&lbnd, (const void*)&ubnd); }
154 
155  void set_bounds( const std::string &wa, const int pane_id,
156  const void *lbnd, const void *ubnd) throw(int);
157 
158  void get_bounds( const std::string &wa, const int pane_id,
159  void *lbnd, void *ubnd) throw(int);
160 
161  int check_bounds( const std::string &wa, int pane_id) throw(int);
162 
166  void allocate_array( const std::string &wa, const int pane_id=0,
167  void **addr=NULL, int strd=0, int cap=0) throw(int);
168 
174  void resize_array( const std::string &wa, const int pane_id=0,
175  void **addr=NULL, int strd=-1, int cap=0) throw(int);
176 
179  void append_array( const std::string &wa, const int pane_id,
180  const void *val, int v_strd, int v_size) throw(int);
181 
184  void use_attribute( const std::string &wname,
185  const std::string &pwname,
186  int withghost=1,
187  const char *cndname=NULL,
188  int val=0) throw(int);
189 
192  void clone_attribute( const std::string &wname,
193  const std::string &pwname,
194  int withghost=1,
195  const char *cndname=NULL,
196  int val=0) throw(int);
197 
199  void copy_attribute( const std::string &wname,
200  const std::string &pwname,
201  int withghost=1,
202  const char *cndname=NULL,
203  int val=0) throw(int);
204 
206  void copy_attribute( int trg_hdl,
207  int src_hdl,
208  int withghost=1,
209  int ptn_hdl=0,
210  int val=0) throw(int);
211 
214  void deallocate_array( const std::string &wa,
215  const int pid=0) throw(int);
216 
219  void get_attribute( const std::string &wa_str, char *loc, int *type,
220  int *size, std::string *unit) throw(int);
221 
223  void get_size( const std::string &wa_str, int pane_id,
224  int *size, int *ng=0) throw(int);
225 
239  int get_status( const std::string &wa_str, int pane_id) throw(int);
240 
242  void get_array( const std::string &wa, const int pane_id,
243  void **addr, int *strd=NULL,
244  int *cap=0, bool is_const=false) throw(int);
245 
247  void get_array( const std::string &wa, const int pane_id,
248  Pointer_descriptor &addr, int *strd=NULL,
249  int *cap=0, bool is_const=false) throw(int);
250 
252  void copy_array( const std::string &wa, const int pane_id,
253  void *val, int v_strd=0, int v_size=0,
254  int offset=0) throw(int);
255 
256  void set_f90pointer( const std::string &waname, void *ptr,
257  Func_ptr f, long int l) throw(int);
258 
259  void get_f90pointer( const std::string &waname, void *ptr,
260  Func_ptr f, long int l) throw(int);
261  //\}
262 
266  MPI_Comm get_communicator( const std::string &wname) throw(int);
267 
269  void get_windows(std::vector<std::string> &) throw(int);
270 
272  void get_modules(std::vector<std::string> &) throw(int);
273 
277  void get_panes( const std::string &wname, std::vector<int> &paneids_vec,
278  int rank=-2, int **pane_ids=NULL) throw(int);
279 
280 
282  void get_attributes( const std::string &wname, int *na,
283  std::string &str, char **names=NULL) throw(int);
284 
286  void get_connectivities( const std::string &wname, int pane_id, int *nc,
287  std::string &str, char **names=NULL) throw(int);
288 
291  void get_parent( const std::string &waname, int pane_id,
292  std::string &str, char **name=NULL) throw(int);
293 
294  void free_buffer( int **buf);
295  void free_buffer( char **buf);
296 
297  int get_window_handle( const std::string &wname) throw(int);
298  Window *get_window_object( int hdl) throw(int);
299  const Window *get_window_object( int hdl) const throw(int);
300 
301  Window *get_window_object( const std::string &wname) throw(int)
302  { return get_window_object( get_window_handle( wname)); }
303  const Window *get_window_object( const std::string &wname) const throw(int)
304  { return get_window_object( const_cast<Roccom_base*>(this)->
305  get_window_handle( wname)); }
306 
307  int get_attribute_handle( const std::string &waname) throw(int);
308  int get_attribute_handle_const( const std::string &waname) throw(int);
309  int get_function_handle( const std::string &wfname) throw(int);
310  //\}
311 
321  void set_function( const std::string &wf,
322  Func_ptr ptr,
323  const std::string &intents,
324  const COM_Type *types,
325  bool ff=false) throw(int);
326 
327  void set_member_function( const std::string &wf,
328  Func_ptr ptr,
329  const std::string &wa,
330  const std::string &intents,
331  const COM_Type *types,
332  bool ff=false) throw(int);
333 
334  void set_member_function( const std::string &wf,
335  Member_func_ptr ptr,
336  const std::string &wa,
337  const std::string &intents,
338  const COM_Type *types,
339  bool ff=false) throw(int);
340 
342  int get_num_arguments( const std::string &wf) throw(COM_exception);
343 
345  int get_num_arguments( const int wf) throw(COM_exception);
346 
353  void call_function( int wf, int count, void **args,
354  const int *lens=NULL,
355  bool from_c=true) throw(int);
356 
364  void icall_function( int wf, int count, void *args[],
365  int *reqid, const int *lens=NULL) throw(int)
366  { *reqid = 0; call_function( wf, count, args, lens); }
367 
369  void wait( int) {}
371  int test( int) { return 1; }
372  //\}
373 
377  int get_verbose() const { return _verbose; }
379 
381  int get_debug() const { return _debug; }
382 
384  void set_verbose( int v) {
385  _verbose = v; _verb1 = ( _verbose<=0) ? 0 : (_verbose+1)%2+1;
386  }
387 
389  void set_debug( bool debug) {
390  _debug = debug;
391  }
392 
393  void set_function_verbose( int i, int level) throw(int);
394 
397  void set_profiling( int i);
398  void set_profiling_barrier( int hdl, MPI_Comm comm);
399  void print_profile( const std::string &fname, const std::string &header);
400  //\}
401 
405  static int get_sizeof( COM_Type type, int count=1);
407 
409  int get_error_code() const { return _errorcode; }
410 
411  void turn_on_exception() { _exception_on = true; }
412  void turn_off_exception() { _exception_on = false; }
413 
415  int f90ptr_treat() const { return _f90ptr_treat; }
416  //\}
417 
418 protected:
419  template < class T>
420  void set_member_function_helper( const std::string &wf,
421  T ptr,
422  const std::string &wa,
423  const std::string &intents,
424  const COM_Type *types,
425  bool ff=false) throw(int);
426 
427  std::pair<int,int> get_f90pntoffsets( const Attribute *a);
428 
432  Window &get_window( const std::string &wname) throw(COM_exception);
434 
436  const Window &get_window( const std::string &wname) const throw(COM_exception)
437  { return const_cast<Roccom_base*>(this)->get_window(wname); }
438 
440  Attribute &get_attribute( const int) throw(COM_exception);
442  const Attribute &get_attribute( const int) const throw(COM_exception);
443 
445  Function &get_function( const int) throw(COM_exception);
447  const Function &get_function( const int) const throw(COM_exception);
448 
449  // \}
450 
454  //====================================================
455  // Some useful utilities for implementing a specific Roccom implementation
456  //====================================================
457 
460  int split_name( const std::string &wa, std::string &wname,
461  std::string &aname, bool tothrow=true) throw(COM_exception);
462 
463  void proc_exception( const COM_exception &, const std::string &) throw( int);
464  //\}
465 
466 protected:
467  Roccom_base(); // Disable default constructor
468 
469 protected: // Protected data members
474 
475  std::string _libdir;
476  std::vector<double> _timer;
477  int _depth;
478  int _verbose;
479  int _verb1;
480  bool _debug;
481  MPI_Comm _comm;
485  bool _profile_on;
486 
488  int _f90ptr_treat;
495 
499  static Roccom_base *roccom_base;
500 };
501 
502 #ifndef __CHARMC__
503 
505 Roccom_base *Roccom_base::get_roccom()
506 { return roccom_base; }
507 
508 #else
509 
513 typedef enum {
514  COMGLOB_FIRST=1, /*First valid global variable ID*/
515  COMGLOB_ROCCOM, /*Index of Roccom's global data*/
516  /*add new global variables before this line*/
517  COMGLOB_LAST /*Last global variable ID+1 (length of global table).*/
518 } COMGLOB_ID;
519 
520 //extern "C" void *TCHARM_Get_global(int);
521 //extern "C" void TCHARM_Set_global( int, void *, void *);
522 
524 Roccom_base *Roccom_base::get_roccom() {
525  extern bool use_tcharm_global;
526 
527  return ! use_tcharm_global ?
528  roccom_base : (COM::Roccom_base *)TCHARM_Get_global(COMGLOB_ROCCOM);
529 }
530 
531 //}
532 
533 #endif // __CHARMC__
534 
535 COM_END_NAME_SPACE
536 
537 inline COM::Roccom_base *COM_get_roccom()
538 { COM::Roccom_base *roccom=COM::Roccom_base::get_roccom();
539  COM_assertion_msg(roccom,
540  "Roccom must be initialized before any Roccom calls.");
541  return roccom;
542 }
543 
544 inline void COM_set_roccom( COM::Roccom_base *p)
545 { COM::Roccom_base::set_roccom(p); }
546 
547 #endif // __ROCCOM_BASE_H__
548 
549 
550 
551 
552 
553 
void use_attribute(const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0)
Use the subset of panes of another window of which the given pane attribute has value val...
Definition: Roccom_base.C:782
A map functions.
Definition: maps.h:134
void get_attribute(const std::string &wa_str, char *loc, int *type, int *size, std::string *unit)
Information retrieval Get the information about an attribute.
Definition: Roccom_base.C:958
static void abort(int ierr)
Definition: Roccom_base.C:205
void delete_window(const std::string &wname)
Deletes a window with given name.
Definition: Roccom_base.C:441
void copy_array(const std::string &wa, const 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_base.C:1093
int COM_Type
Indices for derived data types.
Definition: roccom_basic.h:122
int get_debug() const
Determines whether verbose is on.
Definition: Roccom_base.h:381
A Function object corresponds to a function member of a window.
Definition: Function.h:49
int _depth
Depth of procedure calls.
Definition: Roccom_base.h:477
void set_bounds(const std::string &wa, const int pane_id, const T *lbnd, const T *ubnd)
Definition: Roccom_base.h:151
Module_map _module_map
Definition: Roccom_base.h:470
const Window * get_window_object(const std::string &wname) const
Definition: Roccom_base.h:303
void set_function(const std::string &wf, Func_ptr ptr, const std::string &intents, const COM_Type *types, bool ff=false)
Registers a function to the window.
Definition: Roccom_base.C:1589
Roccom_map< Window * > Window_map
Definition: Roccom_base.h:50
Window & get_window(const std::string &wname)
Obtains a reference to the Window object from its name.
Definition: Roccom_base.C:2166
void get_attributes(const std::string &wname, int *na, std::string &str, char **names=NULL)
Obtain the user-defined attributes of the given window.
Definition: Roccom_base.C:1349
int get_error_code() const
Get the error code.
Definition: Roccom_base.h:409
An Attribute object is a data member of a window.
Definition: Attribute.h:51
int _f90_mangling
Encoding name mangling.
Definition: Roccom_base.h:487
#define COM_assertion_msg(EX, msg)
Roccom_map< Attribute * > Attribute_map
Definition: Roccom_base.h:52
void load_module(const std::string &lname, const std::string &wname)
Load a module.
Definition: Roccom_base.C:211
int get_num_arguments(const std::string &wf)
Get the number of arguments of a given function &quot;window.function&quot;.
Definition: Roccom_base.C:1716
void get_size(const std::string &wa_str, int pane_id, int *size, int *ng=0)
Get the sizes of an attribute. The opposite of set_size.
Definition: Roccom_base.C:988
A Window object contains multiple panes and multiple data attributes.
Definition: Window.h:42
void deallocate_array(const std::string &wa, const int pid=0)
Deallocate space for an attribute in a pane, asuming the memory was allocated allocate_mesh or alloca...
Definition: Roccom_base.C:934
std::pair< int, int > get_f90pntoffsets(const Attribute *a)
Definition: Roccom_base.C:1135
Contains declaration of mappings for module, window, function, attribute.
int get_window_handle(const std::string &wname)
Definition: Roccom_base.C:1471
void unload_module(const std::string &lname, const std::string &wname, int dodl=1)
Unload a module.
Definition: Roccom_base.C:324
Attribute_map _attr_map
Definition: Roccom_base.h:472
void proc_exception(const COM_exception &, const std::string &)
Definition: Roccom_base.C:2259
static void init(int *argc, char ***argv)
Definition: Roccom_base.C:186
bool _exception_on
Indicates whether Roccom should throw exception.
Definition: Roccom_base.h:484
real *8 function offset(vNorm, x2, y2, z2)
Definition: PlaneNorm.f90:211
void COM_set_roccom(COM::Roccom_base *p)
Definition: Roccom_base.h:544
std::string _libdir
Library directory.
Definition: Roccom_base.h:475
int get_attribute_handle(const std::string &waname)
Definition: Roccom_base.C:1540
Encapsulates the states of an exception.
void free_buffer(int **buf)
Definition: Roccom_base.C:1467
void set_member_function(const std::string &wf, Func_ptr ptr, const std::string &wa, const std::string &intents, const COM_Type *types, bool ff=false)
Definition: Roccom_base.C:1695
void delete_pane(const std::string &wname, const int pid)
Deletes a pane and its associated data.
Definition: Roccom_base.C:459
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do subject to the following this list of conditions and the following disclaimers ****Redistributions in binary form must reproduce the above **copyright this list of conditions and the following **disclaimers in the documentation and or other materials **provided with the distribution ****Neither the names of the Center for Simulation of Advanced the University of nor the names of its **contributors may be used to endorse or promote products derived **from this Software without specific prior written permission ****THE SOFTWARE IS PROVIDED AS 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 v
Definition: roccomf90.h:20
int _verb1
Indicates whether to print detailed information.
Definition: Roccom_base.h:479
void resize_array(const std::string &wa, const 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_base.C:727
void turn_on_exception()
Definition: Roccom_base.h:411
void set_size(const std::string &wa_str, int pane_id, int nitems, int ng=0)
Set the sizes of an attribute.
Definition: Roccom_base.C:569
void print_profile(const std::string &fname, const std::string &header)
Definition: Roccom_base.C:2106
static void finalize()
Definition: Roccom_base.C:197
Window * get_window_object(int hdl)
Definition: Roccom_base.C:1495
Window_map _window_map
Definition: Roccom_base.h:471
MPI_Comm get_communicator(const std::string &wname)
Definition: Roccom_base.C:1241
int get_verbose() const
Determines whether verbose is on.
Definition: Roccom_base.h:378
void delete_attribute(const std::string &wa)
Delete an existing attribute from a window.
Definition: Roccom_base.C:548
int _f90ptr_treat
Treatement of F90 pointers.
Definition: Roccom_base.h:493
int f90ptr_treat() const
Definition: Roccom_base.h:415
Roccom_map< std::pair< void *, std::set< std::string > > > Module_map
Definition: Roccom_base.h:51
void get_panes(const std::string &wname, std::vector< int > &paneids_vec, int rank=-2, int **pane_ids=NULL)
Obtain the panes of a given window on a specific process.
Definition: Roccom_base.C:1264
void set_object(const std::string &wa, const int pane_id, void *obj_addr, void *casted_obj)
Associates an object with a specific window.
Definition: Roccom_base.C:625
void wait(int)
Wait for the completion of a nonblocking call.
Definition: Roccom_base.h:369
void(* Func_ptr)()
Pointer of functions.
Definition: roccom_basic.h:123
static bool initialized()
Checks whether Roccom has been initialized.
Definition: Roccom_base.h:82
void get_connectivities(const std::string &wname, int pane_id, int *nc, std::string &str, char **names=NULL)
Obtain the connectivity tables of a pane of the given window.
Definition: Roccom_base.C:1390
void call_function(int wf, int count, void **args, const int *lens=NULL, bool from_c=true)
Invoke a function with given arguments.
Definition: Roccom_base.C:1744
MPI_Comm _comm
Default communicator of Roccom.
Definition: Roccom_base.h:481
blockLoc i
Definition: read.cpp:79
int get_status(const std::string &wa_str, int pane_id)
Get the status of an attribute.
Definition: Roccom_base.C:1055
void set_member_function_helper(const std::string &wf, T ptr, const std::string &wa, const std::string &intents, const COM_Type *types, bool ff=false)
Definition: Roccom_base.C:1636
void get_windows(std::vector< std::string > &)
Obtain a list of all window names.
Definition: Roccom_base.C:1294
void get_parent(const std::string &waname, int pane_id, std::string &str, char **name=NULL)
Obtain the parent attribute&#39;s name of a given attribute on a given pane.
Definition: Roccom_base.C:1431
bool _profile_on
Indicates whether should profile.
Definition: Roccom_base.h:485
void new_window(const std::string &wname, MPI_Comm comm)
Creates a window with given name.
Definition: Roccom_base.C:399
void clone_attribute(const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0)
Clone the subset of panes of another window of which the given pane attribute has value val...
Definition: Roccom_base.C:822
void get_object(const std::string &wa, const int pane_id, void **ptr)
Associates an object with a specific window.
Definition: Roccom_base.C:648
static Roccom_base * roccom_base
Definition: Roccom_base.h:499
void set_verbose(int v)
Changes the verbose setting.
Definition: Roccom_base.h:384
Function & get_function(const int)
Obtains a reference to an attribute from its handle.
Definition: Roccom_base.C:2206
void get_bounds(const std::string &wa, const int pane_id, void *lbnd, void *ubnd)
Definition: Roccom_base.C:1126
~Roccom_base()
Destructor.
Definition: Roccom_base.C:181
int get_attribute_handle_const(const std::string &waname)
Definition: Roccom_base.C:1513
int _errorcode
Error code.
Definition: Roccom_base.h:483
void set_debug(bool debug)
Turns on debuging messages.
Definition: Roccom_base.h:389
void get_f90pointer(const std::string &waname, void *ptr, Func_ptr f, long int l)
Definition: Roccom_base.C:1202
static void set_roccom(Roccom_base *)
Set the Roccom pointer to the given object.
Definition: Roccom_base.C:56
int _verbose
Indicates whether verbose is on.
Definition: Roccom_base.h:478
void set_function_verbose(int i, int level)
Definition: Roccom_base.C:2064
void append_array(const std::string &wa, const 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_base.C:759
Window::Pointer_descriptor Pointer_descriptor
Definition: Roccom_base.h:54
std::vector< double > _timer
Timers for function calls.
Definition: Roccom_base.h:476
static MPI_Comm get_default_communicator()
Get the default communicator of Roccom.
Definition: Roccom_base.h:75
This file indirectly includes the following files: iostream, map, string, vector, and roccom_basic...
Definition: Roccom_base.h:49
void set_profiling_barrier(int hdl, MPI_Comm comm)
Definition: Roccom_base.C:2079
int test(int)
Test whether a nonblocking call has finished.
Definition: Roccom_base.h:371
void set_bounds(const std::string &wa, const int pane_id, T lbnd, T ubnd)
Definition: Roccom_base.h:146
void window_init_done(const std::string &wname, bool panechanged=true)
Marks the end of the registration of a window.
Definition: Roccom_base.C:424
bool _debug
Indicated whether debug mode is on.
Definition: Roccom_base.h:480
void set_f90pointer(const std::string &waname, void *ptr, Func_ptr f, long int l)
Definition: Roccom_base.C:1147
bool _mpi_initialized
Indicates whether MPI was initialized by Roccom.
Definition: Roccom_base.h:482
void turn_off_exception()
Definition: Roccom_base.h:412
int check_bounds(const std::string &wa, int pane_id)
Definition: Roccom_base.C:1130
static int rank
Definition: advectest.C:66
static void set_default_communicator(MPI_Comm comm)
Set the default communicator of Roccom.
Definition: Roccom_base.h:71
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
Definition: Roccom_base.h:537
static Roccom_base * get_roccom()
Get a pointer to the Roccom object.
Definition: Roccom_base.h:505
int split_name(const std::string &wa, std::string &wname, std::string &aname, bool tothrow=true)
Extracts the window and attribute names from &quot;window.attribute&quot;.
Definition: Roccom_base.C:2236
void get_modules(std::vector< std::string > &)
Obtain a list of all module names.
Definition: Roccom_base.C:1322
void set_array(const std::string &wa, const int pane_id, void *addr, int strd=0, int cap=0, bool is_const=false)
Associates an array with an attribute for a specific pane.
Definition: Roccom_base.C:658
int _cppobj_casting
Treatement of C++ objects.
Definition: Roccom_base.h:494
void copy_attribute(const std::string &wname, const std::string &pwname, int withghost=1, const char *cndname=NULL, int val=0)
Copy an attribute onto another.
Definition: Roccom_base.C:862
void get_array(const std::string &wa, const int pane_id, void **addr, int *strd=NULL, int *cap=0, bool is_const=false)
Get the address for an attribute on a specific pane.
Definition: Roccom_base.C:1012
void new_attribute(const std::string &wa, const char loc, const int data_type, int size, const std::string &unit)
Creates a new attribute for a window.
Definition: Roccom_base.C:516
void allocate_array(const std::string &wa, const 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_base.C:695
Function_map _func_map
Definition: Roccom_base.h:473
static int get_sizeof(COM_Type type, int count=1)
Gets the size of the data type given by its index.
Definition: Roccom_base.C:2162
void set_profiling(int i)
This subroutine turns on (or off) profiling if i==1 (or ==0).
Definition: Roccom_base.C:2069
void icall_function(int wf, int count, void *args[], int *reqid, const int *lens=NULL)
Nonblockingly invoke a function with given arguments.
Definition: Roccom_base.h:364
int get_function_handle(const std::string &wfname)
Definition: Roccom_base.C:1565