5 #include "Epetra_ConfigDefs.h" 8 #include "Epetra_MpiComm.h" 10 #include "Epetra_SerialComm.h" 14 #include <boost/random/mersenne_twister.hpp> 15 #include <boost/random/normal_distribution.hpp> 16 #include <boost/random/uniform_real_distribution.hpp> 17 #include <boost/math/special_functions/gamma.hpp> 19 int main(
int argc,
char *argv[]){
21 std::string xmlInFileName =
"";
23 Teuchos::CommandLineProcessor clp(
false);
24 clp.setOption(
"xml-in-file",&xmlInFileName,
"The XML file to read into a parameter list");
25 clp.setDocString(
"Compilation: make -f Makefile.os\n" 26 "Run: mpirun -np 28 ./trilinos_mpi --xml-in-file='nrl.aztec.linux.xml'");
28 Teuchos::CommandLineProcessor::EParseCommandLineReturn
29 parse_return = clp.parse(argc,argv);
30 if( parse_return != Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL ) {
31 std::cout <<
"\nEnd Result: TEST FAILED" << std::endl;
36 MPI_Init(&argc, &argv);
37 Epetra_MpiComm Comm(MPI_COMM_WORLD);
39 Epetra_SerialComm Comm;
42 Teuchos::RCP<Teuchos::ParameterList> paramList = Teuchos::rcp(
new Teuchos::ParameterList);
43 if(xmlInFileName.length()){
44 Teuchos::updateParametersFromXmlFile(xmlInFileName, inoutArg(*paramList));
55 Teuchos::RCP<nrl_PCA_Likelihood> RG =
58 Epetra_IntSerialDenseVector seeds(5);
59 Epetra_SerialDenseVector mean_parameters(5);
60 Epetra_SerialDenseVector exponents(2);
61 Epetra_SerialDenseVector correlation_lengths(2);
62 Epetra_SerialDenseVector coeff_of_variation(4);
63 Epetra_SerialDenseVector plyagls(4);
66 mean_parameters(0) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu1");
67 mean_parameters(1) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu2");
68 mean_parameters(2) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu3");
69 mean_parameters(3) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu4");
70 mean_parameters(4) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu5");
73 exponents(0) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"beta4");
74 exponents(1) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"beta5");
76 correlation_lengths(0) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"lx");
77 correlation_lengths(1) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"ly");
79 coeff_of_variation(0) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta1");
80 coeff_of_variation(1) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta2");
81 coeff_of_variation(2) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta3");
82 coeff_of_variation(3) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta4");
89 int nmc = Teuchos::getParameter<int>(paramList->sublist(
"Shinozuka"),
"nmc");
91 for (
unsigned int i=0;
i<4; ++
i){
92 for (
unsigned int j=0;
j<
nmc; ++
j){
93 seeds(0) = 5*(
j+
i*
nmc)+0;
94 seeds(1) = 5*(
j+
i*
nmc)+1;
95 seeds(2) = 5*(
j+
i*
nmc)+2;
96 seeds(3) = 5*(
j+
i*
nmc)+3;
97 seeds(4) = 5*(
j+
i*
nmc)+4;
98 int flag = RG->rnd(
j ,
int main(int argc, char *argv[])