42 #ifndef EPETRA_EXT_DIAGONAL_TRANSIENT_MODEL_HPP
43 #define EPETRA_EXT_DIAGONAL_TRANSIENT_MODEL_HPP
47 #include "Teuchos_VerboseObject.hpp"
48 #include "Teuchos_ParameterListAcceptor.hpp"
49 #include "Teuchos_Array.hpp"
101 public Teuchos::VerboseObject<DiagonalTransientModel>,
102 public Teuchos::ParameterListAcceptor
111 Teuchos::RCP<Epetra_Comm>
const& epetra_comm
115 Teuchos::RCP<const Epetra_Vector>
get_gamma()
const;
118 Teuchos::RCP<const Epetra_Vector>
124 Teuchos::RCP<const Epetra_MultiVector>
135 void setParameterList(Teuchos::RCP<Teuchos::ParameterList>
const& paramList);
151 Teuchos::RCP<const Epetra_Map>
get_x_map()
const;
153 Teuchos::RCP<const Epetra_Map>
get_f_map()
const;
155 Teuchos::RCP<const Epetra_Map>
get_p_map(
int l)
const;
157 Teuchos::RCP<const Teuchos::Array<std::string> >
get_p_names(
int l)
const;
159 Teuchos::RCP<const Epetra_Map>
get_g_map(
int j)
const;
161 Teuchos::RCP<const Epetra_Vector>
get_x_init()
const;
165 Teuchos::RCP<const Epetra_Vector>
get_p_init(
int l)
const;
167 Teuchos::RCP<Epetra_Operator>
create_W()
const;
186 typedef Teuchos::Array<double> coeff_s_t;
187 typedef Teuchos::Array<int> coeff_s_idx_t;
188 typedef Teuchos::Array<Teuchos::RCP<const Epetra_Map> > RCP_Eptra_Map_Array_t;
189 typedef Teuchos::Array<Teuchos::RCP<Epetra_Vector> > RCP_Eptra_Vector_Array_t;
190 typedef Teuchos::Array<Teuchos::RCP<Teuchos::Array<std::string> > > RCP_Array_String_Array_t;
196 Teuchos::RCP<Teuchos::ParameterList> paramList_;
197 Teuchos::RCP<Epetra_Comm> epetra_comm_;
198 Teuchos::RCP<Epetra_Map> epetra_map_;
204 coeff_s_idx_t coeff_s_idx_;
207 bool exactSolutionAsResponse_;
208 Teuchos::RCP<Epetra_Vector> gamma_;
209 Teuchos::RCP<Epetra_CrsGraph> W_graph_;
213 RCP_Eptra_Map_Array_t map_p_;
214 RCP_Array_String_Array_t names_p_;
215 RCP_Eptra_Map_Array_t map_g_;
216 RCP_Eptra_Vector_Array_t p_init_;
217 Teuchos::RCP<Epetra_Vector> x_init_;
218 Teuchos::RCP<Epetra_Vector> x_dot_init_;
220 mutable Teuchos::RCP<const Epetra_Vector> coeff_s_p_;
230 const Teuchos::RCP<const Epetra_Vector> &coeff_s_p
233 void unset_coeff_s_p()
const;
235 int coeff_s_idx(
int i)
const
237 return coeff_s_idx_[i];
240 double coeff_s(
int i)
const
242 return (*coeff_s_p_)[coeff_s_idx(i)];
252 Teuchos::RCP<DiagonalTransientModel>
253 diagonalTransientModel(
254 Teuchos::RCP<Epetra_Comm>
const& epetra_comm,
255 Teuchos::RCP<Teuchos::ParameterList>
const& paramList = Teuchos::null
267 #endif // EPETRA_EXT_DIAGONAL_TRANSIENT_MODEL_HPP
OutArgs createOutArgs() const
Simple transient diagonal model for an implicit or explicit ODE.
Teuchos::RCP< const Epetra_Vector > getExactSolution(const double t, const Epetra_Vector *coeff_s_p=0) const
Return the exact solution as a function of time.
Teuchos::RCP< const Epetra_Vector > get_gamma() const
Return the model vector gamma,.
Teuchos::RCP< const Epetra_Map > get_p_map(int l) const
.
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
DiagonalTransientModel(Teuchos::RCP< Epetra_Comm > const &epetra_comm)
Teuchos::RCP< const Epetra_Vector > get_x_init() const
Teuchos::RCP< const Epetra_Map > get_f_map() const
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
.
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Teuchos::RCP< const Epetra_MultiVector > getExactSensSolution(const double t, const Epetra_Vector *coeff_s_p=0) const
Return the exact sensitivity of x as a function of time.
Teuchos::RCP< const Epetra_Map > get_x_map() const
InArgs createInArgs() const
Teuchos::RCP< Epetra_Operator > create_W() const
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const ¶mList)
Teuchos::RCP< const Epetra_Vector > get_x_dot_init() const
Teuchos::RCP< const Epetra_Vector > get_p_init(int l) const
Base interface for evaluating a stateless "model".
void evalModel(const InArgs &inArgs, const OutArgs &outArgs) const
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< const Epetra_Map > get_g_map(int j) const
.