Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Rocmap Class Reference

#include <Rocmap.h>

Public Member Functions

 Rocmap ()
 

Static Public Member Functions

static void load (const std::string &mname)
 Loads Rocmap onto Roccom with a given module name. More...
 
static void unload (const std::string &mname)
 Unloads Rocmap from Roccom. More...
 
static void compute_pconn (const COM::Attribute *mesh, COM::Attribute *pconn)
 Compute pane connectivity map between shared nodes. More...
 
static void pane_border_nodes (const COM::Attribute *mesh, COM::Attribute *isborder, int *ghost_level=NULL)
 Determine the nodes at pane boundaries of a given mesh. More...
 
static void size_of_cpanes (const COM::Attribute *pconn, const int *pane_id, int *npanes_total, int *npanes_ghost=NULL)
 Get the number of communicating panes. More...
 
static void reduce_average_on_shared_nodes (COM::Attribute *att, COM::Attribute *pconn=NULL)
 Perform an average-reduction on the shared nodes for the given attribute. More...
 
static void reduce_maxabs_on_shared_nodes (COM::Attribute *att, COM::Attribute *pconn=NULL)
 Perform a maxabs-reduction on the shared nodes for the given attribute. More...
 
static void reduce_minabs_on_shared_nodes (COM::Attribute *att, COM::Attribute *pconn=NULL)
 Perform a minabs-reduction on the shared nodes for the given attribute. More...
 
static void update_ghosts (COM::Attribute *att, const COM::Attribute *pconn=NULL)
 Update ghost nodal or elemental values for the given attribute. More...
 

Detailed Description

Definition at line 39 of file Rocmap.h.

Constructor & Destructor Documentation

Rocmap ( )
inline

Definition at line 41 of file Rocmap.h.

41 {}

Member Function Documentation

MAP_BEGIN_NAMESPACE void compute_pconn ( const COM::Attribute *  mesh,
COM::Attribute *  pconn 
)
static

Compute pane connectivity map between shared nodes.

If pconn was not yet initialized, this routine will allocate memory for it. Otherwise, this routine will copy up to the capacity of the array

Definition at line 34 of file Rocmap.C.

References Pane_connectivity::compute_pconn().

Referenced by load().

35  {
36  // Compute the pane connectivity from scratch
37  Pane_connectivity pc( mesh, mesh->window()->get_communicator());
38 
39  pc.compute_pconn( pconn);
40 }
void compute_pconn(COM::Attribute *pconn_n, COM::Attribute *pconn_f=NULL)
Create b2v mapping for nodes and facets (edges or faces) correspondence.

Here is the call graph for this function:

Here is the caller graph for this function:

void load ( const std::string &  mname)
static

Loads Rocmap onto Roccom with a given module name.

Definition at line 102 of file Rocmap.C.

References COM_INT, COM_METADATA, COM_new_window(), COM_set_function(), COM_window_init_done(), compute_pconn(), pane_border_nodes(), reduce_average_on_shared_nodes(), reduce_maxabs_on_shared_nodes(), reduce_minabs_on_shared_nodes(), size_of_cpanes(), and update_ghosts().

Referenced by Rocmap_load_module(), rocmap_load_module(), ROCMAP_LOAD_MODULE(), rocmap_load_module_(), and ROCMAP_LOAD_MODULE_().

