GLpApp_AdvDiffReactOptModelCreator.cpp

Go to the documentation of this file.
00001 #include "GLpApp_AdvDiffReactOptModelCreator.hpp"
00002 
00003 namespace GLpApp {
00004 
00005 AdvDiffReactOptModelCreator::AdvDiffReactOptModelCreator()
00006   :len_x_(1.0)
00007   ,len_y_(1.0)
00008   ,local_nx_(3)
00009   ,local_ny_(4)
00010   ,geomFileBase_("")
00011   ,np_(-1)
00012   ,normalizeBasis_(false)
00013   ,beta_(1.0)
00014   ,reactionRate_(1.0)
00015   ,x0_(0.0)
00016   ,p0_(1.0)
00017 {}
00018 
00019 void AdvDiffReactOptModelCreator::setupCLP(
00020   Teuchos::CommandLineProcessor *clp
00021   )
00022 {
00023   clp->setOption( "len-x", &len_x_, "Mesh dimension in the x direction (Overridden by --geom-file-base)." );
00024   clp->setOption( "len-y", &len_y_, "Mesh dimension in the y direction (Overridden by --geom-file-base)." );
00025   clp->setOption( "local-nx", &local_nx_, "Number of local discretization segments in the x direction (Overridden by --geom-file-base)." );
00026   clp->setOption( "local-ny", &local_ny_, "Number of local discretization segments in the y direction (Overridden by --geom-file-base)." );
00027   clp->setOption( "geom-file-base", &geomFileBase_, "Base name of geometry file to read the mesh from." );
00028   clp->setOption( "np", &np_, "The number of optimization parameters p (If < 0 then all of boundary is used)" );
00029   clp->setOption( "normalize-basis", "no-normalize-basis", &normalizeBasis_, "Normalize the basis for the parameters p or not." );
00030   clp->setOption( "beta", &beta_, "Regularization." );
00031   clp->setOption( "reaction-rate", &reactionRate_, "The rate of the reaction" );
00032   clp->setOption( "x0", &x0_, "Initial guess for the state." );
00033   clp->setOption( "p0", &p0_, "Initial guess or nonminal value for optimization parameters." );
00034 }
00035 
00036 Teuchos::RefCountPtr<AdvDiffReactOptModel>
00037 AdvDiffReactOptModelCreator::createModel(
00038   const Teuchos::RefCountPtr<const Epetra_Comm>     &comm
00039   ,std::ostream                                     *out
00040   ) const
00041 {
00042   return Teuchos::rcp(
00043     new GLpApp::AdvDiffReactOptModel(
00044       comm,beta_,len_x_,len_y_,local_nx_,local_ny_,geomFileBase_.c_str()
00045       ,np_,x0_,p0_,reactionRate_,normalizeBasis_
00046       )
00047     );
00048 }
00049 
00050 } // namespace GLpApp

Generated on Thu Sep 18 12:31:44 2008 for EpetraExt by doxygen 1.3.9.1