Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_Response_Probe.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_Response_Probe_hpp__
12#define __Panzer_Response_Probe_hpp__
13
14#include <string>
15#include <limits>
16
17#include <mpi.h> // need for comm
18
19#include "Teuchos_RCP.hpp"
20
21#include "Thyra_VectorBase.hpp"
22#include "Thyra_VectorSpaceBase.hpp"
23
24#include "PanzerDiscFE_config.hpp"
25#ifdef PANZER_HAVE_EPETRA_STACK
26#include "Epetra_Map.h"
27#include "Epetra_Vector.h"
28#include "Epetra_MpiComm.h"
29#endif
30
36
37
38namespace panzer {
39
43template <typename EvalT>
46public:
47 typedef typename EvalT::ScalarT ScalarT;
48
50 bool have_probe; // Point for probe is on our processor
51
52 Response_Probe(const std::string & responseName, MPI_Comm comm,
53 const Teuchos::RCP<const panzer::LinearObjFactory<panzer::Traits> > & linObjFact=Teuchos::null);
54
56 virtual void scatterResponse();
57
58 virtual void initializeResponse();
59
60 // from ResponseMESupport_Default
61
63 virtual std::size_t localSizeRequired() const { return 1; }
64
66 virtual bool vectorIsDistributed() const { return false; }
67
69 Teuchos::RCP<Thyra::VectorBase<double> > getGhostedVector() const
70 { return Teuchos::rcp_dynamic_cast<const ThyraObjContainer<double> >(ghostedContainer_)->get_x_th(); }
71
72 void adjustForDirichletConditions(const GlobalEvaluationData & localBCRows,const GlobalEvaluationData & globalBCRows);
73
74private:
76 void setSolnVectorSpace(const Teuchos::RCP<const Thyra::VectorSpaceBase<double> > & soln_vs);
77
78 // hide these methods
81
82 Teuchos::RCP<const panzer::LinearObjFactory<panzer::Traits> > linObjFactory_;
83 Teuchos::RCP<const panzer::ThyraObjFactory<double> > thyraObjFactory_;
84
85 Teuchos::RCP<LinearObjContainer> uniqueContainer_;
86 Teuchos::RCP<LinearObjContainer> ghostedContainer_;
87};
88
89}
90
91#endif
virtual bool vectorIsDistributed() const
Is the vector distributed (or replicated)
Teuchos::RCP< const panzer::ThyraObjFactory< double > > thyraObjFactory_
virtual std::size_t localSizeRequired() const
What is the number of values you need locally.
Response_Probe(const Response_Probe &)
Teuchos::RCP< LinearObjContainer > ghostedContainer_
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedVector() const
Get ghosted responses (this will be filled by the evaluator)
void setSolnVectorSpace(const Teuchos::RCP< const Thyra::VectorSpaceBase< double > > &soln_vs)
Set solution vector space.
Teuchos::RCP< const panzer::LinearObjFactory< panzer::Traits > > linObjFactory_
Teuchos::RCP< LinearObjContainer > uniqueContainer_
void adjustForDirichletConditions(const GlobalEvaluationData &localBCRows, const GlobalEvaluationData &globalBCRows)
virtual void scatterResponse()
This simply does global summation, then shoves the result into a vector.