VectorTools::interpolate(dh, ff, v1);
deallog << "V norm: " << v1.l2_norm() << std::endl;
- Functions::FEFieldFunction<dim, DoFHandler<dim>, Vector<double>> fef(dh, v1);
+ Functions::FEFieldFunction<dim, Vector<double>> fef(dh, v1);
+
VectorTools::interpolate(dh, fef, v2);
VectorTools::interpolate(dh, F<dim>(), v1);
deallog << "V norm: " << v1.l2_norm() << std::endl;
- Functions::FEFieldFunction<dim, DoFHandler<dim>, Vector<double>> fef(dh, v1);
+ Functions::FEFieldFunction<dim, Vector<double>> fef(dh, v1);
+
VectorTools::interpolate(dh, fef, v2);
VectorTools::interpolate(dh, ff, v1);
deallog << "V norm: " << v1.l2_norm() << std::endl;
- Functions::FEFieldFunction<dim, DoFHandler<dim>, Vector<double>> fef(dh, v1);
+ Functions::FEFieldFunction<dim, Vector<double>> fef(dh, v1);
+
// project the discrete function fef back
// onto the finite element space. this
VectorTools::interpolate(dh, ff, v1);
deallog << "V norm: " << v1.l2_norm() << std::endl;
- Functions::FEFieldFunction<dim, DoFHandler<dim>, Vector<double>> fef(dh, v1);
+ Functions::FEFieldFunction<dim, Vector<double>> fef(dh, v1);
+
// project the discrete function fef back
// onto the finite element space. this
VectorTools::interpolate(dh, ff, v1);
deallog << "V norm: " << v1.l2_norm() << std::endl;
- Functions::FEFieldFunction<dim, DoFHandler<dim>, Vector<double>> fef(dh, v1);
+ Functions::FEFieldFunction<dim, Vector<double>> fef(dh, v1);
+
// create the origin
Point<dim> p;
void
LaplaceProblem::output_results() const
{
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
void
LaplaceProblem<dim>::output_results() const
{
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
if (cycle >= 2)
return;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
DataOutBase::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.set_flags(eps_flags);
data_out.attach_dof_handler(dof_handler);
DataOutBase::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.set_flags(eps_flags);
data_out.attach_dof_handler(dof_handler);
DataOutBase::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.set_flags(eps_flags);
data_out.attach_dof_handler(dof_handler);
gmv_filename += ".gmv";
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
filename += ".gmv";
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
void
BEM<spacedim>::output_results()
{
- DataOut<spacedim - 1, DoFHandler<spacedim - 1, spacedim>> dataout;
+ DataOut<spacedim - 1, spacedim> dataout;
dataout.attach_dof_handler(dof_handler_q);
dataout.add_data_vector(dof_handler_q, smooth_solution, "linear_potential");
- dataout.add_data_vector(
- tangential_derivative,
- "tangential_velocity",
- DataOut<spacedim - 1, DoFHandler<spacedim - 1, spacedim>>::type_cell_data);
- dataout.add_data_vector(
- error,
- "error",
- DataOut<spacedim - 1, DoFHandler<spacedim - 1, spacedim>>::type_cell_data);
+ dataout.add_data_vector(tangential_derivative,
+ "tangential_velocity",
+ DataOut<spacedim - 1, spacedim>::type_cell_data);
+ dataout.add_data_vector(error,
+ "error",
+ DataOut<spacedim - 1, spacedim>::type_cell_data);
dataout.build_patches();
dataout.write_vtk(deallog.get_file_stream());
}
for (unsigned int i = 0; i < numbering.size(); ++i)
numbering(i) = i;
- DataOut<dim, DoFHandler<dim, spacedim>> dataout;
+ DataOut<dim, spacedim> dataout;
dataout.add_data_vector(dof_handler, numbering, "numbering");
dataout.build_patches();
dataout.write_vtk(deallog.get_file_stream());
soln = 0;
for (unsigned int i = 0; i < soln.size(); ++i)
soln(i) = i;
- DataOut<dim, DoFHandler<dim, dim + 1>> data_out;
+ DataOut<dim, dim + 1> data_out;
data_out.attach_dof_handler(dof_handler);
- data_out.add_data_vector(
- soln, "scalar_data", DataOut<dim, DoFHandler<dim, dim + 1>>::type_dof_data);
+ data_out.add_data_vector(soln,
+ "scalar_data",
+ DataOut<dim, dim + 1>::type_dof_data);
data_out.build_patches();
data_out.write_vtk(deallog.get_file_stream());
std::vector<std::string> solution_names(3, "position");
- DataOut<2, DoFHandler<2, 3>> data_out;
+ DataOut<2, 3> data_out;
data_out.attach_dof_handler(dh_test);
data_out.add_data_vector(position,
solution_names,
- DataOut<2, DoFHandler<2, 3>>::type_dof_data,
+ DataOut<2, 3>::type_dof_data,
data_component_interpretation);
data_out.build_patches(mapping, 2);
deallog << error(i) << std::endl;
{
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.attach_dof_handler(dof);
- data_out.add_data_vector(
- v, "solution", DataOut<dim, DoFHandler<dim, spacedim>>::type_dof_data);
+ data_out.add_data_vector(v,
+ "solution",
+ DataOut<dim, spacedim>::type_dof_data);
data_out.add_data_vector(error, "error");
data_out.build_patches();
std::string filename = spacedim == 2 ? "solution-2d-" : "solution-3d-";
}
// write graphical output
- DataOut<dim, DoFHandler<dim, spacedim>> dataout;
+ DataOut<dim, spacedim> dataout;
dataout.attach_triangulation(triangulation);
dataout.add_data_vector(projected_directional_derivative, "derivative");
dataout.build_patches();
Functions::CosineFunction<spacedim> cosine;
VectorTools::interpolate(dof_handler, cosine, interpolated_one);
- DataOut<dim, DoFHandler<dim, spacedim>> dataout;
+ DataOut<dim, spacedim> dataout;
dataout.add_data_vector(dof_handler, interpolated_one, "numbering");
dataout.build_patches();
dataout.write_vtk(deallog.get_file_stream());
VectorTools::interpolate(dof_handler, func, interpolated_one);
- DataOut<dim, DoFHandler<dim, spacedim>> dataout;
+ DataOut<dim, spacedim> dataout;
dataout.attach_dof_handler(dof_handler);
dataout.add_data_vector(interpolated_one, "test");
dataout.build_patches();
MappingFEField<dim, spacedim> mapping(map_dh, euler_vec);
;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out_scal;
+ DataOut<dim, spacedim> data_out_scal;
data_out_scal.attach_dof_handler(dof_handler);
- data_out_scal.add_data_vector(
- scal_sol,
- "scalar_data",
- DataOut<dim, DoFHandler<dim, spacedim>>::type_dof_data);
+ data_out_scal.add_data_vector(scal_sol,
+ "scalar_data",
+ DataOut<dim, spacedim>::type_dof_data);
- data_out_scal.build_patches(
- mapping,
- subdivisions,
- DataOut<dim, DoFHandler<dim, spacedim>>::curved_inner_cells);
+ data_out_scal.build_patches(mapping,
+ subdivisions,
+ DataOut<dim, spacedim>::curved_inner_cells);
std::string filename_scal =
("scal_check_" + Utilities::int_to_string(id) + ".vtu");
data_component_interpretation(
spacedim, DataComponentInterpretation::component_is_part_of_vector);
- DataOut<dim, DoFHandler<dim, spacedim>> data_out_euler;
+ DataOut<dim, spacedim> data_out_euler;
data_out_euler.attach_dof_handler(map_dh);
- data_out_euler.add_data_vector(
- euler_vec,
- "euler_vec",
- DataOut<dim, DoFHandler<dim, spacedim>>::type_dof_data,
- data_component_interpretation);
- data_out_euler.build_patches(
- mapping,
- degree,
- DataOut<dim, DoFHandler<dim, spacedim>>::curved_inner_cells);
+ data_out_euler.add_data_vector(euler_vec,
+ "euler_vec",
+ DataOut<dim, spacedim>::type_dof_data,
+ data_component_interpretation);
+ data_out_euler.build_patches(mapping,
+ degree,
+ DataOut<dim, spacedim>::curved_inner_cells);
std::string filename_euler =
("euler_check_" + Utilities::int_to_string(id) + ".vtu");
constraints.close();
VectorTools::project(dof_handler, constraints, quad, cosine, projected_one);
- DataOut<dim, DoFHandler<dim, spacedim>> dataout;
+ DataOut<dim, spacedim> dataout;
dataout.add_data_vector(dof_handler, projected_one, "projection");
dataout.build_patches();
dataout.write_vtk(deallog.get_file_stream());
VectorTools::project(
dof_handler, constraints, quad, cosine, interpolated_one);
- DataOut<dim, DoFHandler<dim, spacedim>> dataout;
+ DataOut<dim, spacedim> dataout;
dataout.attach_dof_handler(dof_handler);
dataout.add_data_vector(interpolated_one, "numbering");
dataout.build_patches();
// Do some refinement
boundary_mesh.begin_active()->set_refine_flag();
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim, spacedim>> soltrans(dh);
+ SolutionTransfer<dim, Vector<double>, spacedim> soltrans(dh);
boundary_mesh.prepare_coarsening_and_refinement();
const std::string filename =
"solution-" + Utilities::int_to_string(cycle, 2) + ".vtk";
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
{
using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
+
const unsigned int n_threads = MultithreadInfo::n_threads();
std::vector<std::pair<active_cell_iterator, active_cell_iterator>>
thread_ranges =
template <int dim>
Solver<dim>::LinearSystem::LinearSystem(const DoFHandler<dim> &dof_handler)
+
{
hanging_node_constraints.clear();
void
PrimalSolver<dim>::output_solution() const
{
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(this->dof_handler);
data_out.add_data_vector(this->solution, "solution");
data_out.build_patches();
virtual void
assemble_rhs(const DoFHandler<dim> &dof_handler, Vector<double> &rhs) const;
+
DeclException1(ExcEvaluationPointNotFound,
Point<dim>,
<< "The evaluation point " << arg1
template <int dim>
void
PointValueEvaluation<dim>::assemble_rhs(const DoFHandler<dim> &dof_handler,
- Vector<double> & rhs) const
+
+ Vector<double> &rhs) const
{
rhs.reinit(dof_handler.n_dofs());
virtual void
assemble_rhs(const DoFHandler<dim> &dof_handler, Vector<double> &rhs) const;
+
DeclException1(ExcEvaluationPointNotFound,
Point<dim>,
<< "The evaluation point " << arg1
using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
+
using FaceIntegrals =
typename std::map<typename DoFHandler<dim>::face_iterator, double>;
+
+
struct CellData
{
hp::FEValues<dim> fe_values;
primal_hanging_node_constraints,
dual_solution);
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(primal_solver.dof_handler);
data_out.add_data_vector(primal_solver.solution, "primal_solution");
const typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
const typename DoFHandler<dim>::cell_iterator neighbor =
+
cell->neighbor(face_no);
Assert(neighbor.state() == IteratorState::valid, ExcInternalError());
Assert(neighbor->has_children(), ExcInternalError());
energy(const DoFHandler<dim> &dof_handler, const Vector<double> &function);
+
const unsigned int run_number;
Triangulation<dim> triangulation;
void
MinimizationProblem<dim>::output_results() const
{
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(present_solution, "solution");
data_out.build_patches();
shape_functions.push_back(shape_function);
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
// get material ids:
shape_functions.push_back(shape_function);
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
// get material ids:
shape_functions.push_back(shape_function);
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
// get material ids:
std::cout << "...finished printing support points" << std::endl;
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
// get material ids:
filename += ".vtk";
std::ofstream output(filename.c_str());
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(localized_solution, "solution");
if (prm.exact_soln_expr != "")
deallog << "...finished printing support points" << std::endl;
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
// get material ids:
filename += ".vtk";
std::ofstream output(filename.c_str());
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(eigenfunctions_locally_relevant[0],
"solution");
filename += ".vtk";
std::ofstream output(filename.c_str());
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(fe_index, "fe_index");
data_out.add_data_vector(estimated_error_per_cell, "estimated_error");
Postprocessor<dim> postprocessor(
enrichment); // has to live until the DataOut object is destroyed;
// objects are destroyed in reverse order of declaration
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(eigenfunctions_locally_relevant[0],
"solution");
filename += ".vtk";
std::ofstream output(filename.c_str());
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(fe_index, "fe_index");
data_out.add_data_vector(estimated_error_per_cell, "estimated_error");
1, DataComponentInterpretation::component_is_scalar);
const std::vector<std::string> data_names(1, "active_fe_index");
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(active_fe_index,
+
data_names,
- DataOut<dim, DoFHandler<dim>>::type_cell_data,
+ DataOut<dim>::type_cell_data,
data_component_interpretation);
data_out.build_patches();
1, DataComponentInterpretation::component_is_scalar);
const std::vector<std::string> data_names(1, "active_fe_index");
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(active_fe_index,
+
data_names,
- DataOut<dim, DoFHandler<dim>>::type_cell_data,
+ DataOut<dim>::type_cell_data,
data_component_interpretation);
data_out.build_patches();
const std::string filename =
"solution-" + Utilities::int_to_string(cycle, 2) + ".vtk";
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
const std::string filename =
"solution-" + Utilities::int_to_string(cycle, 2) + ".vtk";
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
solution = 1.0;
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solultion_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solultion_trans(dof_handler);
solultion_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
q.push_back(QMidpoint<2>());
hp::FEValues<2> x_fe_values(fe_collection, q, update_gradients);
for (DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active();
+
cell != dof_handler.end();
++cell)
{
solution = 1.0;
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solultion_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solultion_trans(dof_handler);
solultion_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
q.push_back(QMidpoint<2>());
hp::FEValues<2> x_fe_values(fe_collection, q, update_hessians);
for (DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active();
+
cell != dof_handler.end();
++cell)
{
solution = 1.0;
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solultion_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solultion_trans(dof_handler);
solultion_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
q.push_back(QMidpoint<2>());
hp::FEValues<2> x_fe_values(fe_collection, q, update_hessians);
for (DoFHandler<2>::active_cell_iterator cell = dof_handler.begin_active();
+
cell != dof_handler.end();
++cell)
{
shape_functions.push_back(shape_function);
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
// get material ids:
shape_functions.push_back(shape_function);
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
// get material ids:
}
#ifdef FEQH_DEBUG_OUTPUT
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(v, "shape_function");
}
// 3.4. Solution Transfer
- SolutionTransfer<dim, TrilinosWrappers::MPI::Vector, DoFHandler<dim>>
- soltrans(dof_handler);
+ SolutionTransfer<dim, TrilinosWrappers::MPI::Vector> soltrans(dof_handler);
+
+
// copy current functions
TrilinosWrappers::MPI::Vector solution_coarse;
VectorTools::interpolate(mapping, q_dof_handler, function, q_solution);
VectorTools::interpolate(mapping, dgq_dof_handler, function, dgq_solution);
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> q_soltrans(
- q_dof_handler);
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> dgq_soltrans(
- dgq_dof_handler);
+ SolutionTransfer<dim, Vector<double>> q_soltrans(q_dof_handler);
+ SolutionTransfer<dim, Vector<double>> dgq_soltrans(dgq_dof_handler);
+
// test b): do some coarsening and
typename DoFHandler<dim>::active_cell_iterator cell = q_dof_handler
.begin_active(),
endc = q_dof_handler.end();
+
for (; cell != endc; ++cell)
{
hp_fe_val.reinit(cell, 0);
for (unsigned int i = 0; i < solution.size(); ++i)
solution(i) = i;
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> soltrans(dof_handler);
+ SolutionTransfer<dim, Vector<double>> soltrans(dof_handler);
+
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
endc = tria.end();
// Save output
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "Solution");
data_out.build_patches();
// Interpoalte solution
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solultion_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solultion_trans(dof_handler);
solultion_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
// Save output
- DataOut<2, DoFHandler<2>> data_out2;
+ DataOut<2> data_out2;
data_out2.attach_dof_handler(dof_handler);
data_out2.add_data_vector(new_solution, "Solution");
data_out2.build_patches();
solution = 1.0;
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solultion_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solultion_trans(dof_handler);
solultion_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
solution = 1.0;
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solultion_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solultion_trans(dof_handler);
solultion_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
// a follow-up error to the one fixed with _04 was that DataOut also got
// itself confused
- DataOut<2, DoFHandler<2>> data_out2;
+ DataOut<2> data_out2;
data_out2.attach_dof_handler(dof_handler);
data_out2.add_data_vector(new_solution, "Solution");
data_out2.build_patches();
// set refine flag for the only cell we have, then do the refinement
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> solution_trans(
- dof_handler);
+ SolutionTransfer<dim, Vector<double>> solution_trans(dof_handler);
dof_handler.begin_active()->set_refine_flag();
solution_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
// set refine flag for the only cell we have, then do the refinement
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> solution_trans(
- dof_handler);
+ SolutionTransfer<dim, Vector<double>> solution_trans(dof_handler);
dof_handler.begin_active()->set_refine_flag();
solution_trans.prepare_for_pure_refinement();
triangulation.execute_coarsening_and_refinement();
solution = 1.0;
// coarsen everything away
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> solution_trans(
- dof_handler);
+ SolutionTransfer<dim, Vector<double>> solution_trans(dof_handler);
for (unsigned int c = 0; c < dof_handler.begin(0)->n_children(); ++c)
dof_handler.begin(0)->child(c)->set_coarsen_flag();
// set refine flag for the only cell we have, then do the refinement
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> solution_trans(
- dof_handler);
+ SolutionTransfer<dim, Vector<double>> solution_trans(dof_handler);
dof_handler.begin_active()->set_refine_flag();
solution_trans.prepare_for_pure_refinement();
triangulation.execute_coarsening_and_refinement();
triangulation.prepare_coarsening_and_refinement();
// Interpolate solution
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solultion_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solultion_trans(dof_handler);
solultion_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
for (unsigned int i = 0; i < solution.size(); ++i)
solution(i) = i;
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> soltrans(dof_handler);
+ SolutionTransfer<dim, Vector<double>> soltrans(dof_handler);
+
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
endc = tria.end();
typename DoFHandler<dim>::active_cell_iterator cell = q_dof_handler
.begin_active(),
endc = q_dof_handler.end();
+
for (; cell != endc; ++cell, ++counter)
{
if (counter < 15)
typename DoFHandler<dim>::active_cell_iterator cell = q_dof_handler
.begin_active(),
endc = q_dof_handler.end();
+
for (; cell != endc; ++cell)
{
hp_fe_val.reinit(cell, 0);
}
}
- SolutionTransfer<dim, Vector<double>, DoFHandler<dim>> q_soltrans(
- q_dof_handler);
+ SolutionTransfer<dim, Vector<double>> q_soltrans(q_dof_handler);
+
// test b): do some coarsening and
typename DoFHandler<dim>::active_cell_iterator cell = q_dof_handler
.begin_active(),
endc = q_dof_handler.end();
+
for (; cell != endc; ++cell, ++counter)
{
if (counter > 20 && counter < 90)
typename DoFHandler<dim>::active_cell_iterator cell = q_dof_handler
.begin_active(),
endc = q_dof_handler.end();
+
for (; cell != endc; ++cell)
{
hp_fe_val.reinit(cell, 0);
}
// Save output
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "Solution");
data_out.add_data_vector(FE_Type, "FE_Type");
triangulation.prepare_coarsening_and_refinement();
// Interpolate solution
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solution_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solution_trans(dof_handler);
+
solution_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
}
// Save new solution
- DataOut<2, DoFHandler<2>> data_out2;
+ DataOut<2> data_out2;
data_out2.attach_dof_handler(dof_handler);
data_out2.add_data_vector(new_solution, "Solution");
data_out2.add_data_vector(FE_Type, "FE_type");
triangulation.prepare_coarsening_and_refinement();
// Interpolate solution
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solution_trans2(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solution_trans2(dof_handler);
solution_trans2.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
}
// Save new solution
- DataOut<2, DoFHandler<2>> data_out3;
+ DataOut<2> data_out3;
data_out3.attach_dof_handler(dof_handler);
data_out3.add_data_vector(new_solution2, "Solution");
data_out3.add_data_vector(FE_Type, "FE_type");
if (locally_owned_dofs.is_element(i))
solution(i) = i;
- SolutionTransfer<dim, TrilinosWrappers::MPI::Vector, DoFHandler<dim>>
- soltrans(dof_handler);
+ SolutionTransfer<dim, TrilinosWrappers::MPI::Vector> soltrans(dof_handler);
+
+
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
endc = tria.end();
if (locally_owned_dofs.is_element(i))
solution(i) = i;
- SolutionTransfer<dim, TrilinosWrappers::MPI::BlockVector, DoFHandler<dim>>
- soltrans(dof_handler);
+ SolutionTransfer<dim, TrilinosWrappers::MPI::BlockVector> soltrans(
+ dof_handler);
+
+
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
endc = tria.end();
triangulation.prepare_coarsening_and_refinement();
// Interpolate solution
- SolutionTransfer<2, Vector<double>, DoFHandler<2>> solution_trans(
- dof_handler);
+ SolutionTransfer<2, Vector<double>> solution_trans(dof_handler);
+
solution_trans.prepare_for_coarsening_and_refinement(solution);
triangulation.execute_coarsening_and_refinement();
{
typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
+
ue_vi_matrix = 0;
if (face->at_boundary())
{
typename DoFHandler<dim>::face_iterator face = cell->face(face_no);
+
if (face->at_boundary())
{
fe_v_face.reinit(cell, face_no);
++subface_no)
{
typename DoFHandler<dim>::cell_iterator neighbor_child =
+
cell->neighbor_child_on_subface(face_no, subface_no);
Assert(neighbor_child->face(neighbor2) ==
face->child(subface_no),
deallog << "Writing solution to <" << filename << ">..." << std::endl
<< std::endl;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution2, "u");
SolutionOutput<dim>::operator()(const DoFHandler<dim> &dof_handler,
const Vector<double> & solution) const
{
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
{
using active_cell_iterator = typename DoFHandler<dim>::active_cell_iterator;
+
const unsigned int n_threads = MultithreadInfo::n_threads();
std::vector<std::pair<active_cell_iterator, active_cell_iterator>>
thread_ranges =
template <int dim>
Solver<dim>::LinearSystem::LinearSystem(const DoFHandler<dim> &dof_handler)
+
{
hanging_node_constraints.clear();
fe_collection[cell->active_fe_index()].degree;
}
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
void
LaplaceProblem::output_results() const
{
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
void
LaplaceProblem::output_results() const
{
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
void
LaplaceProblem::output_results() const
{
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
void
LaplaceProblem::output_results() const
{
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
void
LaplaceProblem::output_results() const
{
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
void
LaplaceProblem<dim>::output_results() const
{
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
if (cycle >= 2)
return;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
DataOutBase::EpsFlags eps_flags;
eps_flags.z_scaling = 4;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.set_flags(eps_flags);
data_out.attach_dof_handler(dof_handler);
gmv_filename += ".gmv";
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
filename += ".gmv";
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution,
solution_names,
- DataOut<dim, DoFHandler<dim>>::type_dof_data,
+ DataOut<dim>::type_dof_data,
interpretation);
data_out.build_patches(fe.degree);
void
LaplaceProblem::output_results() const
{
- DataOut<2, DoFHandler<2>> data_out;
+ DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution, "solution");
data_out.build_patches();
vector_describes_relative_displacement);
DataOutBase::VtkFlags flags;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.set_flags(flags);
data_out.attach_dof_handler(dof_handler);
data_out.build_patches(
mapping,
fe_degree + 1,
- DataOut<dim,
- DoFHandler<dim, spacedim>>::CurvedCellRegion::curved_inner_cells);
+ DataOut<dim, spacedim>::CurvedCellRegion::curved_inner_cells);
static unsigned int counter = 0;
dh.distribute_dofs(fe);
deallog << "dofs " << dh.n_dofs() << std::endl;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.attach_triangulation(tr);
Vector<float> subdomain(tr.n_active_cells());
for (unsigned int i = 0; i < subdomain.size(); ++i)
TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
x_rel = interpolated;
- Functions::
- FEFieldFunction<dim, DoFHandler<dim>, TrilinosWrappers::MPI::Vector>
- field_function(dofh, x_rel);
+ Functions::FEFieldFunction<dim, TrilinosWrappers::MPI::Vector> field_function(
+ dofh, x_rel);
+
for (unsigned int test = 0; test < 4; ++test)
{
TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
x_rel = interpolated;
- Functions::
- FEFieldFunction<dim, DoFHandler<dim>, TrilinosWrappers::MPI::Vector>
- field_function(dofh, x_rel);
+ Functions::FEFieldFunction<dim, TrilinosWrappers::MPI::Vector> field_function(
+ dofh, x_rel);
+
std::vector<Point<dim>> points;
TrilinosWrappers::MPI::Vector x_rel(relevant_set, MPI_COMM_WORLD);
x_rel = interpolated;
- typename Functions::
- FEFieldFunction<dim, DoFHandler<dim>, TrilinosWrappers::MPI::Vector>
- field_func(dofh, x_rel);
+ typename Functions::FEFieldFunction<dim, TrilinosWrappers::MPI::Vector>
+
+ field_func(dofh, x_rel);
Point<2> p(0.1, 0.0);
std::vector<Point<2>> points;
locally_relevant_dofs,
com_small);
- parallel::distributed::
- SolutionTransfer<dim, PETScWrappers::MPI::Vector, DoFHandler<dim>>
- soltrans(dh);
+ parallel::distributed::SolutionTransfer<dim, PETScWrappers::MPI::Vector>
+ soltrans(dh);
for (unsigned int i = 0; i < locally_owned_dofs.n_elements(); ++i)
{
for (unsigned int i = 0; i < max_degree; ++i)
fe_collection.push_back(FE_Q<dim>(max_degree - i));
+
dh.deserialize_active_fe_indices();
dh.distribute_dofs(fe_collection);
PETScWrappers::MPI::Vector solution(locally_owned_dofs, com_all);
solution = PetscScalar();
- parallel::distributed::
- SolutionTransfer<dim, PETScWrappers::MPI::Vector, DoFHandler<dim>>
- soltrans(dh);
+ parallel::distributed::SolutionTransfer<dim, PETScWrappers::MPI::Vector>
+ soltrans(dh);
soltrans.deserialize(solution);
if (locally_owned_dofs.is_element(i))
solution(i) = i;
- SolutionTransfer<dim, TrilinosWrappers::MPI::Vector, DoFHandler<dim>>
- soltrans(dof_handler);
+ SolutionTransfer<dim, TrilinosWrappers::MPI::Vector> soltrans(dof_handler);
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
endc = tria.end();
if (locally_owned_dofs.is_element(i))
solution(i) = i;
- SolutionTransfer<dim, TrilinosWrappers::MPI::BlockVector, DoFHandler<dim>>
- soltrans(dof_handler);
+ SolutionTransfer<dim, TrilinosWrappers::MPI::BlockVector> soltrans(
+ dof_handler);
typename Triangulation<dim>::active_cell_iterator cell = tria.begin_active(),
endc = tria.end();
// ----- transfer -----
- parallel::distributed::
- SolutionTransfer<dim, TrilinosWrappers::MPI::Vector, DoFHandler<dim>>
- soltrans(dh);
+ parallel::distributed::SolutionTransfer<dim, TrilinosWrappers::MPI::Vector>
+ soltrans(dh);
soltrans.prepare_for_coarsening_and_refinement(old_solution);
tria.execute_coarsening_and_refinement();
dgq_solution);
dgq_solution.update_ghost_values();
- parallel::distributed::SolutionTransfer<
- dim,
- LinearAlgebra::distributed::Vector<double>,
- DoFHandler<dim>>
- dgq_soltrans(dgq_dof_handler);
+ parallel::distributed::
+ SolutionTransfer<dim, LinearAlgebra::distributed::Vector<double>>
+
+
+ dgq_soltrans(dgq_dof_handler);
dgq_soltrans.prepare_for_coarsening_and_refinement(dgq_solution);
// refine and transfer
data_out.add_data_vector(
results[l],
"solution",
- DataOut_DoFData<DoFHandler<dim>, dim>::DataVectorType::type_dof_data);
+ DataOut_DoFData<dim, dim>::DataVectorType::type_dof_data);
data_out.build_patches(*mapping_, 2);
std::ofstream output("test." + std::to_string(dim) + "." +
data_out.add_data_vector(
results[l],
"solution",
- DataOut_DoFData<DoFHandler<dim>, dim>::DataVectorType::type_dof_data);
+ DataOut_DoFData<dim, dim>::DataVectorType::type_dof_data);
data_out.build_patches(*mapping_, 2);
std::ofstream output("test." + std::to_string(dim) + "." +
fe_degrees(index) = dof_handler.get_fe(cell->active_fe_index()).degree;
}
- dealii::DataOut<dim, dealii::DoFHandler<dim>> data_out;
+ dealii::DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(values, std::string("function_interpolation"));
data_out.add_data_vector(fe_degrees, std::string("fe_degree"));
fe_degrees(index) = dof_handler.get_fe(cell->active_fe_index()).degree;
}
- dealii::DataOut<dim, dealii::DoFHandler<dim>> data_out;
+ dealii::DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(values, std::string("function_interpolation"));
data_out.add_data_vector(fe_degrees, std::string("fe_degree"));
for (unsigned int i = 0; i < dof_handler.n_dofs(); ++i)
vector(i) = i;
- Functions::FEFieldFunction<dim, DoFHandler<dim>> fe_field(dof_handler,
- vector);
- QGauss<dim> quadrature(5);
+ Functions::FEFieldFunction<dim> fe_field(dof_handler, vector);
+ QGauss<dim> quadrature(5);
deallog << "values:" << std::endl;
if (std::fabs(v(i)) < 1e-12)
v(i) = 0;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dh);
std::vector<DataComponentInterpretation::DataComponentInterpretation>
dim, DataComponentInterpretation::component_is_part_of_vector);
data_out.add_data_vector(v,
+
"x",
- DataOut<dim, DoFHandler<dim>>::type_dof_data,
+ DataOut<dim>::type_dof_data,
data_component_interpretation);
data_out.build_patches(fe[0].degree);
DataOutBase::VtkFlags flags;
// flags.write_higher_order_cells = true;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.set_flags(flags);
data_out.add_data_vector(dof_handler, curvature_vector, "curvature");
data_out.add_data_vector(dof_handler_dim, normal_vector, "normal");
- data_out.build_patches(mapping,
- fe_degree + 1,
- DataOut<dim, DoFHandler<dim, spacedim>>::
- CurvedCellRegion::curved_inner_cells);
+ data_out.build_patches(
+ mapping,
+ fe_degree + 1,
+ DataOut<dim, spacedim>::CurvedCellRegion::curved_inner_cells);
data_out.write_vtu_with_pvtu_record("./",
"data_surface",
0,
DataOutBase::VtkFlags flags;
// flags.write_higher_order_cells = true;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.set_flags(flags);
data_out.attach_dof_handler(dof_handler);
- data_out.build_patches(mapping,
- fe_degree + 1,
- DataOut<dim, DoFHandler<dim, spacedim>>::
- CurvedCellRegion::curved_inner_cells);
+ data_out.build_patches(
+ mapping,
+ fe_degree + 1,
+ DataOut<dim, spacedim>::CurvedCellRegion::curved_inner_cells);
data_out.write_vtu_with_pvtu_record("./",
"data_surface",
0,
if (dim == spacedim)
flags.write_higher_order_cells = true;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.set_flags(flags);
data_out.attach_dof_handler(dof_handler);
deallog << "Writing solution to <" << filename << ">..." << std::endl
<< std::endl;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution2, "u");
deallog << "Writing solution to <" << filename << ">..." << std::endl
<< std::endl;
- DataOut<dim, DoFHandler<dim>> data_out;
+ DataOut<dim> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.add_data_vector(solution1, "u");
DataComponentInterpretation::DataComponentInterpretation::
component_is_part_of_vector);
- data_out.add_data_vector(incremental_displacement,
- solution_names,
- DataOut_DoFData<DoFHandler<dim, dim>, dim, dim>::
- DataVectorType::type_automatic,
- solution_interpretation);
+ data_out.add_data_vector(
+ incremental_displacement,
+ solution_names,
+ DataOut_DoFData<dim, dim>::DataVectorType::type_automatic,
+ solution_interpretation);
Vector<double> norm_of_stress(triangulation.n_active_cells());
void
LaplaceBeltramiProblem<spacedim>::output_results() const
{
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.attach_dof_handler(dof_handler);
- data_out.add_data_vector(
- solution,
- "solution",
- DataOut<dim, DoFHandler<dim, spacedim>>::type_dof_data);
+ data_out.add_data_vector(solution,
+ "solution",
+ DataOut<dim, spacedim>::type_dof_data);
data_out.build_patches(mapping, mapping.get_degree());
const std::string filename =
{
DataOutBase::VtkFlags flags;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.set_flags(flags);
data_out.attach_dof_handler(dof_handler);
data_out.build_patches(
MappingQGeneric<dim, spacedim>(4),
fe_degree + 1,
- DataOut<dim,
- DoFHandler<dim, spacedim>>::CurvedCellRegion::curved_inner_cells);
+ DataOut<dim, spacedim>::CurvedCellRegion::curved_inner_cells);
#if false
std::ofstream output("test.0.vtk");
MappingFEField<dim, spacedim> mapping(dof_handler_dim, euler_vector);
DataOutBase::VtkFlags flags;
- DataOut<dim, DoFHandler<dim, spacedim>> data_out;
+ DataOut<dim, spacedim> data_out;
data_out.set_flags(flags);
data_out.attach_dof_handler(dof_handler);
data_out.build_patches(
mapping,
fe_degree + 1,
- DataOut<dim,
- DoFHandler<dim, spacedim>>::CurvedCellRegion::curved_inner_cells);
+ DataOut<dim, spacedim>::CurvedCellRegion::curved_inner_cells);
#if false
std::ofstream output("test.1.vtk");