59 #ifdef USE_EPETRA_THYRA
61 #include "TSFCoreSerialVectorSpaceStd.hpp"
62 #include "AbstractLinAlgPack_VectorSpaceTSFCore.hpp"
63 #include "TSFCoreEpetraVectorSpace.hpp"
71 #endif // USE_EPETRA_THYRA
75 int argc,
char* argv[],
MPI_Comm comm
77 ,
int *n,
value_type *xo,
bool *has_bounds,
bool *dep_bounded
83 namespace mmp = MemMngPack;
95 int num_proc, proc_rank;
107 #ifdef USE_EPETRA_THYRA
109 bool in_parallel =
false;
111 bool use_tsf =
false;
112 #endif // USE_EPETRA_THYRA
114 CommandLineProcessor command_line_processor;
116 command_line_processor.setOption(
"n", n,
"Global number of dependent (and independent) variables" );
117 command_line_processor.setOption(
"xo", xo,
"Initial guess of the solution" );
118 command_line_processor.setOption(
119 "has-bounds",
"no-has-bounds", has_bounds
120 ,
"Determine if the NLP has bounds or not" );
121 command_line_processor.setOption(
122 "dep-bounded",
"indep-bounded", dep_bounded
123 ,
"Determine if the dependent or independent variables are bounded" );
124 #ifdef USE_EPETRA_THYRA
125 command_line_processor.setOption(
126 "in-parallel",
"in-serial", &in_parallel
127 ,
"Determine if computations are performed in parallel or not" );
128 command_line_processor.setOption(
129 "use-tsf",
"no-use-tsf", &use_tsf
130 ,
"Determine whether to use TSF vectors or not" );
131 #endif // USE_EPETRA_THYRA
133 CommandLineProcessor::EParseCommandLineReturn
134 parse_return = command_line_processor.parse(argc,argv,&std::cerr);
136 if( parse_return != CommandLineProcessor::PARSE_SUCCESSFUL )
141 #ifdef USE_EPETRA_THYRA
143 using AbstractLinAlgPack::VectorSpaceTSFCore;
156 Teuchos::set_extra_data(comm,
"comm", Teuchos::outArg(map));
171 #else // USE_EPETRA_THYRA
175 #endif // USE_EPETRA_THYRA
AbstractLinAlgPack::size_type size_type
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
int MPI_Comm_size(MPI_Comm comm, int *size)
int MPI_Comm_rank(MPI_Comm comm, int *rank)
RTOp_value_type value_type
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
int exampleNLPDiagSetup(int argc, char *argv[], MPI_Comm comm, Teuchos::RCP< const VectorSpace > *vec_space, int *n, value_type *xo, bool *has_bounds, bool *dep_bounded)
Create a vector space given the input arguments argc, argv[] and an MPI communicator.
RTOp_index_type size_type
Abstract interface for objects that represent a space for mutable coordinate vectors.
AbstractLinAlgPack::value_type value_type
Abstract interface for mutable coordinate vectors {abstract}.
Subclass for serial vector space objects that create VectorMutableDense vector and MultiVectorMutable...