libMesh
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Attributes | Private Attributes | List of all members
CDRBThetaExpansion Struct Reference

#include <assembly.h>

Inheritance diagram for CDRBThetaExpansion:
[legend]

Public Types

typedef RBThetaExpansion Parent
 The type of the parent. More...
 

Public Member Functions

 CDRBThetaExpansion ()
 Constructor. More...
 
 CDRBThetaExpansion ()
 Constructor. More...
 
virtual Number eval_M_theta (unsigned int q, const RBParameters &mu)
 Evaluate theta at the current parameter. More...
 
virtual unsigned int get_n_M_terms ()
 Get Q_m, the number of terms in the affine expansion for the mass operator. More...
 
virtual void attach_M_theta (RBTheta *theta_q_m)
 Attach a pointer to a functor object that defines one of the theta_q_m terms. More...
 
virtual Number eval_A_theta (unsigned int q, const RBParameters &mu)
 Evaluate theta_q_a at the current parameter. More...
 
virtual Number eval_F_theta (unsigned int q, const RBParameters &mu)
 Evaluate theta_q_f at the current parameter. More...
 
virtual Number eval_output_theta (unsigned int output_index, unsigned int q_l, const RBParameters &mu)
 Evaluate theta_q_l at the current parameter. 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...
 
virtual void attach_A_theta (RBTheta *theta_q_a)
 Attach a pointer to a functor object that defines one of the theta_q_a terms. More...
 
virtual void attach_multiple_A_theta (std::vector< std::unique_ptr< RBTheta >> &theta_q_a)
 Attach a vector of pointers to functor objects that each define one of the theta_q_a terms. More...
 
virtual void attach_F_theta (RBTheta *theta_q_f)
 Attach a pointer to a functor object that defines one of the theta_q_a terms. More...
 
virtual void attach_multiple_F_theta (std::vector< std::unique_ptr< RBTheta >> &theta_q_f)
 Attach a vector of pointers to functor objects that each define one of the theta_q_f terms. More...
 
virtual void attach_output_theta (std::vector< std::unique_ptr< RBTheta >> &theta_q_l)
 Attach a vector of pointers to functor objects that define one of the outputs. More...
 
virtual void attach_output_theta (std::vector< RBTheta * > theta_q_l)
 Attach a vector of pointers to functor objects that define one of the outputs. More...
 
virtual void attach_output_theta (RBTheta *theta_q_l)
 Attach a pointer to a functor object that defines one of the outputs. 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=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 ()
 

Public Attributes

ThetaA0 theta_a_0
 
ThetaA1 theta_a_1
 
ThetaA2 theta_a_2
 
RBTheta rb_theta
 

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)
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name)
 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< RBTheta * > _M_theta_vector
 Vector storing the pointers to the RBTheta functors. More...
 
std::vector< RBTheta * > _A_theta_vector
 Vector storing the pointers to the RBTheta functors for A. More...
 
std::vector< RBTheta * > _F_theta_vector
 Vector storing the RBTheta functors for the affine expansion of the rhs. More...
 
std::vector< std::vector< RBTheta * > > _output_theta_vector
 Vector storing the RBTheta functors for the affine expansion of the outputs. More...
 

Detailed Description

Definition at line 197 of file assembly.h.

Member Typedef Documentation

◆ Counts

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

◆ Parent

The type of the parent.

Definition at line 53 of file transient_rb_theta_expansion.h.

Constructor & Destructor Documentation

◆ CDRBThetaExpansion() [1/2]

CDRBThetaExpansion::CDRBThetaExpansion ( )
inline

Constructor.

Definition at line 203 of file assembly.h.

204  {
205  // set up the RBThetaExpansion object
206  attach_A_theta(&theta_a_0); // Attach the lhs theta
209 
210  attach_F_theta(&rb_theta); // Attach the rhs theta
211 
212  attach_output_theta(&rb_theta); // Attach output 0 theta
213  attach_output_theta(&rb_theta); // Attach output 1 theta
214  attach_output_theta(&rb_theta); // Attach output 2 theta
215  attach_output_theta(&rb_theta); // Attach output 3 theta
216  }

