OGS
LinearSolverLibrarySetup.h
Go to the documentation of this file.
1
11#pragma once
12
21
22#include "BaseLib/MPI.h"
24
25#if defined(USE_PETSC)
26#include <petsc.h>
27#include <mpi.h>
29{
31{
32 LinearSolverLibrarySetup(int argc, char* argv[]) : mpi_setup(argc, argv)
33 {
34 char help[] = "ogs6 with PETSc \n";
35 PetscInitialize(&argc, &argv, nullptr, help);
36 MPI_Comm_set_errhandler(PETSC_COMM_WORLD, MPI_ERRORS_RETURN);
37 }
38
44
46};
47} // ApplicationsLib
48#elif defined(USE_LIS)
49#include <lis.h>
50namespace ApplicationsLib
51{
52struct LinearSolverLibrarySetup final
53{
54 LinearSolverLibrarySetup(int argc, char* argv[])
55 {
56 lis_initialize(&argc, &argv);
57 }
58
60 {
62 lis_finalize();
63 }
64};
65} // ApplicationsLib
66#else
67namespace ApplicationsLib
68{
69struct LinearSolverLibrarySetup final
70{
71 LinearSolverLibrarySetup(int /*argc*/, char* /*argv*/[]) {}
73 {
75 }
76};
77} // namespace ApplicationsLib
78#endif
void cleanupGlobalMatrixProviders()