4 #if defined(LIBMESH_HAVE_SLEPC) && defined(LIBMESH_HAVE_GLPK)
6 #include "libmesh/sparse_matrix.h"
7 #include "libmesh/numeric_vector.h"
8 #include "libmesh/dense_matrix.h"
9 #include "libmesh/dense_vector.h"
10 #include "libmesh/fe.h"
11 #include "libmesh/fe_interface.h"
12 #include "libmesh/fe_base.h"
13 #include "libmesh/elem_assembly.h"
14 #include "libmesh/quadrature_gauss.h"
17 #include "libmesh/rb_theta.h"
18 #include "libmesh/rb_assembly_expansion.h"
44 const unsigned int u_var = 0;
46 FEBase * elem_fe =
nullptr;
49 const std::vector<Real> & JxW = elem_fe->get_JxW();
51 const std::vector<std::vector<Real>> & phi = elem_fe->get_phi();
55 const std::vector<std::vector<RealGradient>> & dphi = elem_fe->get_dphi();
63 for (
unsigned int qp=0; qp != n_qpoints; qp++)
64 for (
unsigned int i=0; i != n_u_dofs; i++)
65 for (
unsigned int j=0; j != n_u_dofs; j++)
66 c.
get_elem_jacobian()(i,j) += JxW[qp] * (phi[j][qp]*phi[i][qp] + dphi[j][qp]*dphi[i][qp]);
76 const unsigned int u_var = 0;
78 FEBase * elem_fe =
nullptr;
81 const std::vector<Real> & JxW = elem_fe->get_JxW();
85 const std::vector<std::vector<RealGradient>> & dphi = elem_fe->get_dphi();
98 if ((min_x <= centroid(0)) && (centroid(0) < max_x))
99 for (
unsigned int qp=0; qp != n_qpoints; qp++)
100 for (
unsigned int i=0; i != n_u_dofs; i++)
101 for (
unsigned int j=0; j != n_u_dofs; j++)
111 const unsigned int u_var = 0;
113 FEBase * elem_fe =
nullptr;
116 const std::vector<Real> & JxW = elem_fe->get_JxW();
120 const std::vector<std::vector<RealGradient>> & dphi = elem_fe->get_dphi();
133 if ((min_x <= centroid(0)) && (centroid(0) <= max_x))
134 for (
unsigned int qp=0; qp != n_qpoints; qp++)
135 for (
unsigned int i=0; i != n_u_dofs; i++)
136 for (
unsigned int j=0; j != n_u_dofs; j++)
146 const unsigned int u_var = 0;
148 FEBase * elem_fe =
nullptr;
151 const std::vector<Real> & JxW = elem_fe->get_JxW();
153 const std::vector<std::vector<Real>> & phi = elem_fe->get_phi();
155 const std::vector<std::vector<RealGradient>> & dphi = elem_fe->get_dphi();
163 for (
unsigned int qp=0; qp != n_qpoints; qp++)
164 for (
unsigned int i=0; i != n_u_dofs; i++)
165 for (
unsigned int j=0; j != n_u_dofs; j++)
176 const unsigned int u_var = 0;
178 FEBase * elem_fe =
nullptr;
181 const std::vector<Real> & JxW = elem_fe->get_JxW();
183 const std::vector<std::vector<Real>> & phi = elem_fe->get_phi();
191 for (
unsigned int qp=0; qp != n_qpoints; qp++)
192 for (
unsigned int i=0; i != n_u_dofs; i++)
210 const unsigned int u_var = 0;
212 FEBase * elem_fe =
nullptr;
215 const std::vector<Real> & JxW = elem_fe->get_JxW();
217 const std::vector<std::vector<Real>> & phi = elem_fe->get_phi();
228 if ((
min_x <= centroid(0)) && (centroid(0) <=
max_x) &&
229 (
min_y <= centroid(1)) && (centroid(1) <=
max_y))
230 for (
unsigned int qp=0; qp != n_qpoints; qp++)
231 for (
unsigned int i=0; i != n_u_dofs; i++)
277 L0(0.72, 0.88, 0.72, 0.88),
278 L1(0.12, 0.28, 0.72, 0.88),
279 L2(0.12, 0.28, 0.12, 0.28),
280 L3(0.72, 0.88, 0.12, 0.28)
289 attach_output_assembly(&
L0);
290 attach_output_assembly(&
L1);
291 attach_output_assembly(&
L2);
292 attach_output_assembly(&
L3);
307 #endif // LIBMESH_HAVE_SLEPC && LIBMESH_HAVE_GLPK