Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
startest.C File Reference
#include "roccom.h"
#include <cstdio>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <cstring>
#include <string>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <sstream>
#include "roccom_assertion.h"
#include "../Rocsurf/test/IM_Reader.h"
#include "Remesher_Simmetrix.h"
Include dependency graph for startest.C:

Go to the source code of this file.

Classes

struct  Control_parameter
 

Functions

 COM_EXTERN_MODULE (Rocblas)
 
 COM_EXTERN_MODULE (Rocsurf)
 
 COM_EXTERN_MODULE (Rocprop)
 
 COM_EXTERN_MODULE (Rocout)
 
void load_modules ()
 
void print_usage (int argc, char *argv[])
 
void read_control_file (const char *fname, Control_parameter &cp)
 
void init_parameters (const Control_parameter &cntr_param)
 
std::string read_in_mesh (const char *fname)
 
void init_attributes (const string &wname, const Control_parameter &cntr_param)
 
void output_solution (const string &wname, const string &material, const char *timelevel, const char *attr=NULL)
 
template<class T >
square (T t)
 
void init_constraints_starslice (const string &wname)
 
void remesh (const string &wname_old, const string &wname, const Control_parameter &cntr_param, double len, bool preserve_feature)
 
int main (int argc, char *argv[])
 

Variables

static int rank = 0
 

Function Documentation

COM_EXTERN_MODULE ( Rocblas  )
COM_EXTERN_MODULE ( Rocsurf  )
COM_EXTERN_MODULE ( Rocprop  )
COM_EXTERN_MODULE ( Rocout  )
void init_attributes ( const string &  wname,
const Control_parameter cntr_param 
)

Definition at line 205 of file startest.C.

References COM_call_function(), COM_CHAR, COM_DOUBLE, COM_get_attribute_handle(), COM_get_function_handle(), COM_INT, COM_new_attribute(), COM_resize_array(), COM_window_init_done(), Control_parameter::speed, and Control_parameter::sploc.

206  {
207  COM_new_attribute((wname+".cnstr_types_facial").c_str(), 'e', COM_INT, 1, "");
208  COM_new_attribute((wname+".spds").c_str(), cntr_param.sploc,
209  COM_DOUBLE, 1, "m/s");
210  COM_new_attribute((wname+".disps").c_str(), 'n', COM_DOUBLE, 3, "m");
211 
212  COM_new_attribute((wname+".facenormals").c_str(), 'e', COM_DOUBLE, 3, "");
213  COM_new_attribute((wname+".facecenters").c_str(), 'e', COM_DOUBLE, 3, "");
214 
215  // Attribute for storing the number of eigenvalues for each node.
216  COM_new_attribute((wname+".tangranks").c_str(), 'n', COM_CHAR, 1, "");
217 
218  COM_resize_array( (wname+".atts").c_str());
219  COM_window_init_done( wname.c_str());
220 
221  int spds = COM_get_attribute_handle( (wname+".spds").c_str());
222  int BLAS_copy_scalar = COM_get_function_handle( "BLAS.copy_scalar");
223  COM_call_function( BLAS_copy_scalar, &cntr_param.speed, &spds);
224 }
C/C++ Data types.
Definition: roccom_basic.h:129
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
void COM_window_init_done(const char *w_str, int pane_changed=true)
Definition: roccom_c++.h:102
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
Definition: roccom_c++.h:118
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.
Definition: roccom_c++.h:200
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

void init_constraints_starslice ( const string &  wname)

Definition at line 254 of file startest.C.

References NTS::abs(), COM_call_function(), COM_free_buffer(), COM_get_array(), COM_get_attribute_handle(), COM_get_function_handle(), COM_get_panes(), COM_get_size(), i, j, and square().

