43 #ifndef __Panzer_Response_ExtremeValue_impl_hpp__ 
   44 #define __Panzer_Response_ExtremeValue_impl_hpp__ 
   46 #include "Teuchos_Comm.hpp" 
   47 #include "Teuchos_CommHelpers.hpp" 
   48 #include "Teuchos_dyn_cast.hpp" 
   50 #include "Epetra_LocalMap.h" 
   52 #include "Sacado_Traits.hpp" 
   56 template <
typename EvalT>
 
   60   double locValue = Sacado::ScalarValue<ScalarT>::eval(value);
 
   61   double glbValue = 0.0;
 
   72   if(this->useEpetra()) {
 
   74     this->getEpetraVector()[0] = glbValue;
 
   80     this->getThyraVector()[0] = glbValue;
 
   88   using Teuchos::rcp_dynamic_cast;
 
   92   uniqueContainer_ = linObjFactory_->buildLinearObjContainer();
 
   97   uniqueContainer_ = Teuchos::null;
 
  100 #ifdef Panzer_BUILD_HESSIAN_SUPPORT 
  105   using Teuchos::rcp_dynamic_cast;
 
  109   uniqueContainer_ = linObjFactory_->buildLinearObjContainer();
 
  114   uniqueContainer_ = Teuchos::null;
 
  122   const int n = value.size();
 
  123   const int num_deriv = this->numDeriv();
 
  135     int locProc = value.val() == glbValue.val() ? this->getComm()->getRank() : this->getComm()->getSize();
 
  140     Teuchos::broadcast(*this->getComm(), glbProc, Thyra::Ordinal(n), &glbValue.fastAccessDx(0));
 
  146   if(this->useEpetra()) {
 
  149     for (
int i=0; i<num_deriv; ++i)
 
  150       deriv[i][0] = glbValue.dx(i);
 
  155     Thyra::ArrayRCP< Thyra::ArrayRCP<double> > deriv = this->getThyraMultiVector();
 
  156     for (
int i=0; i<num_deriv; ++i)
 
  157       deriv[i][0] = glbValue.dx(i);
 
  162 template <
typename EvalT>
 
  171   setDerivativeVectorSpace(soln_vs);
 
  174 #ifdef Panzer_BUILD_HESSIAN_SUPPORT 
  180   setDerivativeVectorSpace(soln_vs);
 
  185 template <
typename EvalT>
 
  194   linObjFactory_->adjustForDirichletConditions(Teuchos::dyn_cast<const LinearObjContainer>(localBCRows),
 
  195                                                Teuchos::dyn_cast<const LinearObjContainer>(globalBCRows),
 
  196                                                *ghostedContainer_,
true,
true);
 
  199 #ifdef Panzer_BUILD_HESSIAN_SUPPORT 
  205   linObjFactory_->adjustForDirichletConditions(Teuchos::dyn_cast<const LinearObjContainer>(localBCRows),
 
  206                                                Teuchos::dyn_cast<const LinearObjContainer>(globalBCRows),
 
  207                                                *ghostedContainer_,
true,
true);
 
virtual void scatterResponse()
This simply does global summation, then shoves the result into a vector. 
 
TEUCHOS_DEPRECATED void reduceAll(const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *globalReduct)
 
void setSolnVectorSpace(const Teuchos::RCP< const Thyra::VectorSpaceBase< double > > &soln_vs)
Set solution vector space. 
 
void adjustForDirichletConditions(const GlobalEvaluationData &localBCRows, const GlobalEvaluationData &globalBCRows)
 
#define TEUCHOS_ASSERT(assertion_test)