Skip to content

Commit 5a12fc5

Browse files
committed
Fix vector_fe_ex9 with --enable-complex
We're apparently not hitting this in our --enable-complex CI?
1 parent 40c3658 commit 5a12fc5

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

examples/vector_fe/vector_fe_ex9/hdg_problem.C

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,17 @@ HDGProblem::vector_volume_jacobian(DenseMatrix<Number> & Jqq, DenseMatrix<Number
175175
}
176176
}
177177

178-
RealVectorValue
178+
NumberVectorValue
179179
HDGProblem::vel_cross_vel_residual(const std::vector<Number> & u_sol_local,
180180
const std::vector<Number> & v_sol_local,
181181
const unsigned int qp,
182182
const unsigned int vel_component) const
183183
{
184-
const RealVectorValue U(u_sol_local[qp], v_sol_local[qp]);
184+
const NumberVectorValue U(u_sol_local[qp], v_sol_local[qp]);
185185
return U * U(vel_component);
186186
}
187187

188-
RealVectorValue
188+
NumberVectorValue
189189
HDGProblem::vel_cross_vel_jacobian(const std::vector<Number> & u_sol_local,
190190
const std::vector<Number> & v_sol_local,
191191
const unsigned int qp,
@@ -194,8 +194,8 @@ HDGProblem::vel_cross_vel_jacobian(const std::vector<Number> & u_sol_local,
194194
const std::vector<std::vector<Real>> & phi,
195195
const unsigned int j) const
196196
{
197-
const RealVectorValue U(u_sol_local[qp], v_sol_local[qp]);
198-
RealVectorValue vector_phi_local;
197+
const NumberVectorValue U(u_sol_local[qp], v_sol_local[qp]);
198+
NumberVectorValue vector_phi_local;
199199
vector_phi_local(vel_j_component) = phi[j][qp];
200200
auto ret = vector_phi_local * U(vel_component);
201201
if (vel_component == vel_j_component)
@@ -318,11 +318,11 @@ HDGProblem::pressure_volume_jacobian(DenseMatrix<Number> & Jpu,
318318
for (const auto j : make_range(scalar_n_dofs))
319319
{
320320
{
321-
const Gradient phi((*scalar_phi)[j][qp], 0);
321+
const Gradient phi((*scalar_phi)[j][qp], Number(0));
322322
Jpu(i, j) -= (*JxW)[qp] * ((*grad_scalar_phi)[i][qp] * phi);
323323
}
324324
{
325-
const Gradient phi(0, (*scalar_phi)[j][qp]);
325+
const Gradient phi(Number(0), (*scalar_phi)[j][qp]);
326326
Jpv(i, j) -= (*JxW)[qp] * ((*grad_scalar_phi)[i][qp] * phi);
327327
}
328328
}
@@ -359,11 +359,11 @@ HDGProblem::pressure_face_jacobian(DenseMatrix<Number> & Jplm_u, DenseMatrix<Num
359359
for (const auto j : make_range(lm_n_dofs))
360360
{
361361
{
362-
const Gradient phi((*lm_phi_face)[j][qp], 0);
362+
const Gradient phi((*lm_phi_face)[j][qp], Number(0));
363363
Jplm_u(i, j) += (*JxW_face)[qp] * phi * (*normals)[qp] * (*scalar_phi_face)[i][qp];
364364
}
365365
{
366-
const Gradient phi(0, (*lm_phi_face)[j][qp]);
366+
const Gradient phi(Number(0), (*lm_phi_face)[j][qp]);
367367
Jplm_v(i, j) += (*JxW_face)[qp] * phi * (*normals)[qp] * (*scalar_phi_face)[i][qp];
368368
}
369369
}

examples/vector_fe/vector_fe_ex9/hdg_problem.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,18 +114,18 @@ class HDGProblem : public NonlinearImplicitSystem::ComputeResidual,
114114

115115
void vector_volume_jacobian(DenseMatrix<Number> & Jqq, DenseMatrix<Number> & Jqs);
116116

117-
RealVectorValue vel_cross_vel_residual(const std::vector<Number> & u_sol_local,
118-
const std::vector<Number> & v_sol_local,
119-
const unsigned int qp,
120-
const unsigned int vel_component) const;
121-
122-
RealVectorValue vel_cross_vel_jacobian(const std::vector<Number> & u_sol_local,
123-
const std::vector<Number> & v_sol_local,
124-
const unsigned int qp,
125-
const unsigned int vel_component,
126-
const unsigned int vel_j_component,
127-
const std::vector<std::vector<Real>> & phi,
128-
const unsigned int j) const;
117+
NumberVectorValue vel_cross_vel_residual(const std::vector<Number> & u_sol_local,
118+
const std::vector<Number> & v_sol_local,
119+
const unsigned int qp,
120+
const unsigned int vel_component) const;
121+
122+
NumberVectorValue vel_cross_vel_jacobian(const std::vector<Number> & u_sol_local,
123+
const std::vector<Number> & v_sol_local,
124+
const unsigned int qp,
125+
const unsigned int vel_component,
126+
const unsigned int vel_j_component,
127+
const std::vector<std::vector<Real>> & phi,
128+
const unsigned int j) const;
129129

130130
void scalar_volume_residual(const std::vector<Gradient> & vel_gradient,
131131
const unsigned int vel_component,

0 commit comments

Comments
 (0)