EpetraExt  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EpetraExt_MultiPointModelEvaluator.cpp
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ***********************************************************************
4 //
5 // EpetraExt: Epetra Extended - Linear Algebra Services Package
6 // Copyright (2011) Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ***********************************************************************
41 //@HEADER
42 */
43 
45 #include "Epetra_Map.h"
46 #include "Teuchos_as.hpp"
47 
49  Teuchos::RCP<EpetraExt::ModelEvaluator> underlyingME_,
50  const Teuchos::RCP<EpetraExt::MultiComm> &globalComm_,
51  const std::vector<Epetra_Vector*> initGuessVec_,
52  Teuchos::RCP<std::vector< Teuchos::RCP<Epetra_Vector> > > q_vec_,
53  Teuchos::RCP<std::vector< Teuchos::RCP<Epetra_Vector> > > matching_vec_
54  ) :
55  underlyingME(underlyingME_),
56  globalComm(globalComm_),
57  q_vec(q_vec_),
58  underlyingNg(0),
59  timeStepsOnTimeDomain(globalComm_->NumTimeStepsOnDomain()),
60  numTimeDomains(globalComm_->NumSubDomains()),
61  timeDomain(globalComm_->SubDomainRank()),
62 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
63  rowStencil_int(0),
64 #endif
65 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
66  rowStencil_LL(0),
67 #endif
68 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
69  rowIndex_int(0),
70 #endif
71 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
72  rowIndex_LL(0),
73 #endif
74  matching_vec(matching_vec_)
75 {
76  using Teuchos::as;
77  if (globalComm->MyPID()==0) {
78  std::cout << "----------MultiPoint Partition Info------------"
79  << "\n\tNumProcs = " << globalComm->NumProc()
80  << "\n\tSpatial Decomposition = " << globalComm->SubDomainComm().NumProc()
81  << "\n\tNumber of Domains = " << numTimeDomains
82  << "\n\tSteps on Domain 0 = " << timeStepsOnTimeDomain
83  << "\n\tTotal Number of Steps = " << globalComm->NumTimeSteps();
84  std::cout << "\n-----------------------------------------------" << std::endl;
85  }
86 
87  // Construct global block matrix graph from split W and stencil,
88  // which is just diagonal in this case
89 
90  split_W = Teuchos::rcp_dynamic_cast<Epetra_RowMatrix>(underlyingME->create_W());
91 
92 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
93  if(split_W->RowMatrixRowMap().GlobalIndicesInt()) {
94  longlong = false;
95  rowStencil_int = new std::vector< std::vector<int> >(timeStepsOnTimeDomain);
96  rowIndex_int = new std::vector<int>;
97  for (int i=0; i < timeStepsOnTimeDomain; i++) {
98  (*rowStencil_int)[i].push_back(0);
99  (*rowIndex_int).push_back(i + globalComm->FirstTimeStepOnDomain());
100  }
101  block_W = Teuchos::rcp(new EpetraExt::BlockCrsMatrix(*split_W,
102  *rowStencil_int, *rowIndex_int, *globalComm));
103  }
104  else
105 #endif
106 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
107  if(split_W->RowMatrixRowMap().GlobalIndicesInt()) {
108  longlong = true;
109  rowStencil_LL = new std::vector< std::vector<long long> >(timeStepsOnTimeDomain);
110  rowIndex_LL = new std::vector<long long>;
111  for (int i=0; i < timeStepsOnTimeDomain; i++) {
112  (*rowStencil_LL)[i].push_back(0);
113  (*rowIndex_LL).push_back(i + globalComm->FirstTimeStepOnDomain());
114  }
115  block_W = Teuchos::rcp(new EpetraExt::BlockCrsMatrix(*split_W,
116  *rowStencil_LL, *rowIndex_LL, *globalComm));
117  }
118  else
119 #endif
120  throw "EpetraExt::MultiPointModelEvaluator::MultiPointModelEvaluator: Global indices unknown";
121 
122  // Test for g vector
123  EpetraExt::ModelEvaluator::OutArgs underlyingOutArgs = underlyingME->createOutArgs();
124 
125  underlyingNg = underlyingOutArgs.Ng();
126  if (underlyingNg) {
127  if (underlyingOutArgs.supports(OUT_ARG_DgDp,0,0).supports(DERIV_TRANS_MV_BY_ROW))
128  orientation_DgDp = DERIV_TRANS_MV_BY_ROW;
129  else
130  orientation_DgDp = DERIV_MV_BY_COL;
131  }
132 
133  // This code assumes 2 parameter vectors, 1 for opt, second for MultiPoint states
134  TEUCHOS_TEST_FOR_EXCEPT(underlyingOutArgs.Np()!=2);
135 
136  // temporary quantities
137  const Epetra_Map& split_map = split_W->RowMatrixRowMap();
138  num_p0 = underlyingME_->get_p_map(0)->NumMyElements();
139  if (underlyingNg) num_g0 = underlyingME_->get_g_map(0)->NumMyElements();
140  else num_g0 = 0;
141  num_dg0dp0 = num_g0 * num_p0;
142 
143  // Construct global solution vector, residual vector -- local storage
144  block_x = new EpetraExt::BlockVector(split_map, block_W->RowMap());
145  block_f = new EpetraExt::BlockVector(*block_x);
146  block_DfDp = new EpetraExt::BlockMultiVector(split_map, block_W->RowMap(), num_p0);
147  if (underlyingNg)
148  block_DgDx = new EpetraExt::BlockMultiVector(split_map, block_W->RowMap(), num_g0);
149 
150  // Allocate local storage of epetra vectors
151  split_x = Teuchos::rcp(new Epetra_Vector(split_map));
152  split_f = Teuchos::rcp(new Epetra_Vector(split_map));
153  split_DfDp = Teuchos::rcp(new Epetra_MultiVector(split_map, num_p0));
154  if (underlyingNg)
155  split_DgDx = Teuchos::rcp(new Epetra_MultiVector(split_map, num_g0));
156  if (underlyingNg) {
157  if(orientation_DgDp == DERIV_TRANS_MV_BY_ROW)
158  split_DgDp = Teuchos::rcp(new Epetra_MultiVector(*(underlyingME_->get_p_map(0)), num_g0));
159  else
160  split_DgDp = Teuchos::rcp(new Epetra_MultiVector(*(underlyingME_->get_g_map(0)), num_p0));
161  }
162  if (underlyingNg)
163  split_g = Teuchos::rcp(new Epetra_Vector(*(underlyingME_->get_g_map(0))));
164 
165  // Packaging required for getting multivectors back as Derivatives
166  derivMV_DfDp = new EpetraExt::ModelEvaluator::DerivativeMultiVector(split_DfDp);
167  deriv_DfDp = new EpetraExt::ModelEvaluator::Derivative(*derivMV_DfDp);
168  if (underlyingNg) {
170  deriv_DgDx = new EpetraExt::ModelEvaluator::Derivative(*derivMV_DgDx);
171  derivMV_DgDp = new EpetraExt::ModelEvaluator::DerivativeMultiVector(split_DgDp, orientation_DgDp);
172  deriv_DgDp = new EpetraExt::ModelEvaluator::Derivative(*derivMV_DgDp);
173  }
174 
175  // For 4D, we will need the overlap vector and importer between them
176  // Overlap not needed for MultiPoint -- no overlap between blocks
177  /* solutionOverlap = new EpetraExt::BlockVector(split_W->RowMatrixRowMap(),
178  block_W->ColMap());
179  overlapImporter = new Epetra_Import(solutionOverlap->Map(), block_x->Map());
180  */
181 
182  // Load initial guess into block solution vector
183  solution_init = Teuchos::rcp(new EpetraExt::BlockVector(*block_x));
184 
185  if(longlong) {
186 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
187  for (int i=0; i < timeStepsOnTimeDomain; i++)
188  solution_init->LoadBlockValues(*(initGuessVec_[i]), (*rowIndex_LL)[i]);
189 #endif
190  }
191  else {
192 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
193  for (int i=0; i < timeStepsOnTimeDomain; i++)
194  solution_init->LoadBlockValues(*(initGuessVec_[i]), (*rowIndex_int)[i]);
195 #endif
196  }
197 
198 
199  //Prepare logic for matching problem
200  if (Teuchos::is_null(matching_vec)) matchingProblem = false;
201  else matchingProblem = true;
202 
203  if (matchingProblem) {
204  TEUCHOS_TEST_FOR_EXCEPT(as<int>(matching_vec->size())!=timeStepsOnTimeDomain);
205  TEUCHOS_TEST_FOR_EXCEPT(!(*matching_vec)[0]->Map().SameAs(*(underlyingME_->get_g_map(0))));
206  TEUCHOS_TEST_FOR_EXCEPT(num_g0 != 1); //This restriction may be lifted later
207  }
208 }
209 
211 {
212  delete block_x;
213  delete block_f;
214  delete block_DfDp;
215  if (underlyingNg) delete block_DgDx;
216 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
217  delete rowStencil_int;
218  delete rowIndex_int;
219 #endif
220 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
221  delete rowStencil_LL;
222  delete rowIndex_LL;
223 #endif
224 
225  delete derivMV_DfDp;
226  delete deriv_DfDp;
227  if (underlyingNg) {
228  delete derivMV_DgDx;
229  delete deriv_DgDx;
230  delete derivMV_DgDp;
231  delete deriv_DgDp;
232  }
233 }
234 
235 Teuchos::RCP<const Epetra_Map> EpetraExt::MultiPointModelEvaluator::get_x_map() const
236 {
237  return Teuchos::rcp(&(block_W->OperatorDomainMap()), false);
238 }
239 
240 Teuchos::RCP<const Epetra_Map> EpetraExt::MultiPointModelEvaluator::get_f_map() const
241 {
242  return get_x_map();
243 }
244 
245 Teuchos::RCP<const Epetra_Map> EpetraExt::MultiPointModelEvaluator::get_p_map(int l) const
246 {
247  return underlyingME->get_p_map(l);
248 }
249 
250 Teuchos::RCP<const Epetra_Map> EpetraExt::MultiPointModelEvaluator::get_g_map(int j) const
251 {
252  return underlyingME->get_g_map(j);
253 }
254 
255 Teuchos::RCP<const Epetra_Vector> EpetraExt::MultiPointModelEvaluator::get_x_init() const
256 {
257  return solution_init;
258 }
259 
260 Teuchos::RCP<const Epetra_Vector> EpetraExt::MultiPointModelEvaluator::get_p_init(int l) const
261 {
262  return underlyingME->get_p_init(l);
263 }
264 
265 Teuchos::RCP<Epetra_Operator> EpetraExt::MultiPointModelEvaluator::create_W() const
266 {
267  return block_W;
268 }
269 
271 {
272  //return underlyingME->createInArgs();
273  InArgsSetup inArgs;
274  inArgs.setModelEvalDescription(this->description());
275  inArgs.set_Np(1);
276  inArgs.setSupports(IN_ARG_x,true);
277  return inArgs;
278 }
279 
281 {
282  //return underlyingME->createOutArgs();
283  OutArgsSetup outArgs;
284  outArgs.setModelEvalDescription(this->description());
285  outArgs.set_Np_Ng(1, underlyingNg);
286  outArgs.setSupports(OUT_ARG_f,true);
287  outArgs.setSupports(OUT_ARG_W,true);
288  outArgs.set_W_properties(
290  DERIV_LINEARITY_NONCONST
291  ,DERIV_RANK_FULL
292  ,true // supportsAdjoint
293  )
294  );
295  outArgs.setSupports(OUT_ARG_DfDp,0,DERIV_MV_BY_COL);
296  outArgs.set_DfDp_properties(
298  DERIV_LINEARITY_CONST
299  ,DERIV_RANK_DEFICIENT
300  ,true // supportsAdjoint
301  )
302  );
303 
304  if (underlyingNg) {
305  outArgs.setSupports(OUT_ARG_DgDx,0,DERIV_TRANS_MV_BY_ROW);
306  outArgs.set_DgDx_properties(
308  DERIV_LINEARITY_NONCONST
309  ,DERIV_RANK_DEFICIENT
310  ,true // supportsAdjoint
311  )
312  );
313  outArgs.setSupports(OUT_ARG_DgDp,0,0, orientation_DgDp);
314  outArgs.set_DgDp_properties(
316  DERIV_LINEARITY_NONCONST
317  ,DERIV_RANK_DEFICIENT
318  ,true // supportsAdjoint
319  )
320  );
321  }
322  return outArgs;
323 }
324 
326  const OutArgs& outArgs ) const
327 {
328 
329  EpetraExt::ModelEvaluator::InArgs underlyingInArgs = underlyingME->createInArgs();
330  EpetraExt::ModelEvaluator::OutArgs underlyingOutArgs = underlyingME->createOutArgs();
331 
332  //temp code for multipoint param q vec
333 /*
334  Teuchos::RCP<Epetra_Vector> q =
335  Teuchos::rcp(new Epetra_Vector(*(underlyingME->get_p_map(1))));
336 */
337 
338  // Parse InArgs
339  Teuchos::RCP<const Epetra_Vector> p_in = inArgs.get_p(0);
340  if (p_in.get()) underlyingInArgs.set_p(0, p_in);
341 
342  Teuchos::RCP<const Epetra_Vector> x_in = inArgs.get_x();
343  block_x->Epetra_Vector::operator=(*x_in); //copy into block vector
344 
345  // Parse OutArgs
346  Teuchos::RCP<Epetra_Vector> f_out = outArgs.get_f();
347 
348  Teuchos::RCP<Epetra_Operator> W_out = outArgs.get_W();
349  Teuchos::RCP<EpetraExt::BlockCrsMatrix> W_block =
350  Teuchos::rcp_dynamic_cast<EpetraExt::BlockCrsMatrix>(W_out);
351 
352  Teuchos::RCP<Epetra_Vector> g_out;
353  if (underlyingNg) g_out = outArgs.get_g(0);
354  if (g_out.get()) g_out->PutScalar(0.0);
355 
356  EpetraExt::ModelEvaluator::Derivative DfDp_out = outArgs.get_DfDp(0);
357 
360  if (underlyingNg) {
361  DgDx_out = outArgs.get_DgDx(0);
362  DgDp_out = outArgs.get_DgDp(0,0);
363  if (!DgDx_out.isEmpty()) DgDx_out.getMultiVector()->PutScalar(0.0);
364  if (!DgDp_out.isEmpty()) DgDp_out.getMultiVector()->PutScalar(0.0);
365  }
366 
367  // For mathcingProblems, g is needed to calc DgDx DgDp, so ask for
368  // g even if it isn't requested.
369  bool need_g = g_out.get();
370  if (matchingProblem)
371  if ( !DgDx_out.isEmpty() || !DgDp_out.isEmpty() ) need_g = true;
372 
373 
374  // Begin loop over Points (steps) owned on this proc
375  for (int i=0; i < timeStepsOnTimeDomain; i++) {
376 
377  // Set MultiPoint parameter vector
378  underlyingInArgs.set_p(1, (*q_vec)[i]);
379 
380  // Set InArgs
381  if(longlong) {
382 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
383  block_x->ExtractBlockValues(*split_x, (*rowIndex_LL)[i]);
384 #endif
385  }
386  else {
387 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
388  block_x->ExtractBlockValues(*split_x, (*rowIndex_int)[i]);
389 #endif
390  }
391  underlyingInArgs.set_x(split_x);
392 
393  // Set OutArgs
394  if (f_out.get()) underlyingOutArgs.set_f(split_f);
395 
396  if (need_g) underlyingOutArgs.set_g(0, split_g);
397 
398  if (W_out.get()) underlyingOutArgs.set_W(split_W);
399 
400  if (!DfDp_out.isEmpty()) underlyingOutArgs.set_DfDp(0, *deriv_DfDp);
401 
402  if (!DgDx_out.isEmpty()) underlyingOutArgs.set_DgDx(0, *deriv_DgDx);
403 
404  if (!DgDp_out.isEmpty()) underlyingOutArgs.set_DgDp(0, 0, *deriv_DgDp);
405 
406  //********Eval Model ********/
407  underlyingME->evalModel(underlyingInArgs, underlyingOutArgs);
408  //********Eval Model ********/
409 
410  // If matchingProblem, modify all g-related quantitites G = 0.5*(g-g*)^2 / g*^2
411  if (matchingProblem) {
412  if (need_g) {
413  double diff = (*split_g)[0] - (*(*matching_vec)[i])[0];
414  double nrmlz = fabs((*(*matching_vec)[i])[0]) + 1.0e-6;
415  (*split_g)[0] = 0.5 * diff * diff/(nrmlz*nrmlz);
416  if (!DgDx_out.isEmpty()) split_DgDx->Scale(diff/(nrmlz*nrmlz));
417  if (!DgDp_out.isEmpty()) split_DgDp->Scale(diff/(nrmlz*nrmlz));
418  }
419  }
420 
421  // Repackage block components into global block matrx/vector/multivector
422  if(longlong) {
423 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
424  if (f_out.get()) block_f->LoadBlockValues(*split_f, (*rowIndex_LL)[i]);
425  if (W_out.get()) W_block->LoadBlock(*split_W, i, 0);
426  // note: split_DfDp points inside deriv_DfDp
427  if (!DfDp_out.isEmpty()) block_DfDp->LoadBlockValues(*split_DfDp, (*rowIndex_LL)[i]);
428  if (!DgDx_out.isEmpty()) block_DgDx->LoadBlockValues(*split_DgDx, (*rowIndex_LL)[i]);
429 #endif
430  }
431  else {
432 #ifndef EPETRA_NO_32BIT_GLOBAL_INDICES
433  if (f_out.get()) block_f->LoadBlockValues(*split_f, (*rowIndex_int)[i]);
434  if (W_out.get()) W_block->LoadBlock(*split_W, i, 0);
435  // note: split_DfDp points inside deriv_DfDp
436  if (!DfDp_out.isEmpty()) block_DfDp->LoadBlockValues(*split_DfDp, (*rowIndex_int)[i]);
437  if (!DgDx_out.isEmpty()) block_DgDx->LoadBlockValues(*split_DgDx, (*rowIndex_int)[i]);
438 #endif
439  }
440 
441  // Assemble multiple steps on this domain into g and dgdp(0) vectors
442  if (g_out.get()) g_out->Update(1.0, *split_g, 1.0);
443 
444  if (!DgDp_out.isEmpty())
445  DgDp_out.getMultiVector()->Update(1.0, *split_DgDp, 1.0);
446 
447  } // End loop over multiPoint steps on this domain/cluster
448 
449  //Copy block vectors into *_out vectors of same size
450  if (f_out.get()) f_out->operator=(*block_f);
451  if (!DfDp_out.isEmpty())
452  DfDp_out.getMultiVector()->operator=(*block_DfDp);
453  if (!DgDx_out.isEmpty())
454  DgDx_out.getMultiVector()->operator=(*block_DgDx);
455 
456  //Sum together obj fn contributions from differnt Domains (clusters).
457  if (numTimeDomains > 1) {
458  double factorToZeroOutCopies = 0.0;
459  if (globalComm->SubDomainComm().MyPID()==0) factorToZeroOutCopies = 1.0;
460  if (g_out.get()) {
461  (*g_out).Scale(factorToZeroOutCopies);
462  double* vPtr = &((*g_out)[0]);
463  Epetra_Vector tmp = *(g_out.get());
464  globalComm->SumAll( &(tmp[0]), vPtr, num_g0);
465  }
466  if (!DgDp_out.isEmpty()) {
467  DgDp_out.getMultiVector()->Scale(factorToZeroOutCopies);
468  double* mvPtr = (*DgDp_out.getMultiVector())[0];
469  Epetra_MultiVector tmp = *(DgDp_out.getMultiVector());
470  globalComm->SumAll(tmp[0], mvPtr, num_dg0dp0);
471  }
472  }
473 }
bool supports(EOutArgsMembers arg) const
Teuchos::RCP< const Epetra_Vector > get_x_init() const
void set_W_properties(const DerivativeProperties &properties)
Evaluation< Epetra_Vector > get_g(int j) const
Get g(j) where 0 &lt;= j &amp;&amp; j &lt; this-&gt;Ng().
Teuchos::RCP< Epetra_Operator > create_W() const
void set_DgDx(int j, const Derivative &DgDx_j)
Teuchos::RCP< const Epetra_Vector > get_p_init(int l) const
void setSupports(EOutArgsMembers arg, bool supports=true)
void set_x(const Teuchos::RCP< const Epetra_Vector > &x)
Teuchos::RCP< Epetra_Operator > get_W() const
void set_DfDp(int l, const Derivative &DfDp_l)
void evalModel(const InArgs &inArgs, const OutArgs &outArgs) const
void set_f(const Evaluation< Epetra_Vector > &f)
void setSupports(EInArgsMembers arg, bool supports=true)
Teuchos::RCP< const Epetra_Vector > get_p(int l) const
Simple aggregate class that stores a derivative object as a general linear operator or as a multi-vec...
Teuchos::RCP< const Epetra_Map > get_p_map(int l) const
.
Simple aggregate class for a derivative object represented as a column-wise multi-vector or its trans...
void set_DgDp_properties(int j, int l, const DerivativeProperties &properties)
Teuchos::RCP< Epetra_MultiVector > getMultiVector() const
void set_DfDp_properties(int l, const DerivativeProperties &properties)
void setModelEvalDescription(const std::string &modelEvalDescription)
void set_p(int l, const Teuchos::RCP< const Epetra_Vector > &p_l)
Derivative get_DgDp(int j, int l) const
MultiPointModelEvaluator(Teuchos::RCP< EpetraExt::ModelEvaluator > underlyingME_, const Teuchos::RCP< EpetraExt::MultiComm > &globalComm_, const std::vector< Epetra_Vector * > initGuessVec, Teuchos::RCP< std::vector< Teuchos::RCP< Epetra_Vector > > > qvec, Teuchos::RCP< std::vector< Teuchos::RCP< Epetra_Vector > > > matching_vec=Teuchos::null)
void set_W(const Teuchos::RCP< Epetra_Operator > &W)
Teuchos::RCP< const Epetra_Map > get_g_map(int j) const
.
void setModelEvalDescription(const std::string &modelEvalDescription)
void set_DgDp(int j, int l, const Derivative &DgDp_j_l)
void set_DgDx_properties(int j, const DerivativeProperties &properties)
Evaluation< Epetra_Vector > get_f() const
Teuchos::RCP< const Epetra_Vector > get_x() const
Set solution vector Taylor polynomial.
Teuchos::RCP< const Epetra_Map > get_f_map() const
Teuchos::RCP< const Epetra_Map > get_x_map() const
void set_g(int j, const Evaluation< Epetra_Vector > &g_j)
Set g(j) where 0 &lt;= j &amp;&amp; j &lt; this-&gt;Ng().