5 #include "Epetra_ConfigDefs.h"     8 #include "Epetra_MpiComm.h"    10 #include "Epetra_SerialComm.h"    13 #include "Teuchos_RCP.hpp"    14 #include "BelosLinearProblem.hpp"    15 #include "Teuchos_StandardCatchMacros.hpp"    16 #include "Teuchos_ParameterList.hpp"    17 #include "Teuchos_XMLParameterListCoreHelpers.hpp"    20 int main(
int argc, 
char *argv[]){
    22     std::string    xmlInFileName = 
"";
    24     Teuchos::CommandLineProcessor  clp(
false);
    25     clp.setOption(
"xml-in-file",&xmlInFileName,
"The XML file to read into a parameter list");
    26     clp.setDocString(
"TO DO.");
    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         paramList->print(std::cout,2,
true,
true);
    50     Teuchos::RCP<ceeSBVP> 
interface = Teuchos::rcp(new ceeSBVP(Comm,*paramList));
    51     std::string path = Teuchos::getParameter<std::string>(paramList->sublist(
"Mesh"), 
"path");
    53     int * seed = 
new int [5];
    54     double displacement = 0.5;
    56     for (
unsigned int j=0; 
j<1000; ++
j){
    57         seed[0] = 5*
j; seed[1] = 5*
j+1; seed[2] = 5*
j+2; seed[3] = 5*
j+3; seed[4] = 5*
j+4;
    58         interface->solveOneRealization(displacement,seed);
    59         std::string pathu = path + std::to_string(
j) + 
"_u.mtx";
    60         std::string pathf = path + std::to_string(
j);
    61         interface->print_solution(pathu);
    62         interface->recover_cauchy_stress(pathf,seed);
    63         interface->compute_deformation(*interface->solution,pathf,
false,
true);
 
int main(int argc, char *argv[])