References libMesh::RBThetaExpansion::attach_A_theta(), libMesh::RBThetaExpansion::attach_F_theta(), libMesh::RBThetaExpansion::attach_output_theta(), rb_theta, theta_a_0, theta_a_1, and theta_a_2.

◆ CDRBThetaExpansion() [2/2]

CDRBThetaExpansion::CDRBThetaExpansion ( )
inline

Constructor.

Definition at line 231 of file assembly.h.

232  {
233  // set up the RBThetaExpansion object
234  attach_M_theta(&rb_theta); // Attach the time-derivative theta
235 
236  attach_A_theta(&theta_a_0); // Attach the lhs theta
239 
240  attach_F_theta(&rb_theta); // Attach the rhs theta
241 
242  attach_output_theta(&rb_theta); // Attach output 0 theta
243  attach_output_theta(&rb_theta); // Attach output 1 theta
244  attach_output_theta(&rb_theta); // Attach output 2 theta
245  attach_output_theta(&rb_theta); // Attach output 3 theta
246  }

References libMesh::RBThetaExpansion::attach_A_theta(), libMesh::RBThetaExpansion::attach_F_theta(), libMesh::TransientRBThetaExpansion::attach_M_theta(), libMesh::RBThetaExpansion::attach_output_theta(), rb_theta, theta_a_0, theta_a_1, and theta_a_2.

Member Function Documentation

◆ attach_A_theta()

void RBThetaExpansion::attach_A_theta ( RBTheta theta_q_a)
virtualinherited

◆ attach_F_theta()

void RBThetaExpansion::attach_F_theta ( RBTheta theta_q_f)
virtualinherited

Attach a pointer to a functor object that defines one of the theta_q_a terms.

Definition at line 78 of file rb_theta_expansion.C.

79 {
80  libmesh_assert(theta_q_f);
81 
82  _F_theta_vector.push_back(theta_q_f);
83 }

References libMesh::RBThetaExpansion::_F_theta_vector, and libMesh::libmesh_assert().

Referenced by AcousticsRBThetaExpansion::AcousticsRBThetaExpansion(), CDRBThetaExpansion(), ElasticityThetaExpansion::ElasticityThetaExpansion(), and Ex6ThetaExpansion::Ex6ThetaExpansion().

◆ attach_M_theta()

void libMesh::TransientRBThetaExpansion::attach_M_theta ( RBTheta theta_q_m)
virtualinherited

Attach a pointer to a functor object that defines one of the theta_q_m terms.

Definition at line 44 of file transient_rb_theta_expansion.C.

45 {
46  libmesh_assert(theta_q_m);
47 
48  _M_theta_vector.push_back(theta_q_m);
49 }

References libMesh::TransientRBThetaExpansion::_M_theta_vector, and libMesh::libmesh_assert().

Referenced by CDRBThetaExpansion().

◆ attach_multiple_A_theta()

void RBThetaExpansion::attach_multiple_A_theta ( std::vector< std::unique_ptr< RBTheta >> &  theta_q_a)
virtualinherited

Attach a vector of pointers to functor objects that each define one of the theta_q_a terms.

Definition at line 69 of file rb_theta_expansion.C.

70 {
71  for (std::size_t i=0; i<theta_q_a.size(); i++)
72  {
73  libmesh_assert(theta_q_a[i]);
74  _A_theta_vector.push_back(theta_q_a[i].get());
75  }
76 }

References libMesh::RBThetaExpansion::_A_theta_vector, libMesh::ReferenceElem::get(), and libMesh::libmesh_assert().

◆ attach_multiple_F_theta()

void RBThetaExpansion::attach_multiple_F_theta ( std::vector< std::unique_ptr< RBTheta >> &  theta_q_f)
virtualinherited

Attach a vector of pointers to functor objects that each define one of the theta_q_f terms.

Definition at line 85 of file rb_theta_expansion.C.

86 {
87  for (std::size_t i=0; i<theta_q_f.size(); i++)
88  {
89  libmesh_assert(theta_q_f[i]);
90  _F_theta_vector.push_back(theta_q_f[i].get());
91  }
92 }

References libMesh::RBThetaExpansion::_F_theta_vector, libMesh::ReferenceElem::get(), and libMesh::libmesh_assert().

