Trilinos based (stochastic) FEM solvers
main.cpp
Go to the documentation of this file.
1
/*
2
Brian Staber (brian.staber@gmail.com)
3
*/
4
5
#include "Epetra_ConfigDefs.h"
6
#ifdef HAVE_MPI
7
#include "mpi.h"
8
#include "Epetra_MpiComm.h"
9
#else
10
#include "Epetra_SerialComm.h"
11
#endif
12
13
#include "Teuchos_RCP.hpp"
14
#include "Ifpack.h"
15
#include "Ifpack_AdditiveSchwarz.h"
16
#include "BelosLinearProblem.hpp"
17
#include "BelosBlockGmresSolMgr.hpp"
18
#include "BelosEpetraAdapter.hpp"
19
#include <BelosSolverFactory.hpp>
20
#include "BelosBlockGmresSolMgr.hpp"
21
#include "Teuchos_StandardCatchMacros.hpp"
22
#include "Teuchos_ParameterList.hpp"
23
#include "Teuchos_XMLParameterListCoreHelpers.hpp"
24
#include "Stratimikos_DefaultLinearSolverBuilder.hpp"
25
26
#include "
phaseFieldProblem.hpp
"
27
28
int
main
(
int
argc,
char
*argv[]){
29
30
std::string xmlInFileName =
""
;
31
32
Teuchos::CommandLineProcessor clp(
false
);
33
clp.setOption(
"xml-in-file"
,&xmlInFileName,
"The XML file to read into a parameter list"
);
34
clp.setDocString(
"TO DO."
);
35
36
Teuchos::CommandLineProcessor::EParseCommandLineReturn
37
parse_return = clp.parse(argc,argv);
38
if
( parse_return != Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL ) {
39
std::cout <<
"\nEnd Result: TEST FAILED"
<< std::endl;
40
return
parse_return;
41
}
42
43
#ifdef HAVE_MPI
44
MPI_Init(&argc, &argv);
45
Epetra_MpiComm Comm(MPI_COMM_WORLD);
46
#else
47
Epetra_SerialComm Comm;
48
#endif
49
50
Teuchos::RCP<Teuchos::ParameterList> paramList = Teuchos::rcp(
new
Teuchos::ParameterList);
51
if
(xmlInFileName.length()) {
52
Teuchos::updateParametersFromXmlFile(xmlInFileName, inoutArg(*paramList));
53
}
54
if
(Comm.MyPID()==0){
55
paramList->print(std::cout,2,
true
,
true
);
56
}
57
58
Teuchos::RCP<phaseFieldProblem> phaseFieldModel = Teuchos::rcp(
new
phaseFieldProblem
(Comm, *paramList));
59
60
phaseFieldModel->staggeredAlgorithmDirichletBC(*paramList,
true
);
61
62
#ifdef HAVE_MPI
63
MPI_Finalize();
64
#endif
65
return
0;
66
}
phaseFieldProblem.hpp
phaseFieldProblem
Definition:
phaseFieldProblem.hpp:10
main
int main(int argc, char *argv[])
Definition:
main.cpp:23
examples
phasefield
main.cpp
Generated by
1.8.13