254  {
255  int BLAS_copy_scalar = COM_get_function_handle( "BLAS.copy_scalar");
256  int cnstr_handle = COM_get_attribute_handle( (wname+".cnstr_types_facial").c_str());
257  int zero = 0;
258  COM_call_function( BLAS_copy_scalar, &zero, &cnstr_handle);
259 
260  int SURF_normals = COM_get_function_handle( "SURF.compute_element_normals");
261  int nrms_handle = COM_get_attribute_handle( (wname+".facenormals").c_str());
262  COM_call_function( SURF_normals, &nrms_handle);
263 
264  int SURF_centers = COM_get_function_handle( "SURF.interpolate_to_centers");
265  int nc_handle = COM_get_attribute_handle( (wname+".nc").c_str());
266  int centers_handle = COM_get_attribute_handle( (wname+".facecenters").c_str());
267  COM_call_function( SURF_centers, &nc_handle, &centers_handle);
268 
269  // Set speed for different panes.
270  int *pane_ids, npanes;
271  COM_get_panes( wname.c_str(), &npanes, &pane_ids);
272 
273  for ( int i=0; i<npanes; ++i) {
274  int pid = pane_ids[i];
275  MAP::Vector_3<double> *nrms, *centers;
276  COM_get_array( (wname+".facenormals").c_str(), pid, (void**)&nrms);
277  COM_get_array( (wname+".facecenters").c_str(), pid, (void**)&centers);
278 
279  // Set for pane 2 separately
280  int *cnstr_types;
281  COM_get_array( (wname+".cnstr_types_facial").c_str(),
282  pid, (void**)&cnstr_types);
283 
284  int nelems;
285  COM_get_size( (wname+".facenormals").c_str(), pid, &nelems);
286 
287  double eps = 1.e-2;
288  // Loop through all faces
289  for ( int j=0; j<nelems; ++j) {
290  if ( std::abs(std::abs(nrms[j][0])-1)<eps && centers[j][0] < 0.001)
291  cnstr_types[j] = 't'; // Move within yz plane.
292  else if ( std::abs(std::abs(nrms[j][1])-1)<eps &&
293  (centers[j][1]>-20.054 || centers[j][1] < -20.5538))
294  cnstr_types[j] = 't'; // Move within xz plane.
295  else if ( square(centers[j][0])+square(centers[j][2])>=3.9)
296  cnstr_types[j] = 2;
297  }
298  }
299  COM_free_buffer( &pane_ids);
300 
301  int PROP_set_cnstr = COM_get_function_handle( "PROP.set_constraints");
302  COM_call_function( PROP_set_cnstr, &cnstr_handle);
303 }
double square(double x)
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)
Definition: roccom_c++.h:412
blockLoc i
Definition: read.cpp:79
void COM_get_size(const char *wa_str, int pane_id, int *size, int *ng=0)
Get the sizes of an attribute.
Definition: roccom_c++.h:274
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
j indices j
Definition: Indexing.h:6
NT abs(const NT &x)
Definition: number_utils.h:130
void COM_get_panes(const char *wname, std::vector< int > &pane_ids, int rank=-2)
Definition: roccom_c++.h:350
void COM_free_buffer(int **buf)
Definition: roccom_c++.h:397
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

void init_parameters ( const Control_parameter cntr_param)

Definition at line 145 of file startest.C.

References COM_call_function(), COM_get_function_handle(), Control_parameter::courant, Control_parameter::eigthres, Control_parameter::fangle, Control_parameter::method, Control_parameter::normaldif, rank, Control_parameter::verbose, and Control_parameter::wavefrontal.

145  {
146  int PROP_set_option = COM_get_function_handle( "PROP.set_option");
147 
148  if ( !cntr_param.method.empty()) {
149  COM_call_function( PROP_set_option, "method", cntr_param.method.c_str());
150 
151  if ( rank==0) std::cout << "Set propagation method to " << cntr_param.method << std::endl;
152  }
153 
154  if ( !cntr_param.wavefrontal.empty()) {
155  COM_call_function( PROP_set_option, "wavefrontal", cntr_param.wavefrontal.c_str());
156  if ( rank==0) std::cout << "Set wavefrontal to " << cntr_param.wavefrontal << std::endl;
157  }
158 
159  if ( !cntr_param.normaldif.empty()) {
160  COM_call_function( PROP_set_option, "normaldif", cntr_param.normaldif.c_str());
161  if ( rank==0) std::cout << "Set normaldif to " << cntr_param.normaldif << std::endl;
162  }
163 
164  if ( !cntr_param.eigthres.empty()) {
165  COM_call_function( PROP_set_option, "eigthres", cntr_param.eigthres.c_str());
166  if ( rank==0) std::cout << "Set eigthres to " << cntr_param.eigthres << std::endl;
167  }
168 
169  if ( !cntr_param.courant.empty()) {
170  COM_call_function( PROP_set_option, "courant", cntr_param.courant.c_str());
171  if ( rank==0) std::cout << "Set courant constant to " << cntr_param.courant << std::endl;
172  }
173 
174  if ( !cntr_param.fangle.empty()) {
175  COM_call_function( PROP_set_option, "fangle", cntr_param.fangle.c_str());
176  if ( rank==0) std::cout << "Set feature angle to " << cntr_param.fangle << std::endl;
177  }
178 
179  if ( !cntr_param.verbose.empty()) {
180  COM_call_function( PROP_set_option, "verbose", cntr_param.verbose.c_str());
181 
182  if ( rank==0) std::cout << "Set verbose level to " << cntr_param.verbose << std::endl;
183  }
184 
185 }
string normaldif
Definition: advectest.C:84
static int rank
Definition: startest.C:55
string wavefrontal
Definition: advectest.C:83
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

void load_modules ( )

Definition at line 48 of file startest.C.

References COM_LOAD_MODULE_STATIC_DYNAMIC.

48  {
51  COM_LOAD_MODULE_STATIC_DYNAMIC(Rocsurf, "SURF");
53 }
Definition: Rocout.h:81
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
Definition: roccom_basic.h:111
int main ( int  argc,
char *  argv[] 
)

Definition at line 338 of file startest.C.

References code(), COM_assertion_msg, COM_call_function(), COM_finalize(), COM_get_attribute_handle(), COM_get_function_handle(), COM_init(), COM_print_profile(), COM_set_profiling(), COM_set_profiling_barrier(), COMMPI_Comm_rank(), COMMPI_Initialized(), i, init_attributes(), init_constraints_starslice(), init_parameters(), Control_parameter::interval, j, load_modules(), MPI_COMM_WORLD, output_solution(), print_usage(), rank, read_control_file(), read_in_mesh(), remesh(), Control_parameter::remesh_interval, Control_parameter::steps, and Control_parameter::timestep.

