Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT > Class Template Reference

#include <Panzer_STK_ResponseEvaluatorFactory_SolutionWriter.hpp>

Inheritance diagram for panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >:
Inheritance graph
[legend]

Classes

struct  RemovedFieldsSearchUnaryFunctor
 

Public Member Functions

 ResponseEvaluatorFactory_SolutionWriter (const Teuchos::RCP< STK_Interface > &mesh)
 
virtual ~ResponseEvaluatorFactory_SolutionWriter ()
 
virtual Teuchos::RCP
< panzer::ResponseBase
buildResponseObject (const std::string &responseName) const
 
virtual Teuchos::RCP
< panzer::ResponseBase
buildResponseObject (const std::string &responseName, const std::vector< panzer::WorksetDescriptor > &) const
 
virtual void buildAndRegisterEvaluators (const std::string &responseName, PHX::FieldManager< panzer::Traits > &fm, const panzer::PhysicsBlock &physicsBlock, const Teuchos::ParameterList &user_data) const
 
virtual bool typeSupported () const
 
void scaleField (const std::string &fieldName, double fieldScalar)
 
void addAdditionalField (const std::string &fieldName, const Teuchos::RCP< const panzer::PureBasis > &basis)
 
void setAddSolutionFields (bool asf)
 
void setAddCoordinateFields (bool acf)
 
void removeField (const std::string &fieldName)
 
- Public Member Functions inherited from panzer::ResponseEvaluatorFactory< EvalT >
 ResponseEvaluatorFactory ()
 
virtual ~ResponseEvaluatorFactory ()
 
- Public Member Functions inherited from panzer::ResponseEvaluatorFactoryBase
 ResponseEvaluatorFactoryBase ()
 
virtual ~ResponseEvaluatorFactoryBase ()
 
- Public Member Functions inherited from panzer::EvaluatorsRegistrar
int setDetailsIndex (const int details_index)
 
int getDetailsIndex () const
 Get the WorksetDetails index. More...
 

Static Public Member Functions

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)
 

Private Member Functions

void computeReferenceCentroid (const std::map< std::string, Teuchos::RCP< const panzer::PureBasis > > &bases, int baseDimension, Kokkos::DynRankView< double, PHX::Device > &centroid) const
 
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. More...
 

Private Attributes

Teuchos::RCP< STK_Interfacemesh_
 
std::unordered_map
< std::string, double > 
fieldToScalar_
 
std::unordered_set< std::string > scaledFieldsHash_
 
std::vector< std::pair
< std::string, Teuchos::RCP
< const panzer::PureBasis > > > 
additionalFields_
 
std::vector< std::string > removedFields_
 
bool addSolutionFields_
 
bool addCoordinateFields_
 

Additional Inherited Members

- Protected Member Functions inherited from panzer::EvaluatorsRegistrar
 EvaluatorsRegistrar ()
 Default ctor initializes WorksetDetails index to 0. More...
 
virtual ~EvaluatorsRegistrar ()
 
template<typename EvalT >
void registerEvaluator (PHX::FieldManager< panzer::Traits > &fm, const Teuchos::RCP< PHX::Evaluator< panzer::Traits > > &op) const
 

Detailed Description

template<typename EvalT>
class panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >

This class defines a response based solution writer.

Definition at line 25 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter.hpp.

Constructor & Destructor Documentation

template<typename EvalT >
virtual panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::~ResponseEvaluatorFactory_SolutionWriter ( )
inlinevirtual

Member Function Documentation

template<typename EvalT >
Teuchos::RCP< panzer::ResponseBase > panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::buildResponseObject ( const std::string &  responseName) const
virtual

Build the response object used by this factory. This object assumes the role of the scatter target and will be accessible by all the evaluators in the field managers.

Parameters
[in]responseNameName of response to be built. This name will be used for looking up the response in the GlobalEvaluationDataContainer object.

Definition at line 32 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_impl.hpp.

template<typename EvalT >
virtual Teuchos::RCP<panzer::ResponseBase> panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::buildResponseObject ( const std::string &  responseName,
const std::vector< panzer::WorksetDescriptor > &  wkstdescs 
) const
inlinevirtual

Build the response object used by this factory. This object assumes the role of the scatter target and will be accessible by all the evaluators in the field managers. This is the sideset version of the buildResponseObject function.

