38 #include "../Rocsurf/test/IM_Reader.h"
55 cout <<
"Usage: " << argv[0] <<
" <surffile> [<controlfile>]" << std::endl;
79 is.get( buf, 255,
':');
80 if ( buf[0] ==
'\0') { is.getline( buf, 255);
continue; }
82 istringstream istr(buf);
83 string keyword; istr >> keyword;
84 is.getline( buf, 255,
':');
86 if ( keyword ==
"fangle")
88 else if ( keyword ==
"sangle")
90 else if ( keyword ==
"format")
93 std::cerr <<
"Unknow keyword " << keyword << std::endl;
94 is.getline( buf, 255);
101 if ( !cntr_param.
fangle.empty()) {
103 if (
rank==0) std::cout <<
"Set weak-feature angle to " << cntr_param.
fangle << std::endl;
108 if ( !cntr_param.
sangle.empty()) {
110 if (
rank==0) std::cout <<
"Set strong-feature angle to " << cntr_param.
sangle << std::endl;
121 if (
rank==0) cout <<
"Reading surface mesh file \"" << fname <<
'"' << endl;
123 std::string fname_str(fname);
125 std::string::size_type pos = fname_str.find_first_of(
".");
126 const string wname = fname_str.substr( 0, pos);
128 if (
rank==0) cout <<
"Creating window \"" << wname <<
'"' << endl;
131 int npanes = im_reader.
read_winmesh( fname, wname,
false);
153 const string &format) {
154 static int OUT_write = 0, hdl;
162 if ( format !=
"HDF" && format !=
"hdf")
169 std::string fname = wname+
"_"+timelevel;
173 if ( format !=
"HDF" && format !=
"hdf")
174 fname.append(
".cgns");
177 fname.append(
".hdf");
179 else fname.append(
"_");
182 &hdl, (
char*)wname.c_str(), timelevel);
185 int main(
int argc,
char *argv[]) {
211 if (
rank==0) cout <<
"Initializing data structures..." << endl;
215 if (
rank==0) cout <<
"Detecting features..." << endl;
220 if (
rank==0) cout <<
"Writing out solutions..." << endl;
int COMMPI_Comm_rank(MPI_Comm c)
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_WORLD
#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.
This file contains the prototypes for Roccom API.
int COM_get_attribute_handle(const char *waname)
void init_parameters(const Control_parameter &cntr_param)
std::string read_in_mesh(const char *fname)
void COM_window_init_done(const char *w_str, int pane_changed=true)
This file contains a set of routines for error assertion.
void print_usage(int argc, char *argv[])
void COM_call_function(const int wf, int argc,...)
int main(int argc, char *argv[])
void COM_init(int *argc, char ***argv)
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
int read_winmesh(const char *fname, const std::string &wname, bool del=true)
double output_solution(const string &wname, const char *timelevel, double ref=0.)
void init_attributes(const string &wname, const Control_parameter &cntr_param)
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
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.
int COM_get_function_handle(const char *wfname)
void read_control_file(const char *fname, Control_parameter &cp)
#define COM_EXTERN_MODULE(moduleName)