#include <deal.II/grid/grid_out.h>\r
#include <deal.II/grid/manifold_lib.h>\r
#include <deal.II/grid/tria_accessor.h>\r
-#include <deal.II/grid/tria_boundary_lib.h>\r
#include <deal.II/grid/tria_iterator.h>\r
\r
#include <deal.II/fe/fe_dgp_monomial.h>\r
DoFRenumbering::component_wise(dof_handler_ref, block_component);\r
\r
// Count the number of DoFs in each block\r
- dofs_per_block.clear();\r
- dofs_per_block.resize(n_blocks);\r
- DoFTools::count_dofs_per_block(dof_handler_ref, dofs_per_block, block_component);\r
+ dofs_per_block = DoFTools::count_dofs_per_fe_block(dof_handler_ref, block_component);\r
\r
// Setup the sparsity pattern and tangent matrix\r
all_locally_owned_dofs = DoFTools::locally_owned_dofs_per_subdomain (dof_handler_ref);\r
for (unsigned int d=0; d<(solution_p_vector.size()); ++d)\r
solution_vector[solution_u_vector.size()+d] = solution_p_vector[d];\r
\r
- Functions::FEFieldFunction<dim,DoFHandler<dim>,Vector<double>>\r
+ Functions::FEFieldFunction<dim,Vector<double>>\r
find_solution(dof_handler_ref, solution_vector);\r
\r
for (unsigned int p=0; p<tracked_vertices_IN.size(); ++p)\r
0.5);\r
\r
const double rot_angle = 3.0*numbers::PI/2.0;\r
- GridTools::rotate( rot_angle, 1, this->triangulation);\r
+ GridTools::rotate( Point<3>::unit_vector(1), rot_angle, this->triangulation);\r
\r
this->triangulation.reset_manifold(0);\r
static const CylindricalManifold<dim> manifold_description_3d(2);\r
{\r
VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
2,\r
- ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
+ Functions::ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
constraints,\r
(this->fe.component_mask(this->pressure)));\r
}\r
{\r
VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
101,\r
- ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
+ Functions::ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
constraints,\r
(this->fe.component_mask(this->pressure)));\r
}\r
{\r
VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
1,\r
- ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
+ Functions::ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
constraints,\r
(this->fe.component_mask(this->pressure)));\r
\r
VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
2,\r
- ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
+ Functions::ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
constraints,\r
(this->fe.component_mask(this->pressure)));\r
}\r
{\r
VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
100,\r
- ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
+ Functions::ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
constraints,\r
(this->fe.component_mask(this->pressure)));\r
}\r
\r
VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
5,\r
- ConstantFunction<dim>(value[2],this->n_components),\r
+ Functions::ConstantFunction<dim>(value[2],this->n_components),\r
constraints,\r
this->fe.component_mask(direction));\r
}\r
{\r
VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
100,\r
- ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
+ Functions::ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
constraints,\r
(this->fe.component_mask(this->pressure)));\r
}\r
\r
VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
5,\r
- ConstantFunction<dim>(value[2],this->n_components),\r
+ Functions::ConstantFunction<dim>(value[2],this->n_components),\r
constraints,\r
this->fe.component_mask(direction) );\r
\r
{\r
VectorTools::interpolate_boundary_values(this->dof_handler_ref,\r
100,\r
- ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
+ Functions::ConstantFunction<dim>(this->parameters.drained_pressure,this->n_components),\r
constraints,\r
(this->fe.component_mask(this->pressure)));\r
}\r
\r
VectorTools::interpolate_boundary_values( this->dof_handler_ref,\r
4,\r
- ConstantFunction<dim>(value[0],this->n_components),\r
+ Functions::ConstantFunction<dim>(value[0],this->n_components),\r
constraints,\r
this->fe.component_mask(direction));\r
\r
const double current_time = this->time.get_current();\r
const double final_time = this->time.get_end();\r
const double num_cycles = 3.0;\r
- const Point< 3, double> axis (0.0,1.0,0.0);\r
+ const Tensor<1,3> axis ({0.0,1.0,0.0});\r
const double angle = numbers::PI;\r
static const Tensor< 2, dim, double> R(Physics::Transformations::Rotations::rotation_matrix_3d(axis,angle));\r
\r
#include <deal.II/lac/sparse_direct.h>
#include <deal.II/lac/sparsity_tools.h>
-#include <deal.II/lac/petsc_parallel_block_sparse_matrix.h>
-#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_block_sparse_matrix.h>
+#include <deal.II/lac/petsc_sparse_matrix.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/lac/petsc_precondition.h>
#include <deal.II/lac/petsc_solver.h>
std::vector<unsigned int> block_component(dim + 1, 0);
block_component[dim] = 1;
DoFRenumbering::component_wise(dof_handler, block_component);
- dofs_per_block.resize(2);
- 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);
// Partitioning.
unsigned int dof_u = dofs_per_block[0];
unsigned int dof_p = dofs_per_block[1];
sparsity_pattern.copy_from(dsp);
SparsityTools::distribute_sparsity_pattern(
dsp,
- dof_handler.locally_owned_dofs_per_processor(),
+ dof_handler.locally_owned_dofs(),
mpi_communicator,
locally_relevant_dofs);
FEValuesExtractors::Vector velocity(0);
KellyErrorEstimator<dim>::estimate(dof_handler,
face_quad_formula,
- typename FunctionMap<dim>::type(),
+ {},
present_solution,
estimated_error_per_cell,
fe.component_mask(velocity));
#include <deal.II/lac/vector.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
#include <deal.II/lac/petsc_sparse_matrix.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_sparse_matrix.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/lac/petsc_solver.h>
#include <deal.II/lac/petsc_precondition.h>
#include <deal.II/grid/grid_generator.h>
DynamicSparsityPattern dsp (locally_relevant_dofs_LS);
DoFTools::make_sparsity_pattern (dof_handler_LS,dsp,constraints,false);
SparsityTools::distribute_sparsity_pattern (dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
+ dof_handler_LS.locally_owned_dofs(),
mpi_communicator,
locally_relevant_dofs_LS);
- MC_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- Cx_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- CTx_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- Cy_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- CTy_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
+ MC_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ Cx_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ CTx_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ Cy_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ CTy_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
if (dim==3)
{
- Cz_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- CTz_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
+ Cz_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ CTz_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
}
- dLij_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- EntRes_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- SuppSize_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- dCij_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- A_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- LxA_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- Akp1_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- LxAkp1_matrix.reinit (mpi_communicator,
- dsp,
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- dof_handler_LS.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
+ dLij_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ EntRes_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ SuppSize_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ dCij_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ A_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ LxA_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ Akp1_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
+ LxAkp1_matrix.reinit (dof_handler_LS.locally_owned_dofs(),
+ dof_handler_LS.locally_owned_dofs(),
+ dsp, mpi_communicator);
//COMPUTE MASS MATRICES (AND OTHERS) FOR FIRST TIME STEP //
assemble_ML();
invert_ML();
#include <deal.II/lac/vector.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_sparse_matrix.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/lac/petsc_solver.h>
#include <deal.II/lac/petsc_precondition.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/lac/vector.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_sparse_matrix.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/lac/petsc_solver.h>
#include <deal.II/lac/petsc_precondition.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/lac/sparsity_tools.h>
#include <deal.II/distributed/tria.h>
#include <deal.II/distributed/grid_refinement.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/base/convergence_table.h>
#include <deal.II/base/timer.h>
#include <deal.II/base/parameter_handler.h>
DynamicSparsityPattern dsp_Matrix(locally_relevant_dofs_U);
DoFTools::make_sparsity_pattern(dof_handler_U,dsp_Matrix,constraints,false);
SparsityTools::distribute_sparsity_pattern(dsp_Matrix,
- dof_handler_U.n_locally_owned_dofs_per_processor(),mpi_communicator,
+ dof_handler_U.locally_owned_dofs(),
+ mpi_communicator,
locally_relevant_dofs_U);
- system_Matrix_u.reinit(mpi_communicator,dsp_Matrix,
- dof_handler_U.n_locally_owned_dofs_per_processor(),
- dof_handler_U.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- system_Matrix_v.reinit(mpi_communicator,dsp_Matrix,
- dof_handler_U.n_locally_owned_dofs_per_processor(),
- dof_handler_U.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
- system_Matrix_w.reinit(mpi_communicator,dsp_Matrix,
- dof_handler_U.n_locally_owned_dofs_per_processor(),
- dof_handler_U.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
+ system_Matrix_u.reinit(dof_handler_U.locally_owned_dofs(),
+ dof_handler_U.locally_owned_dofs(),
+ dsp_Matrix,
+ mpi_communicator);
+ system_Matrix_v.reinit(dof_handler_U.locally_owned_dofs(),
+ dof_handler_U.locally_owned_dofs(),
+ dsp_Matrix,
+ mpi_communicator);
+ system_Matrix_w.reinit(dof_handler_U.locally_owned_dofs(),
+ dof_handler_U.locally_owned_dofs(),
+ dsp_Matrix,
+ mpi_communicator);
rebuild_Matrix_U=true;
// sparsity pattern for S
DynamicSparsityPattern dsp_S(locally_relevant_dofs_P);
DoFTools::make_sparsity_pattern(dof_handler_P,dsp_S,constraints_psi,false);
SparsityTools::distribute_sparsity_pattern(dsp_S,
- dof_handler_P.n_locally_owned_dofs_per_processor(),mpi_communicator,
+ dof_handler_P.locally_owned_dofs(),
+ mpi_communicator,
locally_relevant_dofs_P);
- system_S.reinit(mpi_communicator,dsp_S,dof_handler_P.n_locally_owned_dofs_per_processor(),
- dof_handler_P.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
+ system_S.reinit(dof_handler_P.locally_owned_dofs(),
+ dof_handler_P.locally_owned_dofs(),
+ dsp_S,
+ mpi_communicator);
// sparsity pattern for M
DynamicSparsityPattern dsp_M(locally_relevant_dofs_P);
DoFTools::make_sparsity_pattern(dof_handler_P,dsp_M,constraints_psi,false);
SparsityTools::distribute_sparsity_pattern(dsp_M,
- dof_handler_P.n_locally_owned_dofs_per_processor(),mpi_communicator,
+ dof_handler_P.locally_owned_dofs(),
+ mpi_communicator,
locally_relevant_dofs_P);
- system_M.reinit(mpi_communicator,dsp_M,dof_handler_P.n_locally_owned_dofs_per_processor(),
- dof_handler_P.n_locally_owned_dofs_per_processor(),
- Utilities::MPI::this_mpi_process(mpi_communicator));
+ system_M.reinit(dof_handler_P.locally_owned_dofs(),
+ dof_handler_P.locally_owned_dofs(),
+ dsp_M,
+ mpi_communicator);
rebuild_S_M=true;
}
#include <deal.II/lac/vector.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_sparse_matrix.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/lac/petsc_solver.h>
#include <deal.II/lac/petsc_precondition.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/lac/sparsity_tools.h>
#include <deal.II/distributed/tria.h>
#include <deal.II/distributed/grid_refinement.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/base/convergence_table.h>
#include <deal.II/base/timer.h>
#include <deal.II/base/parameter_handler.h>
#include <deal.II/lac/vector.h>
#include <deal.II/lac/full_matrix.h>
#include <deal.II/lac/solver_cg.h>
-#include <deal.II/lac/petsc_parallel_sparse_matrix.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_sparse_matrix.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/lac/petsc_solver.h>
#include <deal.II/lac/petsc_precondition.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/lac/sparsity_tools.h>
#include <deal.II/distributed/tria.h>
#include <deal.II/distributed/grid_refinement.h>
-#include <deal.II/lac/petsc_parallel_vector.h>
+#include <deal.II/lac/petsc_vector.h>
#include <deal.II/base/convergence_table.h>
#include <deal.II/base/timer.h>
#include <deal.II/base/parameter_handler.h>