79 int main(
int argc,
char** argv) {
82 libMesh::LibMeshInit init(argc, argv);
85 libMesh::PerfLog perf_log(
"Main program");
88 libMesh::Parallel::Communicator& WorldComm = init.comm();
91 int rank = WorldComm.rank();
92 int nodes = WorldComm.size();
97 GetPot command_line(argc, argv);
103 std::string input_filename;
104 if (command_line.search(2,
"--inputfile",
"-i")) {
105 input_filename = command_line.next(input_filename);
106 field_parser.parse_input_file(input_filename,
"#",
"\n",
" \t\n");
108 field_parser = command_line;
214 switch (current_iteration_status)
223 if(WorldComm.rank() == 0)
225 std::string iter_script_command =
". " + input_params.
scratch_folder_path +
"/FETI_iter_script.sh";
228 std::cout <<
" !!! LOCAL job 'scheduler: Run the following script manually: " << std::endl;
229 std::cout << iter_script_command << std::endl << std::endl;
245 if(WorldComm.rank() == 0)
247 std::string sol_script_command =
". " + input_params.
scratch_folder_path +
"/FETI_sol_script.sh";
250 std::cout <<
" !!! LOCAL job 'scheduler: Run the following script manually: " << std::endl;
251 std::cout << sol_script_command << std::endl << std::endl;
double CG_coupled_conv_rel
[CG] Relative residual convergence.
void get_input_params(GetPot &field_parser, feti_iterate_params &input_params)
Parser function for the coupled solver test programs.
int CG_coupled_conv_max
[CG] Maximum number of iterations.
double CG_coupled_div
[CG] Residual divergence.
void read_scalar_data()
Read the scalar data, rho(0 ... kkk), | RB_corr(0 ... kkk) | and p(0 ... kkk - 1).q(0 ... kkk - 1)
void calculate_q()
Calculate the current q(kkk) vector.
bool bUseRigidBodyModes
[RB] Use the rigid body modes for the micro system?
void export_rb_correction_vector()
Export the rigid body modes correction.
std::string exec_command(const std::string &cmd)
void export_ext_solver_rhs_Ct_phi()
Calculate and export the external solver RHS's for the decoupled problem.
void set_coupling_matrix_R_micro()
Read the mediator - micro system coupling matrix.
carl::BaseCGPrecondType CG_precond_type
[CG] Type of preconditionner.
void calculate_z()
Calculate the current z(kkk+1) vector.
double CG_coupled_conv_abs
[CG] Absolute residual convergence.
void calculate_phi()
Calculate the current phi(kkk+1) solution vector.
void calculate_scalar_data()
Calculate the scalar quantities.
Class containing the operations needed for the FETI solver.
void read_null_space_vecs(const std::string &RB_vectors_base, int nb_of_rb_vectors)
Read the null space vectors.
void read_vector_data()
Read the vector data - essentially calls the "read_previous" and "read_all_previous" methods...
void calculate_rb_correction()
Calculate the rigid body modes corrections.
std::string scratch_folder_path
Path to the folder which will be used to save the temporary files during the solve operation...
void calculate_r()
Calculate the current r(kkk+1) residual vector.
IterationStatus check_convergence(double rel_residual_conv, double abs_residual_conv, int max_iter_div, double rel_residual_div, double rb_modes_conv=-1)
Check the convergence.
void calculate_p()
Calculate the current p(kkk+1) vector.
int main(int argc, char **argv)
void set_coupling_matrix_R_BIG()
Read the mediator - macro system coupling matrix.
std::string coupling_folder_path
Folder containing the coupling matrices.
void read_null_space_inv_RITRI_mat()
Read the matrix.
void using_rb_modes(bool bUseRigidBodyModes)
Set up the.
Structure containing the parameters for the setup initialization of the FETI solver.
void read_ext_solver_output()
Read the latest external solver output.
std::string RB_vectors_base
[RB] Common path base for the micro system's rigid body mode vectors.
double CG_coupled_conv_corr
[CG] Relative rigid body mode convergence.
void print_previous_iters_conv(int nb_of_iters=5)
void export_scalar_data()
Export the iteration scalar data, rho(kkk+1), | RB_corr(kkk+1) | and p(kkk).q(kkk) ...
void export_ext_solver_rhs_Ct_p()
Calculate and export the external solver RHS's for the next iteration.
ClusterSchedulerType scheduler
Cluster scheduler software type. Values: PBS, SLURM (code not implemented for the later yet)...
void set_preconditioner(BaseCGPrecondType CG_precond_type, bool bInitialSet=true)
int nb_of_rb_vectors
[RB] Number of RB mode vectors.