libMesh
|
This class stores the set of ElemAssembly functor objects that define the "parameter-independent expansion" of a PDE. More...
#include <rb_assembly_expansion.h>
Public Member Functions | |
RBAssemblyExpansion ()=default | |
All special functions can be defaulted for this simple class. More... | |
RBAssemblyExpansion (RBAssemblyExpansion &&)=default | |
RBAssemblyExpansion (const RBAssemblyExpansion &)=default | |
RBAssemblyExpansion & | operator= (const RBAssemblyExpansion &)=default |
RBAssemblyExpansion & | operator= (RBAssemblyExpansion &&)=default |
virtual | ~RBAssemblyExpansion ()=default |
void | perform_A_interior_assembly (unsigned int q, FEMContext &context) const |
Perform the specified A interior assembly. More... | |
void | perform_A_boundary_assembly (unsigned int q, FEMContext &context) const |
Perform the specified A boundary assembly. More... | |
void | perform_F_interior_assembly (unsigned int q, FEMContext &context) const |
Perform the specified F interior assembly. More... | |
void | perform_F_boundary_assembly (unsigned int q, FEMContext &context) const |
Perform the specified F boundary assembly. More... | |
void | perform_output_interior_assembly (unsigned int output_index, unsigned int q_l, FEMContext &context) const |
Perform the specified output assembly. More... | |
void | perform_output_boundary_assembly (unsigned int output_index, unsigned int q_l, FEMContext &context) const |
Perform the specified output assembly. More... | |
unsigned int | get_n_A_terms () const |
Get Q_a, the number of terms in the affine expansion for the bilinear form. More... | |
unsigned int | get_n_F_terms () const |
Get Q_f, the number of terms in the affine expansion for the right-hand side. More... | |
unsigned int | get_n_outputs () const |
Get n_outputs, the number output functionals. More... | |
unsigned int | get_n_output_terms (unsigned int output_index) const |
Get the number of affine terms associated with the specified output. More... | |
void | attach_A_assembly (ElemAssembly *Aq_assembly) |
Attach ElemAssembly object for the left-hand side (both interior and boundary assembly). More... | |
void | attach_multiple_A_assembly (std::vector< std::unique_ptr< ElemAssembly >> &Aq_assembly) |
Attach multiple ElemAssembly objects for the left-hand side (both interior and boundary assembly). More... | |
void | attach_F_assembly (ElemAssembly *Fq_assembly) |
Attach ElemAssembly object for the right-hand side (both interior and boundary assembly). More... | |
void | attach_multiple_F_assembly (std::vector< std::unique_ptr< ElemAssembly >> &Fq_assembly) |
Attach multiple ElemAssembly objects for the right-hand side (both interior and boundary assembly). More... | |
virtual void | attach_output_assembly (std::vector< std::unique_ptr< ElemAssembly >> &output_assembly) |
Attach ElemAssembly object for an output (both interior and boundary assembly). More... | |
virtual void | attach_output_assembly (std::vector< ElemAssembly *> output_assembly) |
Attach ElemAssembly object for an output (both interior and boundary assembly). More... | |
virtual void | attach_output_assembly (ElemAssembly *output_assembly) |
Attach ElemAssembly object for an output (both interior and boundary assembly). More... | |
ElemAssembly & | get_A_assembly (unsigned int q) |
Return a reference to the specified A_assembly object. More... | |
ElemAssembly & | get_F_assembly (unsigned int q) |
Return a reference to the specified F_assembly object. More... | |
ElemAssembly & | get_output_assembly (unsigned int output_index, unsigned int q_l) |
Return a reference to the specified output assembly object. More... | |
Static Public Member Functions | |
static std::string | get_info () |
Gets a string containing the reference information. More... | |
static void | print_info (std::ostream &out_stream=libMesh::out) |
Prints the reference information, by default to libMesh::out . More... | |
static unsigned int | n_objects () |
Prints the number of outstanding (created, but not yet destroyed) objects. More... | |
static void | enable_print_counter_info () |
Methods to enable/disable the reference counter output from print_info() More... | |
static void | disable_print_counter_info () |
Protected Types | |
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Data structure to log the information. More... | |
Protected Member Functions | |
void | increment_constructor_count (const std::string &name) noexcept |
Increments the construction counter. More... | |
void | increment_destructor_count (const std::string &name) noexcept |
Increments the destruction counter. More... | |
Static Protected Attributes | |
static Counts | _counts |
Actually holds the data. More... | |
static Threads::atomic< unsigned int > | _n_objects |
The number of objects. More... | |
static Threads::spin_mutex | _mutex |
Mutual exclusion object to enable thread-safe reference counting. More... | |
static bool | _enable_print_counter = true |
Flag to control whether reference count information is printed when print_info is called. More... | |
Private Attributes | |
std::vector< ElemAssembly * > | _A_assembly_vector |
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly. More... | |
std::vector< ElemAssembly * > | _F_assembly_vector |
Vector storing the function pointers to the assembly routines for the rhs affine vectors. More... | |
std::vector< std::vector< ElemAssembly * > > | _output_assembly_vector |
Vector storing the function pointers to the assembly routines for the outputs. More... | |
This class stores the set of ElemAssembly functor objects that define the "parameter-independent expansion" of a PDE.
Definition at line 44 of file rb_assembly_expansion.h.
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
Definition at line 119 of file reference_counter.h.
|
default |
All special functions can be defaulted for this simple class.
|
default |
|
default |
|
virtualdefault |
void RBAssemblyExpansion::attach_A_assembly | ( | ElemAssembly * | Aq_assembly | ) |
Attach ElemAssembly object for the left-hand side (both interior and boundary assembly).
Definition at line 123 of file rb_assembly_expansion.C.
References _A_assembly_vector.
Referenced by AcousticsRBAssemblyExpansion::AcousticsRBAssemblyExpansion(), CDRBAssemblyExpansion::CDRBAssemblyExpansion(), EimTestRBAssemblyExpansion::EimTestRBAssemblyExpansion(), ElasticityAssemblyExpansion::ElasticityAssemblyExpansion(), and Ex6AssemblyExpansion::Ex6AssemblyExpansion().
void RBAssemblyExpansion::attach_F_assembly | ( | ElemAssembly * | Fq_assembly | ) |
Attach ElemAssembly object for the right-hand side (both interior and boundary assembly).
Definition at line 134 of file rb_assembly_expansion.C.
References _F_assembly_vector.
Referenced by AcousticsRBAssemblyExpansion::AcousticsRBAssemblyExpansion(), CDRBAssemblyExpansion::CDRBAssemblyExpansion(), ElasticityAssemblyExpansion::ElasticityAssemblyExpansion(), and Ex6AssemblyExpansion::Ex6AssemblyExpansion().
void RBAssemblyExpansion::attach_multiple_A_assembly | ( | std::vector< std::unique_ptr< ElemAssembly >> & | Aq_assembly | ) |
Attach multiple ElemAssembly objects for the left-hand side (both interior and boundary assembly).
Definition at line 128 of file rb_assembly_expansion.C.
References _A_assembly_vector.
void RBAssemblyExpansion::attach_multiple_F_assembly | ( | std::vector< std::unique_ptr< ElemAssembly >> & | Fq_assembly | ) |
Attach multiple ElemAssembly objects for the right-hand side (both interior and boundary assembly).
Definition at line 139 of file rb_assembly_expansion.C.
References _F_assembly_vector.
|
virtual |
Attach ElemAssembly object for an output (both interior and boundary assembly).
In this case we pass in vector arguments to allow for Q_l > 1.
Definition at line 145 of file rb_assembly_expansion.C.
References _output_assembly_vector.
Referenced by AcousticsRBAssemblyExpansion::AcousticsRBAssemblyExpansion(), attach_output_assembly(), CDRBAssemblyExpansion::CDRBAssemblyExpansion(), and EimTestRBAssemblyExpansion::EimTestRBAssemblyExpansion().
|
virtual |
Attach ElemAssembly object for an output (both interior and boundary assembly).
In this case we pass in vector arguments to allow for Q_l > 1.
Definition at line 154 of file rb_assembly_expansion.C.
References _output_assembly_vector.
|
virtual |
Attach ElemAssembly object for an output (both interior and boundary assembly).
This function provides simpler syntax in the case that Q_l = 1; we do not need to use a vector in this case.
Definition at line 159 of file rb_assembly_expansion.C.
References attach_output_assembly().
|
staticinherited |
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
Definition at line 94 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
ElemAssembly & RBAssemblyExpansion::get_A_assembly | ( | unsigned int | q | ) |
Return a reference to the specified A_assembly object.
Definition at line 166 of file rb_assembly_expansion.C.
References _A_assembly_vector, and get_n_A_terms().
Referenced by libMesh::RBConstruction::add_scaled_Aq(), libMesh::RBConstruction::assemble_Aq_matrix(), and libMesh::RBConstruction::assemble_inner_product_matrix().
ElemAssembly & RBAssemblyExpansion::get_F_assembly | ( | unsigned int | q | ) |
Return a reference to the specified F_assembly object.
Definition at line 174 of file rb_assembly_expansion.C.
References _F_assembly_vector, and get_n_F_terms().
Referenced by libMesh::RBConstruction::assemble_Fq_vector().
|
staticinherited |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
unsigned int RBAssemblyExpansion::get_n_A_terms | ( | ) | const |
Get Q_a, the number of terms in the affine expansion for the bilinear form.
Definition at line 97 of file rb_assembly_expansion.C.
References _A_assembly_vector.
Referenced by get_A_assembly(), perform_A_boundary_assembly(), and perform_A_interior_assembly().
unsigned int RBAssemblyExpansion::get_n_F_terms | ( | ) | const |
Get Q_f, the number of terms in the affine expansion for the right-hand side.
Definition at line 103 of file rb_assembly_expansion.C.
References _F_assembly_vector.
Referenced by get_F_assembly(), perform_F_boundary_assembly(), and perform_F_interior_assembly().
Get the number of affine terms associated with the specified output.
Definition at line 115 of file rb_assembly_expansion.C.
References _output_assembly_vector, and get_n_outputs().
Referenced by get_output_assembly(), perform_output_boundary_assembly(), and perform_output_interior_assembly().
unsigned int RBAssemblyExpansion::get_n_outputs | ( | ) | const |
Get n_outputs, the number output functionals.
Definition at line 109 of file rb_assembly_expansion.C.
References _output_assembly_vector.
Referenced by get_n_output_terms(), get_output_assembly(), perform_output_boundary_assembly(), and perform_output_interior_assembly().
ElemAssembly & RBAssemblyExpansion::get_output_assembly | ( | unsigned int | output_index, |
unsigned int | q_l | ||
) |
Return a reference to the specified output assembly object.
Definition at line 182 of file rb_assembly_expansion.C.
References _output_assembly_vector, get_n_output_terms(), and get_n_outputs().
Referenced by libMesh::RBConstruction::assemble_all_output_vectors().
|
inlineprotectednoexceptinherited |
Increments the construction counter.
Should be called in the constructor of any derived class that will be reference counted.
Definition at line 183 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
|
inlineprotectednoexceptinherited |
Increments the destruction counter.
Should be called in the destructor of any derived class that will be reference counted.
Definition at line 207 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 85 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
Referenced by libMesh::LibMeshInit::~LibMeshInit().
|
default |
|
default |
void RBAssemblyExpansion::perform_A_boundary_assembly | ( | unsigned int | q, |
FEMContext & | context | ||
) | const |
Perform the specified A boundary assembly.
Definition at line 38 of file rb_assembly_expansion.C.
References _A_assembly_vector, get_n_A_terms(), and libMesh::libmesh_assert().
void RBAssemblyExpansion::perform_A_interior_assembly | ( | unsigned int | q, |
FEMContext & | context | ||
) | const |
Perform the specified A interior assembly.
Definition at line 27 of file rb_assembly_expansion.C.
References _A_assembly_vector, get_n_A_terms(), and libMesh::libmesh_assert().
void RBAssemblyExpansion::perform_F_boundary_assembly | ( | unsigned int | q, |
FEMContext & | context | ||
) | const |
Perform the specified F boundary assembly.
Definition at line 60 of file rb_assembly_expansion.C.
References _A_assembly_vector, _F_assembly_vector, get_n_F_terms(), and libMesh::libmesh_assert().
void RBAssemblyExpansion::perform_F_interior_assembly | ( | unsigned int | q, |
FEMContext & | context | ||
) | const |
Perform the specified F interior assembly.
Definition at line 49 of file rb_assembly_expansion.C.
References _A_assembly_vector, _F_assembly_vector, get_n_F_terms(), and libMesh::libmesh_assert().
void RBAssemblyExpansion::perform_output_boundary_assembly | ( | unsigned int | output_index, |
unsigned int | q_l, | ||
FEMContext & | context | ||
) | const |
Perform the specified output assembly.
Definition at line 84 of file rb_assembly_expansion.C.
References _output_assembly_vector, get_n_output_terms(), get_n_outputs(), and libMesh::libmesh_assert().
void RBAssemblyExpansion::perform_output_interior_assembly | ( | unsigned int | output_index, |
unsigned int | q_l, | ||
FEMContext & | context | ||
) | const |
Perform the specified output assembly.
Definition at line 71 of file rb_assembly_expansion.C.
References _output_assembly_vector, get_n_output_terms(), get_n_outputs(), and libMesh::libmesh_assert().
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
Definition at line 81 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
Referenced by libMesh::LibMeshInit::~LibMeshInit().
|
private |
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
Definition at line 186 of file rb_assembly_expansion.h.
Referenced by attach_A_assembly(), attach_multiple_A_assembly(), get_A_assembly(), get_n_A_terms(), perform_A_boundary_assembly(), perform_A_interior_assembly(), perform_F_boundary_assembly(), and perform_F_interior_assembly().
|
staticprotectedinherited |
Actually holds the data.
Definition at line 124 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info().
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 143 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
|
private |
Vector storing the function pointers to the assembly routines for the rhs affine vectors.
Definition at line 192 of file rb_assembly_expansion.h.
Referenced by attach_F_assembly(), attach_multiple_F_assembly(), get_F_assembly(), get_n_F_terms(), perform_F_boundary_assembly(), and perform_F_interior_assembly().
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 137 of file reference_counter.h.
|
staticprotectedinherited |
The number of objects.
Print the reference count information when the number returns to 0.
Definition at line 132 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
|
private |
Vector storing the function pointers to the assembly routines for the outputs.
Element interior part.
Definition at line 198 of file rb_assembly_expansion.h.
Referenced by attach_output_assembly(), get_n_output_terms(), get_n_outputs(), get_output_assembly(), perform_output_boundary_assembly(), and perform_output_interior_assembly().