This patch required some work by hand.
// now provide everything that is
// needed for solving a Laplace
// equation.
- MappingQ1<2> mapping_q1;
+ MappingQGeneric<2> mapping_q1(1);
FE_Q<2> fe(2);
DoFHandler<2> dof_handler(triangulation);
dof_handler.distribute_dofs(fe);
try
{
std::pair<typename Triangulation<2>::active_cell_iterator, Point<2> > current_cell =
- GridTools::find_active_cell_around_point(MappingQ1<2>(), triangulation, test_point);
+ GridTools::find_active_cell_around_point(MappingQGeneric<2>(1), triangulation, test_point);
deallog << "cell: index = " << current_cell.first->index()
<< " level = " << current_cell.first->level() << std::endl;
// ---------------------------------------------------------------------
//
-// Copyright (C) 2003 - 2014 by the deal.II authors
+// Copyright (C) 2003 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
deallog << inside(tria, p2) << std::endl;
hp::MappingCollection<3> mappings;
- mappings.push_back (MappingQ1<3>());
- mappings.push_back (MappingQ1<3>());
+ mappings.push_back (MappingQGeneric<3>(1));
+ mappings.push_back (MappingQGeneric<3>(1));
hp::FECollection<3> fes;
fes.push_back (FE_Q<3>(1));
void check (Triangulation<3> &tria)
{
- MappingQ1<3> map;
+ MappingQGeneric<3> map(1);
Point<3> p (0.75,0,0);
void check (Triangulation<3> &tria)
{
- MappingQ1<3> map;
+ MappingQGeneric<3> map(1);
Point<3> p (0.75,0.75,0.75);
std::pair<Triangulation<3>::active_cell_iterator, Point<3> > cell
void check (Triangulation<2> &tria)
{
const std::vector<Point<2> > &v = tria.get_vertices();
- MappingQ1<2> map;
+ MappingQGeneric<2> map(1);
for (unsigned i=0; i<tria.n_vertices(); i++)
{
fe.push_back (FE_Q<dim>(5));
hp::MappingCollection<dim> mapping_1;
- mapping_1.push_back(MappingQ1<dim>());
- mapping_1.push_back(MappingQ1<dim>());
- mapping_1.push_back(MappingQ1<dim>());
+ mapping_1.push_back(MappingQGeneric<dim>(1));
+ mapping_1.push_back(MappingQGeneric<dim>(1));
+ mapping_1.push_back(MappingQGeneric<dim>(1));
hp::MappingCollection<dim> mapping_2;
- mapping_2.push_back(MappingQ1<dim>());
+ mapping_2.push_back(MappingQGeneric<dim>(1));
hp::DoFHandler<dim> dof_handler (tria);
fe.push_back (FE_Q<dim>(5));
hp::MappingCollection<dim> mapping_1;
- mapping_1.push_back(MappingQ1<dim>());
- mapping_1.push_back(MappingQ1<dim>());
- mapping_1.push_back(MappingQ1<dim>());
+ mapping_1.push_back(MappingQGeneric<dim>(1));
+ mapping_1.push_back(MappingQGeneric<dim>(1));
+ mapping_1.push_back(MappingQGeneric<dim>(1));
hp::MappingCollection<dim> mapping_2;
- mapping_2.push_back(MappingQ1<dim>());
+ mapping_2.push_back(MappingQGeneric<dim>(1));
hp::DoFHandler<dim> dof_handler (tria);
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- const MappingQGeneric<dim> mapping(1);
+ const MappingQGeneric<dim> mapping;
FE_DGQ<dim> fe;
DoFHandler<dim> dof_handler;
template <int dim>
DGMethod<dim>::DGMethod ()
:
- mapping (),
+ mapping (1),
fe (1),
dof_handler (triangulation),
quadrature (4),
-// test mapping surfaces in higher dimensions. when we use the MappingQ1
+// test mapping surfaces in higher dimensions. when we use the MappingQGeneric(1)
// class, each 1d cell in 2d space is mapped to a straight line and so all
// cell normals should be parallel. likewise, if the four vertices of a 2d
// cell in 3d space are in a plane, then the cell normal vectors at all
GridGenerator::extract_boundary_mesh (volume_mesh, boundary_mesh);
QGauss<dim-1> quadrature(2);
- MappingQ1<dim-1,dim> mapping;
+ MappingQGeneric<dim-1,dim> mapping(1);
FE_Q<dim-1,dim> fe (1);
FEValues<dim-1,dim> fe_values (mapping, fe, quadrature, update_normal_vectors);
// ---------------------------------------------------------------------
//
-// Copyright (C) 2005 - 2014 by the deal.II authors
+// Copyright (C) 2005 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
grid_out.write_ucd (tria, logfile);
QTrapez<dim> quad;
- MappingQ1<dim,spacedim> mapping;
+ MappingQGeneric<dim,spacedim> mapping(1);
typename Triangulation<dim,spacedim>::active_cell_iterator cell=tria.begin_active(),
endc=tria.end() ;
Point<spacedim> real;
dof_handler.distribute_dofs (fe);
Vector<double> interpolant (dof_handler.n_dofs());
- VectorTools::interpolate_based_on_material_id (MappingQ1<dim>(),
+ VectorTools::interpolate_based_on_material_id (MappingQGeneric<dim>(1),
dof_handler,
functions,
interpolant);
DoFTools::make_hanging_node_constraints (*dof_handler,
hn_constraints);
hn_constraints.close ();
- MappingQ1<2> map_default;
+ MappingQGeneric<2> map_default(1);
project (map_default, *dof_handler, hn_constraints,
QGauss<2> (6), ConstantFunction<2>(1., 2),
solution);
hn_constraints);
hn_constraints.close ();
- MappingQ1<2> map_default;
+ MappingQGeneric<2> map_default(1);
project (map_default, *dof_handler, hn_constraints,
QGauss<2> (6), TestMap1<2>(2),
template<int dim>
void plot_FE_Q_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Q<dim> q1(1);
plot_derivatives(m, q1, "Q1");
// plot_face_shape_functions(m, q1, "Q1");
template<int dim>
void plot_FE_DGQ_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_DGQ<dim> q1(1);
plot_derivatives(m, q1, "DGQ1");
// plot_face_shape_functions(m, q1, "DGQ1");
// FESystem test.
- MappingQ1<2> m;
+ MappingQGeneric<2> m(1);
FESystem<2> q2_q3(FE_Q<2>(2), 1,
FE_Q<2>(3), 1);
// plot_derivatives(m, q2_q3, "Q2_Q3");
template<int dim>
void plot_FE_Bernstein_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Bernstein<dim> b1(1);
plot_derivatives(m, b1, "B1");
// FESystem test.
- MappingQ1<2> m;
+ MappingQGeneric<2> m(1);
FESystem<2> q2_q3(FE_Bernstein<2>(2), 1,
FE_Bernstein<2>(3), 1);
// plot_derivatives(m, q2_q3, "B2_Q3");
template<int dim>
void plot_FE_Q_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
// FE_Q<dim> q1(1);
// plot_derivatives(m, q1, "Q1");
// plot_face_shape_functions(m, q1, "Q1");
template<int dim>
void plot_FE_DGQ_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_DGQ<dim> q1(1);
plot_derivatives(m, q1, "DGQ1");
FE_DGQ<dim> q2(2);
deallog.threshold_double(1.e-10);
Triangulation<2> tria;
- MappingQ1<2> mapping;
+ MappingQGeneric<2> mapping(1);
make_grid (tria);
std::vector<std::string> mapping_strings;
MappingCartesian<dim> cart;
- MappingQ1<dim> q1_old;
+ MappingQGeneric<dim> q1_old(1);
MappingQ<dim> q1tmp(1);
MappingQ<dim> q2tmp(2);
MappingQ<dim> q3tmp(3);
const Point<2> testp (.5, -.5); //test point
- MappingQ1<2> mapping;
+ MappingQGeneric<2> mapping(1);
deallog<<"Check project for 2D cube from (-1,-1), to (1,1)."<<std::endl;
const Point<3> testp (.5, -.5, 0); //test point
- MappingQ1<3> mapping;
+ MappingQGeneric<3> mapping(1);
deallog<<"Check project for 3D cube from (-1,-1,-1) to (1,1,1)."<<std::endl;
const Point<3> testp (1, 1, 1); //test point
- MappingQ1<3> mapping;
+ MappingQGeneric<3> mapping(1);
deallog<<"Check project for 3D parallelepiped with vectors (2, 0, 0), (0, 2, 0), and (0, 1, 2)."<<std::endl;
Triangulation<3>::active_cell_iterator
dof_handler.distribute_dofs (fe);
displacements.reinit (dof_handler.n_dofs());
- VectorTools::interpolate(MappingQ1<dim>(),dof_handler,
+ VectorTools::interpolate(MappingQGeneric<dim>(1),dof_handler,
imposed_displacement,displacements);
dof_handler.distribute_dofs (fe);
displacements.reinit (dof_handler.n_dofs());
- VectorTools::interpolate(MappingQ1<dim>(),dof_handler,
+ VectorTools::interpolate(MappingQGeneric<dim>(1),dof_handler,
imposed_displacement,displacements);
explicitly_move_mesh();
// ---------------------------------------------------------------------
//
-// Copyright (C) 2006 - 2014 by the deal.II authors
+// Copyright (C) 2006 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
GridGenerator::hyper_ball (triangulation);
triangulation.set_boundary (0, boundary_description);
triangulation.refine_global (1);
- MappingQ1< dim > mapping;
+ MappingQGeneric<dim> mapping(1);
Point<dim> p(-0.27999999999999992, -0.62999999999999989);
}
- MappingQ1< dim, spacedim > map;
+ MappingQGeneric<dim,spacedim> map(1);
typename Triangulation<dim, spacedim >::active_cell_iterator
cell = triangulation.begin_active();
template<int dim>
void plot_FE_Bernstein_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Bernstein<dim> b1(1);
plot_shape_functions(m, b1, "B1");
template<int dim>
void plot_FE_DGP_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_DGP<dim> p1(1);
plot_shape_functions(m, p1, "DGP1");
template<int dim>
void plot_FE_DGPMonomial_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_DGPMonomial<dim> p1(1);
plot_shape_functions(m, p1, "DGPMonomial1");
template<int dim>
void plot_FE_DGPNonparametric_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_DGPNonparametric<dim> p0(0);
plot_shape_functions(m, p0, "DGPNonparametric0");
template<int dim>
void plot_FE_DGQ_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_DGQ<dim> q1(1);
plot_shape_functions(m, q1, "DGQ1");
template<int dim>
void plot_FE_FaceQ_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_FaceQ<dim> q0(0);
FE_FaceQ<dim> q1(1);
template<int dim>
void plot_FE_Nedelec_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Nedelec<dim> p0(0);
// plot_shape_functions(m, p1, "Nedelec1");
// plot_face_shape_functions(m, p1, "Nedelec1");
template<int dim>
void plot_FE_Q_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Q<dim> q1(1);
plot_shape_functions(m, q1, "Q1");
template<int dim>
void plot_FE_Q_Bubbles_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Q_Bubbles<dim> q1(1);
plot_shape_functions(m, q1, "Q1_Bubbles");
template<int dim>
void plot_FE_Q_DG0_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Q_DG0<dim> q1(1);
plot_shape_functions(m, q1, "Q1_DG0");
template<int dim>
void plot_FE_Q_Hierarchical_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Q_Hierarchical<dim> q1(1);
plot_shape_functions(m, q1, "QHierarchical1");
template<int dim>
void plot_FE_Q_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_Q_iso_Q1<dim> q1(1);
plot_shape_functions(m, q1, "Q1");
// ---------------------------------------------------------------------
//
-// Copyright (C) 2013 - 2014 by the deal.II authors
+// Copyright (C) 2013 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
template<int dim>
void plot_FE_System_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
// FESystem<dim> p1(FE_Q<dim>(2), 1,
// FE_Q<dim>(dim<3 ? 3 : 2), 2);
template<int dim>
void plot_FE_TraceQ_shape_functions()
{
- MappingQ1<dim> m;
+ MappingQGeneric<dim> m(1);
FE_TraceQ<dim> tq1(1);
FE_TraceQ<dim> tq2(2);
// ---------------------------------------------------------------------
//
-// Copyright (C) 2006 - 2014 by the deal.II authors
+// Copyright (C) 2006 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
// use an explicit Q1 mapping. this will yield a zero solution
{
- VectorTools::project (hp::MappingCollection<dim>(MappingQ1<dim>()),
+ VectorTools::project (hp::MappingCollection<dim>(MappingQGeneric<dim>(1)),
dh, cm, hp::QCollection<dim>(QGauss<dim>(3)), F<dim>(),
v);
deallog << v.l2_norm() << std::endl;
template <int dim>
DGMethod<dim>::DGMethod ()
:
- mapping (MappingQ1<dim>()),
+ mapping (MappingQGeneric<dim>(1)),
fe (FE_DGQ<dim>(1)),
dof_handler (triangulation),
quadrature (QGauss<dim>(4)),
private:
- const MappingQGeneric<dim> mapping(1);
+ const MappingQGeneric<dim> mapping;
void setup_system ();
template <int dim>
AdvectionProblem<dim>::AdvectionProblem ()
:
- mapping(),
+ mapping(1),
wavespeed(1.0),
dof_handler (triangulation),
fe (FE_DGQ<dim>(0), 1),// p=0, and solving for a scalar
GridGenerator::hyper_cube (triangulation);
triangulation.refine_global(2);
- MappingQ1<dim> mapping_q1;
+ MappingQGeneric<dim> mapping_q1(1);
FESystem<dim> fe(FE_Q<dim>(2), 1, FE_Q<dim>(1), 1);
DoFHandler<dim> dof_handler(triangulation);
GridGenerator::hyper_cube (triangulation);
triangulation.refine_global(2);
- MappingQ1<dim> mapping_q1;
+ MappingQGeneric<dim> mapping_q1(1);
FESystem<dim> fe(FE_Q<dim>(2), 1, FE_Q<dim>(1), 1, FE_Q<dim>(3), 1);
DoFHandler<dim> dof_handler(triangulation);
GridGenerator::hyper_cube (triangulation);
triangulation.refine_global(2);
- MappingQ1<dim> mapping_q1;
+ MappingQGeneric<dim> mapping_q1(1);
FE_Q<dim> q1(1);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(q1);
GridGenerator::hyper_cube (triangulation);
triangulation.refine_global(2);
- MappingQ1<dim> mapping_q1;
+ MappingQGeneric<dim> mapping_q1(1);
FE_Q<dim> q1(1);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(q1);
GridGenerator::hyper_cube (triangulation);
triangulation.refine_global(2);
- MappingQ1<dim> mapping_q1;
+ MappingQGeneric<dim> mapping_q1(1);
FESystem<dim> fe(FE_Q<dim>(1), 1, FE_Q<dim>(1), 1);
DoFHandler<dim> dof_handler(triangulation);
GridGenerator::hyper_cube (triangulation);
triangulation.refine_global(2);
- MappingQ1<dim> mapping_q1;
+ MappingQGeneric<dim> mapping_q1(1);
FE_Q<dim> q1(1);
DoFHandler<dim> dof_handler(triangulation);
dof_handler.distribute_dofs(q1);
void setup_system ();
parallel::distributed::Triangulation<dim> triangulation;
- const MappingQ1<dim> mapping;
+ const MappingQGeneric<dim> mapping;
const FiniteElement<dim> &fe;
DoFHandler<dim> dof_handler;
triangulation (MPI_COMM_WORLD,Triangulation<dim>::
limit_level_difference_at_vertices,
parallel::distributed::Triangulation<dim>::construct_multigrid_hierarchy),
- mapping(),
+ mapping(1),
fe(fe),
dof_handler(triangulation)
{
dofh.distribute_dofs (fe);
std::map<types::global_dof_index, Point<dim> > points;
- DoFTools::map_dofs_to_support_points (MappingQ1<dim>(),
+ DoFTools::map_dofs_to_support_points (MappingQGeneric<dim>(1),
dofh,
points);
if (Utilities::MPI::this_mpi_process (MPI_COMM_WORLD) == 0)
/* ---------------------------------------------------------------------
*
- * Copyright (C) 2008 - 2014 by the deal.II authors
+ * Copyright (C) 2008 - 2015 by the deal.II authors
*
* This file is part of the deal.II library.
*
unsigned int n_local_constraints =0 ;
std::map<types::global_dof_index, Point<dim> > support_points;
- DoFTools::map_dofs_to_support_points (MappingQ1<dim>(), dof_handler, support_points);
+ DoFTools::map_dofs_to_support_points (MappingQGeneric<dim>(1), dof_handler, support_points);
IndexSet constraints_lines = constraints.get_local_lines();
for (unsigned int i=0; i<constraints_lines.n_elements(); ++i)
void output_results (const unsigned int cycle) const;
parallel::distributed::Triangulation<dim> triangulation;
- const MappingQ1<dim> mapping;
+ const MappingQGeneric<dim> mapping;
const FiniteElement<dim> &fe;
DoFHandler<dim> dof_handler;
triangulation (MPI_COMM_WORLD,Triangulation<dim>::
limit_level_difference_at_vertices,
parallel::distributed::Triangulation<dim>::construct_multigrid_hierarchy),
- mapping(),
+ mapping(1),
fe(fe),
dof_handler(triangulation),
estimates(1)
void refine_local ();
Triangulation<dim> triangulation;
- const MappingQGeneric<dim> mapping(1);
+ const MappingQGeneric<dim> mapping;
FESystem<dim> fe;
DoFHandler<dim> mg_dof_handler_renumbered;
template <int dim>
LaplaceProblem<dim>::LaplaceProblem (const unsigned int deg) :
triangulation (Triangulation<dim>::limit_level_difference_at_vertices),
+ mapping(1),
fe (FE_Q<dim> (deg),3),
mg_dof_handler_renumbered (triangulation),
degree(deg)
void refine_local ();
Triangulation<dim> triangulation;
- const MappingQ1<dim> mapping;
+ const MappingQGeneric<dim> mapping;
FESystem<dim> fe;
DoFHandler<dim> mg_dof_handler;
DoFHandler<dim> mg_dof_handler_renumbered;
template <int dim>
LaplaceProblem<dim>::LaplaceProblem (const unsigned int deg) :
triangulation (Triangulation<dim>::limit_level_difference_at_vertices),
+ mapping(1),
fe (FE_Q<dim> (deg),3),
mg_dof_handler (triangulation),
mg_dof_handler_renumbered (triangulation),
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- const MappingQ1<dim> mapping;
+ const MappingQGeneric<dim> mapping;
const FiniteElement<dim> &fe;
DoFHandler<dim> dof_handler;
template <int dim>
InteriorPenaltyProblem<dim>::InteriorPenaltyProblem(const FiniteElement<dim> &fe)
:
- mapping(),
+ mapping(1),
fe(fe),
dof_handler(triangulation),
estimates(1)
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- const MappingQ1<dim> mapping;
+ const MappingQGeneric<dim> mapping;
const FiniteElement<dim> &fe;
DoFHandler<dim> dof_handler;
MGConstrainedDoFs mg_constraints;
template <int dim>
InteriorPenaltyProblem<dim>::InteriorPenaltyProblem(const FiniteElement<dim> &fe)
:
- mapping(),
+ mapping(1),
fe(fe),
dof_handler(triangulation),
estimates(1)
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- const MappingQ1<dim> mapping;
+ const MappingQGeneric<dim> mapping;
const FiniteElement<dim> &fe;
DoFHandler<dim> dof_handler;
template <int dim>
InteriorPenaltyProblem<dim>::InteriorPenaltyProblem(const FiniteElement<dim> &fe)
:
- mapping(),
+ mapping(1),
fe(fe),
dof_handler(triangulation),
estimates(1)
void output_results (const unsigned int cycle) const;
Triangulation<dim> triangulation;
- const MappingQ1<dim> mapping;
+ const MappingQGeneric<dim> mapping;
const FiniteElement<dim> &fe;
DoFHandler<dim> dof_handler;
template <int dim>
InteriorPenaltyProblem<dim>::InteriorPenaltyProblem(const FiniteElement<dim> &fe)
:
- mapping(),
+ mapping(1),
fe(fe),
dof_handler(triangulation),
estimates(1)
std::vector<Mapping<dim>*> maps;
// maps.push_back (new MappingCartesian<dim>);
- maps.push_back (new MappingQ1<dim>);
+ maps.push_back (new MappingQGeneric<dim>(1));
maps.push_back (new MappingQ<dim>(2));
std::vector<FiniteElement<dim>*> elements;
// ---------------------------------------------------------------------
//
-// Copyright (C) 2006 - 2014 by the deal.II authors
+// Copyright (C) 2006 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
// use an explicit Q1 mapping. this will yield a zero solution
{
- VectorTools::project (MappingQ1<dim>(),
+ VectorTools::project (MappingQGeneric<dim>(1),
dh, cm, QGauss<dim>(3), F<dim>(),
v);
deallog << v.l2_norm() << std::endl;