Skip to content
Snippets Groups Projects

MPI communicator handle must be converted

Closed Stephan Schulz requested to merge feature/fortran-interface-fixes into master
3 files
+ 67
3
Compare changes
  • Side-by-side
  • Inline

Files

+ 24
2
@@ -39,6 +39,21 @@ extern "C"
@@ -39,6 +39,21 @@ extern "C"
return new ALL<double,double>(dim,gamma);
return new ALL<double,double>(dim,gamma);
}
}
 
// set grid parameters
 
void ALL_set_proc_grid_params_f(ALL<double,double>* all_obj, int nloc, int* loc, int nsize, int* size)
 
{
 
if(all_obj->get_dimension() != nloc) throw ALL_Invalid_Argument_Exception(__FILE__,__func__,__LINE__,"Length of index array does not match dimension");
 
if(all_obj->get_dimension() != nsize) throw ALL_Invalid_Argument_Exception(__FILE__,__func__,__LINE__,"Length of size array does not match dimension");
 
all_obj->set_proc_grid_params(loc,size);
 
}
 
 
// wrapper to set the minimum domain size
 
void ALL_set_min_domain_size_f(ALL<double,double>* all_obj, ALL_LB_t method, int dim, double* domain_size)
 
{
 
if(all_obj->get_dimension() != dim) throw ALL_Invalid_Argument_Exception(__FILE__,__func__,__LINE__,"Length of array does not match dimension");
 
all_obj->set_min_domain_size(method, domain_size);
 
}
 
// wrapper to set the work (scalar only for the moment)
// wrapper to set the work (scalar only for the moment)
void ALL_set_work_f(ALL<double,double>* all_obj, double work)
void ALL_set_work_f(ALL<double,double>* all_obj, double work)
{
{
@@ -52,9 +67,10 @@ extern "C"
@@ -52,9 +67,10 @@ extern "C"
}
}
// wrapper to set the communicator
// wrapper to set the communicator
void ALL_set_communicator_f(ALL<double,double>* all_obj, MPI_Comm comm)
void ALL_set_communicator_f(ALL<double,double>* all_obj, MPI_Fint fcomm)
{
{
all_obj->set_communicator(comm);
MPI_Comm ccomm = MPI_Comm_f2c(fcomm);
 
all_obj->set_communicator(ccomm);
}
}
// wrapper to setup routine
// wrapper to setup routine
@@ -104,4 +120,10 @@ extern "C"
@@ -104,4 +120,10 @@ extern "C"
}
}
}
}
}
}
 
void ALL_print_vtk_outlines_f(ALL<double,double>* all_obj, int step)
 
{
 
#ifdef ALL_VTK_OUTPUT
 
all_obj->print_vtk_outlines(step);
 
#endif
 
}
}
}
Loading