libMesh
|
#include <L-qoi.h>
Public Member Functions | |
LaplaceQoI ()=default | |
virtual | ~LaplaceQoI ()=default |
virtual void | init_qoi_count (System &sys) |
Initialize system qoi. More... | |
virtual void | init_context (DiffContext &context) |
Prepares the result of a build_context() call for use. More... | |
virtual void | postprocess () |
virtual void | element_qoi_derivative (DiffContext &context, const QoISet &qois) |
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 | element_qoi (DiffContext &context, const QoISet &qois) |
Does any work that needs to be done on elem in a quantity of interest assembly loop, outputting to elem_qoi. More... | |
virtual std::unique_ptr< DifferentiableQoI > | clone () |
Copy of this object. More... | |
virtual void | init_qoi (std::vector< Number > &) |
Initialize system qoi. More... | |
void | init_qoi (std::vector< Number > &) |
Non-virtual, to try to help deprecated user code catch this change at compile time (if they specified override) More... | |
virtual void | clear_qoi () |
Clear all the data structures associated with the QoI. More... | |
virtual void | side_qoi (DiffContext &, const QoISet &) |
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 void | side_qoi_derivative (DiffContext &, const QoISet &) |
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 | 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... | |
|
default |
|
virtualdefault |
|
inlinevirtualinherited |
Clear all the data structures associated with the QoI.
Definition at line 91 of file diff_qoi.h.
Referenced by libMesh::DifferentiableSystem::clear().
|
inlinevirtual |
Copy of this object.
User should override to copy any needed state.
Implements libMesh::DifferentiableQoI.
|
virtual |
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 from libMesh::DifferentiableQoI.
Definition at line 29 of file L-qoi.C.
References std::abs(), libMesh::FEMContext::get_element_fe(), libMesh::FEMContext::get_element_qrule(), libMesh::DiffContext::get_qois(), libMesh::FEMContext::interior_value(), libMesh::QBase::n_points(), and libMesh::Real.
|
virtual |
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 from libMesh::DifferentiableQoI.
Definition at line 70 of file L-qoi.C.
References std::abs(), libMesh::FEMContext::get_element_fe(), libMesh::FEMContext::get_element_qrule(), libMesh::DiffContext::get_qoi_derivatives(), libMesh::DiffContext::n_dof_indices(), libMesh::QBase::n_points(), and libMesh::Real.
|
virtualinherited |
Method to finalize qoi derivatives which require more than just a simple sum of element contributions.
Definition at line 53 of file diff_qoi.C.
Referenced by libMesh::FEMSystem::assemble_qoi_derivative().
|
virtual |
Prepares the result of a build_context() call for use.
FEMSystem-based problems will need to reimplement this in order to call FE::get_*() as their particular QoI requires. Trying to evaluate a QoI without overriding init_context is both inefficient and deprecated.
Reimplemented from libMesh::DifferentiableQoI.
Definition at line 13 of file L-qoi.C.
References libMesh::FEMContext::get_element_fe().
|
inlinevirtualinherited |
Initialize system qoi.
This version of the function required direct vector access, and is now deprecated.
Definition at line 72 of file diff_qoi.h.
|
inlineinherited |
Non-virtual, to try to help deprecated user code catch this change at compile time (if they specified override)
Definition at line 78 of file diff_qoi.h.
|
virtual |
Initialize system qoi.
Often this will just call sys.init_qois(some_desired_number_of_qois)
Reimplemented from libMesh::DifferentiableQoI.
Definition at line 7 of file L-qoi.C.
References libMesh::System::init_qois().
|
virtualinherited |
Method to populate system qoi data structure with process-local qoi.
By default, simply sums process qois into system qoi.
Definition at line 41 of file diff_qoi.C.
References communicator.
Referenced by libMesh::FEMSystem::assemble_qoi().
|
inlinevirtual |
|
inlinevirtualinherited |
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 in CoupledSystemQoI.
Definition at line 147 of file diff_qoi.h.
|
inlinevirtualinherited |
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 in LaplaceSystem, LaplaceSystem, and CoupledSystemQoI.
Definition at line 159 of file diff_qoi.h.
|
virtualinherited |
Method to combine thread-local qois.
By default, simply sums thread qois.
Definition at line 33 of file diff_qoi.C.
References libMesh::index_range().
|
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 115 of file diff_qoi.h.
|
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 107 of file diff_qoi.h.
|
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 99 of file diff_qoi.h.
Referenced by main().