1 #ifndef VERTEXCFD_RESPONSEMANAGER_HPP
2 #define VERTEXCFD_RESPONSEMANAGER_HPP
4 #include "drivers/VertexCFD_PhysicsManager.hpp"
6 #include <Panzer_WorksetDescriptor.hpp>
8 #include <Thyra_VectorBase.hpp>
10 #include <Teuchos_Array.hpp>
11 #include <Teuchos_RCP.hpp>
14 #include <unordered_map>
26 void addFunctionalResponse(
27 const std::string& name,
28 const std::string& field_name,
29 const std::vector<panzer::WorksetDescriptor>& workset_descriptors);
30 void addFunctionalResponse(
const std::string& name,
31 const std::string& field_name);
32 void addMinValueResponse(
const std::string& name,
33 const std::string& field_name);
34 void addMinValueResponse(
35 const std::string& name,
36 const std::string& field_name,
37 const std::vector<panzer::WorksetDescriptor>& workset_descriptors);
38 void addMaxValueResponse(
39 const std::string& name,
40 const std::string& field_name,
41 const std::vector<panzer::WorksetDescriptor>& workset_descriptors);
42 void addMaxValueResponse(
const std::string& name,
43 const std::string& field_name);
44 void addProbeResponse(
45 const std::string& name,
46 const std::string& field_name,
47 const Teuchos::Array<double>& point,
48 const std::vector<panzer::WorksetDescriptor>& workset_descriptors);
49 void addProbeResponse(
const std::string& name,
50 const std::string& field_name,
51 const Teuchos::Array<double>& point);
52 void activateResponse(
const int index = 0);
53 void activateResponse(
const std::string& name);
56 bool isActive(
const int index);
57 bool isActive(
const std::string& name);
59 evaluateResponses(
const Teuchos::RCP<Thyra::VectorBase<double>>& x,
60 const Teuchos::RCP<Thyra::VectorBase<double>>& x_dot);
62 int numResponses()
const;
63 int globalIndex(
const int index = 0)
const;
64 int globalIndex(
const std::string& name)
const;
65 const std::string& name(
const int index = 0)
const;
66 double value(
const int index = 0)
const;
67 double value(
const std::string& name)
const;
71 Teuchos::RCP<PhysicsManager> _physics_manager;
72 std::vector<panzer::WorksetDescriptor> _default_workset_descriptors;
73 std::vector<int> _index_map;
74 std::unordered_map<std::string, int> _name_map;
75 std::vector<Teuchos::RCP<Thyra::VectorBase<double>>> _resp_vectors;
76 std::vector<bool> _is_active;
78 void addExtremeValueResponse(
80 const std::string& name,
81 const std::string& field_name,
82 const std::vector<panzer::WorksetDescriptor>& workset_descriptors);
84 template<
class Builder>
85 void addResponseFromBuilder(
86 const std::string& name,
87 const std::vector<panzer::WorksetDescriptor>& workset_descriptors,
88 const Builder& builder);
93 Teuchos::RCP<ResponseManager>
94 createResponseManager(Teuchos::RCP<PhysicsManager> physics_manager,
95 Teuchos::ParameterList& response_params,
96 std::vector<int>& response_output_freq);
101 #endif // VERTEXCFD_RESPONSEMANAGER_HPP