338  {
339  COM_init( &argc, &argv);
340  load_modules();
341  print_usage( argc, argv);
342 
344 
345  // Read in mesh file.
346  string wname = read_in_mesh( argv[1]);
347 
348  // Read in control parameters
349  Control_parameter cntr_param;
350  read_control_file( argc>2?argv[2]:"control.txt", cntr_param);
351 
352  // Initialize the attributes and output the initial solution.
353  init_attributes( wname, cntr_param);
354 
355  // Attributes
356  int pmesh = COM_get_attribute_handle( (wname+".pmesh").c_str());
357  int nc = COM_get_attribute_handle( (wname+".nc").c_str());
358  int spds = COM_get_attribute_handle( (wname+".spds").c_str());
359  int disps = COM_get_attribute_handle( (wname+".disps").c_str());
360 
361  // Funcitions
362  int PROP_init = COM_get_function_handle( "PROP.initialize");
363  int PROP_propagate = COM_get_function_handle( "PROP.propagate");
364  int BLAS_add = COM_get_function_handle( "BLAS.add");
365 
366  if ( rank==0) cout << "Propagating interface..." << endl;
367  // Initialize control parameters
368  COM_call_function( PROP_init, &pmesh);
369  init_parameters( cntr_param);
370 
371  // Compute average edge length
372  double len;
373  int PROP_length = COM_get_function_handle( "PROP.compute_edge_lengths");
374  COM_call_function( PROP_length, &len);
375 
377 
379  COM_set_profiling_barrier( PROP_propagate, MPI_COMM_WORLD);
380 
381  char fname[40];
382  std::sprintf(fname, "timedata_%03d.txt", rank);
383 
384  std::string wname_rem = wname;
385  for ( int i=1; i<=cntr_param.steps; ++i) {
386  if ( rank==0) cout << "Step " << i << endl;
387 
388  for ( int j=0;j<2;++j) {
389  // Perform remeshing
390  if ( j || cntr_param.remesh_interval>0 &&
391  (i-1)%cntr_param.remesh_interval==0) {
392  std::string wname_old = wname_rem;
393  char buf[40];
394  std::sprintf(buf, "%s%d", wname.c_str(), i);
395 
396  wname_rem = buf;
397  remesh( wname_old, wname_rem, cntr_param, len, j==0);
398 
399  pmesh = COM_get_attribute_handle( (wname_rem+".pmesh").c_str());
400  nc = COM_get_attribute_handle( (wname_rem+".nc").c_str());
401  spds = COM_get_attribute_handle( (wname_rem+".spds").c_str());
402  disps = COM_get_attribute_handle( (wname_rem+".disps").c_str());
403 
404  // Write out the new mesh
405  char steps[10];
406  if ( cntr_param.steps>=1.e6)
407  std::sprintf( steps, "%07d", i);
408  else if ( cntr_param.steps>=1.e5)
409  std::sprintf( steps, "%06d", i);
410  else
411  std::sprintf( steps, "%05d", i);
412 
413  output_solution( wname_rem, wname, steps, "mesh");
414  }
415 
416  int code;
417  COM_call_function( PROP_propagate, &pmesh, &spds,
418  &cntr_param.timestep, &disps, &code);
419 
420  if ( code) {
421  COM_assertion_msg( j==0, "failed");
422  continue;
423  }
424  else
425  break;
426  }
427 
428  COM_call_function( BLAS_add, &nc, &disps, &nc);
429 
430  if ( i%cntr_param.interval == 0) {
431  char steps[10];
432  if ( cntr_param.steps>=1.e6)
433  std::sprintf( steps, "%07d", i);
434  else if ( cntr_param.steps>=1.e5)
435  std::sprintf( steps, "%06d", i);
436  else
437  std::sprintf( steps, "%05d", i);
438 
439  output_solution( wname_rem, wname, steps);
440 
441  COM_print_profile( fname, "Proptest");
442  }
443  }
444 
445  COM_finalize();
446 }
int COMMPI_Comm_rank(MPI_Comm c)
Definition: commpi.h:162
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
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 code(though may enhance!portability between Crays and other systems)!INTEGER MPI_TAG_UB
#define COM_assertion_msg(EX, msg)
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
void init_parameters(const Control_parameter &cntr_param)
Definition: advectest.C:217
std::string read_in_mesh(const char *fname)
Definition: advectest.C:283
static int rank
Definition: startest.C:55
void COM_finalize()
Definition: roccom_c++.h:59
void COM_print_profile(const char *fname, const char *header)
Definition: roccom_c++.h:557
blockLoc i
Definition: read.cpp:79
void COM_set_profiling_barrier(int hdl, MPI_Comm comm)
Definition: roccom_c++.h:554
void print_usage(int argc, char *argv[])
Definition: advectest.C:68
void COM_set_profiling(int i)
Definition: roccom_c++.h:550
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
void load_modules()
Definition: advectest.C:58
void remesh(const string &wname_old, const string &wname, const Control_parameter &cntr_param, double len, bool preserve_feature)
Definition: startest.C:305
j indices j
Definition: Indexing.h:6
void COM_init(int *argc, char ***argv)
Definition: roccom_c++.h:57
void init_constraints_starslice(const string &wname, const Control_parameter &cntr_param)
Definition: proptest.C:404
int COMMPI_Initialized()
Definition: commpi.h:168
double output_solution(const string &wname, const char *timelevel, double ref=0.)
Definition: advectest.C:357
void init_attributes(const string &wname, const Control_parameter &cntr_param)
Definition: advectest.C:323
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428
void read_control_file(const char *fname, Control_parameter &cp)
Definition: advectest.C:115

