libMesh
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Attributes | Private Attributes | List of all members
libMesh::TransientRBAssemblyExpansion Class Reference

This extends RBAssemblyExpansion to provide an assembly expansion for the case of time-dependent PDEs. More...

#include <transient_rb_assembly_expansion.h>

Inheritance diagram for libMesh::TransientRBAssemblyExpansion:
[legend]

Public Member Functions

 TransientRBAssemblyExpansion ()
 Constructor. More...
 
void perform_M_interior_assembly (unsigned int q, FEMContext &context)
 Perform the specified M interior assembly. More...
 
void perform_M_boundary_assembly (unsigned int q, FEMContext &context)
 Perform the specified M boundary assembly. More...
 
unsigned int get_n_M_terms () const
 Get Q_m, the number of terms in the affine expansion for the bilinear form. More...
 
void attach_M_assembly (ElemAssembly *A_q_assembly)
 Attach ElemAssembly object for the time-derivative (both interior and boundary assembly). More...
 
ElemAssemblyget_M_assembly (unsigned int q)
 Return a reference to the specified M_assembly object. More...
 
void perform_A_interior_assembly (unsigned int q, FEMContext &context)
 Perform the specified A interior assembly. More...
 
void perform_A_boundary_assembly (unsigned int q, FEMContext &context)
 Perform the specified A boundary assembly. More...
 
void perform_F_interior_assembly (unsigned int q, FEMContext &context)
 Perform the specified F interior assembly. More...
 
void perform_F_boundary_assembly (unsigned int q, FEMContext &context)
 Perform the specified F boundary assembly. More...
 
void perform_output_interior_assembly (unsigned int output_index, unsigned int q_l, FEMContext &context)
 Perform the specified output assembly. More...
 
void perform_output_boundary_assembly (unsigned int output_index, unsigned int q_l, FEMContext &context)
 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< 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< 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< 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...
 
ElemAssemblyget_A_assembly (unsigned int q)
 Return a reference to the specified A_assembly object. More...
 
ElemAssemblyget_F_assembly (unsigned int q)
 Return a reference to the specified F_assembly object. More...
 
ElemAssemblyget_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=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)
 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< ElemAssembly * > _M_assembly_vector
 Vectors storing the function pointers to the assembly routines for the time-derivative operators, both interior and boundary assembly. More...
 

Detailed Description

This extends RBAssemblyExpansion to provide an assembly expansion for the case of time-dependent PDEs.

This just requires an extra set of ElemAssembly functors for the time-derivative term.

Author
David J. Knezevic
Date
2011

Definition at line 40 of file transient_rb_assembly_expansion.h.

Member Typedef Documentation

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 119 of file reference_counter.h.

Constructor & Destructor Documentation

libMesh::TransientRBAssemblyExpansion::TransientRBAssemblyExpansion ( )

Constructor.

Definition at line 30 of file transient_rb_assembly_expansion.C.

31 {
32 }

Member Function Documentation

void RBAssemblyExpansion::attach_A_assembly ( ElemAssembly Aq_assembly)
inherited

Attach ElemAssembly object for the left-hand side (both interior and boundary assembly).

Definition at line 131 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

132 {
133  _A_assembly_vector.push_back(Aq_assembly);
134 }
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
void RBAssemblyExpansion::attach_F_assembly ( ElemAssembly Fq_assembly)
inherited

Attach ElemAssembly object for the right-hand side (both interior and boundary assembly).

Definition at line 142 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_F_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

143 {
144  _F_assembly_vector.push_back(Fq_assembly);
145 }
std::vector< ElemAssembly * > _F_assembly_vector
Vector storing the function pointers to the assembly routines for the rhs affine vectors.
void libMesh::TransientRBAssemblyExpansion::attach_M_assembly ( ElemAssembly A_q_assembly)

Attach ElemAssembly object for the time-derivative (both interior and boundary assembly).

Definition at line 61 of file transient_rb_assembly_expansion.C.

References _M_assembly_vector.

62 {
63  _M_assembly_vector.push_back(M_q_assembly);
64 }
std::vector< ElemAssembly * > _M_assembly_vector
Vectors storing the function pointers to the assembly routines for the time-derivative operators...
void RBAssemblyExpansion::attach_multiple_A_assembly ( std::vector< ElemAssembly * >  Aq_assembly)
inherited

Attach multiple ElemAssembly objects for the left-hand side (both interior and boundary assembly).

Definition at line 136 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

