Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
add_aspect_ratios.C File Reference
#include "roccom.h"
#include "mapbasic.h"
#include "Rocblas.h"
#include <iostream>
#include <sstream>
#include <fstream>
Include dependency graph for add_aspect_ratios.C:

Go to the source code of this file.

Functions

 COM_EXTERN_MODULE (Rocin)
 
 COM_EXTERN_MODULE (Rocout)
 
 COM_EXTERN_MODULE (Rocmop)
 
 COM_EXTERN_MODULE (Rocmap)
 
 COM_EXTERN_MODULE (Roblas)
 
int get_comm_rank (MPI_Comm comm)
 
int get_comm_size (MPI_Comm comm)
 
int main (int argc, char *argv[])
 

Function Documentation

COM_EXTERN_MODULE ( Rocin  )
COM_EXTERN_MODULE ( Rocout  )
COM_EXTERN_MODULE ( Rocmop  )
COM_EXTERN_MODULE ( Rocmap  )
COM_EXTERN_MODULE ( Roblas  )
int get_comm_rank ( MPI_Comm  comm)

Definition at line 42 of file add_aspect_ratios.C.

References rank.

42  {
43  int rank;
44  int ierr = MPI_Comm_rank( comm, &rank); assert( ierr == 0);
45  return rank;
46 }
static int rank
Definition: advectest.C:66
int get_comm_size ( MPI_Comm  comm)

Definition at line 49 of file add_aspect_ratios.C.

49  {
50  int size;
51  int ierr = MPI_Comm_size( comm, &size); assert( ierr == 0);
52  return size;
53 }
int main ( int  argc,
char *  argv[] 
)

Definition at line 56 of file add_aspect_ratios.C.

References COM_call_function(), COM_finalize(), COM_get_attribute_handle(), COM_get_function_handle(), COM_init(), COM_LOAD_MODULE_STATIC_DYNAMIC, COM_print_profile(), COM_set_profiling(), COM_set_verbose(), and MPI_COMM_WORLD.

56  {
57  MPI_Init( &argc, &argv);
58 
59  if ( argc < 3) {
60  std::cout << "Usage: " << argv[0]
61  << " <Rocin input file> <material name>" << endl;
62  exit(-1);
63  }
64  string inputfname(argv[1]);
65  const string matname(argv[2]);
66 
67  MPI_Comm comm = MPI_COMM_WORLD;
68 
69  COM_init( &argc, &argv);
70 
71  // LOAD MODULES
75 
76  // GET FUNCTION HANDLES
77  int OUT_write = COM_get_function_handle( "OUT.write_attribute");
78  int IN_read = COM_get_function_handle( "IN.read_by_control_file");
79  int MOP_asp = COM_get_function_handle( "MOP.add_aspect_ratios");
80 
81  // SET OUTPUT LEVELS
82  COM_set_verbose(11);
84 
85  const string newfname("with_aspect_ratios");
86 
87  // READ IN FILES
88  COM_call_function( IN_read,
89  inputfname.c_str(),
90  matname.c_str(),
91  &comm);
92 
93  int MAT_all = COM_get_attribute_handle((matname+".all").c_str());
94  string MyString = "001";
95 
96  // CALCULATE ASPECT RATIOS
97  COM_call_function(MOP_asp, &MAT_all);
98 
99  // PRINT SMOOTHED WINDOW
100  COM_call_function( OUT_write,
101  newfname.c_str(), //filename_pre
102  &MAT_all, // attribute
103  matname.c_str(), // material
104  "001" // time
105  );
106 
107  COM_print_profile("", "");
108 
109  COM_finalize();
110  MPI_Finalize();
111 }
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
A Roccom mesh optimization module.
Definition: Rocmop.h:41
void COM_set_verbose(int i)
Definition: roccom_c++.h:543
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
void COM_finalize()
Definition: roccom_c++.h:59
void COM_print_profile(const char *fname, const char *header)
Definition: roccom_c++.h:557
Definition: Rocin.h:64
Definition: Rocout.h:81
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 COM_init(int *argc, char ***argv)
Definition: roccom_c++.h:57
#define COM_LOAD_MODULE_STATIC_DYNAMIC(moduleName, windowString)
Definition: roccom_basic.h:111
int COM_get_function_handle(const char *wfname)
Definition: roccom_c++.h:428

Here is the call graph for this function: