libMesh
Public Member Functions | Public Attributes | List of all members
CoupledSystemQoI Class Reference

#include <H-qoi.h>

Inheritance diagram for CoupledSystemQoI:
[legend]

Public Member Functions

 CoupledSystemQoI ()
 
virtual ~CoupledSystemQoI ()
 
virtual void init_qoi (std::vector< Number > &sys_qoi)
 
virtual void postprocess ()
 
virtual void side_qoi_derivative (DiffContext &context, const QoISet &qois)
 Does any work that needs to be done on side of elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative. More...
 
virtual void side_qoi (DiffContext &context, const QoISet &qois)
 Does any work that needs to be done on side of elem in a quantity of interest assembly loop, outputting to elem_qoi. More...
 
virtual std::unique_ptr< DifferentiableQoIclone ()
 Copy of this object. More...
 
virtual void init_qoi (std::vector< Number > &)
 Initialize system qoi. More...
 
virtual void clear_qoi ()
 Clear all the data structures associated with the QoI. More...
 
virtual void element_qoi (DiffContext &, const QoISet &)
 Does any work that needs to be done on elem in a quantity of interest assembly loop, outputting to elem_qoi. More...
 
virtual void element_qoi_derivative (DiffContext &, const QoISet &)
 Does any work that needs to be done on elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative. More...
 
virtual void init_context (DiffContext &)
 Prepares the result of a build_context() call for use. More...
 
virtual void thread_join (std::vector< Number > &qoi, const std::vector< Number > &other_qoi, const QoISet &qoi_indices)
 Method to combine thread-local qois. More...
 
virtual void parallel_op (const Parallel::Communicator &communicator, std::vector< Number > &sys_qoi, std::vector< Number > &local_qoi, const QoISet &qoi_indices)
 Method to populate system qoi data structure with process-local qoi. More...
 
virtual void finalize_derivative (NumericVector< Number > &derivatives, std::size_t qoi_index)
 Method to finalize qoi derivatives which require more than just a simple sum of element contributions. More...
 

Public Attributes

bool assemble_qoi_sides
 If assemble_qoi_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over domain boundary sides. More...
 
bool assemble_qoi_internal_sides
 If assemble_qoi_internal_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over element sides which do not fall on domain boundaries. More...
 
bool assemble_qoi_elements
 If assemble_qoi_elements is false (it is true by default), the assembly loop for a quantity of interest or its derivatives will skip computing on mesh elements, and will only compute on mesh sides. More...
 

Detailed Description

Definition at line 15 of file H-qoi.h.

Constructor & Destructor Documentation

◆ CoupledSystemQoI()

CoupledSystemQoI::CoupledSystemQoI ( )

Definition at line 18 of file H-qoi.h.

18 {}

◆ ~CoupledSystemQoI()

virtual CoupledSystemQoI::~CoupledSystemQoI ( )
virtual

Definition at line 19 of file H-qoi.h.

19 {}

Member Function Documentation

◆ clear_qoi()

virtual void libMesh::DifferentiableQoI::clear_qoi ( )
virtualinherited

Clear all the data structures associated with the QoI.

Definition at line 75 of file diff_qoi.h.

75 {}

◆ clone()

virtual std::unique_ptr<DifferentiableQoI> CoupledSystemQoI::clone ( )
virtual

Copy of this object.

User should override to copy any needed state.

Implements libMesh::DifferentiableQoI.

Definition at line 30 of file H-qoi.h.

31  {
32  DifferentiableQoI * my_clone = new CoupledSystemQoI;
33  *my_clone = *this;
34  return std::unique_ptr<DifferentiableQoI>(my_clone);
35  }
CoupledSystemQoI()
Definition: H-qoi.h:18
This class provides a specific system class.
Definition: diff_qoi.h:50

◆ element_qoi()

virtual void libMesh::DifferentiableQoI::element_qoi ( DiffContext ,
const QoISet  
)
virtualinherited

Does any work that needs to be done on elem in a quantity of interest assembly loop, outputting to elem_qoi.

Only qois included in the supplied QoISet need to be assembled.

Reimplemented in LaplaceQoI.

Definition at line 108 of file diff_qoi.h.

110  {}

◆ element_qoi_derivative()

virtual void libMesh::DifferentiableQoI::element_qoi_derivative ( DiffContext ,
const QoISet  
)
virtualinherited

Does any work that needs to be done on elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative.

Only qois included in the supplied QoISet need their derivatives assembled.

Reimplemented in HeatSystem, LaplaceSystem, LaplaceSystem, and LaplaceQoI.

Definition at line 120 of file diff_qoi.h.

122  {}

◆ finalize_derivative()

virtual void libMesh::DifferentiableQoI::finalize_derivative ( NumericVector< Number > &  derivatives,
std::size_t  qoi_index 
)
virtualinherited

Method to finalize qoi derivatives which require more than just a simple sum of element contributions.

◆ init_context()

virtual void libMesh::DifferentiableQoI::init_context ( DiffContext )
virtualinherited

Prepares the result of a build_context() call for use.

Most FEMSystem-based problems will need to reimplement this in order to call FE::get_*() as their particular QoI requires.

Reimplemented in libMesh::FEMSystem, HeatSystem, CoupledSystem, L2System, ElasticitySystem, LaplaceSystem, CurlCurlSystem, LaplaceSystem, PoissonSystem, LaplaceSystem, LaplaceSystem, CurlCurlSystem, SolidSystem, NavierSystem, HeatSystem, and LaplaceQoI.

Definition at line 153 of file diff_qoi.h.

153 {}

◆ init_qoi() [1/2]

virtual void CoupledSystemQoI::init_qoi ( std::vector< Number > &  sys_qoi)
virtual

◆ init_qoi() [2/2]

virtual void libMesh::DifferentiableQoI::init_qoi ( std::vector< Number > &  )
virtualinherited

Initialize system qoi.

By default, does nothing in order to maintain backward compatibility for FEMSystem applications that control qoi.

Definition at line 69 of file diff_qoi.h.

Referenced by libMesh::DifferentiableSystem::attach_qoi().

69 {}

◆ parallel_op()

virtual void libMesh::DifferentiableQoI::parallel_op ( const Parallel::Communicator communicator,
std::vector< Number > &  sys_qoi,
std::vector< Number > &  local_qoi,
const QoISet qoi_indices 
)
virtualinherited

Method to populate system qoi data structure with process-local qoi.

By default, simply sums process qois into system qoi.

◆ postprocess()

virtual void CoupledSystemQoI::postprocess ( void  )
virtual

Definition at line 22 of file H-qoi.h.

22 {}

◆ side_qoi()

virtual void CoupledSystemQoI::side_qoi ( DiffContext ,
const QoISet  
)
virtual

Does any work that needs to be done on side of elem in a quantity of interest assembly loop, outputting to elem_qoi.

Only qois included in the supplied QoISet need to be assembled.

Reimplemented from libMesh::DifferentiableQoI.

◆ side_qoi_derivative()

virtual void CoupledSystemQoI::side_qoi_derivative ( DiffContext ,
const QoISet  
)
virtual

Does any work that needs to be done on side of elem in a quantity of interest derivative assembly loop, outputting to elem_qoi_derivative.

Only qois included in the supplied QoISet need their derivatives assembled.

Reimplemented from libMesh::DifferentiableQoI.

◆ thread_join()

virtual void libMesh::DifferentiableQoI::thread_join ( std::vector< Number > &  qoi,
const std::vector< Number > &  other_qoi,
const QoISet qoi_indices 
)
virtualinherited

Method to combine thread-local qois.

By default, simply sums thread qois.

Member Data Documentation

◆ assemble_qoi_elements

bool libMesh::DifferentiableQoI::assemble_qoi_elements
inherited

If assemble_qoi_elements is false (it is true by default), the assembly loop for a quantity of interest or its derivatives will skip computing on mesh elements, and will only compute on mesh sides.

Definition at line 99 of file diff_qoi.h.

◆ assemble_qoi_internal_sides

bool libMesh::DifferentiableQoI::assemble_qoi_internal_sides
inherited

If assemble_qoi_internal_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over element sides which do not fall on domain boundaries.

Definition at line 91 of file diff_qoi.h.

◆ assemble_qoi_sides

bool libMesh::DifferentiableQoI::assemble_qoi_sides
inherited

If assemble_qoi_sides is true (it is false by default), the assembly loop for a quantity of interest or its derivatives will loop over domain boundary sides.

To add domain interior sides, also set assemble_qoi_internal_sides to true.

Definition at line 83 of file diff_qoi.h.


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