Here is the call graph for this function:

void output_solution ( const string &  wname,
const string &  material,
const char *  timelevel,
const char *  attr = NULL 
)

Definition at line 226 of file startest.C.

References COM_call_function(), COM_get_attribute_handle(), COM_get_function_handle(), and COMMPI_Initialized().

227  {
228  int OUT_write = COM_get_function_handle( "OUT.write_attribute");
229  int hdl;
230 
231  if (attr==NULL)
232  hdl = COM_get_attribute_handle( (wname+".all").c_str());
233  else
234  hdl = COM_get_attribute_handle( (wname+"."+attr).c_str());
235 
236  int OUT_set = COM_get_function_handle( "OUT.set_option");
237  COM_call_function( OUT_set, "format", "HDF");
238 
239  std::string fname = material;
240  if ( attr) fname = fname + "-"+attr;
241  fname = fname +"_"+timelevel;
242 
243  if ( !COMMPI_Initialized()) fname.append(".hdf");
244  else fname.append("_");
245 
246  COM_call_function( OUT_write, (char*)fname.c_str(),
247  &hdl, (char*)material.c_str(), timelevel);
248 }
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
int COMMPI_Initialized()
Definition: commpi.h:168
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

void print_usage ( int  argc,
char *  argv[] 
)

Definition at line 57 of file startest.C.

57  {
58  if ( argc <= 2) {
59  cout << "Usage: " << argv[0] << " <surffile> <controlfile>" << std::endl;
60 
61  exit(-1);
62  }
63 }
void read_control_file ( const char *  fname,
Control_parameter cp 
)

Definition at line 84 of file startest.C.

References COM_assertion_msg, Control_parameter::courant, Control_parameter::eigthres, Control_parameter::fangle, Control_parameter::interval, Control_parameter::method, Control_parameter::normaldif, rank, Control_parameter::remesh_interval, Control_parameter::speed, Control_parameter::sploc, Control_parameter::steps, Control_parameter::timestep, Control_parameter::verbose, and Control_parameter::wavefrontal.

84  {
85  /* Sample control file:
86  * method: fo # method: fo and mp
87  * wavefrontal: 1 # wavefrontal condition
88  * normaldif: 1 # normal diffusion
89  * eigthres: 1.e-4 # threshold for null space: 0..1 (1.e-4 default)
90  * courant: 0.5 # courant constant
91  * fangle: 35 # feature edge angle: between 0 and 180
92  * speed: 0.1 # Speed
93  * sploc: e # location of speed: n or e
94  * timestep: 0.001 # time step
95  * steps: 100 # number of time steps
96  * interval: 10 # output intervals
97  * remesh_interval: 50 # remesh frequency
98  * verbose: 1 # verbose level
99  */
100  ifstream is(fname); COM_assertion_msg( is, "File does not exist");
101 
102  while ( !is.eof()) {
103  char buf[255];
104  is.get( buf, 255, ':');
105  if ( buf[0] == '\0') { is.getline( buf, 255); continue; }
106 
107  istringstream istr(buf);
108  string keyword; istr >> keyword;
109  is.getline( buf, 255, ':');
110 
111  if ( keyword == "method")
112  is >> cp.method;
113  else if ( keyword == "wavefrontal")
114  is >> cp.wavefrontal;
115  else if ( keyword == "normaldif")
116  is >> cp.normaldif;
117  else if ( keyword == "eigthres")
118  is >> cp.eigthres;
119  else if ( keyword == "courant")
120  is >> cp.courant;
121  else if ( keyword == "fangle")
122  is >> cp.fangle;
123  else if ( keyword == "speed")
124  is >> cp.speed;
125  else if ( keyword == "sploc")
126  is >> cp.sploc;
127  else if ( keyword == "timestep")
128  is >> cp.timestep;
129  else if ( keyword == "steps")
130  is >> cp.steps;
131  else if ( keyword == "interval")
132  is >> cp.interval;
133  else if ( keyword == "remesh_interval")
134  is >> cp.remesh_interval;
135  else if ( keyword == "verbose")
136  is >> cp.verbose;
137  else
138  std::cerr << "Unknow keyword " << keyword << std::endl;
139  is.getline( buf, 255);
140  }
141 
142  if ( rank==0) std::cout << " speed is " << cp.speed << std::endl;
143 }
#define COM_assertion_msg(EX, msg)
string normaldif
Definition: advectest.C:84
static int rank
Definition: startest.C:55
string wavefrontal
Definition: advectest.C:83
std::string read_in_mesh ( const char *  fname)