◆ attach_output_theta() [1/3]

void RBThetaExpansion::attach_output_theta ( RBTheta theta_q_l)
virtualinherited

Attach a pointer to a functor object that defines one of the outputs.

Definition at line 109 of file rb_theta_expansion.C.

110 {
111  libmesh_assert(theta_q_l);
112 
113  std::vector<RBTheta *> theta_l_vector(1);
114  theta_l_vector[0] = theta_q_l;
115 
116  attach_output_theta(theta_l_vector);
117 }

References libMesh::RBThetaExpansion::attach_output_theta(), and libMesh::libmesh_assert().

◆ attach_output_theta() [2/3]

void RBThetaExpansion::attach_output_theta ( std::vector< RBTheta * >  theta_q_l)
virtualinherited

Attach a vector of pointers to functor objects that define one of the outputs.

Definition at line 104 of file rb_theta_expansion.C.

105 {
106  _output_theta_vector.push_back(theta_q_l);
107 }

References libMesh::RBThetaExpansion::_output_theta_vector.

◆ attach_output_theta() [3/3]

void RBThetaExpansion::attach_output_theta ( std::vector< std::unique_ptr< RBTheta >> &  theta_q_l)
virtualinherited

Attach a vector of pointers to functor objects that define one of the outputs.

Definition at line 94 of file rb_theta_expansion.C.

95 {
96  std::vector<RBTheta *> theta_q_l_ptr;
97  for(std::size_t i=0; i<theta_q_l.size(); i++)
98  {
99  theta_q_l_ptr.push_back( theta_q_l[i].get() );
100  }
101  _output_theta_vector.push_back(theta_q_l_ptr);
102 }

References libMesh::RBThetaExpansion::_output_theta_vector, and libMesh::ReferenceElem::get().

Referenced by AcousticsRBThetaExpansion::AcousticsRBThetaExpansion(), libMesh::RBThetaExpansion::attach_output_theta(), and CDRBThetaExpansion().

◆ disable_print_counter_info()

void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 106 of file reference_counter.C.

107 {
108  _enable_print_counter = false;
109  return;
110 }

References libMesh::ReferenceCounter::_enable_print_counter.

Referenced by libMesh::LibMeshInit::LibMeshInit().

◆ enable_print_counter_info()

void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

Definition at line 100 of file reference_counter.C.

101 {
102  _enable_print_counter = true;
103  return;
104 }

References libMesh::ReferenceCounter::_enable_print_counter.

◆ eval_A_theta()

Number RBThetaExpansion::eval_A_theta ( unsigned int  q,
const RBParameters mu 
)
virtualinherited

Evaluate theta_q_a at the current parameter.

Override if the theta functions need to be treated differently in subclasses.

Definition at line 119 of file rb_theta_expansion.C.

121 {
122  if (q >= get_n_A_terms())
123  libmesh_error_msg("Error: We must have q < get_n_A_terms in eval_A_theta.");
124 
126 
127  return _A_theta_vector[q]->evaluate( mu );
128 }

References libMesh::RBThetaExpansion::_A_theta_vector, libMesh::RBThetaExpansion::get_n_A_terms(), and libMesh::libmesh_assert().

Referenced by libMesh::TransientRBEvaluation::cache_online_residual_terms(), libMesh::RBEvaluation::compute_residual_dual_norm(), libMesh::RBSCMEvaluation::get_SCM_LB(), libMesh::RBSCMEvaluation::get_SCM_UB(), libMesh::TransientRBEvaluation::rb_solve(), libMesh::RBEvaluation::rb_solve(), libMesh::TransientRBConstruction::truth_assembly(), and libMesh::TransientRBEvaluation::uncached_compute_residual_dual_norm().

◆ eval_F_theta()

Number RBThetaExpansion::eval_F_theta ( unsigned int  q,
const RBParameters mu 
)
virtualinherited

◆ eval_M_theta()

Number libMesh::TransientRBThetaExpansion::eval_M_theta ( unsigned int  q,
const RBParameters mu 
)
virtualinherited

Evaluate theta at the current parameter.

Override if the theta functions need to be treated differently in subclasses.

