25 #ifndef GRINS_COMPOSITE_QOI_H
26 #define GRINS_COMPOSITE_QOI_H
33 #include "libmesh/libmesh_common.h"
34 #include "libmesh/diff_qoi.h"
35 #include "libmesh/auto_ptr.h"
55 class MultiphysicsSystem;
67 virtual libMesh::UniquePtr<libMesh::DifferentiableQoI>
clone();
71 unsigned int n_qois()
const;
76 (
const std::string & param_name,
89 virtual void init_qoi( std::vector<libMesh::Number>& sys_qoi );
91 virtual void init_context( libMesh::DiffContext& context );
97 virtual void element_qoi( libMesh::DiffContext& context,
98 const libMesh::QoISet& qoi_indices );
102 const libMesh::QoISet &qoi_indices );
105 virtual void side_qoi( libMesh::DiffContext& context,
const libMesh::QoISet& qoi_indices );
108 virtual void side_qoi_derivative( libMesh::DiffContext &context,
const libMesh::QoISet &qois );
114 virtual void parallel_op(
const libMesh::Parallel::Communicator& communicator,
115 std::vector<libMesh::Number>& sys_qoi,
116 std::vector<libMesh::Number>& local_qoi,
117 const libMesh::QoISet& qoi_indices );
123 virtual void thread_join( std::vector<libMesh::Number>& qoi,
124 const std::vector<libMesh::Number>& other_qoi,
125 const libMesh::QoISet& qoi_indices );
131 libMesh::Number
get_qoi_value(
unsigned int qoi_index )
const;
153 libmesh_assert_less( qoi_index, this->
n_qois() );
155 return (*
_qois[qoi_index]);
161 libmesh_assert_less( qoi_index, this->
n_qois() );
163 return (*
_qois[qoi_index]);
168 #endif // GRINS_COMPOSITE_QOI_H
virtual void thread_join(std::vector< libMesh::Number > &qoi, const std::vector< libMesh::Number > &other_qoi, const libMesh::QoISet &qoi_indices)
Operation to accumulate the QoI from multiple MPI processes.
std::vector< QoIBase * > _qois
virtual void init_context(libMesh::DiffContext &context)
virtual void side_qoi_derivative(libMesh::DiffContext &context, const libMesh::QoISet &qois)
Compute the qoi derivative with respect to the solution on the domain boundary.
const QoIBase & get_qoi(unsigned int qoi_index) const
void register_parameter(const std::string ¶m_name, libMesh::ParameterMultiAccessor< libMesh::Number > ¶m_pointer) const
Each QoI will register its copy(s) of an independent variable.
virtual libMesh::UniquePtr< libMesh::DifferentiableQoI > clone()
Required to provide clone for adding QoI object to libMesh objects.
virtual void side_qoi(libMesh::DiffContext &context, const libMesh::QoISet &qoi_indices)
Compute the qoi value on the domain boundary.
virtual void element_qoi(libMesh::DiffContext &context, const libMesh::QoISet &qoi_indices)
Compute the qoi value for element interiors.
virtual void init_qoi(std::vector< libMesh::Number > &sys_qoi)
Method to allow QoI to resize libMesh::System storage of QoI computations.
virtual void parallel_op(const libMesh::Parallel::Communicator &communicator, std::vector< libMesh::Number > &sys_qoi, std::vector< libMesh::Number > &local_qoi, const libMesh::QoISet &qoi_indices)
Operation to accumulate the QoI from multiple MPI processes.
Interface with libMesh for solving Multiphysics problems.
virtual void add_qoi(const QoIBase &qoi)
void output_qoi(std::ostream &out) const
Basic output for computed QoI's.
virtual void init(const GetPot &input, const MultiphysicsSystem &system)
Method to allow QoI to cache any system information needed for QoI calculation, for example...
virtual void element_qoi_derivative(libMesh::DiffContext &context, const libMesh::QoISet &qoi_indices)
Compute the qoi derivative with respect to the solution on element interiors.
libMesh::Number get_qoi_value(unsigned int qoi_index) const
Accessor for value of QoI for given qoi_index.
virtual void reinit(MultiphysicsSystem &system)
Reinitialize qoi.
unsigned int n_qois() const