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 "
damageField.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
55
if
(Comm.MyPID()==0){
56
paramList->print(std::cout,2,
true
,
true
);
57
}
58
59
std::string mesh_file = Teuchos::getParameter<std::string>(paramList->sublist(
"Mesh"
),
"mesh_file"
);
60
mesh
Mesh(Comm, mesh_file, 1.0);
61
62
double
gc = 2.0;
63
double
lc
= 1.0;
64
65
Teuchos::RCP<damageField> damageInterface = Teuchos::rcp(
new
damageField
(Comm, Mesh, gc, lc));
66
67
#ifdef HAVE_MPI
68
MPI_Finalize();
69
#endif
70
return
0;
71
}
lc
modelParameters lc
Definition:
run_meanModels.m:30
mesh
Definition:
meshpp.hpp:49
main
int main(int argc, char *argv[])
Definition:
main.cpp:23
damageField
Definition:
damageField.hpp:10
damageField.hpp
examples
damagefield
main.cpp
Generated by
1.8.13