// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
*/
typedef Quadrature<dim-1> SubQuadrature;
- /**
- * @deprecated Use size()
- * instead.
- *
- * Number of quadrature points.
- *
- * @warning After introduction of
- * the assignment operator, this
- * number is not constant anymore
- * and erroneous assignment can
- * compromise integrity of the
- * Quadrature object. Since
- * direct data access should be
- * considered a design flaw
- * anyway, it is strongly
- * suggested to use size()
- * instead.
- */
- unsigned int n_quadrature_points;
-
/**
* Constructor.
*
}
-
+//TODO: It would be desirable to have a Tensor<rank,0>
template <>
Quadrature<0>::Quadrature (const unsigned int)
- : n_quadrature_points(1),
- weights (1, 1.)
+ :
+// quadrature_points(1),
+ weights (1, 1.)
{}
template <int dim>
Quadrature<dim>::Quadrature (const unsigned int n_q) :
- n_quadrature_points(n_q),
quadrature_points (n_q, Point<dim>()),
weights (n_q, 0)
{}
Quadrature<dim>::Quadrature (const std::vector<Point<dim> > &points,
const std::vector<double> &weights)
:
- n_quadrature_points(points.size()),
quadrature_points(points),
weights(weights)
{
template <int dim>
Quadrature<dim>::Quadrature (const std::vector<Point<dim> > &points)
:
- n_quadrature_points(points.size()),
quadrature_points(points),
weights(points.size(), std::atof("Inf"))
{
template <int dim>
Quadrature<dim>::Quadrature (const Point<dim> &point)
:
- n_quadrature_points(1),
quadrature_points(std::vector<Point<dim> > (1, point)),
weights(std::vector<double> (1, 1.))
{}
template <>
-Quadrature<0>::Quadrature (const Quadrature<-1> &,
- const Quadrature<1> &)
- :
- n_quadrature_points (1),
- weights(1, 1.)
-{}
+Quadrature<0>::Quadrature (const SubQuadrature&,
+ const Quadrature<1>&)
+{
+ Assert(false, ExcImpossibleInDim(0));
+}
Quadrature<dim>::Quadrature (const SubQuadrature &q1,
const Quadrature<1> &q2)
:
- n_quadrature_points (q1.size() *
- q2.size()),
- quadrature_points (n_quadrature_points),
- weights (n_quadrature_points, 0)
+ quadrature_points (q1.size() * q2.size()),
+ weights (q1.size() * q2.size())
{
unsigned int present_index = 0;
for (unsigned int i2=0; i2<q2.size(); ++i2)
Quadrature<1>::Quadrature (const SubQuadrature&,
const Quadrature<1>& q2)
:
- n_quadrature_points (q2.size()),
- quadrature_points (n_quadrature_points),
- weights (n_quadrature_points, 0)
+ quadrature_points (q2.size()),
+ weights (q2.size())
{
unsigned int present_index = 0;
for (unsigned int i2=0; i2<q2.size(); ++i2)
template <>
Quadrature<0>::Quadrature (const Quadrature<1> &)
:
- n_quadrature_points (1),
- weights (1, 1.)
+ Subscriptor(),
+// quadrature_points(1),
+ weights(1,1.)
{}
template <>
Quadrature<1>::Quadrature (const Quadrature<0> &)
:
- n_quadrature_points (numbers::invalid_unsigned_int),
- quadrature_points (),
- weights ()
+ Subscriptor()
{
// this function should never be
// called -- this should be the
// copy constructor in 1d...
- Assert (false, ExcInternalError());
+ Assert (false, ExcImpossibleInDim(1));
}
Quadrature<dim>::Quadrature (const Quadrature<dim != 1 ? 1 : 0> &q)
:
Subscriptor(),
- n_quadrature_points (dimpow<dim>(q.size())),
- quadrature_points (n_quadrature_points),
- weights (n_quadrature_points, 0.)
+ quadrature_points (dimpow<dim>(q.size())),
+ weights (dimpow<dim>(q.size()))
{
Assert (dim <= 3, ExcNotImplemented());
Quadrature<dim>::Quadrature (const Quadrature<dim> &q)
:
Subscriptor(),
- n_quadrature_points (q.size()),
quadrature_points (q.quadrature_points),
weights (q.weights)
{}
{
weights = q.weights;
quadrature_points = q.quadrature_points;
- n_quadrature_points = q.size();
return *this;
}
DEAL_II_NAMESPACE_OPEN
+//#define DEBUG_NEDELEC
template <int dim>
FE_Nedelec<dim>::FE_Nedelec (const unsigned int p) :
std::vector<bool> (dim, true))),
deg (p)
{
+#ifdef DEBUG_NEDELEC
+ deallog << get_name() << std::endl;
+#endif
+
Assert (dim >= 2, ExcImpossibleInDim(dim));
const unsigned int n_dofs = this->dofs_per_cell;
// matrices to the right sizes.
// Restriction only for isotropic
// refinement
+#ifdef DEBUG_NEDELEC
+ deallog << "Embedding" << std::endl;
+#endif
this->reinit_restriction_and_prolongation_matrices ();
// Fill prolongation matrices with embedding operators
FETools::compute_embedding_matrices (*this, this->prolongation, true);
+#ifdef DEBUG_NEDELEC
+ deallog << "Restriction" << std::endl;
+#endif
initialize_restriction ();
-
+
+#ifdef DEBUG_NEDELEC
+ deallog << "Face Embedding" << std::endl;
+#endif
FullMatrix<double> face_embeddings[GeometryInfo<dim>::max_children_per_face];
for (unsigned int i = 0; i < GeometryInfo<dim>::max_children_per_face; ++i)
:
FE_Poly<TensorProductPolynomials<dim>, dim, spacedim> (
TensorProductPolynomials<dim>(Polynomials::generate_complete_Lagrange_basis(points.get_points())),
- FiniteElementData<dim>(get_dpo_vector(points.n_quadrature_points-1),
- 1, points.n_quadrature_points-1,
+ FiniteElementData<dim>(get_dpo_vector(points.size()-1),
+ 1, points.size()-1,
FiniteElementData<dim>::H1),
std::vector<bool> (1, false),
std::vector<std::vector<bool> >(1, std::vector<bool>(1,true))),
- face_index_map(FE_Q_Helper::invert_numbering(face_lexicographic_to_hierarchic_numbering (points.n_quadrature_points-1)))
+ face_index_map(FE_Q_Helper::invert_numbering(face_lexicographic_to_hierarchic_numbering (points.size()-1)))
{
- const unsigned int degree = points.n_quadrature_points-1;
+ const unsigned int degree = points.size()-1;
Assert (degree > 0,
ExcMessage ("This element can only be used for polynomial degrees "
// trapezoidal quadrature rule.
const QTrapez<1> q1d;
const QIterated<dim> q_iterated(q1d,map_degree);
- const unsigned int n_q_points = q_iterated.n_quadrature_points;
+ const unsigned int n_q_points = q_iterated.size();
// we then need to define a renumbering
// vector that allows us to go from a
// components appropriately, or create a
// separate dof handler for the displacements.
- const unsigned int n_support_pts = support_quadrature.n_quadrature_points;
+ const unsigned int n_support_pts = support_quadrature.size();
const unsigned int n_components = euler_dof_handler->get_fe().n_components();
Assert (n_components >= spacedim, ExcDimensionMismatch(n_components, spacedim) );
ParallelDataBase<dim,spacedim> (n_components,
n_datasets,
n_subdivisions,
- quadrature.n_quadrature_points,
+ quadrature.size(),
n_postprocessor_outputs,
finite_elements),
q_collection (quadrature),
DataOutBase::Patch<DH::dimension, DH::space_dimension> sample_patch;
sample_patch.n_subdivisions = n_subdivisions;
- sample_patch.data.reinit (n_datasets, patch_points.n_quadrature_points);
+ sample_patch.data.reinit (n_datasets, patch_points.size());
ParallelDataBase<dim,spacedim> (n_components,
n_datasets,
n_subdivisions,
- quadrature.n_quadrature_points,
+ quadrature.size(),
n_postprocessor_outputs,
finite_elements),
q_collection (quadrature),
DataOutBase::Patch<DH::dimension-1,DH::space_dimension> sample_patch;
sample_patch.n_subdivisions = n_subdivisions;
sample_patch.data.reinit (n_datasets,
- patch_points.n_quadrature_points);
+ patch_points.size());
// now build the patches in parallel
WorkStream::run (&all_faces[0],
ParallelDataBase<dim,spacedim> (n_components,
n_datasets,
n_subdivisions,
- quadrature.n_quadrature_points,
+ quadrature.size(),
n_postprocessor_outputs,
finite_elements),
n_patches_per_circle (n_patches_per_circle),
{
new_patches[i].n_subdivisions = n_subdivisions;
new_patches[i].data.reinit (n_datasets,
- patch_points.n_quadrature_points
+ patch_points.size()
* (n_subdivisions+1));
}
hp::FEValues<dim> x_fe_patch_values (fe_collection, q_collection,
update_values);
- const unsigned int n_q_points = patch_points.n_quadrature_points;
+ const unsigned int n_q_points = patch_points.size();
std::vector<double> patch_values (n_q_points);
std::vector<Vector<double> > patch_values_system (n_q_points,
Vector<double>(n_components));
void
ParallelData<DH>::resize (const unsigned int active_fe_index)
{
- const unsigned int n_q_points = face_quadratures[active_fe_index].n_quadrature_points;
+ const unsigned int n_q_points = face_quadratures[active_fe_index].size();
const unsigned int n_components = finite_element.n_components();
normal_vectors.resize(n_q_points);
const unsigned int dim = DH::dimension;
const typename DH::face_iterator face = cell->face(face_no);
- const unsigned int n_q_points = parallel_data.face_quadratures[cell->active_fe_index()]
- .n_quadrature_points,
+ const unsigned int n_q_points = parallel_data.face_quadratures[cell->active_fe_index()].size(),
n_components = parallel_data.finite_element.n_components(),
n_solution_vectors = solutions.size();
const unsigned int dim = DH::dimension;
const typename DH::cell_iterator neighbor = cell->neighbor(face_no);
- const unsigned int n_q_points = parallel_data.face_quadratures[cell->active_fe_index()]
- .n_quadrature_points,
+ const unsigned int n_q_points = parallel_data.face_quadratures[cell->active_fe_index()].size(),
n_components = parallel_data.finite_element.n_components(),
n_solution_vectors = solutions.size();
const typename DH::face_iterator