1 #include "Epetra_ConfigDefs.h" 4 #include "Epetra_MpiComm.h" 6 #include "Epetra_SerialComm.h" 12 int main(
int argc,
char *argv[]){
14 std::string xmlInFileName =
"";
16 Teuchos::CommandLineProcessor clp(
false);
17 clp.setOption(
"xml-in-file",&xmlInFileName,
"The XML file to read into a parameter list");
18 clp.setDocString(
"TO DO.");
20 Teuchos::CommandLineProcessor::EParseCommandLineReturn
21 parse_return = clp.parse(argc,argv);
22 if( parse_return != Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL ) {
23 std::cout <<
"\nEnd Result: TEST FAILED" << std::endl;
28 MPI_Init(&argc, &argv);
29 Epetra_MpiComm Comm(MPI_COMM_WORLD);
31 Epetra_SerialComm Comm;
34 Teuchos::RCP<Teuchos::ParameterList> paramList = Teuchos::rcp(
new Teuchos::ParameterList);
35 if(xmlInFileName.length()) {
36 Teuchos::updateParametersFromXmlFile(xmlInFileName, inoutArg(*paramList));
40 paramList->print(std::cout,2,
true,
true);
43 Epetra_SerialDenseVector parameters(7);
44 Teuchos::RCP<rubberblock>
interface = Teuchos::rcp(new rubberblock(Comm,*paramList));
46 parameters(0) = Teuchos::getParameter<double>(paramList->sublist(
"rubberblock"),
"lambda");
47 parameters(1) = Teuchos::getParameter<double>(paramList->sublist(
"rubberblock"),
"mu");
48 interface->set_parameters(parameters);
49 Teuchos::RCP<newtonRaphson> Newton = Teuchos::rcp(
new newtonRaphson(*interface,*paramList));
52 double g = -interface->topcoord*0.3;
53 std::string pathsig22 =
"sig22.mtx";
54 std::string pathe22 =
"e22.mtx";
55 std::string pathsolut =
"u.mtx";
57 Newton->Initialization();
58 Newton->setParameters(*paramList);
60 int error = Newton->Solve_with_Aztec(
true);
int main(int argc, char *argv[])