1 #ifndef __Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_hpp__ 2 #define __Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_hpp__ 6 #include "PanzerAdaptersSTK_config.hpp" 14 #include "Teuchos_RCP.hpp" 15 #include "Teuchos_ParameterList.hpp" 17 #include <unordered_map> 18 #include <unordered_set> 24 template <
typename EvalT>
42 virtual Teuchos::RCP<panzer::ResponseBase>
buildResponseObject(
const std::string & responseName)
const;
45 const std::vector<panzer::WorksetDescriptor>& )
const 62 const Teuchos::ParameterList & user_data)
const;
76 static void bucketByBasisType(
const std::vector<std::pair<std::string,Teuchos::RCP<const panzer::PureBasis> > > & providedDofs,
77 std::map<std::string,std::vector<std::string> > & basisBucket);
88 void scaleField(
const std::string & fieldName,
double fieldScalar);
92 void addAdditionalField(
const std::string & fieldName,
const Teuchos::RCP<const panzer::PureBasis> & basis);
114 Kokkos::DynRankView<double,PHX::Device> & centroid)
const;
119 std::vector<std::pair<std::string,Teuchos::RCP<const panzer::PureBasis> > > & fields)
const;
123 bool operator() (
const std::pair<std::string,Teuchos::RCP<const panzer::PureBasis> > &
field)
144 Teuchos::RCP<panzer_stk::STK_Interface>
mesh;
146 void scaleField(
const std::string & fieldName,
double fieldScalar)
149 void addAdditionalField(
const std::string & fieldName,
const Teuchos::RCP<const panzer::PureBasis> & basis)
159 template <
typename T>
160 Teuchos::RCP<panzer::ResponseEvaluatorFactoryBase>
build()
const 162 Teuchos::RCP<ResponseEvaluatorFactory_SolutionWriter<T> > ref =
179 for(std::unordered_map<std::string,double>::const_iterator itr=
fieldToScalar_.begin();
181 ref->scaleField(itr->first,itr->second);
void computeReferenceCentroid(const std::map< std::string, Teuchos::RCP< const panzer::PureBasis > > &bases, int baseDimension, Kokkos::DynRankView< double, PHX::Device > ¢roid) const
void removeField(const std::string &fieldName)
Object that contains information on the physics and discretization of a block of elements with the SA...
std::vector< std::string > removedFields_
void scaleField(const std::string &fieldName, double fieldScalar)
std::unordered_set< std::string > scaledFieldsHash_
void addAdditionalField(const std::string &fieldName, const Teuchos::RCP< const panzer::PureBasis > &basis)
virtual Teuchos::RCP< panzer::ResponseBase > buildResponseObject(const std::string &responseName) const
RespFactorySolnWriter_Builder()
bool operator()(const std::pair< std::string, Teuchos::RCP< const panzer::PureBasis > > &field)
std::unordered_map< std::string, double > fieldToScalar_
std::vector< std::string > removedFields_
virtual void buildAndRegisterEvaluators(const std::string &responseName, PHX::FieldManager< panzer::Traits > &fm, const panzer::PhysicsBlock &physicsBlock, const Teuchos::ParameterList &user_data) const
Teuchos::RCP< panzer_stk::STK_Interface > mesh
std::vector< std::pair< std::string, Teuchos::RCP< const panzer::PureBasis > > > additionalFields_
void addAdditionalField(const std::string &fieldName, const Teuchos::RCP< const panzer::PureBasis > &basis)
void setAddSolutionFields(bool asf)
virtual bool typeSupported() const
void scaleField(const std::string &fieldName, double fieldScalar)
void setAddCoordinateFields(bool acf)
std::unordered_map< std::string, double > fieldToScalar_
void removeField(const std::string &fieldName)
static void bucketByBasisType(const std::vector< std::pair< std::string, Teuchos::RCP< const panzer::PureBasis > > > &providedDofs, std::map< std::string, std::vector< std::string > > &basisBucket)
bool addCoordinateFields_
virtual ~ResponseEvaluatorFactory_SolutionWriter()
PHX::MDField< ScalarT, panzer::Cell, panzer::BASIS > field
A field to which we'll contribute, or in which we'll store, the result of computing this integral...
virtual Teuchos::RCP< panzer::ResponseBase > buildResponseObject(const std::string &responseName, const std::vector< panzer::WorksetDescriptor > &) const
Teuchos::RCP< STK_Interface > mesh_
void setAddCoordinateFields(bool acf)
void deleteRemovedFields(const std::vector< std::string > &removedFields, std::vector< std::pair< std::string, Teuchos::RCP< const panzer::PureBasis > > > &fields) const
Delete from the argument all the fields that are in the removedFields array.
ResponseEvaluatorFactory_SolutionWriter(const Teuchos::RCP< STK_Interface > &mesh)
void setAddSolutionFields(bool asf)
Teuchos::RCP< panzer::ResponseEvaluatorFactoryBase > build() const
bool addCoordinateFields_
std::vector< std::pair< std::string, Teuchos::RCP< const panzer::PureBasis > > > additionalFields_
std::vector< std::string > removedFields_