Definition at line 33 of file transient_rb_theta_expansion.C.

35 {
36  if (q >= get_n_M_terms())
37  libmesh_error_msg("Error: We must have q < get_n_M_terms in eval_M_theta.");
38 
40 
41  return _M_theta_vector[q]->evaluate( mu );
42 }

References libMesh::TransientRBThetaExpansion::_M_theta_vector, libMesh::TransientRBThetaExpansion::get_n_M_terms(), and libMesh::libmesh_assert().

Referenced by libMesh::TransientRBConstruction::add_scaled_mass_matrix(), libMesh::TransientRBEvaluation::cache_online_residual_terms(), libMesh::TransientRBConstruction::mass_matrix_scaled_matvec(), libMesh::TransientRBEvaluation::rb_solve(), and libMesh::TransientRBEvaluation::uncached_compute_residual_dual_norm().

◆ eval_output_theta()

Number RBThetaExpansion::eval_output_theta ( unsigned int  output_index,
unsigned int  q_l,
const RBParameters mu 
)
virtualinherited

Evaluate theta_q_l at the current parameter.

Definition at line 141 of file rb_theta_expansion.C.

144 {
145  if ((output_index >= get_n_outputs()) || (q_l >= get_n_output_terms(output_index)))
146  libmesh_error_msg("Error: We must have output_index < n_outputs and " \
147  << "q_l < get_n_output_terms(output_index) in eval_output_theta.");
148 
149  libmesh_assert(_output_theta_vector[output_index][q_l]);
150 
151  return _output_theta_vector[output_index][q_l]->evaluate( mu );
152 }

References libMesh::RBThetaExpansion::_output_theta_vector, libMesh::RBThetaExpansion::get_n_output_terms(), libMesh::RBThetaExpansion::get_n_outputs(), and libMesh::libmesh_assert().

Referenced by libMesh::RBEvaluation::eval_output_dual_norm(), libMesh::TransientRBEvaluation::rb_solve(), libMesh::RBEvaluation::rb_solve(), libMesh::TransientRBConstruction::truth_solve(), and libMesh::RBConstruction::truth_solve().

◆ get_info()

std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

Definition at line 47 of file reference_counter.C.

48 {
49 #if defined(LIBMESH_ENABLE_REFERENCE_COUNTING) && defined(DEBUG)
50 
51  std::ostringstream oss;
52 
53  oss << '\n'
54  << " ---------------------------------------------------------------------------- \n"
55  << "| Reference count information |\n"
56  << " ---------------------------------------------------------------------------- \n";
57 
58  for (const auto & pr : _counts)
59  {
60  const std::string name(pr.first);
61  const unsigned int creations = pr.second.first;
62  const unsigned int destructions = pr.second.second;
63 
64  oss << "| " << name << " reference count information:\n"
65  << "| Creations: " << creations << '\n'
66  << "| Destructions: " << destructions << '\n';
67  }
68 
69  oss << " ---------------------------------------------------------------------------- \n";
70 
71  return oss.str();
72 
73 #else
74 
75  return "";
76 
77 #endif
78 }

References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().

Referenced by libMesh::ReferenceCounter::print_info().

◆ get_n_A_terms()

unsigned int RBThetaExpansion::get_n_A_terms ( ) const
inherited

Get Q_a, the number of terms in the affine expansion for the bilinear form.

Definition at line 35 of file rb_theta_expansion.C.

36 {
37  return cast_int<unsigned int>
38  (_A_theta_vector.size());
39 }

References libMesh::RBThetaExpansion::_A_theta_vector.

