47 MPI_Init( &argc, &argv);
52 MPI_Comm_size( comm, &size);
53 MPI_Comm_rank( comm, &rank);
57 std::cout <<
"Usage: " << argv[0] <<
" #iter #startiter scheme\n"
58 <<
"Schemes: 0: interpolation\n\t 1: weighted residual"
59 <<
"\n\t 2: virtual surface" << std::endl;
86 const string wnames[2] = {string(
"solid"), string(
"fluid")};
89 for (
int k=0;
k<2; ++
k) {
119 COM_get_array( (wnames[0]+
".nrms").c_str(), 0, &(
void*&)nrms);
125 int niter=atoi(argv[1]);
131 initial = atoi(argv[2]);
132 if (initial<0) initial = 0;
134 std::sprintf( buf,
"%05d", initial);
145 &w1_fs, wnames[0].c_str(), buf);
147 &w2_fs, wnames[1].c_str(), buf);
151 &w1_fs, wnames[0].c_str(), buf);
156 &w2_fs, wnames[1].c_str(), buf);
167 scheme = atoi(argv[3]);
169 std::sprintf( buf,
"%05d", initial);
173 for (
int i=initial+1;
i<=niter; ++
i) {
174 int verbose=(
i==nextdump), noop=0, two=2;
175 double half=0.5, tol=1.e-15;
190 if (
i==niter ||
i==nextdump) {
197 std::cout <<
"Error norms are: " << nrms[0] <<
' ' << nrms[1]
198 <<
' ' << nrms[2] << std::endl;
200 std::sprintf( buf,
"%05d",
i+1);
202 &w1_fs, wnames[0].c_str(), buf);
204 &w2_fs, wnames[1].c_str(), buf);
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
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
bool is_local_fluid(int pid, int comm_rank, int comm_size)
bool is_local_solid(int pid, int comm_rank, int comm_size)
void COM_get_array(const char *wa_str, int pane_id, void **addr, int *strd, int *cap)
Get the address for an attribute on a specific pane.
int COM_get_attribute_handle(const char *waname)
int read_mesh(const char *fname, const std::string &wname, Func_ptr is_local)
void COM_print_profile(const char *fname, const char *header)
void COM_set_profiling_barrier(int hdl, MPI_Comm comm)
void COM_window_init_done(const char *w_str, int pane_changed=true)
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
void COM_set_profiling(int i)
void COM_call_function(const int wf, int argc,...)
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.
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.
#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)