137 {
138  for (std::size_t i=0; i<Aq_assembly.size(); i++)
139  _A_assembly_vector.push_back(Aq_assembly[i]);
140 }
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
void RBAssemblyExpansion::attach_multiple_F_assembly ( std::vector< ElemAssembly * >  Fq_assembly)
inherited

Attach multiple ElemAssembly objects for the right-hand side (both interior and boundary assembly).

Definition at line 147 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_F_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

148 {
149  for (std::size_t i=0; i<Fq_assembly.size(); i++)
150  _F_assembly_vector.push_back(Fq_assembly[i]);
151 }
std::vector< ElemAssembly * > _F_assembly_vector
Vector storing the function pointers to the assembly routines for the rhs affine vectors.
void RBAssemblyExpansion::attach_output_assembly ( std::vector< ElemAssembly * >  output_assembly)
virtualinherited

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 153 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_output_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::attach_output_assembly(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

154 {
155  _output_assembly_vector.push_back(output_assembly);
156 }
std::vector< std::vector< ElemAssembly * > > _output_assembly_vector
Vector storing the function pointers to the assembly routines for the outputs.
void RBAssemblyExpansion::attach_output_assembly ( ElemAssembly output_assembly)
virtualinherited

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 158 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::attach_output_assembly().

159 {
160  std::vector<ElemAssembly *> L_vector(1); L_vector[0] = output_assembly;
161 
162  attach_output_assembly(L_vector);
163 }
virtual void attach_output_assembly(std::vector< ElemAssembly * > output_assembly)
Attach ElemAssembly object for an output (both interior and boundary assembly).
void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

Definition at line 107 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

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

108 {
109  _enable_print_counter = false;
110  return;
111 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...
void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

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

Definition at line 101 of file reference_counter.C.

References libMesh::ReferenceCounter::_enable_print_counter.

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

102 {
103  _enable_print_counter = true;
104  return;
105 }
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...
ElemAssembly & RBAssemblyExpansion::get_A_assembly ( unsigned int  q)
inherited

Return a reference to the specified A_assembly object.

Definition at line 165 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector, and libMesh::RBAssemblyExpansion::get_n_A_terms().

Referenced by libMesh::RBConstruction::add_scaled_Aq(), libMesh::RBConstruction::assemble_Aq_matrix(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

166 {
167  if (q >= get_n_A_terms())
168  libmesh_error_msg("Error: We must have q < get_n_A_terms in get_A_assembly.");
169 
170  return *_A_assembly_vector[q];
171 }
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
unsigned int get_n_A_terms() const
Get Q_a, the number of terms in the affine expansion for the bilinear form.
ElemAssembly & RBAssemblyExpansion::get_F_assembly ( unsigned int  q)
inherited

Return a reference to the specified F_assembly object.

Definition at line 173 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_F_assembly_vector, and libMesh::RBAssemblyExpansion::get_n_F_terms().

Referenced by libMesh::RBConstruction::assemble_Fq_vector(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

174 {
175  if (q >= get_n_F_terms())
176  libmesh_error_msg("Error: We must have q < get_n_F_terms in get_F_assembly.");
177 
178  return *_F_assembly_vector[q];
179 }
unsigned int get_n_F_terms() const
Get Q_f, the number of terms in the affine expansion for the right-hand side.
std::vector< ElemAssembly * > _F_assembly_vector
Vector storing the function pointers to the assembly routines for the rhs affine vectors.
std::string libMesh::ReferenceCounter::get_info ( )
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().

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 (Counts::iterator it = _counts.begin();
59  it != _counts.end(); ++it)
60  {
61  const std::string name(it->first);
62  const unsigned int creations = it->second.first;
63  const unsigned int destructions = it->second.second;
64 
65  oss << "| " << name << " reference count information:\n"
66  << "| Creations: " << creations << '\n'
67  << "| Destructions: " << destructions << '\n';
68  }
69 
70  oss << " ---------------------------------------------------------------------------- \n";
71 
72  return oss.str();
73 
74 #else
75 
76  return "";
77 
78 #endif
79 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:39
static Counts _counts
Actually holds the data.
ElemAssembly & libMesh::TransientRBAssemblyExpansion::get_M_assembly ( unsigned int  q)

Return a reference to the specified M_assembly object.

Definition at line 66 of file transient_rb_assembly_expansion.C.

References _M_assembly_vector, and get_n_M_terms().

67 {
68  if (q >= get_n_M_terms())
69  libmesh_error_msg("Error: We must have q < get_n_M_terms in get_M_assembly.");
70 
71  return *_M_assembly_vector[q];
72 }
std::vector< ElemAssembly * > _M_assembly_vector
Vectors storing the function pointers to the assembly routines for the time-derivative operators...
unsigned int get_n_M_terms() const
Get Q_m, the number of terms in the affine expansion for the bilinear form.
unsigned int RBAssemblyExpansion::get_n_A_terms ( ) const
inherited

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

Definition at line 104 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::get_A_assembly(), libMesh::RBAssemblyExpansion::perform_A_boundary_assembly(), libMesh::RBAssemblyExpansion::perform_A_interior_assembly(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

105 {
106  return cast_int<unsigned int>
107  (_A_assembly_vector.size());
108 }
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
unsigned int RBAssemblyExpansion::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 110 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_F_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::get_F_assembly(), libMesh::RBAssemblyExpansion::perform_F_boundary_assembly(), libMesh::RBAssemblyExpansion::perform_F_interior_assembly(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

111 {
112  return cast_int<unsigned int>
113  (_F_assembly_vector.size());
114 }
std::vector< ElemAssembly * > _F_assembly_vector
Vector storing the function pointers to the assembly routines for the rhs affine vectors.
unsigned int libMesh::TransientRBAssemblyExpansion::get_n_M_terms ( ) const

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

Definition at line 56 of file transient_rb_assembly_expansion.C.

References _M_assembly_vector.

Referenced by get_M_assembly(), perform_M_boundary_assembly(), and perform_M_interior_assembly().

57 {
58  return cast_int<unsigned int>(_M_assembly_vector.size());
59 }
std::vector< ElemAssembly * > _M_assembly_vector
Vectors storing the function pointers to the assembly routines for the time-derivative operators...
unsigned int RBAssemblyExpansion::get_n_output_terms ( unsigned int  output_index) const
inherited

Get the number of affine terms associated with the specified output.

Definition at line 122 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_output_assembly_vector, and libMesh::RBAssemblyExpansion::get_n_outputs().

Referenced by libMesh::RBAssemblyExpansion::get_output_assembly(), libMesh::RBAssemblyExpansion::perform_output_boundary_assembly(), libMesh::RBAssemblyExpansion::perform_output_interior_assembly(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

123 {
124  if (index >= get_n_outputs())
125  libmesh_error_msg("Error: We must have index < n_outputs in get_Q_l.");
126 
127  return cast_int<unsigned int>
128  (_output_assembly_vector[index].size());
129 }
std::vector< std::vector< ElemAssembly * > > _output_assembly_vector
Vector storing the function pointers to the assembly routines for the outputs.
unsigned int get_n_outputs() const
Get n_outputs, the number output functionals.
unsigned int RBAssemblyExpansion::get_n_outputs ( ) const
inherited

Get n_outputs, the number output functionals.

Definition at line 116 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_output_assembly_vector.

Referenced by libMesh::RBAssemblyExpansion::get_n_output_terms(), libMesh::RBAssemblyExpansion::get_output_assembly(), libMesh::RBAssemblyExpansion::perform_output_boundary_assembly(), libMesh::RBAssemblyExpansion::perform_output_interior_assembly(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

117 {
118  return cast_int<unsigned int>
119  (_output_assembly_vector.size());
120 }
std::vector< std::vector< ElemAssembly * > > _output_assembly_vector
Vector storing the function pointers to the assembly routines for the outputs.
ElemAssembly & RBAssemblyExpansion::get_output_assembly ( unsigned int  output_index,
unsigned int  q_l 
)
inherited

Return a reference to the specified output assembly object.

Definition at line 181 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_output_assembly_vector, libMesh::RBAssemblyExpansion::get_n_output_terms(), and libMesh::RBAssemblyExpansion::get_n_outputs().

Referenced by libMesh::RBConstruction::assemble_all_output_vectors(), and libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

183 {
184  if ((output_index >= get_n_outputs()) || (q_l >= get_n_output_terms(output_index)))
185  libmesh_error_msg("Error: We must have output_index < n_outputs and " \
186  << "q_l < get_n_output_terms(output_index) in get_output_assembly.");
187 
188  return *_output_assembly_vector[output_index][q_l];
189 }
unsigned int get_n_output_terms(unsigned int output_index) const
Get the number of affine terms associated with the specified output.
std::vector< std::vector< ElemAssembly * > > _output_assembly_vector
Vector storing the function pointers to the assembly routines for the outputs.
unsigned int get_n_outputs() const
Get n_outputs, the number output functionals.
void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
protectedinherited

Increments the construction counter.

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

Definition at line 185 of file reference_counter.h.

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

Referenced by libMesh::ReferenceCounter::n_objects(), and libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

186 {
187  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
188  std::pair<unsigned int, unsigned int> & p = _counts[name];
189 
190  p.first++;
191 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:39
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:29
static Counts _counts
Actually holds the data.
void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
protectedinherited

Increments the destruction counter.

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

Definition at line 198 of file reference_counter.h.

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

Referenced by libMesh::ReferenceCounter::n_objects(), and libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

199 {
200  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
201  std::pair<unsigned int, unsigned int> & p = _counts[name];
202 
203  p.second++;
204 }
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:39
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.
Definition: threads.C:29
static Counts _counts
Actually holds the data.
static unsigned int libMesh::ReferenceCounter::n_objects ( )
staticinherited
void RBAssemblyExpansion::perform_A_boundary_assembly ( unsigned int  q,
FEMContext context 
)
inherited

Perform the specified A boundary assembly.

Definition at line 45 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector, libMesh::RBAssemblyExpansion::get_n_A_terms(), and libMesh::libmesh_assert().

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

47 {
48  if (q >= get_n_A_terms())
49  libmesh_error_msg("Error: We must have q < get_n_A_terms in perform_A_boundary_assembly.");
50 
52 
53  return _A_assembly_vector[q]->boundary_assembly( context );
54 }
libmesh_assert(j)
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
unsigned int get_n_A_terms() const
Get Q_a, the number of terms in the affine expansion for the bilinear form.
void RBAssemblyExpansion::perform_A_interior_assembly ( unsigned int  q,
FEMContext context 
)
inherited

Perform the specified A interior assembly.

Definition at line 34 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector, libMesh::RBAssemblyExpansion::get_n_A_terms(), and libMesh::libmesh_assert().

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

36 {
37  if (q >= get_n_A_terms())
38  libmesh_error_msg("Error: We must have q < get_n_A_terms in perform_A_interior_assembly.");
39 
41 
42  return _A_assembly_vector[q]->interior_assembly( context );
43 }
libmesh_assert(j)
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
unsigned int get_n_A_terms() const
Get Q_a, the number of terms in the affine expansion for the bilinear form.
void RBAssemblyExpansion::perform_F_boundary_assembly ( unsigned int  q,
FEMContext context 
)
inherited

Perform the specified F boundary assembly.

Definition at line 67 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector, libMesh::RBAssemblyExpansion::_F_assembly_vector, libMesh::RBAssemblyExpansion::get_n_F_terms(), and libMesh::libmesh_assert().

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

69 {
70  if (q >= get_n_F_terms())
71  libmesh_error_msg("Error: We must have q < get_n_F_terms in perform_F_interior_assembly.");
72 
74 
75  return _F_assembly_vector[q]->boundary_assembly( context );
76 }
unsigned int get_n_F_terms() const
Get Q_f, the number of terms in the affine expansion for the right-hand side.
std::vector< ElemAssembly * > _F_assembly_vector
Vector storing the function pointers to the assembly routines for the rhs affine vectors.
libmesh_assert(j)
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
void RBAssemblyExpansion::perform_F_interior_assembly ( unsigned int  q,
FEMContext context 
)
inherited

Perform the specified F interior assembly.

Definition at line 56 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_A_assembly_vector, libMesh::RBAssemblyExpansion::_F_assembly_vector, libMesh::RBAssemblyExpansion::get_n_F_terms(), and libMesh::libmesh_assert().

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

58 {
59  if (q >= get_n_F_terms())
60  libmesh_error_msg("Error: We must have q < get_n_F_terms in perform_F_interior_assembly.");
61 
63 
64  return _F_assembly_vector[q]->interior_assembly( context );
65 }
unsigned int get_n_F_terms() const
Get Q_f, the number of terms in the affine expansion for the right-hand side.
std::vector< ElemAssembly * > _F_assembly_vector
Vector storing the function pointers to the assembly routines for the rhs affine vectors.
libmesh_assert(j)
std::vector< ElemAssembly * > _A_assembly_vector
Vectors storing the function pointers to the assembly routines for the affine operators, both interior and boundary assembly.
void libMesh::TransientRBAssemblyExpansion::perform_M_boundary_assembly ( unsigned int  q,
FEMContext context 
)

Perform the specified M boundary assembly.

Definition at line 45 of file transient_rb_assembly_expansion.C.

References _M_assembly_vector, get_n_M_terms(), and libMesh::libmesh_assert().

47 {
48  if (q >= get_n_M_terms())
49  libmesh_error_msg("Error: We must have q < get_n_M_terms in perform_M_boundary_assembly.");
50 
52 
53  return _M_assembly_vector[q]->boundary_assembly( context );
54 }
libmesh_assert(j)
std::vector< ElemAssembly * > _M_assembly_vector
Vectors storing the function pointers to the assembly routines for the time-derivative operators...
unsigned int get_n_M_terms() const
Get Q_m, the number of terms in the affine expansion for the bilinear form.
void libMesh::TransientRBAssemblyExpansion::perform_M_interior_assembly ( unsigned int  q,
FEMContext context 
)

Perform the specified M interior assembly.

Definition at line 34 of file transient_rb_assembly_expansion.C.

References _M_assembly_vector, get_n_M_terms(), and libMesh::libmesh_assert().

36 {
37  if (q >= get_n_M_terms())
38  libmesh_error_msg("Error: We must have q < get_n_M_terms in perform_M_interior_assembly.");
39 
41 
42  return _M_assembly_vector[q]->interior_assembly( context );
43 }
libmesh_assert(j)
std::vector< ElemAssembly * > _M_assembly_vector
Vectors storing the function pointers to the assembly routines for the time-derivative operators...
unsigned int get_n_M_terms() const
Get Q_m, the number of terms in the affine expansion for the bilinear form.
void RBAssemblyExpansion::perform_output_boundary_assembly ( unsigned int  output_index,
unsigned int  q_l,
FEMContext context 
)
inherited

Perform the specified output assembly.

Definition at line 91 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_output_assembly_vector, libMesh::RBAssemblyExpansion::get_n_output_terms(), libMesh::RBAssemblyExpansion::get_n_outputs(), and libMesh::libmesh_assert().

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

94 {
95  if ((output_index >= get_n_outputs()) || (q_l >= get_n_output_terms(output_index)))
96  libmesh_error_msg("Error: We must have output_index < n_outputs and " \
97  << "q_l < get_n_output_terms(output_index) in perform_output_boundary_assembly.");
98 
99  libmesh_assert(_output_assembly_vector[output_index][q_l]);
100 
101  return _output_assembly_vector[output_index][q_l]->boundary_assembly(context);
102 }
unsigned int get_n_output_terms(unsigned int output_index) const
Get the number of affine terms associated with the specified output.
libmesh_assert(j)
std::vector< std::vector< ElemAssembly * > > _output_assembly_vector
Vector storing the function pointers to the assembly routines for the outputs.
unsigned int get_n_outputs() const
Get n_outputs, the number output functionals.
void RBAssemblyExpansion::perform_output_interior_assembly ( unsigned int  output_index,
unsigned int  q_l,
FEMContext context 
)
inherited

Perform the specified output assembly.

Definition at line 78 of file rb_assembly_expansion.C.

References libMesh::RBAssemblyExpansion::_output_assembly_vector, libMesh::RBAssemblyExpansion::get_n_output_terms(), libMesh::RBAssemblyExpansion::get_n_outputs(), and libMesh::libmesh_assert().

Referenced by libMesh::RBAssemblyExpansion::~RBAssemblyExpansion().

81 {
82  if ((output_index >= get_n_outputs()) || (q_l >= get_n_output_terms(output_index)))
83  libmesh_error_msg("Error: We must have output_index < n_outputs and " \
84  << "q_l < get_n_output_terms(output_index) in perform_output_interior_assembly.");
85 
86  libmesh_assert(_output_assembly_vector[output_index][q_l]);
87 
88  return _output_assembly_vector[output_index][q_l]->interior_assembly(context);
89 }
unsigned int get_n_output_terms(unsigned int output_index) const
Get the number of affine terms associated with the specified output.
libmesh_assert(j)
std::vector< std::vector< ElemAssembly * > > _output_assembly_vector
Vector storing the function pointers to the assembly routines for the outputs.
unsigned int get_n_outputs() const
Get n_outputs, the number output functionals.
void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

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

Definition at line 88 of file reference_counter.C.

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

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

89 {
91  out_stream << ReferenceCounter::get_info();
92 }
static std::string get_info()
Gets a string containing the reference information.
static bool _enable_print_counter
Flag to control whether reference count information is printed when print_info is called...

Member Data Documentation

ReferenceCounter::Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited
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 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().

std::vector<ElemAssembly *> libMesh::TransientRBAssemblyExpansion::_M_assembly_vector
private

Vectors storing the function pointers to the assembly routines for the time-derivative operators, both interior and boundary assembly.

Definition at line 85 of file transient_rb_assembly_expansion.h.

Referenced by attach_M_assembly(), get_M_assembly(), get_n_M_terms(), perform_M_boundary_assembly(), and perform_M_interior_assembly().

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

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 137 of file reference_counter.h.

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 132 of file reference_counter.h.

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


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