Referenced by libMesh::RBDataSerialization::add_rb_evaluation_data_to_builder(), libMesh::RBDataSerialization::add_rb_scm_evaluation_data_to_builder(), libMesh::RBDataSerialization::add_transient_rb_evaluation_data_to_builder(), libMesh::RBConstruction::allocate_data_structures(), libMesh::RBConstruction::assemble_all_affine_operators(), libMesh::RBConstruction::assemble_inner_product_matrix(), libMesh::TransientRBEvaluation::cache_online_residual_terms(), libMesh::RBEvaluation::compute_residual_dual_norm(), libMesh::RBSCMConstruction::compute_SCM_bounding_box(), libMesh::RBThetaExpansion::eval_A_theta(), libMesh::RBSCMConstruction::evaluate_stability_constant(), libMesh::RBConstruction::get_all_matrices(), libMesh::RBSCMEvaluation::get_SCM_LB(), libMesh::RBSCMEvaluation::get_SCM_UB(), libMesh::TransientRBEvaluation::legacy_read_offline_data_from_files(), libMesh::RBEvaluation::legacy_read_offline_data_from_files(), libMesh::RBSCMEvaluation::legacy_read_offline_data_from_files(), libMesh::TransientRBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBSCMEvaluation::legacy_write_offline_data_to_files(), libMesh::RBDataDeserialization::load_rb_evaluation_data(), libMesh::RBDataDeserialization::load_rb_scm_evaluation_data(), libMesh::RBDataDeserialization::load_transient_rb_evaluation_data(), libMesh::RBSCMConstruction::print_info(), libMesh::RBConstruction::print_info(), libMesh::TransientRBEvaluation::rb_solve(), libMesh::RBEvaluation::rb_solve(), libMesh::TransientRBEvaluation::resize_data_structures(), libMesh::RBEvaluation::resize_data_structures(), libMesh::TransientRBConstruction::truth_assembly(), libMesh::RBConstruction::truth_assembly(), libMesh::TransientRBEvaluation::uncached_compute_residual_dual_norm(), libMesh::RBConstruction::update_RB_system_matrices(), libMesh::TransientRBConstruction::update_residual_terms(), and libMesh::RBConstruction::update_residual_terms().

◆ get_n_F_terms()

unsigned int RBThetaExpansion::get_n_F_terms ( ) const
inherited

Get Q_f, the number of terms in the affine expansion for the right-hand side.

Definition at line 41 of file rb_theta_expansion.C.

42 {
43  return cast_int<unsigned int>
44  (_F_theta_vector.size());
45 }

References libMesh::RBThetaExpansion::_F_theta_vector.

Referenced by libMesh::RBDataSerialization::add_rb_evaluation_data_to_builder(), libMesh::RBDataSerialization::add_transient_rb_evaluation_data_to_builder(), libMesh::RBConstruction::allocate_data_structures(), libMesh::RBConstruction::assemble_all_affine_vectors(), libMesh::TransientRBEvaluation::cache_online_residual_terms(), libMesh::RBConstruction::compute_Fq_representor_innerprods(), libMesh::RBEvaluation::compute_residual_dual_norm(), libMesh::RBConstruction::enrich_basis_from_rhs_terms(), libMesh::RBThetaExpansion::eval_F_theta(), libMesh::RBConstruction::get_all_vectors(), libMesh::TransientRBEvaluation::legacy_read_offline_data_from_files(), libMesh::RBEvaluation::legacy_read_offline_data_from_files(), libMesh::TransientRBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBDataDeserialization::load_rb_evaluation_data(), libMesh::RBDataDeserialization::load_transient_rb_evaluation_data(), libMesh::RBConstruction::print_info(), libMesh::TransientRBEvaluation::rb_solve(), libMesh::RBEvaluation::rb_solve(), libMesh::TransientRBEvaluation::resize_data_structures(), libMesh::RBEvaluation::resize_data_structures(), libMesh::TransientRBConstruction::truth_assembly(), libMesh::RBConstruction::truth_assembly(), libMesh::TransientRBEvaluation::uncached_compute_residual_dual_norm(), libMesh::RBConstruction::update_RB_system_matrices(), libMesh::TransientRBConstruction::update_residual_terms(), and libMesh::RBConstruction::update_residual_terms().

◆ get_n_M_terms()

virtual unsigned int libMesh::TransientRBThetaExpansion::get_n_M_terms ( )
inlinevirtualinherited

Get Q_m, the number of terms in the affine expansion for the mass operator.

Definition at line 67 of file transient_rb_theta_expansion.h.

68  { return cast_int<unsigned int>(_M_theta_vector.size()); }

References libMesh::TransientRBThetaExpansion::_M_theta_vector.

