GRINS-0.8.0
|
#include <integrated_function.h>
Public Member Functions | |
IntegratedFunction (unsigned int p_level, SharedPtr< Function > f, RayfireMesh *rayfire, const std::string &qoi_name) | |
Constructor. More... | |
IntegratedFunction (const GetPot &input, unsigned int p_level, SharedPtr< Function > f, const std::string &input_qoi_string, const std::string &qoi_name) | |
Constructor. More... | |
IntegratedFunction (const IntegratedFunction &original) | |
Copy Constructor. More... | |
virtual QoIBase * | clone () const |
Required to provide clone (deep-copy) for adding QoI object to libMesh objects. More... | |
virtual bool | assemble_on_interior () const |
Does the QoI need an element interior assembly loop? More... | |
virtual bool | assemble_on_sides () const |
Does the QoI need a domain boundary assembly loop? More... | |
virtual void | element_qoi (AssemblyContext &context, const unsigned int qoi_index) |
Compute the qoi value. More... | |
virtual void | element_qoi_derivative (AssemblyContext &context, const unsigned int qoi_index) |
Compute the qoi derivative with respect to the solution. More... | |
virtual void | init (const GetPot &input, const MultiphysicsSystem &system, unsigned int qoi_num) |
Initializes the rayfire with the mesh from system. More... | |
virtual void | reinit (MultiphysicsSystem &system) |
Reinitialize the rayfire. More... | |
const RayfireMesh & | get_rayfire () |
Public Member Functions inherited from GRINS::QoIBase | |
QoIBase (const std::string &qoi_name) | |
virtual | ~QoIBase () |
virtual void | init_context (AssemblyContext &) |
virtual void | side_qoi (AssemblyContext &, const unsigned int) |
Compute the qoi value on the domain boundary. More... | |
virtual void | side_qoi_derivative (AssemblyContext &, const unsigned int) |
Compute the qoi derivative with respect to the solution on the domain boundary. More... | |
virtual void | parallel_op (const libMesh::Parallel::Communicator &communicator, libMesh::Number &sys_qoi, libMesh::Number &local_qoi) |
Call the parallel operation for this QoI and cache the value. More... | |
virtual void | thread_join (libMesh::Number &qoi, const libMesh::Number &other_qoi) |
Call the operation to accumulate this QoI from multiple threads. More... | |
virtual void | output_qoi (std::ostream &out) const |
Basic output for computed QoI's. More... | |
libMesh::Number | value () const |
Returns the current QoI value. More... | |
const std::string & | name () const |
Returns the name of this QoI. More... | |
Public Member Functions inherited from GRINS::ParameterUser | |
ParameterUser (const std::string &user_name) | |
virtual | ~ParameterUser () |
virtual void | set_parameter (libMesh::Number ¶m_variable, const GetPot &input, const std::string ¶m_name, libMesh::Number param_default) |
Each subclass can simultaneously read a parameter value from. More... | |
virtual void | set_parameter (libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &func, const GetPot &input, const std::string &func_param_name, const std::string ¶m_default) |
Each subclass can simultaneously read a parsed function from. More... | |
virtual void | set_parameter (libMesh::ParsedFEMFunction< libMesh::Number > &func, const GetPot &input, const std::string &func_param_name, const std::string ¶m_default) |
Each subclass can simultaneously read a parsed function from. More... | |
virtual void | move_parameter (const libMesh::Number &old_parameter, libMesh::Number &new_parameter) |
When cloning an object, we need to update parameter pointers. More... | |
virtual void | move_parameter (const libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &old_func, libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &new_func) |
When cloning an object, we need to update parameter pointers. More... | |
virtual void | move_parameter (const libMesh::ParsedFEMFunction< libMesh::Number > &old_func, libMesh::ParsedFEMFunction< libMesh::Number > &new_func) |
When cloning an object, we need to update parameter pointers. More... | |
virtual void | register_parameter (const std::string ¶m_name, libMesh::ParameterMultiAccessor< libMesh::Number > ¶m_pointer) const |
Each subclass will register its copy of an independent. More... | |
Private Member Functions | |
libMesh::Real | qoi_value (Function &f, AssemblyContext &context, const libMesh::Point &xyz) |
Compute the value of a QoI at a QP. More... | |
void | qoi_derivative (Function &f, AssemblyContext &context, const libMesh::Point &qp_xyz, const libMesh::Real JxW, const unsigned int qoi_index) |
Compute derivatiuves at QP. More... | |
IntegratedFunction () | |
User cannot call empty constructor. More... | |
template<> | |
libMesh::Real | qoi_value (FEMFunctionAndDerivativeBase< libMesh::Real > &f, AssemblyContext &context, const libMesh::Point &xyz) |
template<> | |
libMesh::Real | qoi_value (libMesh::FunctionBase< libMesh::Real > &f, AssemblyContext &, const libMesh::Point &xyz) |
template<> | |
void | qoi_derivative (FEMFunctionAndDerivativeBase< libMesh::Real > &f, AssemblyContext &context, const libMesh::Point &qp_xyz, const libMesh::Real JxW, const unsigned int qoi_index) |
template<> | |
void | qoi_derivative (libMesh::FunctionBase< libMesh::Real > &, AssemblyContext &, const libMesh::Point &, const libMesh::Real, const unsigned int) |
Private Attributes | |
unsigned int | _p_level |
Quadrature order. More... | |
SharedPtr< Function > | _f |
Pointer to the template class used for function evaluation. More... | |
libMesh::UniquePtr< RayfireMesh > | _rayfire |
Pointer to RayfireMesh object. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from GRINS::ParameterUser | |
static std::string | zero_vector_function = std::string("{0}") |
A parseable function string with LIBMESH_DIM components, all 0. More... | |
Protected Attributes inherited from GRINS::QoIBase | |
std::string | _qoi_name |
libMesh::Number | _qoi_value |
The purpose of this class is to integrate a function along a 1D line through a 2D mesh. This class utilizes the RayfireMesh class to calculate the line and provide 1D elements for evaluating the function.
The template parameter must be FunctionBase or FEMFunctionBase.
Currently, calculating element qoi derivatives is not supported.
Definition at line 53 of file integrated_function.h.
GRINS::IntegratedFunction< Function >::IntegratedFunction | ( | unsigned int | p_level, |
SharedPtr< Function > | f, | ||
RayfireMesh * | rayfire, | ||
const std::string & | qoi_name | ||
) |
Constructor.
p_level | The desired Gauss Quadrature level |
f | A FunctionBase or FEMFunctionBase object for evaluting the QoI |
rayfire | A RayfireMesh object (will be initialized in init()) Ownership will be taken by an internal libMesh::UniquePtr |
qoi_name | Passed to the QoIBase |
Definition at line 48 of file integrated_function.C.
GRINS::IntegratedFunction< Function >::IntegratedFunction | ( | const GetPot & | input, |
unsigned int | p_level, | ||
SharedPtr< Function > | f, | ||
const std::string & | input_qoi_string, | ||
const std::string & | qoi_name | ||
) |
Constructor.
Used by the QoIFactory. Passes GetPot through to RayfireMesh for construction
Definition at line 56 of file integrated_function.C.
References GRINS::IntegratedFunction< Function >::_rayfire.
GRINS::IntegratedFunction< Function >::IntegratedFunction | ( | const IntegratedFunction< Function > & | original | ) |
Copy Constructor.
Required to deep-copy the UniquePtr RayfireMesh object
Definition at line 65 of file integrated_function.C.
References GRINS::IntegratedFunction< Function >::_rayfire.
|
private |
User cannot call empty constructor.
|
inlinevirtual |
Does the QoI need an element interior assembly loop?
This is pure virtual to force to user to specify.
Implements GRINS::QoIBase.
Definition at line 132 of file integrated_function.h.
|
inlinevirtual |
Does the QoI need a domain boundary assembly loop?
This is pure virtual to force to user to specify.
Implements GRINS::QoIBase.
Definition at line 139 of file integrated_function.h.
|
virtual |
Required to provide clone (deep-copy) for adding QoI object to libMesh objects.
Implements GRINS::QoIBase.
Reimplemented in GRINS::SpectroscopicAbsorption.
Definition at line 75 of file integrated_function.C.
|
virtual |
Compute the qoi value.
Reimplemented from GRINS::QoIBase.
Definition at line 96 of file integrated_function.C.
|
virtual |
Compute the qoi derivative with respect to the solution.
Currently not implemented
Reimplemented from GRINS::QoIBase.
Definition at line 130 of file integrated_function.C.
|
inline |
Definition at line 103 of file integrated_function.h.
|
virtual |
Initializes the rayfire with the mesh from system.
Reimplemented from GRINS::QoIBase.
Definition at line 82 of file integrated_function.C.
|
private |
Compute derivatiuves at QP.
|
private |
Definition at line 177 of file integrated_function.C.
References GRINS::FEMFunctionAndDerivativeBase< Output >::derivatives().
|
private |
Definition at line 184 of file integrated_function.C.
|
private |
Compute the value of a QoI at a QP.
|
private |
Definition at line 164 of file integrated_function.C.
|
private |
Definition at line 170 of file integrated_function.C.
|
virtual |
Reinitialize the rayfire.
Reimplemented from GRINS::QoIBase.
Definition at line 90 of file integrated_function.C.
|
private |
Pointer to the template class used for function evaluation.
Definition at line 113 of file integrated_function.h.
|
private |
Quadrature order.
Definition at line 110 of file integrated_function.h.
|
private |
Pointer to RayfireMesh object.
Definition at line 116 of file integrated_function.h.
Referenced by GRINS::IntegratedFunction< FEMFunctionAndDerivativeBase< libMesh::Real > >::get_rayfire(), and GRINS::IntegratedFunction< Function >::IntegratedFunction().