85 for (
int i=0;
i<nnodes; ++
i)
98 for ( V2b_table::const_iterator
100 *(v2b_buf++) = it->first;
101 *(v2b_buf++) = it->second.first;
102 *(v2b_buf++) = it->second.second;
106 std::string b2v_name=wname+
".b2v";
107 for ( B2v_table::const_iterator
109 const B2v &b2v = it->second;
170 const std::string &parent_wname,
171 COM::Pane *pn_base) {
173 const int pid =
id();
179 int win_handle = rcom->get_window_handle( parent_wname.c_str());
180 COM::Window *parent_win = rcom->get_window_object(win_handle);
182 COM::Attribute *mesh = parent_win->pane(pid).attribute(
COM::COM_PMESH);
185 ((
Pane_friend*)pn_base)->inherit( mesh,
"", COM::Pane::INHERIT_CLONE, 0);
189 int nv2b;
const int *v2b_ptr;
191 COM_get_array_const( (sdv_wname+
".v2b").c_str(), pid, &v2b_ptr);
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]);
197 int nb2v;
const int *b2v_ptr;
200 COM_get_array_const( (sdv_wname+
".b2v").c_str(), pid, &b2v_ptr);
311 for ( Pane_set::iterator
313 std::string fname =
get_sdv_fname( prefix, it->first, IO_format);
315 std::ifstream is( fname.c_str());
317 std::cerr <<
"Rocface: Could not open input file " << fname
318 <<
"\nAbortting..." << std::endl;
334 std::string sdv_material = base_material+
"_sdv";
336 std::string buf_wname(
_bufwin_prefix); buf_wname.append( base_material);
337 std::string sdv_wname=buf_wname+
"_sdv";
341 for ( Pane_set::iterator
344 int pane_id = it->first;
345 std::string fname =
get_sdv_fname( prefix, pane_id, IO_format);
350 sdv_material.c_str(), &comm_self);
354 it->second->read_rocin( sdv_wname);
382 for ( Pane_set::const_iterator
384 std::string fname =
get_sdv_fname( prefix, it->first, IO_format);
386 std::ofstream os( fname.c_str());
388 std::cerr <<
"Rocface: Could not open output file " << fname
389 <<
"\nAbortting..." << std::endl;
410 std::string sdv_material = base_material+
"_sdv";
412 std::string buf_wname(
_bufwin_prefix); buf_wname.append( base_material);
413 std::string sdv_wname=buf_wname+
"_sdv";
420 const char *time_level =
"000";
421 for ( Pane_set::const_iterator
423 int pane_id = it->first;
426 std::string fname =
get_sdv_fname( prefix, pane_id, IO_format);
429 it->second->register_sdv_attributes( sdv_wname);
434 base_material.c_str(), time_level,
435 NULL, NULL, &pane_id);
440 sdv_material.c_str(), time_level,
441 NULL, NULL, &pane_id);
458 const char *last_slash = std::strrchr( prefix,
'/');
460 if ( last_slash == NULL)
return prefix;
461 else return last_slash+1;
467 if ( !format || std::strcmp( format,
"BIN") ==0)
469 if ( std::strcmp( format,
"HDF") ==0)
471 if (std::strcmp( format,
"CGNS") ==0)
482 std::ostringstream fname;
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;
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.
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)
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.
const RFC_Pane_base & pane(const int pid) const
int COM_get_attribute_handle(const char *waname)
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.
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
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.
#define RFC_BEGIN_NAME_SPACE
Point_3 get_point_of_subnode(int id) const
#define RFC_assertion_msg
void COM_window_init_done(const char *w_str, int pane_changed=true)
void COM_get_size(const char *wa_str, int pane_id, int *size, int *ng=0)
Get the sizes of an attribute.
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
void COM_set_array_const(const char *wa_str, int pane_id, const void *addr, int strd=0, int cap=0)
void COM_call_function(const int wf, int argc,...)
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...
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.
Pane_set _pane_set
The set of panes contained in the window.
void COM_delete_pane(const char *str, int pid)
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.
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:
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
std::vector< Point_2S > _subnode_nat_coors
Natual coordinates in the parent face.
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 ...
void read_sdv(const char *prefix, const char *format=NULL)
Read in local panes in native binary format or using Rocin.
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.
int COM_get_function_handle(const char *wfname)
std::vector< Face_ID > _subface_counterparts
Ids of counterparts of faces.
void Rocin_unload_module(const char *name)
Unload the module Rocin from Roccom.
static int get_sdv_format(const char *format)