EpetraExt
Development
Toggle main menu visibility
Loading...
Searching...
No Matches
example
model_evaluator
2dsim
EpetraModelEval2DSim.hpp
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
44
#ifndef EPETRA_MODEL_EVAL_2D_SIM_HPP
45
#define EPETRA_MODEL_EVAL_2D_SIM_HPP
46
47
#include "
EpetraExt_ModelEvaluator.h
"
48
#include "Epetra_Map.h"
49
#include "Epetra_Vector.h"
50
#include "Epetra_Comm.h"
51
#include "Epetra_CrsGraph.h"
52
64
class
EpetraModelEval2DSim
:
public
EpetraExt::ModelEvaluator
{
65
public
:
66
68
EpetraModelEval2DSim
(
69
const
double
d = 10.0
70
,
const
double
p0 = 2.0
71
,
const
double
p1 = 0.0
72
,
const
double
x00 = 1.0
73
,
const
double
x01 = 1.0
74
,
const
bool
showGetInvalidArg =
false
75
);
76
79
81
Teuchos::RCP<const Epetra_Map>
get_x_map
()
const
;
83
Teuchos::RCP<const Epetra_Map>
get_f_map
()
const
;
85
Teuchos::RCP<const Epetra_Vector>
get_x_init
()
const
;
87
Teuchos::RCP<Epetra_Operator>
create_W
()
const
;
89
InArgs
createInArgs
()
const
;
91
OutArgs
createOutArgs
()
const
;
93
void
evalModel
(
const
InArgs
& inArgs,
const
OutArgs
& outArgs )
const
;
94
96
97
private
:
98
99
// /////////////////////////////////////
100
// Private member data
101
102
double
d_;
103
bool
showGetInvalidArg_;
104
105
bool
isInitialized_;
106
107
Teuchos::RCP<const Epetra_Comm> epetra_comm_;
108
Teuchos::RCP<const Epetra_Map> map_x_;
109
110
Teuchos::RCP<Epetra_Vector> x0_;
111
Teuchos::RCP<Epetra_Vector> p_;
112
113
Teuchos::RCP<Epetra_CrsGraph> W_graph_;
114
115
};
116
117
#endif
// EPETRA_MODEL_EVAL_2D_SIM_HPP
EpetraExt_ModelEvaluator.h
EpetraExt::ModelEvaluator::InArgs
Definition
EpetraExt_ModelEvaluator.h:135
EpetraExt::ModelEvaluator::OutArgs
Definition
EpetraExt_ModelEvaluator.h:760
EpetraExt::ModelEvaluator
Base interface for evaluating a stateless "model".
Definition
EpetraExt_ModelEvaluator.h:85
EpetraModelEval2DSim::EpetraModelEval2DSim
EpetraModelEval2DSim(const double d=10.0, const double p0=2.0, const double p1=0.0, const double x00=1.0, const double x01=1.0, const bool showGetInvalidArg=false)
Definition
EpetraModelEval2DSim.cpp:49
EpetraModelEval2DSim::createOutArgs
OutArgs createOutArgs() const
Definition
EpetraModelEval2DSim.cpp:118
EpetraModelEval2DSim::get_x_init
Teuchos::RCP< const Epetra_Vector > get_x_init() const
Definition
EpetraModelEval2DSim.cpp:97
EpetraModelEval2DSim::get_x_map
Teuchos::RCP< const Epetra_Map > get_x_map() const
Definition
EpetraModelEval2DSim.cpp:85
EpetraModelEval2DSim::create_W
Teuchos::RCP< Epetra_Operator > create_W() const
Definition
EpetraModelEval2DSim.cpp:103
EpetraModelEval2DSim::createInArgs
InArgs createInArgs() const
Definition
EpetraModelEval2DSim.cpp:109
EpetraModelEval2DSim::get_f_map
Teuchos::RCP< const Epetra_Map > get_f_map() const
Definition
EpetraModelEval2DSim.cpp:91
EpetraModelEval2DSim::evalModel
void evalModel(const InArgs &inArgs, const OutArgs &outArgs) const
Definition
EpetraModelEval2DSim.cpp:134
Generated by
1.17.0