void write_high_order_mesh(const unsigned cycle);
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
MappingQ<dim> mapping;
// specified in the constructor). If you want to use a DG method of a
// different degree the whole program stays the same, only replace 1 in
// the constructor by the desired polynomial degree.
- FE_DGQ<dim> fe;
- DoFHandler<dim> dof_handler;
+ const FE_DGQ<dim> fe;
+ DoFHandler<dim> dof_handler;
// The next four members represent the linear system to be solved.
// <code>system_matrix</code> and <code>right_hand_side</code> are generated
Triangulation<dim> triangulation;
DoFHandler<dim> dof_handler;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
AffineConstraints<double> hanging_node_constraints;
void output_results(const unsigned int cycle) const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
void output_results(const unsigned int cycle) const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
// and vector types to use parallel PETSc objects instead. Note that
// we do not use a separate sparsity pattern, since PETSc manages this
// internally as part of its matrix data structures.
- Triangulation<dim> triangulation;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ Triangulation<dim> triangulation;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
AffineConstraints<double> hanging_node_constraints;
// This is the new shared Triangulation:
parallel::shared::Triangulation<dim> triangulation;
- FESystem<dim> fe;
+ const FESystem<dim> fe;
DoFHandler<dim> dof_handler;
Triangulation<dim> triangulation;
MappingQ<dim> mapping;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
const unsigned int degree;
- Triangulation<dim> triangulation;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ Triangulation<dim> triangulation;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
// The second difference is that the sparsity pattern, the system matrix,
// and solution and right hand side vectors are now blocked. What this
const unsigned int degree;
- Triangulation<dim> triangulation;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ Triangulation<dim> triangulation;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
BlockSparsityPattern sparsity_pattern;
BlockSparseMatrix<double> system_matrix;
const unsigned int degree;
- Triangulation<dim> triangulation;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ Triangulation<dim> triangulation;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
void output_results() const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
void output_results() const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
void output_results(const unsigned int timestep_number) const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
const unsigned int max_grid_level);
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
// all energy groups:
const Parameters ¶meters;
const MaterialData material_data;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
// Furthermore, we have (iv) the value of the computed eigenvalue at the
// present iteration. This is, in fact, the only part of the solution that
ParameterHandler &prm;
- Triangulation<dim> triangulation;
- DoFHandler<dim> dof_handler;
- FESystem<dim> fe;
+ Triangulation<dim> triangulation;
+ DoFHandler<dim> dof_handler;
+ const FESystem<dim> fe;
SparsityPattern sparsity_pattern;
SparseMatrix<double> system_matrix;
// will specify the exact polynomial degree of the finite element in the
// constructor of this class)...
Triangulation<2> triangulation;
- FE_Q<2> fe;
+ const FE_Q<2> fe;
DoFHandler<2> dof_handler;
// ...variables for the sparsity pattern and values of the system matrix
// specified in the constructor). If you want to use a DG method of a
// different degree replace 1 in the constructor by the new degree.
const unsigned int degree;
- FE_DGQ<dim> fe;
+ const FE_DGQ<dim> fe;
DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
double global_Omega_diameter;
const unsigned int stokes_degree;
- FESystem<dim> stokes_fe;
+ const FESystem<dim> stokes_fe;
DoFHandler<dim> stokes_dof_handler;
AffineConstraints<double> stokes_constraints;
const unsigned int temperature_degree;
- FE_Q<dim> temperature_fe;
+ const FE_Q<dim> temperature_fe;
DoFHandler<dim> temperature_dof_handler;
AffineConstraints<double> temperature_constraints;
TrilinosWrappers::MPI::BlockVector stokes_rhs;
- FE_Q<dim> temperature_fe;
+ const FE_Q<dim> temperature_fe;
DoFHandler<dim> temperature_dof_handler;
AffineConstraints<double> temperature_constraints;
// mapping can be selected in the constructor of the class.
Triangulation<dim - 1, dim> tria;
- FE_Q<dim - 1, dim> fe;
+ const FE_Q<dim - 1, dim> fe;
DoFHandler<dim - 1, dim> dof_handler;
MappingQ<dim - 1, dim> mapping;
Triangulation<dim> external_tria;
GridGenerator::hyper_cube(external_tria, -2, 2);
- FE_Q<dim> external_fe(1);
+ const FE_Q<dim> external_fe(1);
DoFHandler<dim> external_dh(external_tria);
Vector<double> external_phi;
Triangulation<dim> triangulation;
- FE_Q<dim> fe_velocity;
- FE_Q<dim> fe_pressure;
+ const FE_Q<dim> fe_velocity;
+ const FE_Q<dim> fe_pressure;
DoFHandler<dim> dof_handler_velocity;
DoFHandler<dim> dof_handler_pressure;
void output_results() const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
// With these exceptions: For our eigenvalue problem, we need both a
Triangulation<dim> triangulation;
#endif
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
MappingQ1<dim> mapping;
Triangulation<dim, spacedim> triangulation;
- FE_Q<dim, spacedim> fe;
+ const FE_Q<dim, spacedim> fe;
DoFHandler<dim, spacedim> dof_handler;
MappingQ<dim, spacedim> mapping;
deallog.depth_console(2);
std::ofstream logfile("deallog");
deallog.attach(logfile);
- FE_DGQ<2> fe1(3);
+ const FE_DGQ<2> fe1(3);
InteriorPenaltyProblem<2> test1(fe1);
test1.run(12);
}
void output_results() const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
parallel::distributed::Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
IndexSet locally_owned_dofs;
void output_results(const unsigned int iteration) const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
IndexSet active_set;
const unsigned int n_initial_global_refinements;
parallel::distributed::Triangulation<dim> triangulation;
- const unsigned int fe_degree;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ const unsigned int fe_degree;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
const unsigned int degree;
const unsigned int darcy_degree;
- FESystem<dim> darcy_fe;
+ const FESystem<dim> darcy_fe;
DoFHandler<dim> darcy_dof_handler;
AffineConstraints<double> darcy_constraints;
const unsigned int saturation_degree;
- FE_Q<dim> saturation_fe;
+ const FE_Q<dim> saturation_fe;
DoFHandler<dim> saturation_dof_handler;
AffineConstraints<double> saturation_constraints;
MPI_Comm mpi_communicator;
parallel::distributed::Triangulation<dim> triangulation;
- FESystem<dim> fe;
+ const FESystem<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
const unsigned int elasticity_degree;
Triangulation<dim> triangulation;
- FESystem<dim> stokes_fe;
- FESystem<dim> elasticity_fe;
+ const FESystem<dim> stokes_fe;
+ const FESystem<dim> elasticity_fe;
hp::FECollection<dim> fe_collection;
DoFHandler<dim> dof_handler;
MappingQ<dim> mapping;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
#else
Triangulation<dim> triangulation;
#endif
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
MappingQ1<dim> mapping;
void output_results(const unsigned int cycle) const;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
SparsityPattern sparsity_pattern;
parallel::distributed::Triangulation<dim> triangulation;
const MappingQ1<dim> mapping;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
// The 'local' solutions are interior to each element. These
// represent the primal solution field $u$ as well as the auxiliary
// field $\mathbf{q}$.
- FESystem<dim> fe_local;
- DoFHandler<dim> dof_handler_local;
- Vector<double> solution_local;
+ const FESystem<dim> fe_local;
+ DoFHandler<dim> dof_handler_local;
+ Vector<double> solution_local;
// The new finite element type and corresponding <code>DoFHandler</code> are
// used for the global skeleton solution that couples the element-level
// local solutions.
- FE_FaceQ<dim> fe;
- DoFHandler<dim> dof_handler;
- Vector<double> solution;
- Vector<double> system_rhs;
+ const FE_FaceQ<dim> fe;
+ DoFHandler<dim> dof_handler;
+ Vector<double> solution;
+ Vector<double> system_rhs;
// As stated in the introduction, HDG solutions can be post-processed to
// attain superconvergence rates of $\mathcal{O}(h^{p+2})$. The
// representing the primal variable on the interior of each cell. We define
// a FE type of degree $p+1$ to represent this post-processed solution,
// which we only use for output after constructing it.
- FE_DGQ<dim> fe_u_post;
- DoFHandler<dim> dof_handler_u_post;
- Vector<double> solution_u_post;
+ const FE_DGQ<dim> fe_u_post;
+ DoFHandler<dim> dof_handler_u_post;
+ Vector<double> solution_u_post;
// The degrees of freedom corresponding to the skeleton strongly enforce
// Dirichlet boundary conditions, just as in a continuous Galerkin finite
double viscosity;
MPI_Comm mpi_communicator;
- FESystem<dim> fe;
+ const FESystem<dim> fe;
parallel::distributed::Triangulation<dim> triangulation;
DoFHandler<dim> dof_handler;
const unsigned int pressure_degree;
const SolverType solver_type;
- Triangulation<dim> triangulation;
- FESystem<dim> velocity_fe;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
- DoFHandler<dim> velocity_dof_handler;
+ Triangulation<dim> triangulation;
+ const FESystem<dim> velocity_fe;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
+ DoFHandler<dim> velocity_dof_handler;
AffineConstraints<double> constraints;
const unsigned int degree;
std::vector<types::global_dof_index> dofs_per_block;
- Triangulation<dim> triangulation;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ Triangulation<dim> triangulation;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
AffineConstraints<double> zero_constraints;
AffineConstraints<double> nonzero_constraints;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<std::complex<double>> constraints;
Triangulation<dim> triangulation;
#endif
- FE_DGQHermite<dim> fe;
- DoFHandler<dim> dof_handler;
+ const FE_DGQHermite<dim> fe;
+ DoFHandler<dim> dof_handler;
MappingQ1<dim> mapping;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
Triangulation<dim> triangulation;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
Vector<double> solution;
Vector<double> system_rhs;
- FE_DGRaviartThomas<dim> fe_dgrt;
- DoFHandler<dim> dof_handler_dgrt;
- Vector<double> darcy_velocity;
+ const FE_DGRaviartThomas<dim> fe_dgrt;
+ DoFHandler<dim> dof_handler_dgrt;
+ Vector<double> darcy_velocity;
};
std::vector<QuadratureCache<dim>> quadrature_cache;
- FESystem<dim> fe;
- DoFHandler<dim> dof_handler;
+ const FESystem<dim> fe;
+ DoFHandler<dim> dof_handler;
IndexSet locally_owned_dofs;
IndexSet locally_relevant_dofs;
parallel::distributed::Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
IndexSet locally_owned_dofs;
void postprocess(const Mapping<dim> &mapping);
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
// As usual we then define the Lagrangian finite elements FE_Q and a
// DoFHandler.
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
Triangulation<dim> triangulation;
#endif
- FESystem<dim> fe;
- MappingQ<dim> mapping;
- DoFHandler<dim> dof_handler;
+ const FESystem<dim> fe;
+ MappingQ<dim> mapping;
+ DoFHandler<dim> dof_handler;
TimerOutput timer;
Particles::ParticleHandler<dim> particle_handler;
DoFHandler<dim> fluid_dh;
- FESystem<dim> fluid_fe;
+ const FESystem<dim> fluid_fe;
MappingQ1<dim> mapping;
LinearAlgebra::distributed::Vector<double> velocity_field;
<< std::endl
<< std::endl;
- FE_Q<dim> fe(1);
+ const FE_Q<dim> fe(1);
HelmholtzProblem<dim> helmholtz_problem_2d(
fe, HelmholtzProblem<dim>::adaptive_refinement);
<< "===========================================" << std::endl
<< std::endl;
- FE_Q<dim> fe(1);
+ const FE_Q<dim> fe(1);
HelmholtzProblem<dim> helmholtz_problem_2d(
fe, HelmholtzProblem<dim>::global_refinement);
<< "===========================================" << std::endl
<< std::endl;
- FE_Q<dim> fe(2);
+ const FE_Q<dim> fe(2);
HelmholtzProblem<dim> helmholtz_problem_2d(
fe, HelmholtzProblem<dim>::global_refinement);
<< "===========================================" << std::endl
<< std::endl;
- FE_Q<dim> fe(2);
+ const FE_Q<dim> fe(2);
HelmholtzProblem<dim> helmholtz_problem_2d(
fe, HelmholtzProblem<dim>::adaptive_refinement);
par.arguments_for_particle_grid);
particle_insert_tria.refine_global(par.particle_insertion_refinement);
- FE_Q<spacedim> particles_fe(1);
+ const FE_Q<spacedim> particles_fe(1);
DoFHandler<spacedim> particles_dof_handler(particle_insert_tria);
particles_dof_handler.distribute_dofs(particles_fe);
Triangulation<dim> triangulation;
#endif
- FESystem<dim> fe;
- MappingQ<dim> mapping;
- DoFHandler<dim> dof_handler;
+ const FESystem<dim> fe;
+ MappingQ<dim> mapping;
+ DoFHandler<dim> dof_handler;
TimerOutput timer;
Triangulation<dim> triangulation;
DoFHandler<dim> dof_handler;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
AffineConstraints<double> hanging_node_constraints;
const double strike_price;
Triangulation<dim> triangulation;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
// factors below) as well as the filter matrix to ensure that
// the design remains smooth.
Triangulation<dim> triangulation;
- FESystem<dim> fe;
+ const FESystem<dim> fe;
DoFHandler<dim> dof_handler;
AffineConstraints<double> constraints;
Triangulation<dim> triangulation;
DoFHandler<dim> dof_handler;
- FESystem<dim> fe;
+ const FESystem<dim> fe;
AffineConstraints<double> constraints;
const unsigned int n_refinements;
- FE_DGQ<dim> fe;
- DoFHandler<dim> dof_handler;
+ const FE_DGQ<dim> fe;
+ DoFHandler<dim> dof_handler;
// We also need a variable that describes the finite element space
// $[\mathbb{V}_h]^{d\times d}$ used for the two lifting
// operators. The other member variables below are as in most of the other
// tutorial programs.
- FESystem<dim> fe_lift;
+ const FESystem<dim> fe_lift;
SparsityPattern sparsity_pattern;
SparseMatrix<double> matrix;
Triangulation<dim> tria;
GridGenerator::subdivided_hyper_cube(tria, 7);
- FE_Q<dim> fe(fe_degree);
+ const FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof_handler(tria);
dof_handler.distribute_dofs(fe);
DistributedTriangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::subdivided_hyper_cube(tria, 7);
- FE_Q<dim> fe(fe_degree);
+ const FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof_handler(tria);
dof_handler.distribute_dofs(fe);
pcout << "Running: example 2" << std::endl;
pcout << " - create system" << std::endl;
- FE_Q<dim> fe(fe_degree);
+ const FE_Q<dim> fe(fe_degree);
MappingQ1<dim> mapping;
DistributedTriangulation<dim> tria(MPI_COMM_WORLD);
GridGenerator::subdivided_hyper_cube(tria, 50);
GridGenerator::hyper_cube(tria_background);
tria_background.refine_global(5);
- MappingQ1<dim> mapping_background;
- FESystem<dim> fe_background(FE_Q<dim>(degree), dim);
- DoFHandler<dim> dof_handler_background(tria_background);
+ MappingQ1<dim> mapping_background;
+ const FESystem<dim> fe_background(FE_Q<dim>(degree), dim);
+ DoFHandler<dim> dof_handler_background(tria_background);
dof_handler_background.distribute_dofs(fe_background);
// and, similarly, for the immersed surface mesh.
mapping_immersed.initialize(mapping_immersed_base, tria_immersed);
const QGauss<dim - 1> quadrature_immersed(degree + 1);
- FE_Q<dim - 1, dim> fe_scalar_immersed(degree);
- FESystem<dim - 1, dim> fe_immersed(fe_scalar_immersed, dim);
- DoFHandler<dim - 1, dim> dof_handler_immersed(tria_immersed);
+ const FE_Q<dim - 1, dim> fe_scalar_immersed(degree);
+ const FESystem<dim - 1, dim> fe_immersed(fe_scalar_immersed, dim);
+ DoFHandler<dim - 1, dim> dof_handler_immersed(tria_immersed);
dof_handler_immersed.distribute_dofs(fe_immersed);
// We renumber the DoFs related to the vector-valued problem to
Triangulation<dim> triangulation;
DoFHandler<dim> dof_handler;
- FE_Q<dim> fe;
+ const FE_Q<dim> fe;
AffineConstraints<double> hanging_node_constraints;