Parameters
[in]responseNameName of response to be built. This name will be used for looking up the response in the GlobalEvaluationDataContainer object.
[in]wkstdescsA vector of descriptors for the elements this response is over.

Implements panzer::ResponseEvaluatorFactory< EvalT >.

Definition at line 44 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::buildAndRegisterEvaluators ( const std::string &  responseName,
PHX::FieldManager< panzer::Traits > &  fm,
const panzer::PhysicsBlock physicsBlock,
const Teuchos::ParameterList user_data 
) const
virtual

Build and register evaluators for a response on a particular physics block.

Parameters
[in]responseNameThe name of the response to be constructed by these evaluators.
[in,out]fmField manager to be fuild with the evaluators.
[in]physicsBlockWhat physics block is being used for constructing the evaluators
[in]user_dataThe user data parameter list, this stores things that the user may find useful.

Implements panzer::ResponseEvaluatorFactory< EvalT >.

Definition at line 39 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_impl.hpp.

template<typename EvalT >
bool panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::typeSupported ( ) const
virtual

Is this evaluation type supported by the factory. This is used to determine cases where a response may support a particular evaluation type, however at runtime the user decides not to enable the (say) Jacobian evaluation of this response.

Note that use of this mechanism is complementary to having the builder return Teuchos::null for a particular evaluation type.

Implements panzer::ResponseEvaluatorFactory< EvalT >.

Definition at line 321 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_impl.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::bucketByBasisType ( const std::vector< std::pair< std::string, Teuchos::RCP< const panzer::PureBasis > > > &  providedDofs,
std::map< std::string, std::vector< std::string > > &  basisBucket 
)
static

Take a vector of (std::string (field name), RCP<PureBasis>) pairs and bucket them by basis name. What is returned is a map pairing the basis to a vector of field names.

Definition at line 261 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_impl.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::scaleField ( const std::string &  fieldName,
double  fieldScalar 
)

Scale a field before writing out to STK by a prescribed value (the implicit default is 1.0). A warning will be printed if no field is found of that name when buildAndRegisterEvaluators is called.

Note
Currently only works for HGRAD fields.
Parameters
[in]fieldNameHGRAD field to scale.
[in]fieldScalarValue to scale the field by.

Definition at line 314 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_impl.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::addAdditionalField ( const std::string &  fieldName,
const Teuchos::RCP< const panzer::PureBasis > &  basis 
)

Add an additional (solution) field to write out that is not in the physics blocks.

Definition at line 331 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_impl.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::setAddSolutionFields ( bool  asf)
inline

Enable/disable addition of solution fields. Note that this "true" by default.

Definition at line 96 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::setAddCoordinateFields ( bool  acf)
inline

Enable/disable addition of coordinate fields. Note that this "true" by default.

Definition at line 101 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::removeField ( const std::string &  fieldName)
inline

Remove a field (even a solution field) from the response. Note that even if a field has not been added, it will be removed by any previous or following call to removeField. This implies that removeField takes precedence.

Definition at line 108 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter.hpp.

template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::computeReferenceCentroid ( const std::map< std::string, Teuchos::RCP< const panzer::PureBasis > > &  bases,
int  baseDimension,
Kokkos::DynRankView< double, PHX::Device > &  centroid 
) const
private
template<typename EvalT >
void panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::deleteRemovedFields ( const std::vector< std::string > &  removedFields,
std::vector< std::pair< std::string, Teuchos::RCP< const panzer::PureBasis > > > &  fields 
) const
private

Delete from the argument all the fields that are in the removedFields array.

Definition at line 338 of file Panzer_STK_ResponseEvaluatorFactory_SolutionWriter_impl.hpp.

Member Data Documentation

template<typename EvalT >
Teuchos::RCP<STK_Interface> panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::mesh_
private
template<typename EvalT >
std::unordered_map<std::string,double> panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::fieldToScalar_
private
template<typename EvalT >
std::unordered_set<std::string> panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::scaledFieldsHash_
private
template<typename EvalT >
std::vector<std::pair<std::string,Teuchos::RCP<const panzer::PureBasis> > > panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::additionalFields_
private
template<typename EvalT >
std::vector<std::string> panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::removedFields_
private
template<typename EvalT >
bool panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::addSolutionFields_
private
template<typename EvalT >
bool panzer_stk::ResponseEvaluatorFactory_SolutionWriter< EvalT >::addCoordinateFields_
private

The documentation for this class was generated from the following files: