From 1a380068c7495b123d75ff7e13f5f2ab352c2639 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 21 Dec 1999 14:17:34 +0000 Subject: [PATCH] Introduce the flag update_values for consistency with the other update flags. git-svn-id: https://svn.dealii.org/trunk@2103 0785d39b-7218-0410-832d-ea1e28bc413d --- .../Attic/examples/convergence/convergence.cc | 4 +- .../error-estimation/error-estimation.cc | 4 +- .../Attic/examples/multigrid/multigrid.cc | 4 +- .../fixed-point-iteration/nonlinear.cc | 4 +- .../deal.II/Attic/examples/poisson/problem.cc | 4 +- .../examples/step-by-step/step-3/step-3.cc | 9 ++-- deal.II/deal.II/include/fe/fe_update_flags.h | 30 +++++++++---- deal.II/deal.II/include/fe/fe_values.h | 1 + deal.II/deal.II/source/fe/fe_values.cc | 1 + deal.II/deal.II/source/numerics/data_io.cc | 3 +- .../deal.II/source/numerics/data_out_stack.cc | 2 +- deal.II/deal.II/source/numerics/matrices.cc | 9 ++-- deal.II/deal.II/source/numerics/vectors.cc | 7 +++- .../doc/tutorial/chapter-1.elements/rhs.html | 8 +++- deal.II/examples/step-3/step-3.cc | 9 ++-- tests/big-tests/convergence/convergence.cc | 4 +- .../error-estimation/error-estimation.cc | 4 +- tests/big-tests/multigrid/multigrid.cc | 4 +- .../fixed-point-iteration/nonlinear.cc | 4 +- tests/big-tests/poisson/problem.cc | 4 +- tests/deal.II/wave-test-3.cc | 42 ++++++++++++------- tests/fe/show_shapes.cc | 2 +- tests/fe/show_transform.cc | 2 +- 23 files changed, 106 insertions(+), 59 deletions(-) diff --git a/deal.II/deal.II/Attic/examples/convergence/convergence.cc b/deal.II/deal.II/Attic/examples/convergence/convergence.cc index 3b09adeaed..d972b01fbd 100644 --- a/deal.II/deal.II/Attic/examples/convergence/convergence.cc +++ b/deal.II/deal.II/Attic/examples/convergence/convergence.cc @@ -335,8 +335,8 @@ int PoissonProblem::run (const unsigned int level) { n_dofs.push_back (dof->n_dofs()); cout << " Assembling matrices..." << endl; - UpdateFlags update_flags = UpdateFlags(update_q_points | update_gradients | - update_JxW_values); + UpdateFlags update_flags = UpdateFlags(update_values | update_q_points | + update_gradients | update_JxW_values); ProblemBase::FunctionMap dirichlet_bc; dirichlet_bc[0] = boundary_values; diff --git a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc index 2aa1b4e5da..bde0cea6a5 100644 --- a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc +++ b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc @@ -484,8 +484,8 @@ void PoissonProblem::run (ParameterHandler &prm) { n_dofs.push_back (dof->n_dofs()); cout << " Assembling matrices..." << endl; - UpdateFlags update_flags = UpdateFlags(update_q_points | update_gradients | - update_JxW_values); + UpdateFlags update_flags = UpdateFlags(update_values | update_q_points | + update_gradients | update_JxW_values); ProblemBase::FunctionMap dirichlet_bc; dirichlet_bc[0] = solution_function; diff --git a/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc b/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc index 2341d34c14..bdc538b84a 100644 --- a/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc +++ b/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc @@ -503,8 +503,8 @@ int PoissonProblem::run (const unsigned int level) { n_dofs.push_back (dof->DoFHandler::n_dofs()); cout << " Assembling matrices..." << endl; - UpdateFlags update_flags = UpdateFlags(update_q_points | update_gradients | - update_JxW_values); + UpdateFlags update_flags = UpdateFlags(update_values | update_q_points | + update_gradients | update_JxW_values); map*> dirichlet_bc; dirichlet_bc[0] = boundary_values; diff --git a/deal.II/deal.II/Attic/examples/nonlinear/fixed-point-iteration/nonlinear.cc b/deal.II/deal.II/Attic/examples/nonlinear/fixed-point-iteration/nonlinear.cc index ea02510cb5..30155302fa 100644 --- a/deal.II/deal.II/Attic/examples/nonlinear/fixed-point-iteration/nonlinear.cc +++ b/deal.II/deal.II/Attic/examples/nonlinear/fixed-point-iteration/nonlinear.cc @@ -199,8 +199,8 @@ void NonlinearProblem::run () { cout << " Nonlinear step " << nonlinear_step << endl; cout << " Assembling matrices..." << endl; assemble (equation, quadrature, fe, - UpdateFlags(update_gradients | update_JxW_values | - update_q_points), + UpdateFlags(update_values | update_gradients | + update_JxW_values | update_q_points), dirichlet_bc); cout << " Solving..." << endl; diff --git a/deal.II/deal.II/Attic/examples/poisson/problem.cc b/deal.II/deal.II/Attic/examples/poisson/problem.cc index f867e12661..309a056b64 100644 --- a/deal.II/deal.II/Attic/examples/poisson/problem.cc +++ b/deal.II/deal.II/Attic/examples/poisson/problem.cc @@ -589,8 +589,8 @@ void PoissonProblem::run (ParameterHandler &prm) { ProblemBase::FunctionMap dirichlet_bc; dirichlet_bc[0] = boundary_values; assemble (equation, quadrature, - UpdateFlags(update_gradients | update_JxW_values | - update_q_points), + UpdateFlags(update_values | update_gradients | + update_JxW_values | update_q_points), dirichlet_bc); cout << " Solving..." << endl; diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc b/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc index 25178f6044..0e0403cabf 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc @@ -336,8 +336,10 @@ void LaplaceProblem::assemble_system () // transformations from the unit // cell to the real cells. The // values of the shape functions - // are always computed, so we don't - // have to list them. The + // computed by specifying + // update_values; the gradients are + // done alike, using + // update_gradients. The // determinants of the Jacobians // and the weights are always used // together, so only the products @@ -346,7 +348,8 @@ void LaplaceProblem::assemble_system () // we also need them, we have to // list them as well: FEValues<2> fe_values (fe, quadrature_formula, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_JxW_values)); // For use further down below, we diff --git a/deal.II/deal.II/include/fe/fe_update_flags.h b/deal.II/deal.II/include/fe/fe_update_flags.h index 793211f699..4c2ec388ce 100644 --- a/deal.II/deal.II/include/fe/fe_update_flags.h +++ b/deal.II/deal.II/include/fe/fe_update_flags.h @@ -21,28 +21,44 @@ enum UpdateFlags { * Default: update nothing. */ update_default = 0, + /** + * Compute the values of the + * shape functions at the + * quadrature points on the + * real space cell. For the + * usual Lagrange elements, + * these values are equal to + * the values of the shape + * functions at the quadrature + * points on the unit cell, but + * they are different for more + * complicated elements, such + * as BDM or Raviart-Thomas + * elements. + */ + update_values = 1, /** * Compute quadrature points in real * space (not on unit cell). */ - update_q_points = 1, + update_q_points = 2, /** * Transform gradients on unit cell to * gradients on real cell. */ - update_gradients = 2, + update_gradients = 4, /** * Compute jacobian matrices of the * transform between unit and real cell * in the evaluation points. */ - update_jacobians = 4, + update_jacobians = 8, /** * Compute the JxW values (Jacobian * determinant at the quadrature point * times the weight of this point). */ - update_JxW_values = 8, + update_JxW_values = 16, /** * Compute the points on the real cell * on which the trial functions are @@ -53,7 +69,7 @@ enum UpdateFlags { * in an error, since support points are * not useful in that case. */ - update_support_points = 16, + update_support_points = 32, /** * Update the outward normal vectors * to the face relative to this cell. @@ -65,13 +81,13 @@ enum UpdateFlags { * an error, since normal vectors are * not useful in that case. */ - update_normal_vectors = 32, + update_normal_vectors = 64, /** * Update the second derivatives of the * shape functions on the real cell. */ - update_second_derivatives = 64 + update_second_derivatives = 128 }; diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index db369ffef5..1bae229f37 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -1227,6 +1227,7 @@ template inline const FullMatrix & FEValuesBase::get_shape_values () const { + Assert (update_flags & update_values, ExcAccessToUninitializedField()); Assert (selected_dataset::FEValuesBase (const unsigned int n_q_points, template double FEValuesBase::shape_value (const unsigned int i, const unsigned int j) const { + Assert (update_flags & update_values, ExcAccessToUninitializedField()); Assert (selected_dataset::write_gnuplot (ostream &out, unsigned int accuracy) const QTrapez<1> q_trapez; QIterated points (q_trapez, accuracy); - FEValues fe(dofs->get_fe(), points, UpdateFlags(update_q_points)); + FEValues fe(dofs->get_fe(), points, + UpdateFlags(update_values | update_q_points)); vector< vector > > values (dof_data.size(), vector< Vector >(points.n_quadrature_points, diff --git a/deal.II/deal.II/source/numerics/data_out_stack.cc b/deal.II/deal.II/source/numerics/data_out_stack.cc index 45e38031ff..70b23947f3 100644 --- a/deal.II/deal.II/source/numerics/data_out_stack.cc +++ b/deal.II/deal.II/source/numerics/data_out_stack.cc @@ -193,7 +193,7 @@ void DataOutStack::build_patches (const unsigned int n_subdivisions) QIterated patch_points (q_trapez, n_subdivisions); FEValues fe_patch_values (dof_handler->get_fe(), patch_points, - update_default); + update_values); const unsigned int n_q_points = patch_points.n_quadrature_points; vector patch_values (n_q_points); vector > patch_values_system (n_q_points, diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index d57cf1c2ae..40026511fd 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -25,7 +25,7 @@ void MatrixCreator::create_mass_matrix (const DoFHandler &dof, SparseMatrix &matrix, const Function * const a) { Vector dummy; // no entries, should give an error if accessed - UpdateFlags update_flags = update_JxW_values; + UpdateFlags update_flags = UpdateFlags(update_values | update_JxW_values); if (a != 0) update_flags = UpdateFlags (update_flags | update_q_points); const Assembler::AssemblerData data (dof, @@ -55,7 +55,8 @@ void MatrixCreator::create_mass_matrix (const DoFHandler &dof, const Function &rhs, Vector &rhs_vector, const Function * const a) { - UpdateFlags update_flags = UpdateFlags(update_q_points | + UpdateFlags update_flags = UpdateFlags(update_values | + update_q_points | update_JxW_values); const Assembler::AssemblerData data (dof, true, true, @@ -150,7 +151,9 @@ void MatrixCreator::create_boundary_mass_matrix (const DoFHandler & Vector cell_vector(dofs_per_cell); - UpdateFlags update_flags = UpdateFlags (update_JxW_values | update_q_points); + UpdateFlags update_flags = UpdateFlags (update_values | + update_JxW_values | + update_q_points); FEFaceValues fe_values (fe, q, update_flags); // two variables for the coefficient, diff --git a/deal.II/deal.II/source/numerics/vectors.cc b/deal.II/deal.II/source/numerics/vectors.cc index 85d464b889..b98221083d 100644 --- a/deal.II/deal.II/source/numerics/vectors.cc +++ b/deal.II/deal.II/source/numerics/vectors.cc @@ -439,7 +439,8 @@ void VectorTools::create_right_hand_side (const DoFHandler &dof, Assert (dof.get_fe().n_components() == rhs.n_components, ExcComponentMismatch()); - UpdateFlags update_flags = UpdateFlags(update_q_points | + UpdateFlags update_flags = UpdateFlags(update_values | + update_q_points | update_JxW_values); SparseMatrix dummy; const Assembler::AssemblerData data (dof, @@ -735,8 +736,12 @@ VectorTools::integrate_difference (const DoFHandler &dof, UpdateFlags update_flags = UpdateFlags (update_q_points | update_JxW_values); + if (norm != H1_seminorm) + update_flags != update_values; + if ((norm==H1_seminorm) || (norm==H1_norm)) update_flags = UpdateFlags (update_flags | update_gradients); + FEValues fe_values(fe, q, update_flags); vector< Vector > function_values (n_q_points, diff --git a/deal.II/doc/tutorial/chapter-1.elements/rhs.html b/deal.II/doc/tutorial/chapter-1.elements/rhs.html index 82c97e25c5..d95986bfb1 100644 --- a/deal.II/doc/tutorial/chapter-1.elements/rhs.html +++ b/deal.II/doc/tutorial/chapter-1.elements/rhs.html @@ -55,9 +55,13 @@ quadrature points. // Initialize the trial functions on the cell faces. FEValues<2> fe_values(fe, quadrature, - UpdateFlags(update_gradients | update_JxW_values)); + UpdateFlags(update_values | + update_gradients | + update_JxW_values)); FEFaceValues<2> fe_face_values (fe, face_quadrature, - UpdateFlags(update_JxW_values | update_q_points)); + UpdateFlags(update_values | + update_JxW_values | + update_q_points)); diff --git a/deal.II/examples/step-3/step-3.cc b/deal.II/examples/step-3/step-3.cc index 25178f6044..0e0403cabf 100644 --- a/deal.II/examples/step-3/step-3.cc +++ b/deal.II/examples/step-3/step-3.cc @@ -336,8 +336,10 @@ void LaplaceProblem::assemble_system () // transformations from the unit // cell to the real cells. The // values of the shape functions - // are always computed, so we don't - // have to list them. The + // computed by specifying + // update_values; the gradients are + // done alike, using + // update_gradients. The // determinants of the Jacobians // and the weights are always used // together, so only the products @@ -346,7 +348,8 @@ void LaplaceProblem::assemble_system () // we also need them, we have to // list them as well: FEValues<2> fe_values (fe, quadrature_formula, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_JxW_values)); // For use further down below, we diff --git a/tests/big-tests/convergence/convergence.cc b/tests/big-tests/convergence/convergence.cc index 3b09adeaed..d972b01fbd 100644 --- a/tests/big-tests/convergence/convergence.cc +++ b/tests/big-tests/convergence/convergence.cc @@ -335,8 +335,8 @@ int PoissonProblem::run (const unsigned int level) { n_dofs.push_back (dof->n_dofs()); cout << " Assembling matrices..." << endl; - UpdateFlags update_flags = UpdateFlags(update_q_points | update_gradients | - update_JxW_values); + UpdateFlags update_flags = UpdateFlags(update_values | update_q_points | + update_gradients | update_JxW_values); ProblemBase::FunctionMap dirichlet_bc; dirichlet_bc[0] = boundary_values; diff --git a/tests/big-tests/error-estimation/error-estimation.cc b/tests/big-tests/error-estimation/error-estimation.cc index 2aa1b4e5da..bde0cea6a5 100644 --- a/tests/big-tests/error-estimation/error-estimation.cc +++ b/tests/big-tests/error-estimation/error-estimation.cc @@ -484,8 +484,8 @@ void PoissonProblem::run (ParameterHandler &prm) { n_dofs.push_back (dof->n_dofs()); cout << " Assembling matrices..." << endl; - UpdateFlags update_flags = UpdateFlags(update_q_points | update_gradients | - update_JxW_values); + UpdateFlags update_flags = UpdateFlags(update_values | update_q_points | + update_gradients | update_JxW_values); ProblemBase::FunctionMap dirichlet_bc; dirichlet_bc[0] = solution_function; diff --git a/tests/big-tests/multigrid/multigrid.cc b/tests/big-tests/multigrid/multigrid.cc index 2341d34c14..bdc538b84a 100644 --- a/tests/big-tests/multigrid/multigrid.cc +++ b/tests/big-tests/multigrid/multigrid.cc @@ -503,8 +503,8 @@ int PoissonProblem::run (const unsigned int level) { n_dofs.push_back (dof->DoFHandler::n_dofs()); cout << " Assembling matrices..." << endl; - UpdateFlags update_flags = UpdateFlags(update_q_points | update_gradients | - update_JxW_values); + UpdateFlags update_flags = UpdateFlags(update_values | update_q_points | + update_gradients | update_JxW_values); map*> dirichlet_bc; dirichlet_bc[0] = boundary_values; diff --git a/tests/big-tests/nonlinear/fixed-point-iteration/nonlinear.cc b/tests/big-tests/nonlinear/fixed-point-iteration/nonlinear.cc index ea02510cb5..30155302fa 100644 --- a/tests/big-tests/nonlinear/fixed-point-iteration/nonlinear.cc +++ b/tests/big-tests/nonlinear/fixed-point-iteration/nonlinear.cc @@ -199,8 +199,8 @@ void NonlinearProblem::run () { cout << " Nonlinear step " << nonlinear_step << endl; cout << " Assembling matrices..." << endl; assemble (equation, quadrature, fe, - UpdateFlags(update_gradients | update_JxW_values | - update_q_points), + UpdateFlags(update_values | update_gradients | + update_JxW_values | update_q_points), dirichlet_bc); cout << " Solving..." << endl; diff --git a/tests/big-tests/poisson/problem.cc b/tests/big-tests/poisson/problem.cc index f867e12661..309a056b64 100644 --- a/tests/big-tests/poisson/problem.cc +++ b/tests/big-tests/poisson/problem.cc @@ -589,8 +589,8 @@ void PoissonProblem::run (ParameterHandler &prm) { ProblemBase::FunctionMap dirichlet_bc; dirichlet_bc[0] = boundary_values; assemble (equation, quadrature, - UpdateFlags(update_gradients | update_JxW_values | - update_q_points), + UpdateFlags(update_values | update_gradients | + update_JxW_values | update_q_points), dirichlet_bc); cout << " Solving..." << endl; diff --git a/tests/deal.II/wave-test-3.cc b/tests/deal.II/wave-test-3.cc index 272686fcd3..ef53aef2c3 100644 --- a/tests/deal.II/wave-test-3.cc +++ b/tests/deal.II/wave-test-3.cc @@ -2122,11 +2122,12 @@ void EndEnergy::compute_vectors (const PartOfDomain pod, primal_cell = primal_dof->begin_active(); FEValues fe_values (*fe, *quadrature, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_JxW_values | update_q_points)); FEValues fe_values_primal (*primal_fe, *quadrature, - update_gradients); + UpdateFlags(update_values | update_gradients)); FullMatrix cell_matrix (dofs_per_cell, dofs_per_cell); @@ -2266,7 +2267,8 @@ void SeismicSignal::compute_functionals (Vector &j1, vector cell_dof_indices (dofs_per_cell); FEFaceValues fe_face_values (*fe, *quadrature_face, - UpdateFlags(update_JxW_values | + UpdateFlags(update_values | + update_JxW_values | update_q_points)); for (; cell!=endc; ++cell) @@ -2397,7 +2399,7 @@ void SplitSignal::compute_functionals (Vector &j1, endc = dof->end(); vector dof_indices (fe->dofs_per_cell); - FEFaceValues fe_face_values (*fe, *quadrature_face, update_JxW_values); + FEFaceValues fe_face_values (*fe, *quadrature_face, UpdateFlags(update_values | update_JxW_values)); for (; cell!=endc; ++cell) for (unsigned int face_no=0; face_no::faces_per_cell; @@ -2465,7 +2467,7 @@ void SplitLine<1>::compute_endtime_vectors (Vector &final_u_bar, DoFHandler::active_cell_iterator cell = dof->begin_active (), endc = dof->end (); - FEValues fe_values (*fe, *quadrature, update_JxW_values); + FEValues fe_values (*fe, *quadrature, UpdateFlags(update_values | update_JxW_values)); vector cell_dof_indices (dofs_per_cell); for (; cell!=endc; ++cell) @@ -2517,7 +2519,7 @@ void OneBranch1d::compute_functionals (Vector &j1, endc = dof->end(); vector dof_indices (fe->dofs_per_cell); - FEValues fe_values (*fe, *quadrature, update_JxW_values); + FEValues fe_values (*fe, *quadrature, UpdateFlags(update_values | update_JxW_values)); for (; cell!=endc; ++cell) if ((cell->center()(0) > -0.6) && @@ -2566,7 +2568,7 @@ void SecondCrossing::compute_functionals (Vector &j1, endc = dof->end(); vector dof_indices (fe->dofs_per_cell); - FEValues fe_values (*fe, *quadrature, update_JxW_values); + FEValues fe_values (*fe, *quadrature, UpdateFlags(update_values | update_JxW_values)); for (; cell!=endc; ++cell) if ((cell->center()(0) > -0.03) && @@ -2755,7 +2757,8 @@ double EvaluateEnergyContent::compute_energy (const PartOfDomain pod) const endc = dof->end (); FEValues fe_values (*fe, *quadrature, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_JxW_values | update_q_points)); FullMatrix cell_matrix (fe->dofs_per_cell, fe->dofs_per_cell); @@ -2942,7 +2945,9 @@ double EvaluateSeismicSignal::evaluate () { endc = dof->end(); double u_integrated=0; FEFaceValues face_values (*fe, *quadrature_face, - UpdateFlags(update_JxW_values|update_q_points)); + UpdateFlags(update_values | + update_JxW_values | + update_q_points)); vector face_u (fe->dofs_per_face); for (; cell!=endc; ++cell) @@ -3038,7 +3043,7 @@ double EvaluateSplitSignal::evaluate () { DoFHandler::active_cell_iterator cell = dof->begin_active(), endc = dof->end(); double u_integrated=0; - FEFaceValues face_values (*fe, *quadrature_face, update_JxW_values); + FEFaceValues face_values (*fe, *quadrature_face, UpdateFlags(update_values | update_JxW_values)); vector face_u (fe->dofs_per_face); for (; cell!=endc; ++cell) @@ -3132,7 +3137,7 @@ double EvaluateOneBranch1d<1>::evaluate () { DoFHandler<1>::active_cell_iterator cell = dof->begin_active(), endc = dof->end(); double u_integrated=0; - FEValues<1> fe_values (*fe, *quadrature, update_JxW_values); + FEValues<1> fe_values (*fe, *quadrature, UpdateFlags(update_values | update_JxW_values)); vector cell_u (fe->dofs_per_cell); for (; cell!=endc; ++cell) @@ -3209,7 +3214,8 @@ double EvaluateSecondCrossing1d<1>::evaluate () { DoFHandler<1>::active_cell_iterator cell = dof->begin_active(), endc = dof->end(); double u_integrated=0; - FEValues<1> fe_values (*fe, *quadrature, UpdateFlags(update_JxW_values | update_q_points)); + FEValues<1> fe_values (*fe, *quadrature, + UpdateFlags(update_values | update_JxW_values | update_q_points)); vector cell_u (fe->dofs_per_cell); for (; cell!=endc; ++cell) @@ -5518,7 +5524,8 @@ void TimeStep_Wave::create_matrices () FEValues fe_values (fe, quadrature, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_JxW_values | (!density_constant || !stiffness_constant ? update_q_points : @@ -6070,7 +6077,8 @@ void TimeStep_Dual::build_rhs (Vector &right_hand_side1, // is expensive to create it for // every cell FEValues fe_values (fe, quadrature, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_JxW_values | update_q_points)); @@ -6745,7 +6753,8 @@ void TimeStep_ErrorEstimation::estimate_error_dual () { { FEValues fe_values (dual_problem.fe, dual_problem.quadrature, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_second_derivatives | update_JxW_values | update_q_points)); @@ -8391,7 +8400,8 @@ void TimeStep_Primal::build_rhs (Vector &right_hand_side1, // is expensive to create it for // every cell FEValues fe_values (fe, quadrature, - UpdateFlags(update_gradients | + UpdateFlags(update_values | + update_gradients | update_JxW_values | update_q_points)); diff --git a/tests/fe/show_shapes.cc b/tests/fe/show_shapes.cc index 1ddf9d59dc..a441df0fff 100644 --- a/tests/fe/show_shapes.cc +++ b/tests/fe/show_shapes.cc @@ -25,7 +25,7 @@ plot_shape_functions(FiniteElement& finel, const char* name) QTrapez<1> q_trapez; QIterated q(q_trapez, div); - FEValues fe(finel, q, UpdateFlags(update_default)); + FEValues fe(finel, q, UpdateFlags(update_values)); sprintf(fname, "%s.dat", name); ofstream gnuplot(fname); diff --git a/tests/fe/show_transform.cc b/tests/fe/show_transform.cc index 8e0dd377be..d48c8809d3 100644 --- a/tests/fe/show_transform.cc +++ b/tests/fe/show_transform.cc @@ -28,7 +28,7 @@ plot_transformation(FiniteElement& finel, QTrapez<1> q_trapez; QIterated q(q_trapez, div); FEValues fe(finel, q, - UpdateFlags(update_q_points | update_JxW_values)); + UpdateFlags(update_values | update_q_points | update_JxW_values)); fe.reinit(c); -- 2.39.5