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));
47 Teuchos::RCP<nrl_PCA_Likelihood> RG =
50 Epetra_IntSerialDenseVector seeds(5);
51 Epetra_SerialDenseVector mean_parameters(5);
52 Epetra_SerialDenseVector exponents(2);
53 Epetra_SerialDenseVector correlation_lengths(2);
54 Epetra_SerialDenseVector coeff_of_variation(4);
55 Epetra_SerialDenseVector plyagls(4);
58 mean_parameters(0) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu1");
59 mean_parameters(1) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu2");
60 mean_parameters(2) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu3");
61 mean_parameters(3) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu4");
62 mean_parameters(4) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"mu5");
65 exponents(0) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"beta4");
66 exponents(1) = Teuchos::getParameter<double>(paramList->sublist(
"TIMooney"),
"beta5");
68 correlation_lengths(0) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"lx");
69 correlation_lengths(1) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"ly");
71 coeff_of_variation(0) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta1");
72 coeff_of_variation(1) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta2");
73 coeff_of_variation(2) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta3");
74 coeff_of_variation(3) = Teuchos::getParameter<double>(paramList->sublist(
"Shinozuka"),
"delta4");
81 int nmc = Teuchos::getParameter<int>(paramList->sublist(
"Shinozuka"),
"nmc");
83 for (
unsigned int i=0;
i<4; ++
i){
84 for (
unsigned int j=0;
j<
nmc; ++
j){
85 seeds(0) = 5*(
j+
i*
nmc)+0;
86 seeds(1) = 5*(
j+
i*
nmc)+1;
87 seeds(2) = 5*(
j+
i*
nmc)+2;
88 seeds(3) = 5*(
j+
i*
nmc)+3;
89 seeds(4) = 5*(
j+
i*
nmc)+4;
90 int flag = RG->rnd(
j ,
int main(int argc, char *argv[])