Referenced by libMesh::TransientRBConstruction::add_scaled_mass_matrix(), libMesh::RBDataSerialization::add_transient_rb_evaluation_data_to_builder(), libMesh::TransientRBConstruction::allocate_data_structures(), libMesh::TransientRBConstruction::assemble_all_affine_operators(), libMesh::TransientRBConstruction::assemble_Mq_matrix(), libMesh::TransientRBEvaluation::cache_online_residual_terms(), libMesh::TransientRBThetaExpansion::eval_M_theta(), libMesh::TransientRBConstruction::get_all_matrices(), libMesh::TransientRBConstruction::get_M_q(), libMesh::TransientRBConstruction::get_non_dirichlet_M_q(), libMesh::TransientRBConstruction::initialize_rb_construction(), libMesh::TransientRBEvaluation::legacy_read_offline_data_from_files(), libMesh::TransientRBEvaluation::legacy_write_offline_data_to_files(), libMesh::RBDataDeserialization::load_transient_rb_evaluation_data(), libMesh::TransientRBConstruction::mass_matrix_scaled_matvec(), libMesh::TransientRBConstruction::print_info(), libMesh::TransientRBEvaluation::rb_solve(), libMesh::TransientRBEvaluation::resize_data_structures(), libMesh::TransientRBEvaluation::uncached_compute_residual_dual_norm(), libMesh::TransientRBConstruction::update_RB_system_matrices(), and libMesh::TransientRBConstruction::update_residual_terms().

◆ get_n_output_terms()

unsigned int RBThetaExpansion::get_n_output_terms ( unsigned int  output_index) const
inherited

◆ get_n_outputs()

unsigned int RBThetaExpansion::get_n_outputs ( ) const
inherited

◆ increment_constructor_count()

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
inlineprotectedinherited

Increments the construction counter.

Should be called in the constructor of any derived class that will be reference counted.

Definition at line 181 of file reference_counter.h.

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

◆ increment_destructor_count()

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
inlineprotectedinherited

Increments the destruction counter.

Should be called in the destructor of any derived class that will be reference counted.

Definition at line 194 of file reference_counter.h.

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

◆ n_objects()

static unsigned int libMesh::ReferenceCounter::n_objects ( )
inlinestaticinherited

Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 83 of file reference_counter.h.

84  { return _n_objects; }

References libMesh::ReferenceCounter::_n_objects.

◆ print_info()

void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

Definition at line 87 of file reference_counter.C.

88 {
90  out_stream << ReferenceCounter::get_info();
91 }

References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().

Member Data Documentation

◆ _A_theta_vector

std::vector<RBTheta *> libMesh::RBThetaExpansion::_A_theta_vector
privateinherited

◆ _counts

ReferenceCounter::Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _enable_print_counter

bool libMesh::ReferenceCounter::_enable_print_counter = true
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 141 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().

◆ _F_theta_vector

std::vector<RBTheta *> libMesh::RBThetaExpansion::_F_theta_vector
privateinherited

◆ _M_theta_vector

std::vector<RBTheta *> libMesh::TransientRBThetaExpansion::_M_theta_vector
privateinherited

◆ _mutex

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _n_objects

Threads::atomic< unsigned int > libMesh::ReferenceCounter::_n_objects
staticprotectedinherited

The number of objects.

Print the reference count information when the number returns to 0.

Definition at line 130 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

◆ _output_theta_vector

std::vector<std::vector<RBTheta *> > libMesh::RBThetaExpansion::_output_theta_vector
privateinherited

◆ rb_theta

RBTheta CDRBThetaExpansion::rb_theta

Definition at line 222 of file assembly.h.

Referenced by CDRBThetaExpansion().

◆ theta_a_0

ThetaA0 CDRBThetaExpansion::theta_a_0

Definition at line 219 of file assembly.h.

Referenced by CDRBThetaExpansion().

◆ theta_a_1

ThetaA1 CDRBThetaExpansion::theta_a_1

Definition at line 220 of file assembly.h.

Referenced by CDRBThetaExpansion().

◆ theta_a_2

ThetaA2 CDRBThetaExpansion::theta_a_2

Definition at line 221 of file assembly.h.

Referenced by CDRBThetaExpansion().


