5 #include "Epetra_ConfigDefs.h" 8 #include "Epetra_MpiComm.h" 10 #include "Epetra_SerialComm.h" 13 #include "Teuchos_CommandLineProcessor.hpp" 14 #include "Teuchos_StandardCatchMacros.hpp" 15 #include "Teuchos_ParameterList.hpp" 16 #include "Teuchos_XMLParameterListCoreHelpers.hpp" 19 #include <boost/math/special_functions/gamma.hpp> 21 int load_solution(std::string & filesolution, Epetra_Vector * x);
23 int main(
int argc,
char *argv[]){
25 std::string xmlInFileName =
"";
26 std::string extraXmlFile =
"";
27 std::string xmlOutFileName =
"paramList.out";
29 Teuchos::CommandLineProcessor clp(
false);
30 clp.setOption(
"xml-in-file",&xmlInFileName,
"The XML file to read into a parameter list");
31 clp.setDocString(
"TO DO.");
33 Teuchos::CommandLineProcessor::EParseCommandLineReturn
34 parse_return = clp.parse(argc,argv);
35 if( parse_return != Teuchos::CommandLineProcessor::PARSE_SUCCESSFUL ) {
36 std::cout <<
"\nEnd Result: TEST FAILED" << std::endl;
41 MPI_Init(&argc, &argv);
42 Epetra_MpiComm Comm(MPI_COMM_WORLD);
44 Epetra_SerialComm Comm;
47 Teuchos::RCP<Teuchos::ParameterList> paramList = Teuchos::rcp(
new Teuchos::ParameterList);
48 if(xmlInFileName.length()) {
49 Teuchos::updateParametersFromXmlFile(xmlInFileName, inoutArg(*paramList));
53 paramList->print(std::cout,2,
true,
true);
56 Teuchos::RCP<neumannInnerSurface_PolyconvexHGO>
interface = Teuchos::rcp(new neumannInnerSurface_PolyconvexHGO(Comm,*paramList));
72 Epetra_Vector * x =
new Epetra_Vector(*interface->StandardMap);
83 Teuchos::RCP<newtonRaphson> Newton = Teuchos::rcp(
new newtonRaphson(*interface,*paramList));
84 Newton->setParameters(*paramList);
86 std::string filesolution =
"/Users/Brian/Documents/Thesis/Trilinos_results/arteries/gmrf_neumann/disp_mean_model.mtx";
88 std::string filestress =
"/Users/Brian/Documents/Thesis/Trilinos_results/arteries/gmrf_neumann/stress_mean_model";
89 interface->compute_center_cauchy_stress(*x,filestress);
123 file.open(filesolution);
125 for (
int i=0;
i<x->GlobalLength(); ++
i){
127 if ( (x->Map()).MyGID(
i) ){
128 LID = (x->Map()).LID(
i);
129 x->ReplaceMyValues(1,&data,&LID);
133 std::cout << std::setw(10) << x->GlobalLength() << std::setw(10) << x->MyLength() <<
"\n";
138 std::cout <<
"Couldn't open the file: " << filesolution <<
"\n";
int load_solution(std::string &filesolution, Epetra_Vector *x)
int main(int argc, char *argv[])