Definition at line 188 of file startest.C.

References COM_assertion_msg, rank, and IM_Reader::read_winmesh().

188  {
189  if ( rank==0) cout << "Reading surface mesh file \"" << fname << '"' << endl;
190 
191  std::string fname_str(fname);
192 
193  std::string::size_type pos = fname_str.find_first_of( ".");
194  const string wname = fname_str.substr( 0, pos);
195 
196  if ( rank==0) cout << "Creating window \"" << wname << '"' << endl;
197 
198  IM_Reader im_reader;
199  int npanes = im_reader.read_winmesh( fname, wname, false);
200  COM_assertion_msg( npanes>=0, "Failed to read in mesh file. File empty?");
201 
202  return wname;
203 }
#define COM_assertion_msg(EX, msg)
static int rank
Definition: startest.C:55
int read_winmesh(const char *fname, const std::string &wname, bool del=true)
Definition: IM_Reader.h:58

Here is the call graph for this function:

void remesh ( const string &  wname_old,
const string &  wname,
const Control_parameter cntr_param,
double  len,
bool  preserve_feature 
)

Definition at line 305 of file startest.C.

References cimg_library::cimg::atof(), COM_call_function(), COM_delete_window(), COM_get_attribute_handle(), COM_get_function_handle(), COM_new_window(), COM_window_init_done(), Control_parameter::fangle, init_attributes(), and init_constraints_starslice().

Referenced by main().

307  {
308  COM_new_window( wname.c_str());
309  COM_window_init_done( wname.c_str());
310 
311  static PROP::Remesher_Simmetrix *rem=NULL;
312  if ( rem==NULL) {
313  rem = new PROP::Remesher_Simmetrix();
314  int PROP_set_remesher = COM_get_function_handle( "PROP.set_remesher");
315  int owner = 1;
316  COM_call_function( PROP_set_remesher, rem, &owner);
317  }
318 
319  int PROP_remesh = COM_get_function_handle( "PROP.remesh_serial");
320  int newmesh_hdl = COM_get_attribute_handle( (wname+".mesh").c_str());
321 
322  double fangle = (preserve_feature&&!cntr_param.fangle.empty())
323  ? std::atof(cntr_param.fangle.c_str()) : 0.;
324  COM_call_function( PROP_remesh, &newmesh_hdl, &len, &fangle);
325 
326  // Initialize the attributes and output the initial solution.
327  init_attributes( wname, cntr_param);
329 
330  int PROP_init = COM_get_function_handle( "PROP.initialize");
331  int pmesh = COM_get_attribute_handle( (wname+".pmesh").c_str());
332  COM_call_function( PROP_init, &pmesh);
333 
334  // Delete the old window
335  COM_delete_window( wname_old.c_str());
336 }
void COM_delete_window(const char *wname)
Definition: roccom_c++.h:94
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
float atof(const char *const str)
Read a float number from a C-string.
Definition: CImg.h:4905
void COM_window_init_done(const char *w_str, int pane_changed=true)
Definition: roccom_c++.h:102
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
Definition: roccom_c++.h:86
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
void init_constraints_starslice(const string &wname, const Control_parameter &cntr_param)
Definition: proptest.C:404
void init_attributes(const string &wname, const Control_parameter &cntr_param)
Definition: advectest.C:323
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function:

Here is the caller graph for this function:

T square ( t)

Definition at line 251 of file startest.C.

251 { return t*t; }

Variable Documentation

int rank = 0
static

Definition at line 55 of file startest.C.

Referenced by init_parameters(), main(), read_control_file(), and read_in_mesh().