102  {
103  COM_new_window( mname.c_str());
104 
105  COM_Type types[4];
106  types[0] = COM_METADATA;
107  types[1] = COM_METADATA;
108  COM_set_function( (mname+".reduce_average_on_shared_nodes").c_str(),
110 
111  COM_set_function( (mname+".reduce_maxabs_on_shared_nodes").c_str(),
113 
114  COM_set_function( (mname+".reduce_minabs_on_shared_nodes").c_str(),
116 
117  COM_set_function( (mname+".update_ghosts").c_str(),
118  (Func_ptr)update_ghosts, "iI", types);
119 
120  types[0] = types[1] = COM_METADATA;
121  COM_set_function( (mname+".compute_pconn").c_str(),
122  (Func_ptr)compute_pconn, "io", types);
123 
124  types[0] = types[1] = COM_METADATA; types[2] = COM_INT;
125  COM_set_function( (mname+".pane_border_nodes").c_str(),
126  (Func_ptr)pane_border_nodes, "ioI", types);
127 
128  types[0] = COM_METADATA;
129  types[1] = types[2] = types[3] = COM_INT;
130  COM_set_function( (mname+".size_of_cpanes").c_str(),
131  (Func_ptr)size_of_cpanes, "iioO", types);
132 
133  COM_window_init_done( mname.c_str());
134 }
int COM_Type
Indices for derived data types.
Definition: roccom_basic.h:122
static void compute_pconn(const COM::Attribute *mesh, COM::Attribute *pconn)
Compute pane connectivity map between shared nodes.
Definition: Rocmap.C:34
static void reduce_minabs_on_shared_nodes(COM::Attribute *att, COM::Attribute *pconn=NULL)
Perform a minabs-reduction on the shared nodes for the given attribute.
Definition: Rocmap.C:67
void COM_set_function(const char *wf_str, Func_ptr func, const char *intents, const COM_Type *types)
Definition: roccom_c++.h:323
static void size_of_cpanes(const COM::Attribute *pconn, const int *pane_id, int *npanes_total, int *npanes_ghost=NULL)
Get the number of communicating panes.
Definition: Rocmap.C:50
static void reduce_maxabs_on_shared_nodes(COM::Attribute *att, COM::Attribute *pconn=NULL)
Perform a maxabs-reduction on the shared nodes for the given attribute.
Definition: Rocmap.C:77
void(* Func_ptr)()
Pointer of functions.
Definition: roccom_basic.h:123
void COM_window_init_done(const char *w_str, int pane_changed=true)
Definition: roccom_c++.h:102
static void pane_border_nodes(const COM::Attribute *mesh, COM::Attribute *isborder, int *ghost_level=NULL)
Determine the nodes at pane boundaries of a given mesh.
Definition: Rocmap.C:43
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
Definition: roccom_c++.h:86
static void update_ghosts(COM::Attribute *att, const COM::Attribute *pconn=NULL)
Update ghost nodal or elemental values for the given attribute.
Definition: Rocmap.C:87
static void reduce_average_on_shared_nodes(COM::Attribute *att, COM::Attribute *pconn=NULL)
Perform an average-reduction on the shared nodes for the given attribute.
Definition: Rocmap.C:57

Here is the call graph for this function:

Here is the caller graph for this function:

void pane_border_nodes ( const COM::Attribute *  mesh,
COM::Attribute *  isborder,
int *  ghost_level = NULL 
)
static

Determine the nodes at pane boundaries of a given mesh.

The argument isborder must be a nodal attribute of integer type. At return, isborder is set to 1 for border nodes, and 0 for others

Definition at line 43 of file Rocmap.C.

References Pane_boundary::determine_borders().

Referenced by load().

45  {
46  Pane_boundary::determine_borders( mesh, isborder, ghost_level?*ghost_level:0);
47 }
static void determine_borders(const COM::Attribute *mesh, COM::Attribute *isborder, int ghost_level=0)
Determine the nodes at pane boundaries of a given mesh.

Here is the call graph for this function:

Here is the caller graph for this function:

void reduce_average_on_shared_nodes ( COM::Attribute *  att,
COM::Attribute *  pconn = NULL 
)
static

Perform an average-reduction on the shared nodes for the given attribute.

Definition at line 57 of file Rocmap.C.

References Pane_communicator::init().

Referenced by load(), and Rocmop::smooth_vol_mesq_wg().

58  {
59  Pane_communicator pc(att->window(), att->window()->get_communicator());
60  pc.init(att,pconn);
61  pc.begin_update_shared_nodes();
62  pc.reduce_average_on_shared_nodes();
63  pc.end_update_shared_nodes();
64 }
Encapsulates information about distribution of panes on all processes and handles across pane communi...
void init(void **ptrs, COM_Type type, int ncomp, const int *sizes=NULL, const int *strds=NULL)
Initialize the communication buffers.

Here is the call graph for this function:

Here is the caller graph for this function:

void reduce_maxabs_on_shared_nodes ( COM::Attribute *  att,
COM::Attribute *  pconn = NULL 
)
static

Perform a maxabs-reduction on the shared nodes for the given attribute.

Definition at line 77 of file Rocmap.C.

References Pane_communicator::init().

Referenced by Rocmop::determine_physical_border(), load(), and Rocmop::smooth_vol_mesq_ng().

78  {
79  Pane_communicator pc(att->window(), att->window()->get_communicator());
80  pc.init(att,pconn);
81  pc.begin_update_shared_nodes();
82  pc.reduce_maxabs_on_shared_nodes();
83  pc.end_update_shared_nodes();
84 }
Encapsulates information about distribution of panes on all processes and handles across pane communi...
void init(void **ptrs, COM_Type type, int ncomp, const int *sizes=NULL, const int *strds=NULL)
Initialize the communication buffers.

Here is the call graph for this function:

Here is the caller graph for this function:

void reduce_minabs_on_shared_nodes ( COM::Attribute *  att,
COM::Attribute *  pconn = NULL 
)
static

Perform a minabs-reduction on the shared nodes for the given attribute.

Definition at line 67 of file Rocmap.C.

References Pane_communicator::init().

Referenced by load().

68  {
69  Pane_communicator pc(att->window(), att->window()->get_communicator());
70  pc.init(att,pconn);
71  pc.begin_update_shared_nodes();
72  pc.reduce_minabs_on_shared_nodes();
73  pc.end_update_shared_nodes();
74 }
Encapsulates information about distribution of panes on all processes and handles across pane communi...
void init(void **ptrs, COM_Type type, int ncomp, const int *sizes=NULL, const int *strds=NULL)
Initialize the communication buffers.

Here is the call graph for this function:

Here is the caller graph for this function:

void size_of_cpanes ( const COM::Attribute *  pconn,
const int *  pane_id,
int *  npanes_total,
int *  npanes_ghost = NULL 
)
static

Get the number of communicating panes.

Definition at line 50 of file Rocmap.C.

References Pane_connectivity::size_of_cpanes().

Referenced by load().

51  {
52 
53  Pane_connectivity::size_of_cpanes(pconn, pane_id, npanes_total, npanes_ghost);
54 }
static void size_of_cpanes(const COM::Attribute *pconn, const int *pane_id, int *npanes_total, int *npanes_ghost=NULL)
Get the number of communicating panes.

Here is the call graph for this function:

Here is the caller graph for this function:

void unload ( const std::string &  mname)
static

Unloads Rocmap from Roccom.

Definition at line 136 of file Rocmap.C.

References COM_delete_window().

Referenced by Rocmap_unload_module(), rocmap_unload_module(), ROCMAP_UNLOAD_MODULE(), rocmap_unload_module_(), and ROCMAP_UNLOAD_MODULE_().

136  {
137  COM_delete_window( mname.c_str());
138 }
void COM_delete_window(const char *wname)
Definition: roccom_c++.h:94

Here is the call graph for this function:

Here is the caller graph for this function:

void update_ghosts ( COM::Attribute *  att,
const COM::Attribute *  pconn = NULL 
)
static

Update ghost nodal or elemental values for the given attribute.

Definition at line 87 of file Rocmap.C.

References Pane_communicator::init().

Referenced by Rocmop::add_aspect_ratios(), Rocmop::determine_physical_border(), Rocmop::get_usr_disp(), load(), and Rocmop::smooth_vol_mesq_wg().

88  {
89  Pane_communicator pc(att->window(), att->window()->get_communicator());
90  pc.init(att, pconn);
91 
92  if (att->is_elemental()){
93  pc.begin_update_ghost_cells();
94  pc.end_update_ghost_cells();
95  }
96  else{
97  pc.begin_update_ghost_nodes();
98  pc.end_update_ghost_nodes();
99  }
100 }
Encapsulates information about distribution of panes on all processes and handles across pane communi...
void init(void **ptrs, COM_Type type, int ncomp, const int *sizes=NULL, const int *strds=NULL)
Initialize the communication buffers.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: