Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_BlockedEpetraLinearObjContainer.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Panzer: A partial differential equation assembly
4// engine for strongly coupled complex multiphysics systems
5//
6// Copyright 2011 NTESS and the Panzer contributors.
7// SPDX-License-Identifier: BSD-3-Clause
8// *****************************************************************************
9// @HEADER
10
11#ifndef __Panzer_BlockedEpetraLinearObjContainer_hpp__
12#define __Panzer_BlockedEpetraLinearObjContainer_hpp__
13
14#include "PanzerDiscFE_config.hpp"
15
16#include "Teuchos_RCP.hpp"
19
20#include "Thyra_PhysicallyBlockedLinearOpBase.hpp"
21#include "Thyra_ProductVectorBase.hpp"
22
23#include "Epetra_Map.h"
24
25#include <unordered_map>
26
27namespace panzer {
28
33 , public ThyraObjContainer<double> {
34public:
37
39 bool checkCompatibility() const;
40
41 virtual void clear();
42
44 void initializeMatrix(double value);
45
46 void setMapsForBlocks(const std::vector<Teuchos::RCP<const Epetra_Map> > & blockMaps)
47 { blockMaps_ = blockMaps; }
48
49 Teuchos::RCP<const Epetra_Map> getMapForBlock(std::size_t i) const
50 { return blockMaps_[i]; }
51
52 inline void set_x(const Teuchos::RCP<VectorType> & in) { set_x_th(in); }
53 inline Teuchos::RCP<VectorType> get_x() const { return get_x_th(); }
54
55 inline void set_dxdt(const Teuchos::RCP<VectorType> & in) { set_dxdt_th(in); }
56 inline Teuchos::RCP<VectorType> get_dxdt() const { return get_dxdt_th(); }
57
58 inline void set_f(const Teuchos::RCP<VectorType> & in) { set_f_th(in); }
59 inline Teuchos::RCP<VectorType> get_f() const { return get_f_th(); }
60
61 inline void set_A(const Teuchos::RCP<CrsMatrixType> & in) { set_A_th(in); }
62 inline Teuchos::RCP<CrsMatrixType> get_A() const { return get_A_th(); }
63
64 // Inherited from LinearObjContainer
65 virtual void initialize();
66
67 // Inherited from ThyraObjContainer
68
69 void set_x_th(const Teuchos::RCP<VectorType> & in) { x = in; }
70 Teuchos::RCP<VectorType> get_x_th() const { return x; }
71
72 void set_dxdt_th(const Teuchos::RCP<VectorType> & in) { dxdt = in; }
73 Teuchos::RCP<VectorType> get_dxdt_th() const { return dxdt; }
74
75 void set_f_th(const Teuchos::RCP<VectorType> & in) { f = in; }
76 Teuchos::RCP<VectorType> get_f_th() const { return f; }
77
78 void set_A_th(const Teuchos::RCP<CrsMatrixType> & in) { A = in; }
79 Teuchos::RCP<CrsMatrixType> get_A_th() const { return A; }
80
81private:
82 Teuchos::RCP<VectorType> x, dxdt, f;
83 Teuchos::RCP<CrsMatrixType> A;
84
85 std::vector<Teuchos::RCP<const Epetra_Map> > blockMaps_;
86};
87
88}
89
90#endif
void set_A_th(const Teuchos::RCP< CrsMatrixType > &in)
void set_dxdt_th(const Teuchos::RCP< VectorType > &in)
std::vector< Teuchos::RCP< const Epetra_Map > > blockMaps_
void setMapsForBlocks(const std::vector< Teuchos::RCP< const Epetra_Map > > &blockMaps)
void set_A(const Teuchos::RCP< CrsMatrixType > &in)
bool checkCompatibility() const
Make sure row and column spaces match up.
void initializeMatrix(double value)
Put a particular scalar in the matrix.
Teuchos::RCP< const Epetra_Map > getMapForBlock(std::size_t i) const