The documentation for this struct was generated from the following file:
libMesh::RBThetaExpansion::get_n_output_terms
unsigned int get_n_output_terms(unsigned int output_index) const
Get the number of affine terms associated with the specified output.
Definition: rb_theta_expansion.C:53
libMesh::RBThetaExpansion::get_n_F_terms
unsigned int get_n_F_terms() const
Get Q_f, the number of terms in the affine expansion for the right-hand side.
Definition: rb_theta_expansion.C:41
libMesh::RBThetaExpansion::_output_theta_vector
std::vector< std::vector< RBTheta * > > _output_theta_vector
Vector storing the RBTheta functors for the affine expansion of the outputs.
Definition: rb_theta_expansion.h:159
CDRBThetaExpansion::theta_a_1
ThetaA1 theta_a_1
Definition: assembly.h:220
libMesh::RBThetaExpansion::attach_output_theta
virtual void attach_output_theta(std::vector< std::unique_ptr< RBTheta >> &theta_q_l)
Attach a vector of pointers to functor objects that define one of the outputs.
Definition: rb_theta_expansion.C:94
libMesh::TransientRBThetaExpansion::_M_theta_vector
std::vector< RBTheta * > _M_theta_vector
Vector storing the pointers to the RBTheta functors.
Definition: transient_rb_theta_expansion.h:81
libMesh::ReferenceCounter::_counts
static Counts _counts
Actually holds the data.
Definition: reference_counter.h:122
libMesh::ReferenceCounter::_n_objects
static Threads::atomic< unsigned int > _n_objects
The number of objects.
Definition: reference_counter.h:130
libMesh::ReferenceCounter::get_info
static std::string get_info()
Gets a string containing the reference information.
Definition: reference_counter.C:47
libMesh::TransientRBThetaExpansion::attach_M_theta
virtual void attach_M_theta(RBTheta *theta_q_m)
Attach a pointer to a functor object that defines one of the theta_q_m terms.
Definition: transient_rb_theta_expansion.C:44
libMesh::RBThetaExpansion::_F_theta_vector
std::vector< RBTheta * > _F_theta_vector
Vector storing the RBTheta functors for the affine expansion of the rhs.
Definition: rb_theta_expansion.h:154
libMesh::libmesh_assert
libmesh_assert(ctx)
libMesh::RBThetaExpansion::_A_theta_vector
std::vector< RBTheta * > _A_theta_vector
Vector storing the pointers to the RBTheta functors for A.
Definition: rb_theta_expansion.h:149
libMesh::TransientRBThetaExpansion::get_n_M_terms
virtual unsigned int get_n_M_terms()
Get Q_m, the number of terms in the affine expansion for the mass operator.
Definition: transient_rb_theta_expansion.h:67
CDRBThetaExpansion::rb_theta
RBTheta rb_theta
Definition: assembly.h:222
libMesh::Threads::spin_mtx
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:29
libMesh::RBThetaExpansion::attach_F_theta
virtual void attach_F_theta(RBTheta *theta_q_f)
Attach a pointer to a functor object that defines one of the theta_q_a terms.
Definition: rb_theta_expansion.C:78
libMesh::RBThetaExpansion::get_n_outputs
unsigned int get_n_outputs() const
Get n_outputs, the number output functionals.
Definition: rb_theta_expansion.C:47
CDRBThetaExpansion::theta_a_0
ThetaA0 theta_a_0
Definition: assembly.h:219
libMesh::ReferenceElem::get
const Elem & get(const ElemType type_in)
Definition: reference_elem.C:237
CDRBThetaExpansion::theta_a_2
ThetaA2 theta_a_2
Definition: assembly.h:221
libMesh::RBThetaExpansion::get_n_A_terms
unsigned int get_n_A_terms() const
Get Q_a, the number of terms in the affine expansion for the bilinear form.
Definition: rb_theta_expansion.C:35
libMesh::RBThetaExpansion::attach_A_theta
virtual void attach_A_theta(RBTheta *theta_q_a)
Attach a pointer to a functor object that defines one of the theta_q_a terms.
Definition: rb_theta_expansion.C:62
libMesh::ReferenceCounter::_enable_print_counter
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called.
Definition: reference_counter.h:141
libMesh::Quality::name
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42