21 #include "libmesh/rb_theta_expansion.h" 22 #include "libmesh/rb_theta.h" 23 #include "libmesh/rb_parameters.h" 26 #include "libmesh/int_range.h" 33 return cast_int<unsigned int>
39 return cast_int<unsigned int>
45 return cast_int<unsigned int>
51 libmesh_error_msg_if(index >=
get_n_outputs(),
"Error: We must have index < n_outputs in get_Q_l.");
53 return cast_int<unsigned int>
68 unsigned int index = q_l;
86 for (std::size_t i=0; i<theta_q_a.size(); i++)
102 for (std::size_t i=0; i<theta_q_f.size(); i++)
111 std::vector<RBTheta *> theta_q_l_ptr;
112 for(std::size_t i=0; i<theta_q_l.size(); i++)
114 theta_q_l_ptr.push_back( theta_q_l[i].
get() );
128 std::vector<RBTheta *> theta_l_vector(1);
129 theta_l_vector[0] = theta_q_l;
137 libmesh_error_msg_if(q >=
get_n_A_terms(),
"Error: We must have q < get_n_A_terms in eval_A_theta.");
144 const std::vector<RBParameters> & mus)
const 146 libmesh_error_msg_if(q >=
get_n_A_terms(),
"Error: We must have q < get_n_A_terms in eval_A_theta.");
155 libmesh_error_msg_if(q >=
get_n_F_terms(),
"Error: We must have q < get_n_F_terms in eval_F_theta.");
162 const std::vector<RBParameters> & mus)
const 164 libmesh_error_msg_if(q >=
get_n_F_terms(),
"Error: We must have q < get_n_F_terms in eval_F_theta.");
175 "Error: We must have output_index < n_outputs and " 176 "q_l < get_n_output_terms(output_index) in eval_output_theta.");
186 const std::vector<RBParameters> & mus)
const 189 "Error: We must have output_index < n_outputs and " 190 "q_l < get_n_output_terms(output_index) in eval_output_theta.");
std::vector< RBTheta * > _A_theta_vector
Vector storing the pointers to the RBTheta functors for A.
virtual Number eval_output_theta(unsigned int output_index, unsigned int q_l, const RBParameters &mu) const
Evaluate theta_q_l at the current parameter.
virtual Number eval_A_theta(unsigned int q, const RBParameters &mu) const
Evaluate theta_q_a at the current parameter.
unsigned int get_n_F_terms() const
Get Q_f, the number of terms in the affine expansion for the right-hand side.
unsigned int get_n_A_terms() const
Get Q_a, the number of terms in the affine expansion for the bilinear form.
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...
The libMesh namespace provides an interface to certain functionality in the library.
unsigned int output_index_1D(unsigned int n, unsigned int q_l) const
Computes the one-dimensional index for output n, term q_l implied by a "row-major" ordering of the ou...
unsigned int get_n_outputs() const
Get n_outputs, the number output functionals.
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.
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...
std::vector< RBTheta * > _F_theta_vector
Vector storing the RBTheta functors for the affine expansion of the rhs.
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.
virtual Number eval_F_theta(unsigned int q, const RBParameters &mu) const
Evaluate theta_q_f at the current parameter.
std::vector< std::vector< RBTheta * > > _output_theta_vector
Vector storing the RBTheta functors for the affine expansion of the outputs.
This class is part of the rbOOmit framework.
unsigned int get_n_output_terms(unsigned int output_index) const
Get the number of affine terms associated with the specified output.
unsigned int get_total_n_output_terms() const
Returns the total number of affine terms associated with all outputs.
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
This class is part of the rbOOmit framework.
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.