From e861af750ff5bc551eec23e79b906c472a9ae9cf Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 18 Jul 2022 17:48:30 -0600 Subject: [PATCH] Fix some code gallery programs. This is not enough to make all of them compile, much less compile without warning. But it is a step. --- Distributed_LDG_Method/LDGPoisson.cc | 8 ++-- ElastoplasticTorsion/ElastoplasticTorsion.cc | 6 +-- .../Linear_active_muscle_model.cc | 12 ++--- MCMC-Laplace/mcmc-laplace.cc | 2 +- .../mfmfe.cc | 6 +-- .../navier_stokes_TRBDF2_DG.cc | 4 +- .../nonlinear-poro-viscoelasticity.cc | 44 +++++++++--------- .../cook_membrane.cc | 4 +- .../viscoelastic_strip_with_hole.cc | 39 ++++++++-------- .../source/DG_advection_reaction.cc | 4 +- cdr/solver/cdr.cc | 2 +- .../elastoplastic.cc | 18 ++++---- two_phase_flow/MultiPhase.cc | 46 +++++++++---------- two_phase_flow/TestLevelSet.cc | 2 +- two_phase_flow/utilities.cc | 8 ++-- 15 files changed, 101 insertions(+), 104 deletions(-) diff --git a/Distributed_LDG_Method/LDGPoisson.cc b/Distributed_LDG_Method/LDGPoisson.cc index 5db57a2..3fd0b1f 100644 --- a/Distributed_LDG_Method/LDGPoisson.cc +++ b/Distributed_LDG_Method/LDGPoisson.cc @@ -330,8 +330,8 @@ make_dofs() DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs); - std::vector dofs_per_component(dim+1); - DoFTools::count_dofs_per_component(dof_handler, dofs_per_component); + const std::vector dofs_per_component = + DoFTools::count_dofs_per_fe_component(dof_handler); // Discontinuous Galerkin methods are fantanistic methods in part because // many of the limitations of traditional finite element methods no longer @@ -360,7 +360,7 @@ make_dofs() dsp); SparsityTools::distribute_sparsity_pattern(dsp, - dof_handler.n_locally_owned_dofs_per_processor(), + dof_handler.locally_owned_dofs(), MPI_COMM_WORLD, locally_relevant_dofs); @@ -641,7 +641,7 @@ assemble_system() // compute the interior fluxes across the children faces // and the neighbor's face. for (unsigned int subface_no=0; - subface_no < face->number_of_children(); + subface_no < face->n_children(); ++subface_no) { // We then get the neighbor cell's subface that diff --git a/ElastoplasticTorsion/ElastoplasticTorsion.cc b/ElastoplasticTorsion/ElastoplasticTorsion.cc index 05bad66..f00658a 100644 --- a/ElastoplasticTorsion/ElastoplasticTorsion.cc +++ b/ElastoplasticTorsion/ElastoplasticTorsion.cc @@ -553,7 +553,7 @@ namespace nsp H1_error = difference_per_cell.l2_norm(); // compute W1infty error (save to difference_per_cell) - const QTrapez<1> q_trapez; + const QTrapezoid<1> q_trapez; const QIterated q_iterated (q_trapez, 5); VectorTools::integrate_difference (dof_handler,present_solution,Solution(), difference_per_cell,q_iterated,VectorTools::W1infty_seminorm); @@ -746,7 +746,7 @@ namespace nsp std::map boundary_values; VectorTools::interpolate_boundary_values (dof_handler, 0, - ZeroFunction(), + Functions::ZeroFunction(), boundary_values); MatrixTools::apply_boundary_values (boundary_values, system_matrix, @@ -958,7 +958,7 @@ namespace nsp double ElastoplasticTorsion::dual_infty_error () const { double obj = 0.0; - const QTrapez<1> q_trapez; + const QTrapezoid<1> q_trapez; const QIterated quadrature_formula (q_trapez, 10); FEValues fe_values (fe, quadrature_formula, diff --git a/Linear_Elastic_Active_Skeletal_Muscle_Model/Linear_active_muscle_model.cc b/Linear_Elastic_Active_Skeletal_Muscle_Model/Linear_active_muscle_model.cc index dd65655..f42a63e 100644 --- a/Linear_Elastic_Active_Skeletal_Muscle_Model/Linear_active_muscle_model.cc +++ b/Linear_Elastic_Active_Skeletal_Muscle_Model/Linear_active_muscle_model.cc @@ -1039,7 +1039,7 @@ namespace LMM { Point operator() (const Point &in) const { - static const Tensor<2,dim> rot_mat = Physics::Transformations::Rotations::rotation_matrix_3d(Point(0,1,0), M_PI/2.0); + static const Tensor<2,dim> rot_mat = Physics::Transformations::Rotations::rotation_matrix_3d(Tensor<1,dim>({0,1,0}), M_PI/2.0); return Point(rot_mat*in); } }; @@ -1439,7 +1439,7 @@ namespace LMM component_mask_x.set(0, true); VectorTools::interpolate_boundary_values (dof_handler, parameters.bid_CC_dirichlet_symm_X, - ZeroFunction(dim), + Functions::ZeroFunction(dim), boundary_values, component_mask_x); } @@ -1449,7 +1449,7 @@ namespace LMM component_mask_z.set(2, true); VectorTools::interpolate_boundary_values (dof_handler, parameters.bid_CC_dirichlet_symm_Z, - ZeroFunction(dim), + Functions::ZeroFunction(dim), boundary_values, component_mask_z); } @@ -1504,7 +1504,7 @@ namespace LMM component_mask_x.set(0, true); VectorTools::interpolate_boundary_values (dof_handler, parameters.bid_BB_dirichlet_X, - ZeroFunction(dim), + Functions::ZeroFunction(dim), boundary_values, component_mask_x); } @@ -1562,7 +1562,7 @@ namespace LMM ComponentMask component_mask_x (dim, true); VectorTools::interpolate_boundary_values (dof_handler, parameters.bid_BB_dirichlet_X, - ZeroFunction(dim), + Functions::ZeroFunction(dim), boundary_values, component_mask_x); } @@ -1573,7 +1573,7 @@ namespace LMM component_mask_x.set(2, true); VectorTools::interpolate_boundary_values (dof_handler, parameters.bid_BB_neumann, - ZeroFunction(dim), + Functions::ZeroFunction(dim), boundary_values, component_mask_x); } diff --git a/MCMC-Laplace/mcmc-laplace.cc b/MCMC-Laplace/mcmc-laplace.cc index 6f6f997..2fa932d 100644 --- a/MCMC-Laplace/mcmc-laplace.cc +++ b/MCMC-Laplace/mcmc-laplace.cc @@ -255,7 +255,7 @@ namespace ForwardSimulator VectorTools::interpolate_boundary_values(dof_handler, 0, - ZeroFunction(), + Functions::ZeroFunction(), boundary_values); } } diff --git a/MultipointFluxMixedFiniteElementMethods/mfmfe.cc b/MultipointFluxMixedFiniteElementMethods/mfmfe.cc index a551288..48497b3 100644 --- a/MultipointFluxMixedFiniteElementMethods/mfmfe.cc +++ b/MultipointFluxMixedFiniteElementMethods/mfmfe.cc @@ -542,8 +542,8 @@ namespace MFMFE dof_handler.distribute_dofs(fe); DoFRenumbering::component_wise (dof_handler); - std::vector dofs_per_component (dim+1); - DoFTools::count_dofs_per_component (dof_handler, dofs_per_component); + const std::vector dofs_per_component + = DoFTools::count_dofs_per_fe_component (dof_handler); QGaussLobatto quad(degree+1); QGauss face_quad(degree); @@ -858,7 +858,7 @@ namespace MFMFE Vector cellwise_errors (triangulation.n_active_cells()); - QTrapez<1> q_trapez; + QTrapezoid<1> q_trapez; QIterated quadrature(q_trapez,degree+2); QGauss quadrature_super(degree); diff --git a/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc b/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc index 10d6bbe..166bb63 100644 --- a/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc +++ b/NavierStokes_TRBDF2_DG/navier_stokes_TRBDF2_DG.cc @@ -2012,7 +2012,7 @@ namespace NS_TRBDF2 { auto& inverse_diagonal = this->inverse_diagonal_entries->get_vector(); if(NS_stage == 1) { - MatrixFreeTools::compute_diagonal> + ::MatrixFreeTools::compute_diagonal> (*(this->data), inverse_diagonal, [&](const auto& data, auto& dst, const auto& src, const auto& cell_range) { @@ -2027,7 +2027,7 @@ namespace NS_TRBDF2 { 0); } else if(NS_stage == 2) { - MatrixFreeTools::compute_diagonal> + ::MatrixFreeTools::compute_diagonal> (*(this->data), inverse_diagonal, [&](const auto& data, auto& dst, const auto& src, const auto& cell_range) { diff --git a/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc b/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc index 999f6a1..1e527e6 100644 --- a/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc +++ b/Nonlinear_PoroViscoelasticity/nonlinear-poro-viscoelasticity.cc @@ -4040,21 +4040,21 @@ namespace NonLinearPoroViscoElasticity { VectorTools::interpolate_boundary_values(this->dof_handler_ref, 2, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->pressure))); } VectorTools::interpolate_boundary_values( this->dof_handler_ref, 0, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement)| this->fe.component_mask(this->y_displacement) ) ); VectorTools::interpolate_boundary_values( this->dof_handler_ref, 1, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement) | this->fe.component_mask(this->y_displacement) | @@ -4233,38 +4233,38 @@ namespace NonLinearPoroViscoElasticity { VectorTools::interpolate_boundary_values(this->dof_handler_ref, 101, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->pressure))); } VectorTools::interpolate_boundary_values( this->dof_handler_ref, 0, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, this->fe.component_mask(this->x_displacement)); VectorTools::interpolate_boundary_values( this->dof_handler_ref, 1, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, this->fe.component_mask(this->x_displacement)); VectorTools::interpolate_boundary_values( this->dof_handler_ref, 2, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, this->fe.component_mask(this->y_displacement)); VectorTools::interpolate_boundary_values( this->dof_handler_ref, 3, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, this->fe.component_mask(this->y_displacement)); VectorTools::interpolate_boundary_values( this->dof_handler_ref, 4, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, ( this->fe.component_mask(this->x_displacement) | this->fe.component_mask(this->y_displacement) | @@ -4415,27 +4415,27 @@ namespace NonLinearPoroViscoElasticity { VectorTools::interpolate_boundary_values(this->dof_handler_ref, 1, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->pressure))); VectorTools::interpolate_boundary_values(this->dof_handler_ref, 2, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->pressure))); } VectorTools::interpolate_boundary_values( this->dof_handler_ref, 0, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement)| this->fe.component_mask(this->y_displacement) ) ); VectorTools::interpolate_boundary_values( this->dof_handler_ref, 1, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement) | this->fe.component_mask(this->y_displacement) | @@ -4443,7 +4443,7 @@ namespace NonLinearPoroViscoElasticity VectorTools::interpolate_boundary_values( this->dof_handler_ref, 2, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement) | this->fe.component_mask(this->y_displacement) )); @@ -4614,13 +4614,13 @@ namespace NonLinearPoroViscoElasticity { VectorTools::interpolate_boundary_values( this->dof_handler_ref, 100, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->pressure))); } VectorTools::interpolate_boundary_values( this->dof_handler_ref, 4, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, this->fe.component_mask(this->z_displacement) ); @@ -4770,14 +4770,14 @@ namespace NonLinearPoroViscoElasticity { VectorTools::interpolate_boundary_values( this->dof_handler_ref, 100, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->pressure))); } VectorTools::interpolate_boundary_values( this->dof_handler_ref, 4, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement) | this->fe.component_mask(this->y_displacement) | @@ -4798,7 +4798,7 @@ namespace NonLinearPoroViscoElasticity VectorTools::interpolate_boundary_values( this->dof_handler_ref, 5, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement) | this->fe.component_mask(this->y_displacement) )); @@ -4920,14 +4920,14 @@ namespace NonLinearPoroViscoElasticity { VectorTools::interpolate_boundary_values( this->dof_handler_ref, 100, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->pressure))); } VectorTools::interpolate_boundary_values( this->dof_handler_ref, 5, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->x_displacement) | this->fe.component_mask(this->y_displacement) | @@ -4948,7 +4948,7 @@ namespace NonLinearPoroViscoElasticity VectorTools::interpolate_boundary_values( this->dof_handler_ref, 4, - ZeroFunction(this->n_components), + Functions::ZeroFunction(this->n_components), constraints, (this->fe.component_mask(this->y_displacement) | this->fe.component_mask(this->z_displacement) )); diff --git a/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc b/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc index 2eb7d8d..59d5a5c 100644 --- a/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc +++ b/Quasi_static_Finite_strain_Compressible_Elasticity/cook_membrane.cc @@ -2087,7 +2087,7 @@ namespace Cook_Membrane const int boundary_id = 1; VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(u_fe)); } @@ -2100,7 +2100,7 @@ namespace Cook_Membrane const FEValuesExtractors::Scalar z_displacement(2); VectorTools::interpolate_boundary_values(dof_handler_ref, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } diff --git a/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc b/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc index 4da4d7c..7aac1a7 100644 --- a/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc +++ b/Quasi_static_Finite_strain_Quasi_incompressible_ViscoElasticity/viscoelastic_strip_with_hole.cc @@ -1339,10 +1339,7 @@ namespace ViscoElasStripHole DoFRenumbering::component_wise(dof_handler, block_component); // Count DoFs in each block - dofs_per_block.clear(); - dofs_per_block.resize(n_blocks); - DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, - block_component); + dofs_per_block = DoFTools::count_dofs_per_fe_block(dof_handler, block_component); all_locally_owned_dofs = DoFTools::locally_owned_dofs_per_subdomain (dof_handler); std::vector all_locally_relevant_dofs @@ -1860,13 +1857,13 @@ namespace ViscoElasStripHole if (apply_dirichlet_bc == true) VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); else VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(x_displacement)); } @@ -1875,13 +1872,13 @@ namespace ViscoElasStripHole if (apply_dirichlet_bc == true) VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); else VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -1893,13 +1890,13 @@ namespace ViscoElasStripHole if (apply_dirichlet_bc == true) VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1908,13 +1905,13 @@ namespace ViscoElasStripHole if (apply_dirichlet_bc == true) VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); else VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(z_displacement)); } @@ -1932,21 +1929,21 @@ namespace ViscoElasStripHole const double delta_u_y = delta_length/2.0/n_stretch_steps; VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ConstantFunction(delta_u_y,n_components), + Functions::ConstantFunction(delta_u_y,n_components), constraints, fe.component_mask(y_displacement)); } else VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } else VectorTools::interpolate_boundary_values(dof_handler, boundary_id, - ZeroFunction(n_components), + Functions::ZeroFunction(n_components), constraints, fe.component_mask(y_displacement)); } @@ -2042,8 +2039,8 @@ namespace ViscoElasStripHole } } - template > - class FilteredDataOut : public DataOut + template + class FilteredDataOut : public DataOut { public: FilteredDataOut (const unsigned int subdomain_id) @@ -2053,7 +2050,7 @@ namespace ViscoElasStripHole virtual ~FilteredDataOut() {} - virtual typename DataOut::cell_iterator + virtual typename DataOut::cell_iterator first_cell () { auto cell = this->dofs->begin_active(); @@ -2063,15 +2060,15 @@ namespace ViscoElasStripHole return cell; } - virtual typename DataOut::cell_iterator - next_cell (const typename DataOut::cell_iterator &old_cell) + virtual typename DataOut::cell_iterator + next_cell (const typename DataOut::cell_iterator &old_cell) { if (old_cell != this->dofs->end()) { const IteratorFilters::SubdomainEqualTo predicate(subdomain_id); return ++(FilteredIterator - ::cell_iterator> + ::cell_iterator> (predicate,old_cell)); } else diff --git a/advection_reaction_estimator/source/DG_advection_reaction.cc b/advection_reaction_estimator/source/DG_advection_reaction.cc index e3f77c2..7a69bd7 100644 --- a/advection_reaction_estimator/source/DG_advection_reaction.cc +++ b/advection_reaction_estimator/source/DG_advection_reaction.cc @@ -330,8 +330,8 @@ void AdvectionReaction::assemble_system() { for (unsigned int j = 0; j < n_dofs; ++j) { - copy_data_face.cell_matrix(i, j) += (beta(q_points[qpoint]) * normals[qpoint] * fe_iv.average(j, qpoint) * fe_iv.jump(i, qpoint) + - theta * std::abs(beta_dot_n) * fe_iv.jump(j, qpoint) * fe_iv.jump(i, qpoint)) * + copy_data_face.cell_matrix(i, j) += (beta(q_points[qpoint]) * normals[qpoint] * fe_iv.average_of_shape_values(j, qpoint) * fe_iv.jump_in_shape_values(i, qpoint) + + theta * std::abs(beta_dot_n) * fe_iv.jump_in_shape_values(j, qpoint) * fe_iv.jump_in_shape_values(i, qpoint)) * JxW[qpoint]; } } diff --git a/cdr/solver/cdr.cc b/cdr/solver/cdr.cc index 9d48299..f5b35d3 100644 --- a/cdr/solver/cdr.cc +++ b/cdr/solver/cdr.cc @@ -177,7 +177,7 @@ void CDRProblem::setup_system() DoFTools::make_sparsity_pattern(dof_handler, dynamic_sparsity_pattern, constraints, /*keep_constrained_dofs*/true); SparsityTools::distribute_sparsity_pattern - (dynamic_sparsity_pattern, dof_handler.n_locally_owned_dofs_per_processor(), + (dynamic_sparsity_pattern, dof_handler.locally_owned_dofs(), mpi_communicator, locally_relevant_dofs); system_rhs.reinit(locally_owned_dofs, mpi_communicator); diff --git a/goal_oriented_elastoplasticity/elastoplastic.cc b/goal_oriented_elastoplasticity/elastoplastic.cc index cc3c5eb..5b978cc 100644 --- a/goal_oriented_elastoplasticity/elastoplastic.cc +++ b/goal_oriented_elastoplasticity/elastoplastic.cc @@ -853,7 +853,7 @@ namespace ElastoPlastic // For the purposes of this program, we choose a simple form of boundary // displacement: we displace the top boundary with constant velocity // downwards. The rest of the boundary is either going to be fixed (and is - // then described using an object of type ZeroFunction) or free + // then described using an object of type Functions::ZeroFunction) or free // (Neumann-type, in which case nothing special has to be done). The // implementation of the class describing the constant downward motion // should then be obvious using the knowledge we gained through all the @@ -1010,10 +1010,10 @@ namespace ElastoPlastic template - class BodyForce : public ZeroFunction + class BodyForce : public Functions::ZeroFunction { public: - BodyForce () : ZeroFunction (dim) {} + BodyForce () : Functions::ZeroFunction (dim) {} }; template @@ -1189,10 +1189,10 @@ namespace ElastoPlastic template - class BodyForce : public ZeroFunction + class BodyForce : public Functions::ZeroFunction { public: - BodyForce () : ZeroFunction (dim) {} + BodyForce () : Functions::ZeroFunction (dim) {} }; @@ -1328,10 +1328,10 @@ namespace ElastoPlastic template - class BodyForce : public ZeroFunction + class BodyForce : public Functions::ZeroFunction { public: - BodyForce () : ZeroFunction (dim) {} + BodyForce () : Functions::ZeroFunction (dim) {} }; @@ -1493,10 +1493,10 @@ namespace ElastoPlastic template - class BodyForce : public ZeroFunction + class BodyForce : public Functions::ZeroFunction { public: - BodyForce () : ZeroFunction (dim) {} + BodyForce () : Functions::ZeroFunction (dim) {} }; diff --git a/two_phase_flow/MultiPhase.cc b/two_phase_flow/MultiPhase.cc index 3e0e71d..89e0aa9 100644 --- a/two_phase_flow/MultiPhase.cc +++ b/two_phase_flow/MultiPhase.cc @@ -235,21 +235,21 @@ void MultiPhase::initial_condition() // init condition for u=0 completely_distributed_solution_u = 0; VectorTools::interpolate(dof_handler_U, - ZeroFunction(), + Functions::ZeroFunction(), completely_distributed_solution_u); constraints.distribute (completely_distributed_solution_u); locally_relevant_solution_u = completely_distributed_solution_u; // init condition for v completely_distributed_solution_v = 0; VectorTools::interpolate(dof_handler_U, - ZeroFunction(), + Functions::ZeroFunction(), completely_distributed_solution_v); constraints.distribute (completely_distributed_solution_v); locally_relevant_solution_v = completely_distributed_solution_v; // init condition for p completely_distributed_solution_p = 0; VectorTools::interpolate(dof_handler_P, - ZeroFunction(), + Functions::ZeroFunction(), completely_distributed_solution_p); constraints.distribute (completely_distributed_solution_p); locally_relevant_solution_p = completely_distributed_solution_p; @@ -275,45 +275,45 @@ void MultiPhase::get_boundary_values_U() if (PROBLEM==BREAKING_DAM || PROBLEM==FALLING_DROP) { //LEFT - VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction(),map_boundary_values_v); // RIGHT - VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction(),map_boundary_values_v); // BOTTOM - VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction(),map_boundary_values_v); // TOP - VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction(),map_boundary_values_v); } else if (PROBLEM==SMALL_WAVE_PERTURBATION) { // no slip in bottom and top and slip in left and right //LEFT - VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction(),map_boundary_values_u); // RIGHT - VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction(),map_boundary_values_u); // BOTTOM - VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction(),map_boundary_values_v); // TOP - VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction(),map_boundary_values_v); } else if (PROBLEM==FILLING_TANK) { //LEFT: entry in x, zero in y VectorTools::interpolate_boundary_values (dof_handler_U,0,BoundaryU(PROBLEM),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,0,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,0,Functions::ZeroFunction(),map_boundary_values_v); //RIGHT: no-slip condition - VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,1,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,1,Functions::ZeroFunction(),map_boundary_values_v); //BOTTOM: non-slip - VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction(),map_boundary_values_u); - VectorTools::interpolate_boundary_values (dof_handler_U,2,ZeroFunction(),map_boundary_values_v); + VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,2,Functions::ZeroFunction(),map_boundary_values_v); //TOP: exit in y, zero in x - VectorTools::interpolate_boundary_values (dof_handler_U,3,ZeroFunction(),map_boundary_values_u); + VectorTools::interpolate_boundary_values (dof_handler_U,3,Functions::ZeroFunction(),map_boundary_values_u); VectorTools::interpolate_boundary_values (dof_handler_U,3,BoundaryV(PROBLEM),map_boundary_values_v); } else diff --git a/two_phase_flow/TestLevelSet.cc b/two_phase_flow/TestLevelSet.cc index 00f58fa..3426be6 100644 --- a/two_phase_flow/TestLevelSet.cc +++ b/two_phase_flow/TestLevelSet.cc @@ -359,7 +359,7 @@ void TestLevelSet::initial_condition() completely_distributed_solution_phi = 0; VectorTools::interpolate(dof_handler_LS, InitialPhi(PROBLEM, sharpness), - //ZeroFunction(), + //Functions::ZeroFunction(), completely_distributed_solution_phi); constraints.distribute (completely_distributed_solution_phi); locally_relevant_solution_phi = completely_distributed_solution_phi; diff --git a/two_phase_flow/utilities.cc b/two_phase_flow/utilities.cc index 9b56cc6..25725fa 100644 --- a/two_phase_flow/utilities.cc +++ b/two_phase_flow/utilities.cc @@ -50,20 +50,20 @@ double InitialPhi::value (const Point &p, //////////////////// FORCE TERMS ///// //////////////// /////////////////////////////////////////////////////// template -class ForceTerms : public ConstantFunction +class ForceTerms : public Functions::ConstantFunction { public: - ForceTerms (const std::vector values) : ConstantFunction(values) {} + ForceTerms (const std::vector values) : Functions::ConstantFunction(values) {} }; ///////////////////////////////////////////////////// //////////////////// BOUNDARY PHI /////////////////// ///////////////////////////////////////////////////// template -class BoundaryPhi : public ConstantFunction +class BoundaryPhi : public Functions::ConstantFunction { public: - BoundaryPhi (const double value, const unsigned int n_components=1) : ConstantFunction(value,n_components) {} + BoundaryPhi (const double value, const unsigned int n_components=1) : Functions::ConstantFunction(value,n_components) {} }; ////////////////////////////////////////////////////////// -- 2.39.5