CArl
Code Arlequin / C++ implementation
carl_feti_setup_finish_input_parser.cpp
Go to the documentation of this file.
1 /*
2  * carl_feti_setup_finish_input_parser.h
3  *
4  * Created on: Feb 14, 2017
5  * Author: Thiago Milanetto Schlittler
6  */
7 
9 
10 namespace carl
11 {
12 
13 void get_input_params(GetPot& field_parser,
14  feti_setup_finish_params& input_params) {
15 
16  if (field_parser.search(1, "ClusterSchedulerType")) {
17  std::string cluster_scheduler_type;
18  cluster_scheduler_type = field_parser.next(cluster_scheduler_type);
19  if(cluster_scheduler_type == "LOCAL")
20  {
21  std::cout << " !!! WARNING: " << std::endl;
22  std::cout << " Using the LOCAL job 'scheduler'. You will have to launch each script" << std::endl;
23  std::cout << " MANUALLY!!! Reason: MPI does not support recursive 'mpirun' calls" << std::endl;
25  }
26  else if(cluster_scheduler_type == "PBS")
28  else if(cluster_scheduler_type == "SLURM")
30  else
31  homemade_error_msg("Invalid scheduler type!");
32  } else {
33  homemade_error_msg("Missing the scheduler type!");
34  }
35 
36  if (field_parser.search(1, "ScratchFolderPath")) {
37  input_params.scratch_folder_path = field_parser.next(
38  input_params.scratch_folder_path);
39  } else {
40  homemade_error_msg("Missing the external scratch folder path!");
41  }
42 
43  if (field_parser.search(1, "CouplingMatricesFolder")) {
44  input_params.coupling_folder_path = field_parser.next(
45  input_params.coupling_folder_path);
46  } else {
47  homemade_error_msg("Missing the coupling matrices path!");
48  }
49 
50  if (field_parser.search(1,"UseRigidBodyModesB"))
51  {
52  input_params.bUseRigidBodyModes = true;
53  if (field_parser.search(1, "RBVectorBase")) {
54  input_params.RB_vectors_base = field_parser.next(
55  input_params.RB_vectors_base);
56  } else {
57  homemade_error_msg("Missing the system B's rigid body mode vectors!");
58  }
59 
60  if (field_parser.search(1, "NbOfRBVectors")) {
61  input_params.nb_of_rb_vectors = field_parser.next(
62  input_params.nb_of_rb_vectors);
63  } else {
64  input_params.nb_of_rb_vectors = 6;
65  }
66  } else {
67  input_params.bUseRigidBodyModes = false;
68  }
69 
70  if ( field_parser.search(1, "CGPreconditionerType") )
71  {
72  std::string CG_precond_type_string = field_parser.next(CG_precond_type_string);
73  if(CG_precond_type_string == "NONE")
75  else if(CG_precond_type_string == "Coupling_operator")
77  else if(CG_precond_type_string == "Coupling_operator_jacobi")
79  else
80  homemade_error_msg("Invalid preconditionner type!");
81  } else {
82  homemade_error_msg("Missing preconditionner type!");
83  }
84 };
85 
86 };
#define homemade_error_msg(msg)
Definition: common_header.h:73
void get_input_params(GetPot &field_parser, feti_iterate_params &input_params)
Parser function for the coupled solver test programs.
carl::BaseCGPrecondType CG_precond_type
[CG] Type of preconditionner.
bool bUseRigidBodyModes
[RB] Use the rigid body modes for the micro system?
std::string scratch_folder_path
Path to the folder which will be used to save the temporary files during the solve operation...
ClusterSchedulerType scheduler
Cluster scheduler software type. Values: PBS, SLURM (code not implemented for the later yet)...
std::string RB_vectors_base
[RB] Common path base for the micro system's rigid body mode vectors.
int nb_of_rb_vectors
[RB] Number of RB mode vectors.
Structure containing the parameters for the setup initialization of the FETI solver.
std::string coupling_folder_path
Folder containing the coupling matrices.