Panzer  Version of the Day
Panzer_Response_Probe.hpp
Go to the documentation of this file.
1 #ifndef __Panzer_Response_Probe_hpp__
2 #define __Panzer_Response_Probe_hpp__
3 
4 #include <string>
5 #include <limits>
6 
7 #include <mpi.h> // need for comm
8 
9 #include "Teuchos_RCP.hpp"
10 
11 #include "Thyra_VectorBase.hpp"
12 #include "Thyra_VectorSpaceBase.hpp"
13 
14 #include "Epetra_Map.h"
15 #include "Epetra_Vector.h"
16 #include "Epetra_MpiComm.h"
17 
23 
24 
25 namespace panzer {
26 
30 template <typename EvalT>
33 public:
34  typedef typename EvalT::ScalarT ScalarT;
35 
37  bool have_probe; // Point for probe is on our processor
38 
39  Response_Probe(const std::string & responseName, MPI_Comm comm,
40  const Teuchos::RCP<const panzer::LinearObjFactory<panzer::Traits> > & linObjFact=Teuchos::null);
41 
43  virtual void scatterResponse();
44 
45  virtual void initializeResponse();
46 
47  // from ResponseMESupport_Default
48 
50  virtual std::size_t localSizeRequired() const { return 1; }
51 
53  virtual bool vectorIsDistributed() const { return false; }
54 
57  { return Teuchos::rcp_dynamic_cast<const ThyraObjContainer<double> >(ghostedContainer_)->get_x_th(); }
58 
59  void adjustForDirichletConditions(const GlobalEvaluationData & localBCRows,const GlobalEvaluationData & globalBCRows);
60 
61 private:
64 
65  // hide these methods
68 
71 
74 };
75 
76 }
77 
78 #endif
virtual void scatterResponse()
This simply does global summation, then shoves the result into a vector.
Teuchos::RCP< LinearObjContainer > ghostedContainer_
Teuchos::RCP< const panzer::LinearObjFactory< panzer::Traits > > linObjFactory_
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get ghosted responses (this will be filled by the evaluator)
void adjustForDirichletConditions(const GlobalEvaluationData &localBCRows, const GlobalEvaluationData &globalBCRows)
virtual bool vectorIsDistributed() const
Is the vector distributed (or replicated)
Teuchos::RCP< LinearObjContainer > uniqueContainer_
Teuchos::RCP< const panzer::ThyraObjFactory< double > > thyraObjFactory_
Teuchos::RCP< const Teuchos::Comm< int > > comm
void setSolnVectorSpace(const Teuchos::RCP< const Thyra::VectorSpaceBase< double > > &soln_vs)
Set solution vector space.
virtual std::size_t localSizeRequired() const
What is the number of values you need locally.