--- /dev/null
+Changed: DoFHandler::get_finite_element(unsigned int) has been removed again in
+favor of equipping DoFHandler::get_fe() with a (defaulted) unsigned int
+parameter. hp::DoFHandler::get_finite_element(unsigned int) has been renamed to
+hp::DoFHandler::get_fe(unsigned int).
+<br>
+(Daniel Arndt, 2017/08/25)
// formula with number of points one higher than the polynomial degree
// used. Since the quadratures for cells, boundary and interior faces can
// be selected independently, we have to hand over this value three times.
- const unsigned int n_gauss_points = dof_handler.get_finite_element().degree+1;
+ const unsigned int n_gauss_points = dof_handler.get_fe().degree+1;
info_box.initialize_gauss_quadrature(n_gauss_points,
n_gauss_points,
n_gauss_points);
//
// Ideally, we would check this at the beginning of the
// function, for example by a statement like <code>Assert
- // (dof_handler.get_finite_element().dofs_per_vertex @> 0,
+ // (dof_handler.get_fe().dofs_per_vertex @> 0,
// ExcNotImplemented())</code>, which should make it quite clear
// what is going wrong when the exception is triggered. In this
// case, we omit it (which is indeed bad style), but knowing
// ...then have some objects of which the meaning will become clear
// below...
QTrapez<dim> vertex_quadrature;
- FEValues<dim> fe_values (dof_handler.get_finite_element(),
+ FEValues<dim> fe_values (dof_handler.get_fe(),
vertex_quadrature,
update_gradients | update_quadrature_points);
std::vector<Tensor<1,dim> >
// have abbreviations for the number of quadrature points and shape
// functions...
QGauss<dim> quadrature(4);
- FEValues<dim> fe_values (dof_handler.get_finite_element(), quadrature,
+ FEValues<dim> fe_values (dof_handler.get_fe(), quadrature,
update_gradients |
update_quadrature_points |
update_JxW_values);
const unsigned int n_q_points = fe_values.n_quadrature_points;
- const unsigned int dofs_per_cell = dof_handler.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
// ...and have two objects that are used to store the global indices of
// the degrees of freedom on a cell, and the values of the gradients of
template <int dim>
void DGMethod<dim>::assemble_system2 ()
{
- const unsigned int dofs_per_cell = dof_handler.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> dofs (dofs_per_cell);
std::vector<types::global_dof_index> dofs_neighbor (dofs_per_cell);
const Vector<double> &solution,
Vector<double> &refinement_indicators)
{
- const unsigned int dofs_per_cell = dof_handler.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
std::vector<unsigned int> dofs (dofs_per_cell);
const QMidpoint<dim> quadrature_formula;
const UpdateFlags update_flags = update_gradients;
- FEValues<dim> fe_v (mapping, dof_handler.get_finite_element(),
+ FEValues<dim> fe_v (mapping, dof_handler.get_fe(),
quadrature_formula, update_flags);
std::vector<std::vector<Tensor<1,dim> > >
template <int dim>
void ConservationLaw<dim>::assemble_system ()
{
- const unsigned int dofs_per_cell = dof_handler.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> dof_indices (dofs_per_cell);
std::vector<types::global_dof_index> dof_indices_neighbor (dofs_per_cell);
// This starts like before,
MeshWorker::IntegrationInfoBox<dim> info_box;
- const unsigned int n_gauss_points = dof_handler.get_finite_element().tensor_degree()+1;
+ const unsigned int n_gauss_points = dof_handler.get_fe().tensor_degree()+1;
info_box.initialize_gauss_quadrature(n_gauss_points, n_gauss_points+1, n_gauss_points);
// but now we need to notify the info box of the finite element function we
cell->set_user_index(i);
MeshWorker::IntegrationInfoBox<dim> info_box;
- const unsigned int n_gauss_points = dof_handler.get_finite_element().tensor_degree()+1;
+ const unsigned int n_gauss_points = dof_handler.get_fe().tensor_degree()+1;
info_box.initialize_gauss_quadrature(n_gauss_points, n_gauss_points+1, n_gauss_points);
AnyData solution_data;
for (; cell!=endc; ++cell)
for (unsigned int v=0; v<GeometryInfo<dim>::vertices_per_cell; ++v)
{
- Assert (dof_handler.get_finite_element().dofs_per_cell ==
+ Assert (dof_handler.get_fe().dofs_per_cell ==
GeometryInfo<dim>::vertices_per_cell,
ExcNotImplemented());
FEFaceValues<dim> saturation_fe_face_values_neighbor (saturation_fe, face_quadrature_formula,
update_values);
- const unsigned int dofs_per_cell = saturation_dof_handler.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = saturation_dof_handler.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const double global_max_u_F_prime = get_max_u_F_prime ();
end_sync_it,
&GradientEstimation::template estimate_cell<dim>,
std::function<void (const EstimateCopyData &)> (),
- EstimateScratchData<dim> (dof_handler.get_finite_element(),
+ EstimateScratchData<dim> (dof_handler.get_fe(),
solution),
EstimateCopyData ());
}
const unsigned int i)
{
return dof_handler.mg_vertex_dofs[vertex_index].get_index (level, i,
- dof_handler.get_finite_element().dofs_per_vertex);
+ dof_handler.get_fe().dofs_per_vertex);
}
types::global_dof_index index)
{
return dof_handler.mg_vertex_dofs[vertex_index].set_index (level, i,
- dof_handler.get_finite_element().dofs_per_vertex,
+ dof_handler.get_fe().dofs_per_vertex,
index);
}
(void)fe_index;
Assert ((fe_index == dealii::DoFHandler<dim,spacedim>::default_fe_index),
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
- Assert (local_index < dof_handler.get_finite_element().dofs_per_vertex,
+ Assert (local_index < dof_handler.get_fe().dofs_per_vertex,
ExcIndexRange(local_index, 0,
- dof_handler.get_finite_element().dofs_per_vertex));
+ dof_handler.get_fe().dofs_per_vertex));
dof_handler.vertex_dofs[vertex_index *
- dof_handler.get_finite_element().dofs_per_vertex
+ dof_handler.get_fe().dofs_per_vertex
+ local_index]
= global_index;
}
(void)fe_index;
Assert ((fe_index == dealii::DoFHandler<dim,spacedim>::default_fe_index),
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
- Assert (local_index < dof_handler.get_finite_element().dofs_per_vertex,
+ Assert (local_index < dof_handler.get_fe().dofs_per_vertex,
ExcIndexRange(local_index, 0,
- dof_handler.get_finite_element().dofs_per_vertex));
+ dof_handler.get_fe().dofs_per_vertex));
return
dof_handler.vertex_dofs[vertex_index *
- dof_handler.get_finite_element().dofs_per_vertex
+ dof_handler.get_fe().dofs_per_vertex
+ local_index];
}
const unsigned int fe_index)
{
const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
- = accessor.get_dof_handler ().get_finite_element(fe_index);
+ = accessor.get_dof_handler ().get_fe(fe_index);
std::vector<types::global_dof_index>::const_iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_cell; ++vertex)
const unsigned int fe_index)
{
const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
- = accessor.get_dof_handler ().get_finite_element(fe_index);
+ = accessor.get_dof_handler ().get_fe(fe_index);
std::vector<types::global_dof_index>::const_iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<3>::vertices_per_cell; ++vertex)
Assert (this->dof_handler != nullptr, ExcInvalidObject ());
Assert (vertex < GeometryInfo<structdim>::vertices_per_cell,
ExcIndexRange (vertex, 0, GeometryInfo<structdim>::vertices_per_cell));
- Assert (i < this->dof_handler->get_finite_element (fe_index).dofs_per_vertex,
- ExcIndexRange (i, 0, this->dof_handler->get_finite_element (fe_index).dofs_per_vertex));
+ Assert (i < this->dof_handler->get_fe (fe_index).dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe (fe_index).dofs_per_vertex));
return
dealii::internal::DoFAccessor::Implementation::mg_vertex_dof_index
Assert (this->dof_handler != nullptr, ExcInvalidObject ());
Assert (vertex < GeometryInfo<structdim>::vertices_per_cell,
ExcIndexRange (vertex, 0, GeometryInfo<structdim>::vertices_per_cell));
- Assert (i < this->dof_handler->get_finite_element (fe_index).dofs_per_vertex,
- ExcIndexRange (i, 0, this->dof_handler->get_finite_element (fe_index).dofs_per_vertex));
+ Assert (i < this->dof_handler->get_fe (fe_index).dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe (fe_index).dofs_per_vertex));
return
dealii::internal::DoFAccessor::Implementation::set_mg_vertex_dof_index
Assert (fe_index_is_active (fe_index) == true,
ExcMessage ("This function can only be called for active fe indices"));
- return this->dof_handler->get_finite_element(fe_index);
+ return this->dof_handler->get_fe(fe_index);
}
const DoFHandlerType &handler = accessor.get_dof_handler();
const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
- = handler.get_finite_element (fe_index);
+ = handler.get_fe (fe_index);
std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<1>::vertices_per_cell; ++vertex)
const DoFHandlerType &handler = accessor.get_dof_handler();
const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
- = handler.get_finite_element (fe_index);
+ = handler.get_fe (fe_index);
std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_cell; ++vertex)
const DoFHandlerType &handler = accessor.get_dof_handler();
const FiniteElement<DoFHandlerType::dimension, DoFHandlerType::space_dimension> &fe
- = handler.get_finite_element (fe_index);
+ = handler.get_fe (fe_index);
std::vector<types::global_dof_index>::iterator next = dof_indices.begin ();
for (unsigned int vertex = 0; vertex < GeometryInfo<3>::vertices_per_cell; ++vertex)
{
case 1:
Assert (dof_indices.size() ==
- (2*this->dof_handler->get_finite_element(fe_index).dofs_per_vertex +
- this->dof_handler->get_finite_element(fe_index).dofs_per_line),
+ (2*this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe(fe_index).dofs_per_line),
ExcVectorDoesNotMatch());
break;
case 2:
Assert (dof_indices.size() ==
- (4*this->dof_handler->get_finite_element(fe_index).dofs_per_vertex +
- 4*this->dof_handler->get_finite_element(fe_index).dofs_per_line +
- this->dof_handler->get_finite_element(fe_index).dofs_per_quad),
+ (4*this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ 4*this->dof_handler->get_fe(fe_index).dofs_per_line +
+ this->dof_handler->get_fe(fe_index).dofs_per_quad),
ExcVectorDoesNotMatch());
break;
case 3:
Assert (dof_indices.size() ==
- (8*this->dof_handler->get_finite_element(fe_index).dofs_per_vertex +
- 12*this->dof_handler->get_finite_element(fe_index).dofs_per_line +
- 6*this->dof_handler->get_finite_element(fe_index).dofs_per_quad +
- this->dof_handler->get_finite_element(fe_index).dofs_per_hex),
+ (8*this->dof_handler->get_fe(fe_index).dofs_per_vertex +
+ 12*this->dof_handler->get_fe(fe_index).dofs_per_line +
+ 6*this->dof_handler->get_fe(fe_index).dofs_per_quad +
+ this->dof_handler->get_fe(fe_index).dofs_per_hex),
ExcVectorDoesNotMatch());
break;
default:
// non-active thing
Assert (this->fe_index_is_active (fe_index)
||
- (this->dof_handler->get_finite_element(fe_index).dofs_per_cell ==
+ (this->dof_handler->get_fe(fe_index).dofs_per_cell ==
GeometryInfo<structdim>::vertices_per_cell *
- this->dof_handler->get_finite_element(fe_index).dofs_per_vertex),
+ this->dof_handler->get_fe(fe_index).dofs_per_vertex),
ExcInternalError());
// now do the actual work
case 1:
{
Assert (dof_indices.size () ==
- 2 * this->dof_handler->get_finite_element (fe_index).dofs_per_vertex +
- this->dof_handler->get_finite_element (fe_index).dofs_per_line,
+ 2 * this->dof_handler->get_fe (fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe (fe_index).dofs_per_line,
ExcVectorDoesNotMatch ());
break;
}
case 2:
{
Assert (dof_indices.size () ==
- 4 * (this->dof_handler->get_finite_element (fe_index).dofs_per_vertex +
- this->dof_handler->get_finite_element (fe_index).dofs_per_line) +
- this->dof_handler->get_finite_element (fe_index).dofs_per_quad,
+ 4 * (this->dof_handler->get_fe (fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe (fe_index).dofs_per_line) +
+ this->dof_handler->get_fe (fe_index).dofs_per_quad,
ExcVectorDoesNotMatch ());
break;
}
case 3:
{
Assert (dof_indices.size () ==
- 8 * this->dof_handler->get_finite_element (fe_index).dofs_per_vertex +
- 12 * this->dof_handler->get_finite_element (fe_index).dofs_per_line +
- 6 * this->dof_handler->get_finite_element (fe_index).dofs_per_quad +
- this->dof_handler->get_finite_element (fe_index).dofs_per_hex,
+ 8 * this->dof_handler->get_fe (fe_index).dofs_per_vertex +
+ 12 * this->dof_handler->get_fe (fe_index).dofs_per_line +
+ 6 * this->dof_handler->get_fe (fe_index).dofs_per_quad +
+ this->dof_handler->get_fe (fe_index).dofs_per_hex,
ExcVectorDoesNotMatch ());
break;
}
case 1:
{
Assert (dof_indices.size () ==
- 2 * this->dof_handler->get_finite_element (fe_index).dofs_per_vertex +
- this->dof_handler->get_finite_element (fe_index).dofs_per_line,
+ 2 * this->dof_handler->get_fe (fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe (fe_index).dofs_per_line,
ExcVectorDoesNotMatch ());
break;
}
case 2:
{
Assert (dof_indices.size () ==
- 4 * (this->dof_handler->get_finite_element (fe_index).dofs_per_vertex +
- this->dof_handler->get_finite_element (fe_index).dofs_per_line) +
- this->dof_handler->get_finite_element (fe_index).dofs_per_quad,
+ 4 * (this->dof_handler->get_fe (fe_index).dofs_per_vertex +
+ this->dof_handler->get_fe (fe_index).dofs_per_line) +
+ this->dof_handler->get_fe (fe_index).dofs_per_quad,
ExcVectorDoesNotMatch ());
break;
}
case 3:
{
Assert (dof_indices.size () ==
- 8 * this->dof_handler->get_finite_element (fe_index).dofs_per_vertex +
- 12 * this->dof_handler->get_finite_element (fe_index).dofs_per_line +
- 6 * this->dof_handler->get_finite_element (fe_index).dofs_per_quad +
- this->dof_handler->get_finite_element (fe_index).dofs_per_hex,
+ 8 * this->dof_handler->get_fe (fe_index).dofs_per_vertex +
+ 12 * this->dof_handler->get_fe (fe_index).dofs_per_line +
+ 6 * this->dof_handler->get_fe (fe_index).dofs_per_quad +
+ this->dof_handler->get_fe (fe_index).dofs_per_hex,
ExcVectorDoesNotMatch ());
break;
}
(void) fe_index;
Assert (this->dof_handler != nullptr, ExcInvalidObject ());
Assert (dof_indices.size () ==
- this->dof_handler->get_finite_element (fe_index).dofs_per_vertex,
+ this->dof_handler->get_fe (fe_index).dofs_per_vertex,
ExcVectorDoesNotMatch ());
Assert (false, ExcNotImplemented());
get_fe (const unsigned int fe_index) const
{
Assert (this->dof_handler != nullptr, ExcInvalidObject());
- return dof_handler->get_finite_element(fe_index);
+ return dof_handler->get_fe(fe_index);
}
// (cell-local) ordering.
for (unsigned int line=0; line<12; ++line)
for (unsigned int d=0; d<dofs_per_line; ++d)
- *next++ = accessor.line(line)->dof_index(accessor.dof_handler->get_finite_element().
+ *next++ = accessor.line(line)->dof_index(accessor.dof_handler->get_fe().
adjust_line_dof_index_for_line_orientation(d,
accessor.line_orientation(line)));
// now copy dof numbers from the face. for
// face_orientation is non-standard
for (unsigned int quad=0; quad<6; ++quad)
for (unsigned int d=0; d<dofs_per_quad; ++d)
- *next++ = accessor.quad(quad)->dof_index(accessor.dof_handler->get_finite_element().
+ *next++ = accessor.quad(quad)->dof_index(accessor.dof_handler->get_fe().
adjust_quad_dof_index_for_face_orientation(d,
accessor.face_orientation(quad),
accessor.face_flip(quad),
// (cell-local) ordering.
for (unsigned int line=0; line<12; ++line)
for (unsigned int d=0; d<dofs_per_line; ++d, ++index)
- accessor.line(line)->set_dof_index(accessor.dof_handler->get_finite_element().
+ accessor.line(line)->set_dof_index(accessor.dof_handler->get_fe().
adjust_line_dof_index_for_line_orientation(d,
accessor.line_orientation(line)),
local_dof_indices[index]);
// face_orientation is non-standard
for (unsigned int quad=0; quad<6; ++quad)
for (unsigned int d=0; d<dofs_per_quad; ++d, ++index)
- accessor.quad(quad)->set_dof_index(accessor.dof_handler->get_finite_element().
+ accessor.quad(quad)->set_dof_index(accessor.dof_handler->get_fe().
adjust_quad_dof_index_for_face_orientation(d,
accessor.face_orientation(quad),
accessor.face_flip(quad),
ExcMessage ("In hp::DoFHandler objects, finite elements are only associated "
"with active cells. Consequently, you can not ask for the "
"active finite element on cells with children."));
- return this->dof_handler->get_finite_element(active_fe_index());
+ return this->dof_handler->get_fe(active_fe_index());
}
const std::vector<types::global_dof_index> &
n_locally_owned_dofs_per_processor () const;
- /**
- * Return a constant reference to the selected finite element object.
- *
- * @deprecated Use get_finite_element() instead.
- */
- const FiniteElement<dim,spacedim> &get_fe () const DEAL_II_DEPRECATED;
-
/**
* Return a constant reference to the selected finite element object.
* Since there is only one FiniteElement @index must be equal to zero
* which is also the default value.
*/
const FiniteElement<dim,spacedim> &
- get_finite_element (const unsigned int index=0) const;
+ get_fe (const unsigned int index=0) const;
/**
* Return a constant reference to the set of finite element objects that
template <int dim, int spacedim>
inline
const FiniteElement<dim,spacedim> &
-DoFHandler<dim,spacedim>::get_fe () const
-{
- return this->get_finite_element();
-}
-
-
-
-template <int dim, int spacedim>
-inline
-const FiniteElement<dim,spacedim> &
-DoFHandler<dim,spacedim>::get_finite_element
+DoFHandler<dim,spacedim>::get_fe
(const unsigned int index) const
{
(void) index;
// loading that this number is indeed correct; same with something that
// identifies the FE and the policy
unsigned int n_cells = tria->n_cells();
- std::string fe_name = this->get_finite_element().get_name();
+ std::string fe_name = this->get_fe(0).get_name();
std::string policy_name = internal::policy_to_string(*policy);
ar &n_cells &fe_name &policy_name;
AssertThrow (n_cells == tria->n_cells(),
ExcMessage ("The object being loaded into does not match the triangulation "
"that has been stored previously."));
- AssertThrow (fe_name == this->get_finite_element().get_name(),
+ AssertThrow (fe_name == this->get_fe(0).get_name(),
ExcMessage ("The finite element associated with this DoFHandler does not match "
"the one that was associated with the DoFHandler previously stored."));
AssertThrow (policy_name == internal::policy_to_string(*policy),
(void)fe_index;
Assert ((fe_index == dealii::DoFHandler<dh_dim,spacedim>::default_fe_index),
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
- Assert (local_index<dof_handler.get_finite_element().template n_dofs_per_object<dim>(),
- ExcIndexRange (local_index, 0, dof_handler.get_finite_element().template n_dofs_per_object<dim>()));
- Assert (obj_index * dof_handler.get_finite_element().template n_dofs_per_object<dim>()+local_index
+ Assert (local_index<dof_handler.get_fe().template n_dofs_per_object<dim>(),
+ ExcIndexRange (local_index, 0, dof_handler.get_fe().template n_dofs_per_object<dim>()));
+ Assert (obj_index * dof_handler.get_fe().template n_dofs_per_object<dim>()+local_index
<
dofs.size(),
ExcInternalError());
- return dofs[obj_index * dof_handler.get_finite_element()
+ return dofs[obj_index * dof_handler.get_fe()
.template n_dofs_per_object<dim>() + local_index];
}
* This function exists for both non-hp and hp DoFHandlers, to allow for a
* uniform interface to query this property.
*
- * @deprecated Use <code>dh.get_finite_element(0).is_primitive()</code>.
+ * @deprecated Use <code>dh.get_fe(0).is_primitive()</code>.
*
* @relates DoFHandler
*/
* This function exists for both non-hp and hp DoFHandlers, to allow for a
* uniform interface to query this property.
*
- * @deprecated Use <code>dh.get_finite_element(0).is_primitive()</code>.
+ * @deprecated Use <code>dh.get_fe(0).is_primitive()</code>.
*
* @relates hp::DoFHandler
*/
unsigned int
max_dofs_per_cell (const DoFHandler<dim,spacedim> &dh)
{
- return dh.get_finite_element().dofs_per_cell;
+ return dh.get_fe().dofs_per_cell;
}
unsigned int
max_dofs_per_face (const DoFHandler<dim,spacedim> &dh)
{
- return dh.get_finite_element().dofs_per_face;
+ return dh.get_fe().dofs_per_face;
}
unsigned int
max_dofs_per_vertex (const DoFHandler<dim,spacedim> &dh)
{
- return dh.get_finite_element().dofs_per_vertex;
+ return dh.get_fe().dofs_per_vertex;
}
unsigned int
n_components (const DoFHandler<dim,spacedim> &dh)
{
- return dh.get_finite_element().n_components();
+ return dh.get_fe().n_components();
}
bool
fe_is_primitive (const DoFHandler<dim,spacedim> &dh)
{
- return dh.get_finite_element().is_primitive();
+ return dh.get_fe().is_primitive();
}
unsigned int
n_components (const hp::DoFHandler<dim,spacedim> &dh)
{
- return dh.get_finite_element(0).n_components();
+ return dh.get_fe(0).n_components();
}
bool
fe_is_primitive (const hp::DoFHandler<dim,spacedim> &dh)
{
- return dh.get_finite_element(0).is_primitive();
+ return dh.get_fe(0).is_primitive();
}
* version hp::DoFHandler, since one can then write code like this:
* @code
* dofs_per_cell
- * = dof_handler->get_finite_element()[cell->active_fe_index()].dofs_per_cell;
+ * = dof_handler->get_fe()[cell->active_fe_index()].dofs_per_cell;
* @endcode
*
* This code doesn't work in both situations without the present operator
if (locally_owned_children)
{
- const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
Vector<typename OutVector::value_type> interpolated_values(dofs_per_cell);
}
else
{
- const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
Assert (interpolated_values.size() == dofs_per_cell,
const Vector<value_type> &local_values,
OutVector &u)
{
- const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
if (!dealii_cell->has_children ())
const typename dealii::internal::p4est::types<dim>::quadrant &p4est_cell,
std::vector<CellData> &new_needs)
{
- const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dealii_cell->get_dof_handler().get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
CellData cell_data (dofs_per_cell);
compute_all_non_local_data (dof2, u2_relevant);
// exclude dofs on more refined ghosted cells
- const FiniteElement<dim,spacedim> &fe = dof2.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dof2.get_fe();
const unsigned int dofs_per_face = fe.dofs_per_face;
if (dofs_per_face > 0)
{
const DoFHandler<dim,spacedim> &dof2,
OutVector &u2)
{
- const unsigned int dofs_per_cell = dof2.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof2.get_fe().dofs_per_cell;
Vector<typename OutVector::value_type> dof_values(dofs_per_cell);
// then traverse grid bottom up
const ConstraintMatrix &constraints,
OutVector &u2)
{
- Assert(dof1.get_finite_element(0).n_components() == dof2.get_finite_element(0).n_components(),
- ExcDimensionMismatch(dof1.get_finite_element(0).n_components(), dof2.get_finite_element(0).n_components()));
+ Assert(dof1.get_fe(0).n_components() == dof2.get_fe(0).n_components(),
+ ExcDimensionMismatch(dof1.get_fe(0).n_components(), dof2.get_fe(0).n_components()));
Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch());
Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
Assert(u2.size()==dof2.n_dofs(), ExcDimensionMismatch(u2.size(), dof2.n_dofs()));
const FiniteElement<dim,spacedim> &fe2,
OutVector &u1_interpolated)
{
- Assert(dof1.get_finite_element(0).n_components() == fe2.n_components(),
- ExcDimensionMismatch(dof1.get_finite_element(0).n_components(), fe2.n_components()));
+ Assert(dof1.get_fe(0).n_components() == fe2.n_components(),
+ ExcDimensionMismatch(dof1.get_fe(0).n_components(), fe2.n_components()));
Assert(u1.size() == dof1.n_dofs(),
ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
Assert(u1_interpolated.size() == dof1.n_dofs(),
{
// For discontinuous elements without constraints take the simpler version
// of the back_interpolate function.
- if (dof1.get_finite_element().dofs_per_vertex==0 && dof2.get_finite_element().dofs_per_vertex==0
+ if (dof1.get_fe().dofs_per_vertex==0 && dof2.get_fe().dofs_per_vertex==0
&& constraints1.n_constraints()==0 && constraints2.n_constraints()==0)
- back_interpolate(dof1, u1, dof2.get_finite_element(), u1_interpolated);
+ back_interpolate(dof1, u1, dof2.get_fe(), u1_interpolated);
else
{
- Assert(dof1.get_finite_element(0).n_components() == dof2.get_finite_element(0).n_components(),
- ExcDimensionMismatch(dof1.get_finite_element(0).n_components(), dof2.get_finite_element(0).n_components()));
+ Assert(dof1.get_fe(0).n_components() == dof2.get_fe(0).n_components(),
+ ExcDimensionMismatch(dof1.get_fe(0).n_components(), dof2.get_fe(0).n_components()));
Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
Assert(u1_interpolated.size()==dof1.n_dofs(),
ExcDimensionMismatch(u1_interpolated.size(), dof1.n_dofs()));
const FiniteElement<dim,spacedim> &fe2,
OutVector &u1_difference)
{
- Assert(dof1.get_finite_element(0).n_components() == fe2.n_components(),
- ExcDimensionMismatch(dof1.get_finite_element(0).n_components(), fe2.n_components()));
+ Assert(dof1.get_fe(0).n_components() == fe2.n_components(),
+ ExcDimensionMismatch(dof1.get_fe(0).n_components(), fe2.n_components()));
Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
Assert(u1_difference.size()==dof1.n_dofs(),
ExcDimensionMismatch(u1_difference.size(), dof1.n_dofs()));
// hanging node constraints are
// allowed.
const bool hanging_nodes_not_allowed=
- (dof1.get_finite_element().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
+ (dof1.get_fe().dofs_per_vertex != 0) || (fe2.dofs_per_vertex != 0);
- const unsigned int dofs_per_cell=dof1.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell=dof1.get_fe().dofs_per_cell;
Vector<typename OutVector::value_type> u1_local(dofs_per_cell);
Vector<typename OutVector::value_type> u1_diff_local(dofs_per_cell);
dof1.get_triangulation().locally_owned_subdomain();
FullMatrix<double> difference_matrix(dofs_per_cell, dofs_per_cell);
- get_interpolation_difference_matrix(dof1.get_finite_element(), fe2,
+ get_interpolation_difference_matrix(dof1.get_fe(), fe2,
difference_matrix);
typename DoFHandler<dim,spacedim>::active_cell_iterator cell = dof1.begin_active(),
// without constraints take the
// cheaper version of the
// interpolation_difference function.
- if (dof1.get_finite_element().dofs_per_vertex==0 && dof2.get_finite_element().dofs_per_vertex==0
+ if (dof1.get_fe().dofs_per_vertex==0 && dof2.get_fe().dofs_per_vertex==0
&& constraints1.n_constraints()==0 && constraints2.n_constraints()==0)
- interpolation_difference(dof1, u1, dof2.get_finite_element(), u1_difference);
+ interpolation_difference(dof1, u1, dof2.get_fe(), u1_difference);
else
{
internal::interpolation_difference(dof1, constraints1, u1, dof2, constraints2, u1_difference);
OutVector &u2)
{
Assert(&dof1.get_triangulation()==&dof2.get_triangulation(), ExcTriangulationMismatch());
- Assert(dof1.get_finite_element(0).n_components() == dof2.get_finite_element(0).n_components(),
- ExcDimensionMismatch(dof1.get_finite_element(0).n_components(), dof2.get_finite_element(0).n_components()));
+ Assert(dof1.get_fe(0).n_components() == dof2.get_fe(0).n_components(),
+ ExcDimensionMismatch(dof1.get_fe(0).n_components(), dof2.get_fe(0).n_components()));
Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs()));
Assert(u2.size()==dof2.n_dofs(), ExcDimensionMismatch(u2.size(), dof2.n_dofs()));
typename DoFHandler<dim,spacedim>::active_cell_iterator cell2 = dof2.begin_active();
typename DoFHandler<dim,spacedim>::active_cell_iterator end = dof2.end();
- const unsigned int n1 = dof1.get_finite_element().dofs_per_cell;
- const unsigned int n2 = dof2.get_finite_element().dofs_per_cell;
+ const unsigned int n1 = dof1.get_fe().dofs_per_cell;
+ const unsigned int n2 = dof2.get_fe().dofs_per_cell;
Vector<typename OutVector::value_type> u1_local(n1);
Vector<typename OutVector::value_type> u2_local(n2);
std::vector<types::global_dof_index> dofs(n2);
FullMatrix<double> matrix(n2,n1);
- get_projection_matrix(dof1.get_finite_element(), dof2.get_finite_element(), matrix);
+ get_projection_matrix(dof1.get_fe(), dof2.get_fe(), matrix);
u2 = 0;
while (cell2 != end)
* documentation of the internal::DoFHandler::DoFLevel class, we can
* compute the location of the first line DoF, for example, by calculating
* the offset as <code>line_index *
- * dof_handler.get_finite_element().dofs_per_line</code>. This of course doesn't work
+ * dof_handler.get_fe().dofs_per_line</code>. This of course doesn't work
* any more if different lines may have different numbers of degrees of
* freedom associated with them. Consequently, rather than using this
* simple multiplication, the dofs array has an associated array
Assert (fe_index < dof_handler.get_fe_collection().size(),
ExcIndexRange (fe_index, 0, dof_handler.get_fe_collection().size()));
Assert (local_index <
- dof_handler.get_finite_element(fe_index).template n_dofs_per_object<structdim>(),
+ dof_handler.get_fe(fe_index).template n_dofs_per_object<structdim>(),
ExcIndexRange(local_index, 0,
- dof_handler.get_finite_element(fe_index)
+ dof_handler.get_fe(fe_index)
.template n_dofs_per_object<structdim>()));
Assert (obj_index < dof_offsets.size(),
ExcIndexRange (obj_index, 0, dof_offsets.size()));
return *(pointer + 1 + local_index);
else
pointer += static_cast<types::global_dof_index>(
- dof_handler.get_finite_element(*pointer)
+ dof_handler.get_fe(*pointer)
.template n_dofs_per_object<structdim>() + 1);
}
}
Assert (fe_index < dof_handler.get_fe_collection().size(),
ExcIndexRange (fe_index, 0, dof_handler.get_fe_collection().size()));
Assert (local_index <
- dof_handler.get_finite_element(fe_index).template n_dofs_per_object<structdim>(),
+ dof_handler.get_fe(fe_index).template n_dofs_per_object<structdim>(),
ExcIndexRange(local_index, 0,
- dof_handler.get_finite_element(fe_index)
+ dof_handler.get_fe(fe_index)
.template n_dofs_per_object<structdim>()));
Assert (obj_index < dof_offsets.size(),
ExcIndexRange (obj_index, 0, dof_offsets.size()));
return;
}
else
- pointer += dof_handler.get_finite_element(*pointer)
+ pointer += dof_handler.get_fe(*pointer)
.template n_dofs_per_object<structdim>() + 1;
}
}
else
{
++counter;
- pointer += dof_handler.get_finite_element(*pointer)
+ pointer += dof_handler.get_fe(*pointer)
.template n_dofs_per_object<structdim>() + 1;
}
}
return fe_index;
++counter;
- pointer += dof_handler.get_finite_element(fe_index)
+ pointer += dof_handler.get_fe(fe_index)
.template n_dofs_per_object<structdim>() + 1;
}
}
return true;
else
pointer += static_cast<types::global_dof_index>(
- dof_handler.get_finite_element(*pointer)
+ dof_handler.get_fe(*pointer)
.template n_dofs_per_object<structdim>()+1);
}
}
* used by this @p DoFHandler.
*/
const FiniteElement<dim,spacedim> &
- get_finite_element (const unsigned int index) const;
+ get_fe (const unsigned int index) const;
/**
* Return a constant reference to the set of finite element objects that
template <int dim, int spacedim>
inline
const FiniteElement<dim,spacedim> &
- DoFHandler<dim,spacedim>::get_finite_element
+ DoFHandler<dim,spacedim>::get_fe
(const unsigned int number) const
{
Assert (finite_elements != nullptr,
//TODO: only free if we actually need arrays of different length
free();
- const FiniteElement<dim> &fe = dof_handler.get_finite_element();
+ const FiniteElement<dim> &fe = dof_handler.get_fe();
fe_degree = fe.degree;
//TODO this should be a templated parameter
for (unsigned int nq =0; nq<n_quad; nq++)
{
AssertDimension (quad[nq].size(), 1);
- shape_info(no,nq,0,0).reinit(quad[nq][0], dof_handler[no]->get_finite_element());
+ shape_info(no,nq,0,0).reinit(quad[nq][0], dof_handler[no]->get_fe());
}
}
for (unsigned int i=0; i<dof_info.size(); ++i)
{
dof_info[i].dimension = dim;
- dof_info[i].n_components = dof_handler[i]->get_finite_element().element_multiplicity(0);
- dof_info[i].dofs_per_cell.push_back(dof_handler[i]->get_finite_element().dofs_per_cell);
+ dof_info[i].n_components = dof_handler[i]->get_fe().element_multiplicity(0);
+ dof_info[i].dofs_per_cell.push_back(dof_handler[i]->get_fe().dofs_per_cell);
dof_info[i].row_starts.resize(size_info.n_macro_cells+1);
dof_info[i].row_starts.back()[2] =
cell_level_index.size() % VectorizedArray<Number>::n_array_elements;
for (unsigned int nq =0; nq<n_quad; nq++)
for (unsigned int q_no=0; q_no<quad[nq].size(); ++q_no)
shape_info(no,nq,fe_no,q_no).reinit (quad[nq][q_no],
- dof_handler[no]->get_finite_element(fe_no));
+ dof_handler[no]->get_fe(fe_no));
}
if (additional_data.initialize_indices == true)
{
Assert(dof_handler[i]->get_fe_collection().size() == 1, ExcNotImplemented());
dof_info[i].dimension = dim;
- dof_info[i].n_components = dof_handler[i]->get_finite_element(0).element_multiplicity(0);
- dof_info[i].dofs_per_cell.push_back(dof_handler[i]->get_finite_element(0).dofs_per_cell);
+ dof_info[i].n_components = dof_handler[i]->get_fe(0).element_multiplicity(0);
+ dof_info[i].dofs_per_cell.push_back(dof_handler[i]->get_fe(0).dofs_per_cell);
dof_info[i].row_starts.resize(size_info.n_macro_cells+1);
dof_info[i].row_starts.back()[2] =
cell_level_index.size() % VectorizedArray<Number>::n_array_elements;
else
{
const DoFHandler<dim> *dofh =&*dof_handlers.dof_handler[no];
- fes.push_back (&dofh->get_finite_element());
+ fes.push_back (&dofh->get_fe());
dof_info[no].max_fe_index = 1;
dof_info[no].fe_index_conversion.resize (1);
dof_info[no].fe_index_conversion[0] =
level_cell (false)
{
std::vector<types::global_dof_index> aux(1);
- aux[0] = dof_handler.get_finite_element().dofs_per_cell;
+ aux[0] = dof_handler.get_fe().dofs_per_cell;
aux_local_indices.reinit(aux);
}
std::vector<unsigned int> target_component,
MGLevelObject<BlockVector<number> > &v)
{
- const unsigned int n_blocks = mg_dof.get_finite_element().n_blocks();
+ const unsigned int n_blocks = mg_dof.get_fe().n_blocks();
if (target_component.size()==0)
{
target_component.resize(n_blocks);
* dummy object of FE_DGQ<dim>(0) in case only the triangulation is used.
*/
std::vector<std::shared_ptr<dealii::hp::FECollection<DoFHandlerType::dimension,DoFHandlerType::space_dimension> > >
- get_finite_elements() const;
+ get_fes() const;
/**
* Overload of the respective DataOutInterface::get_vector_data_ranges()
"does not have any degrees of freedom, so it is not "
"possible to output DoF data in this context."));
const std::string name = names[0];
- const unsigned int n_components = dof_handler->get_finite_element(0).n_components();
+ const unsigned int n_components = dof_handler->get_fe(0).n_components();
deduced_names.resize (n_components);
if (n_components > 1)
{
Exceptions::DataOut::ExcInvalidVectorSize (data_vector.size(),
dof_handler->n_dofs(),
triangulation->n_active_cells()));
- Assert (deduced_names.size() == dof_handler->get_finite_element(0).n_components(),
+ Assert (deduced_names.size() == dof_handler->get_fe(0).n_components(),
Exceptions::DataOut::ExcInvalidNumberOfNames (deduced_names.size(),
- dof_handler->get_finite_element(0).n_components()));
+ dof_handler->get_fe(0).n_components()));
break;
default:
Assert (false, ExcInternalError());
int patch_dim, int patch_space_dim>
std::vector<std::shared_ptr<dealii::hp::FECollection<DoFHandlerType::dimension,
DoFHandlerType::space_dimension> > >
- DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::get_finite_elements() const
+ DataOut_DoFData<DoFHandlerType,patch_dim,patch_space_dim>::get_fes() const
{
const unsigned int dhdim = DoFHandlerType::dimension;
const unsigned int dhspacedim = DoFHandlerType::space_dimension;
= subdomain_id_;
#endif
- const unsigned int n_components = dof_handler.get_finite_element(0).n_components();
+ const unsigned int n_components = dof_handler.get_fe(0).n_components();
(void)n_components;
// sanity checks
const VectorType &myv,
const Mapping<dim> &mymapping)
:
- Function<dim,typename VectorType::value_type>(mydh.get_finite_element(0).n_components()),
+ Function<dim,typename VectorType::value_type>(mydh.get_fe(0).n_components()),
dh(&mydh, "FEFieldFunction"),
data_vector(myv),
mapping(mymapping),
Assert (matrix.n() == dof.n_dofs(),
ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
- hp::FECollection<dim,spacedim> fe_collection (dof.get_finite_element());
+ hp::FECollection<dim,spacedim> fe_collection (dof.get_fe());
hp::QCollection<dim> q_collection (q);
hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,number>
Assert (matrix.n() == dof.n_dofs(),
ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
- hp::FECollection<dim,spacedim> fe_collection (dof.get_finite_element());
+ hp::FECollection<dim,spacedim> fe_collection (dof.get_fe());
hp::QCollection<dim> q_collection (q);
hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,number>
return;
}
- const FiniteElement<dim,spacedim> &fe = dof.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dof.get_fe();
const unsigned int n_components = fe.n_components();
Assert (matrix.n() == dof.n_boundary_dofs (boundary_functions),
Assert (matrix.n() == dof.n_dofs(),
ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
- hp::FECollection<dim,spacedim> fe_collection (dof.get_finite_element());
+ hp::FECollection<dim,spacedim> fe_collection (dof.get_fe());
hp::QCollection<dim> q_collection (q);
hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,double>
Assert (matrix.n() == dof.n_dofs(),
ExcDimensionMismatch (matrix.n(), dof.n_dofs()));
- hp::FECollection<dim,spacedim> fe_collection (dof.get_finite_element());
+ hp::FECollection<dim,spacedim> fe_collection (dof.get_fe());
hp::QCollection<dim> q_collection (q);
hp::MappingCollection<dim,spacedim> mapping_collection (mapping);
MatrixCreator::internal::AssemblerData::Scratch<dim, spacedim,double>
VectorType &vec_result);
/**
- * Same as above but for <code>n_q_points_1d = matrix_free.get_dof_handler().get_finite_element().degree+1</code>.
+ * Same as above but for <code>n_q_points_1d = matrix_free.get_dof_handler().get_fe().degree+1</code>.
*/
template <int dim, typename VectorType>
void project (std::shared_ptr<const MatrixFree<dim,typename VectorType::value_type> > data,
const ComponentMask &component_mask)
{
typedef typename VectorType::value_type number;
- Assert (component_mask.represents_n_components(dof.get_finite_element(0).n_components()),
+ Assert (component_mask.represents_n_components(dof.get_fe(0).n_components()),
ExcMessage("The number of components in the mask has to be either "
"zero or equal to the number of components in the finite "
"element.") );
Assert (vec.size() == dof.n_dofs(),
ExcDimensionMismatch (vec.size(), dof.n_dofs()));
- Assert (dof.get_finite_element(0).n_components() == function.n_components,
- ExcDimensionMismatch(dof.get_finite_element(0).n_components(),
+ Assert (dof.get_fe(0).n_components() == function.n_components,
+ ExcDimensionMismatch(dof.get_fe(0).n_components(),
function.n_components));
- Assert (component_mask.n_selected_components(dof.get_finite_element(0).n_components()) > 0,
+ Assert (component_mask.n_selected_components(dof.get_fe(0).n_components()) > 0,
ComponentMask::ExcNoComponentSelected());
const hp::FECollection<dim,spacedim> &fe = dof.get_fe_collection();
OutVector &data_2)
{
typedef typename OutVector::value_type number;
- Vector<number> cell_data_1(dof_1.get_finite_element().dofs_per_cell);
- Vector<number> cell_data_2(dof_2.get_finite_element().dofs_per_cell);
+ Vector<number> cell_data_1(dof_1.get_fe().dofs_per_cell);
+ Vector<number> cell_data_2(dof_2.get_fe().dofs_per_cell);
std::vector<short unsigned int> touch_count (dof_2.n_dofs(), 0); //TODO: check on datatype... kinda strange (UK)
- std::vector<types::global_dof_index> local_dof_indices (dof_2.get_finite_element().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dof_2.get_fe().dofs_per_cell);
typename DoFHandler<dim,spacedim>::active_cell_iterator h = dof_1.begin_active();
typename DoFHandler<dim,spacedim>::active_cell_iterator l = dof_2.begin_active();
l->get_dof_indices (local_dof_indices);
// distribute cell vector
- for (unsigned int j=0; j<dof_2.get_finite_element().dofs_per_cell; ++j)
+ for (unsigned int j=0; j<dof_2.get_fe().dofs_per_cell; ++j)
{
::dealii::internal::ElementAccess<OutVector>::add(cell_data_2(j),
local_dof_indices[j], data_2);
{
typedef typename VectorType::value_type number;
- Assert( component_mask.represents_n_components(dof.get_finite_element(0).n_components()),
+ Assert( component_mask.represents_n_components(dof.get_fe(0).n_components()),
ExcMessage("The number of components in the mask has to be either "
"zero or equal to the number of components in the finite "
"element.") );
iter != function_map.end();
++iter )
{
- Assert( dof.get_finite_element(0).n_components() == iter->second->n_components,
- ExcDimensionMismatch(dof.get_finite_element(0).n_components(), iter->second->n_components) );
+ Assert( dof.get_fe(0).n_components() == iter->second->n_components,
+ ExcDimensionMismatch(dof.get_fe(0).n_components(), iter->second->n_components) );
}
const hp::FECollection<dim, spacedim> &fe = dof.get_fe_collection();
const bool project_to_boundary_first)
{
typedef typename VectorType::value_type number;
- Assert (dof.get_finite_element(0).n_components() == function.n_components,
- ExcDimensionMismatch(dof.get_finite_element(0).n_components(),
+ Assert (dof.get_fe(0).n_components() == function.n_components,
+ ExcDimensionMismatch(dof.get_fe(0).n_components(),
function.n_components));
Assert (vec_result.size() == dof.n_dofs(),
ExcDimensionMismatch (vec_result.size(), dof.n_dofs()));
(void) project_to_boundary_first;
(void) q_boundary;
- Assert (dof.get_finite_element(0).n_components() == function.n_components,
- ExcDimensionMismatch(dof.get_finite_element(0).n_components(),
+ Assert (dof.get_fe(0).n_components() == function.n_components,
+ ExcDimensionMismatch(dof.get_fe(0).n_components(),
function.n_components));
Assert (fe_degree == -1 ||
- dof.get_finite_element().degree == static_cast<unsigned int>(fe_degree),
- ExcDimensionMismatch(fe_degree, dof.get_finite_element().degree));
- Assert (dof.get_finite_element(0).n_components() == components,
- ExcDimensionMismatch(components, dof.get_finite_element(0).n_components()));
+ dof.get_fe().degree == static_cast<unsigned int>(fe_degree),
+ ExcDimensionMismatch(fe_degree, dof.get_fe().degree));
+ Assert (dof.get_fe(0).n_components() == components,
+ ExcDimensionMismatch(components, dof.get_fe(0).n_components()));
// set up mass matrix and right hand side
typename MatrixFree<dim,Number>::AdditionalData additional_data;
std::shared_ptr<MatrixFree<dim, Number> > matrix_free(
new MatrixFree<dim, Number> ());
matrix_free->reinit (mapping, dof, constraints,
- QGauss<1>(dof.get_finite_element().degree+2), additional_data);
+ QGauss<1>(dof.get_fe().degree+2), additional_data);
typedef MatrixFreeOperators::MassOperator<dim, fe_degree, fe_degree+2, components, LinearAlgebra::distributed::Vector<Number> > MatrixType;
MatrixType mass_matrix;
mass_matrix.initialize(matrix_free);
const Quadrature<dim-1> &q_boundary,
const bool project_to_boundary_first)
{
- switch (dof.get_finite_element().degree)
+ switch (dof.get_fe().degree)
{
case 1:
project_matrix_free<components, 1>
const Quadrature<dim-1> &q_boundary,
const bool project_to_boundary_first)
{
- switch (dof.get_finite_element(0).n_components())
+ switch (dof.get_fe(0).n_components())
{
case 1:
project_matrix_free_degree<1>
const bool project_to_boundary_first)
{
// If we can, use the matrix-free implementation
- bool use_matrix_free = MatrixFree<dim, typename VectorType::value_type>::is_supported(dof.get_finite_element());
+ bool use_matrix_free = MatrixFree<dim, typename VectorType::value_type>::is_supported(dof.get_fe());
// enforce_zero_boundary and project_to_boundary_first
// are not yet supported.
// We have explicit instantiations only if
// the number of components is not too high.
if (enforce_zero_boundary || project_to_boundary_first
- || dof.get_finite_element(0).n_components()>4)
+ || dof.get_fe(0).n_components()>4)
use_matrix_free = false;
if (use_matrix_free)
VectorType &vec_result)
{
typedef typename VectorType::value_type Number;
- Assert (dof.get_finite_element(0).n_components() == 1,
- ExcDimensionMismatch(dof.get_finite_element(0).n_components(),
+ Assert (dof.get_fe(0).n_components() == 1,
+ ExcDimensionMismatch(dof.get_fe(0).n_components(),
1));
Assert (vec_result.size() == dof.n_dofs(),
ExcDimensionMismatch (vec_result.size(), dof.n_dofs()));
Assert (fe_degree == -1 ||
- dof.get_finite_element().degree == static_cast<unsigned int>(fe_degree),
- ExcDimensionMismatch(fe_degree, dof.get_finite_element().degree));
+ dof.get_fe().degree == static_cast<unsigned int>(fe_degree),
+ ExcDimensionMismatch(fe_degree, dof.get_fe().degree));
// set up mass matrix and right hand side
typename MatrixFree<dim,Number>::AdditionalData additional_data;
std::shared_ptr<MatrixFree<dim, Number> > matrix_free(
new MatrixFree<dim, Number>());
matrix_free->reinit (mapping, dof, constraints,
- QGauss<1>(dof.get_finite_element().degree+2), additional_data);
+ QGauss<1>(dof.get_fe().degree+2), additional_data);
typedef MatrixFreeOperators::MassOperator<dim, fe_degree, fe_degree+2, 1, LinearAlgebra::distributed::Vector<Number> > MatrixType;
MatrixType mass_matrix;
mass_matrix.initialize(matrix_free);
// assemble right hand side:
{
- FEValues<dim> fe_values (mapping, dof.get_finite_element(), quadrature,
+ FEValues<dim> fe_values (mapping, dof.get_fe(), quadrature,
update_values | update_JxW_values);
- const unsigned int dofs_per_cell = dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
const unsigned int n_q_points = quadrature.size();
Vector<Number> cell_rhs (dofs_per_cell);
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
const DoFHandler<dim,spacedim> &dof = matrix_free->get_dof_handler();
typedef typename VectorType::value_type Number;
- Assert (dof.get_finite_element(0).n_components() == 1,
- ExcDimensionMismatch(dof.get_finite_element(0).n_components(),
+ Assert (dof.get_fe(0).n_components() == 1,
+ ExcDimensionMismatch(dof.get_fe(0).n_components(),
1));
Assert (vec_result.size() == dof.n_dofs(),
ExcDimensionMismatch (vec_result.size(), dof.n_dofs()));
Assert (fe_degree == -1 ||
- dof.get_finite_element().degree == static_cast<unsigned int>(fe_degree),
- ExcDimensionMismatch(fe_degree, dof.get_finite_element().degree));
+ dof.get_fe().degree == static_cast<unsigned int>(fe_degree),
+ ExcDimensionMismatch(fe_degree, dof.get_fe().degree));
typedef MatrixFreeOperators::MassOperator<dim, fe_degree, n_q_points_1d, 1, LinearAlgebra::distributed::Vector<Number> > MatrixType;
MatrixType mass_matrix;
const std::function< typename VectorType::value_type (const typename DoFHandler<dim, spacedim>::active_cell_iterator &, const unsigned int)> func,
VectorType &vec_result)
{
- switch (dof.get_finite_element().degree)
+ switch (dof.get_fe().degree)
{
case 1:
project_parallel<dim,VectorType,spacedim,1> (mapping,dof,constraints,quadrature,func,vec_result);
VectorType &vec_result)
{
(void) n_q_points_1d;
- const unsigned int fe_degree = matrix_free->get_dof_handler().get_finite_element().degree;
+ const unsigned int fe_degree = matrix_free->get_dof_handler().get_fe().degree;
Assert (fe_degree+1 == n_q_points_1d,
ExcNotImplemented());
{
project (matrix_free,
constraints,
- matrix_free->get_dof_handler().get_finite_element().degree+1,
+ matrix_free->get_dof_handler().get_fe().degree+1,
func,
vec_result);
}
{
typedef typename VectorType::value_type Number;
- const FiniteElement<dim,spacedim> &fe = dof_handler.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dof_handler.get_fe();
Assert (fe.n_components() == rhs_function.n_components,
ExcDimensionMismatch(fe.n_components(), rhs_function.n_components));
Assert (rhs_vector.size() == dof_handler.n_dofs(),
{
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
- Assert (dof_handler.get_finite_element(0).n_components() == 1,
+ Assert (dof_handler.get_fe(0).n_components() == 1,
ExcMessage ("This function only works for scalar finite elements"));
rhs_vector = 0;
Quadrature<dim> q(GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
- FEValues<dim,spacedim> fe_values(mapping, dof_handler.get_finite_element(),
+ FEValues<dim,spacedim> fe_values(mapping, dof_handler.get_fe(),
q, UpdateFlags(update_values));
fe_values.reinit(cell_point.first);
- const unsigned int dofs_per_cell = dof_handler.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_point.first->get_dof_indices (local_dof_indices);
{
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
- Assert (dof_handler.get_finite_element(0).n_components() == 1,
+ Assert (dof_handler.get_fe(0).n_components() == 1,
ExcMessage ("This function only works for scalar finite elements"));
rhs_vector = 0;
{
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
- Assert (dof_handler.get_finite_element(0).n_components() == dim,
+ Assert (dof_handler.get_fe(0).n_components() == dim,
ExcMessage ("This function only works for vector-valued finite elements."));
rhs_vector = 0;
const Quadrature<dim> q(GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
const FEValuesExtractors::Vector vec (0);
- FEValues<dim,spacedim> fe_values(mapping, dof_handler.get_finite_element(),
+ FEValues<dim,spacedim> fe_values(mapping, dof_handler.get_fe(),
q, UpdateFlags(update_values));
fe_values.reinit(cell_point.first);
- const unsigned int dofs_per_cell = dof_handler.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof_handler.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
cell_point.first->get_dof_indices (local_dof_indices);
{
Assert (rhs_vector.size() == dof_handler.n_dofs(),
ExcDimensionMismatch(rhs_vector.size(), dof_handler.n_dofs()));
- Assert (dof_handler.get_finite_element(0).n_components() == dim,
+ Assert (dof_handler.get_fe(0).n_components() == dim,
ExcMessage ("This function only works for vector-valued finite elements."));
rhs_vector = 0;
VectorType &rhs_vector,
const std::set<types::boundary_id> &boundary_ids)
{
- const FiniteElement<dim> &fe = dof_handler.get_finite_element();
+ const FiniteElement<dim> &fe = dof_handler.get_fe();
Assert (fe.n_components() == rhs_function.n_components,
ExcDimensionMismatch(fe.n_components(), rhs_function.n_components));
Assert (rhs_vector.size() == dof_handler.n_dofs(),
std::map<types::global_dof_index,number> &boundary_values,
const ComponentMask &component_mask)
{
- Assert (component_mask.represents_n_components(dof.get_finite_element(0).n_components()),
+ Assert (component_mask.represents_n_components(dof.get_fe(0).n_components()),
ExcMessage ("The number of components in the mask has to be either "
"zero or equal to the number of components in the finite "
"element."));
if (component_mapping.size() == 0)
{
- AssertDimension (dof.get_finite_element(0).n_components(), boundary_functions.begin()->second->n_components);
+ AssertDimension (dof.get_fe(0).n_components(), boundary_functions.begin()->second->n_components);
// I still do not see why i
// should create another copy
// here
- component_mapping.resize(dof.get_finite_element(0).n_components());
+ component_mapping.resize(dof.get_fe(0).n_components());
for (unsigned int i= 0 ; i < component_mapping.size() ; ++i)
component_mapping[i] = i;
}
else
- AssertDimension (dof.get_finite_element(0).n_components(), component_mapping.size());
+ AssertDimension (dof.get_fe(0).n_components(), component_mapping.size());
std::vector<types::global_dof_index> dof_to_boundary_mapping;
std::set<types::boundary_id> selected_boundary_components;
// ones. Thus we have to solve two linear systems of equations of size
// <tt>degree * (degree + 1)<tt> to obtain the values for the
// corresponding degrees of freedom.
- const unsigned int superdegree = dof_handler.get_finite_element ().degree;
+ const unsigned int superdegree = dof_handler.get_fe ().degree;
const QGauss<dim - 1> reference_face_quadrature (2 * superdegree);
- const unsigned int dofs_per_face = dof_handler.get_finite_element ().dofs_per_face;
+ const unsigned int dofs_per_face = dof_handler.get_fe ().dofs_per_face;
hp::FECollection<dim> fe_collection (dof_handler.get_fe_collection ());
hp::MappingCollection<dim> mapping_collection (mapping);
hp::QCollection<dim> face_quadrature_collection;
// normal components of the shape
// functions supported on the
// boundary.
- const FiniteElement<dim> &fe = dof_handler.get_finite_element ();
+ const FiniteElement<dim> &fe = dof_handler.get_fe ();
QGauss<dim - 1> face_quadrature (fe.degree + 1);
FEFaceValues<dim> fe_face_values (mapping, fe, face_quadrature, update_JxW_values |
update_normal_vectors |
// on, if necessary, so have a read-write version of it:
double exponent = exponent_1;
- const unsigned int n_components = dof.get_finite_element(0).n_components();
+ const unsigned int n_components = dof.get_fe(0).n_components();
if (weight!=nullptr)
{
const Point<spacedim> &point)
{
typedef typename VectorType::value_type Number;
- const FiniteElement<dim> &fe = dof.get_finite_element();
+ const FiniteElement<dim> &fe = dof.get_fe();
Assert(difference.size() == fe.n_components(),
ExcDimensionMismatch(difference.size(), fe.n_components()));
Vector<typename VectorType::value_type> &value)
{
typedef typename VectorType::value_type Number;
- const FiniteElement<dim> &fe = dof.get_finite_element();
+ const FiniteElement<dim> &fe = dof.get_fe();
Assert(value.size() == fe.n_components(),
ExcDimensionMismatch(value.size(), fe.n_components()));
const VectorType &fe_function,
const Point<spacedim> &point)
{
- Assert(dof.get_finite_element(0).n_components() == 1,
+ Assert(dof.get_fe(0).n_components() == 1,
ExcMessage ("Finite element is not scalar as is necessary for this function"));
Vector<typename VectorType::value_type> value(1);
const VectorType &fe_function,
const Point<spacedim> &point)
{
- Assert(dof.get_finite_element(0).n_components() == 1,
+ Assert(dof.get_fe(0).n_components() == 1,
ExcMessage ("Finite element is not scalar as is necessary for this function"));
Vector<typename VectorType::value_type> value(1);
const Point<spacedim> &point,
std::vector<Tensor<1, spacedim, typename VectorType::value_type> > &gradient)
{
- const FiniteElement<dim> &fe = dof.get_finite_element();
+ const FiniteElement<dim> &fe = dof.get_fe();
Assert(gradient.size() == fe.n_components(),
ExcDimensionMismatch(gradient.size(), fe.n_components()));
const VectorType &fe_function,
const Point<spacedim> &point)
{
- Assert(dof.get_finite_element(0).n_components() == 1,
+ Assert(dof.get_fe(0).n_components() == 1,
ExcMessage ("Finite element is not scalar as is necessary for this function"));
std::vector<Tensor<1, dim, typename VectorType::value_type> > gradient(1);
const VectorType &fe_function,
const Point<spacedim> &point)
{
- Assert(dof.get_finite_element(0).n_components() == 1,
+ Assert(dof.get_fe(0).n_components() == 1,
ExcMessage ("Finite element is not scalar as is necessary for this function"));
std::vector<Tensor<1, dim, typename VectorType::value_type> > gradient(1);
typedef typename VectorType::value_type Number;
Assert (v.size() == dof.n_dofs(),
ExcDimensionMismatch (v.size(), dof.n_dofs()));
- Assert (component < dof.get_finite_element(0).n_components(),
- ExcIndexRange(component, 0, dof.get_finite_element(0).n_components()));
+ Assert (component < dof.get_fe(0).n_components(),
+ ExcIndexRange(component, 0, dof.get_fe(0).n_components()));
- FEValues<dim,spacedim> fe(mapping, dof.get_finite_element(), quadrature,
+ FEValues<dim,spacedim> fe(mapping, dof.get_fe(), quadrature,
UpdateFlags(update_JxW_values
| update_values));
typename DoFHandler<dim,spacedim>::active_cell_iterator cell;
std::vector<Vector<Number> > values(quadrature.size(),
- Vector<Number> (dof.get_finite_element(0).n_components()));
+ Vector<Number> (dof.get_fe(0).n_components()));
Number mean = Number();
double area = 0.;
const ComponentMask &mask)
{
AssertDimension(vector.size(), dh.n_dofs());
- const FiniteElement<dim, spacedim> &fe = dh.get_finite_element();
+ const FiniteElement<dim, spacedim> &fe = dh.get_fe();
// Construct default fe_mask;
const ComponentMask fe_mask(mask.size() ? mask :
{
if (!levels_only && dof.has_active_dofs())
{
- const FiniteElement<dim, spacedim> &fe = dof.get_finite_element();
+ const FiniteElement<dim, spacedim> &fe = dof.get_fe();
std::vector<types::global_dof_index> sizes(fe.n_blocks());
DoFTools::count_dofs_per_block(dof, sizes);
bi_global.reinit(sizes);
std::vector<std::vector<types::global_dof_index> > sizes (dof.get_triangulation().n_levels ());
for (unsigned int i = 0; i < sizes.size (); ++i)
- sizes[i].resize (dof.get_finite_element ().n_blocks ());
+ sizes[i].resize (dof.get_fe ().n_blocks ());
MGTools::count_dofs_per_block (dof, sizes);
levels.resize (sizes.size ());
void
BlockInfo::initialize_local(const DoFHandler<dim, spacedim> &dof)
{
- const FiniteElement<dim, spacedim> &fe = dof.get_finite_element();
+ const FiniteElement<dim, spacedim> &fe = dof.get_fe();
std::vector<types::global_dof_index> sizes(fe.n_blocks());
base_elements.resize(fe.n_blocks());
Vector<number> tmp (this->get_fe().dofs_per_cell);
this->get_dof_values (values, tmp);
- FullMatrix<double> interpolation (this->dof_handler->get_finite_element(fe_index).dofs_per_cell,
+ FullMatrix<double> interpolation (this->dof_handler->get_fe(fe_index).dofs_per_cell,
this->get_fe().dofs_per_cell);
- this->dof_handler->get_finite_element(fe_index).get_interpolation_matrix (this->get_fe(),
+ this->dof_handler->get_fe(fe_index).get_interpolation_matrix (this->get_fe(),
interpolation);
interpolation.vmult (interpolated_values, tmp);
}
"of freedom are only distributed on active cells for which "
"the active_fe_index has been set."));
- const FiniteElement<dim,spacedim> &fe = this->get_dof_handler().get_finite_element(fe_index);
+ const FiniteElement<dim,spacedim> &fe = this->get_dof_handler().get_fe(fe_index);
const unsigned int dofs_per_cell = fe.dofs_per_cell;
Assert (this->dof_handler != nullptr,
this->set_dof_values (local_values, values);
else
{
- Assert (local_values.size() == this->dof_handler->get_finite_element(fe_index).dofs_per_cell,
+ Assert (local_values.size() == this->dof_handler->get_fe(fe_index).dofs_per_cell,
ExcMessage ("Incorrect size of local_values vector.") );
- FullMatrix<double> interpolation (this->get_fe().dofs_per_cell, this->dof_handler->get_finite_element(fe_index).dofs_per_cell);
+ FullMatrix<double> interpolation (this->get_fe().dofs_per_cell, this->dof_handler->get_fe(fe_index).dofs_per_cell);
- this->get_fe().get_interpolation_matrix (this->dof_handler->get_finite_element(fe_index),
+ this->get_fe().get_interpolation_matrix (this->dof_handler->get_fe(fe_index),
interpolation);
// do the interpolation to the target space. for historical
"of freedom are only distributed on active cells for which "
"the active_fe_index has been set."));
- const FiniteElement<dim,spacedim> &fe = this->get_dof_handler().get_finite_element(fe_index);
+ const FiniteElement<dim,spacedim> &fe = this->get_dof_handler().get_fe(fe_index);
const unsigned int dofs_per_cell = fe.dofs_per_cell;
Assert (this->dof_handler != nullptr,
unsigned int
max_couplings_between_dofs (const DoFHandler<1,spacedim> &dof_handler)
{
- return std::min(static_cast<types::global_dof_index>(3*dof_handler.get_finite_element().dofs_per_vertex +
- 2*dof_handler.get_finite_element().dofs_per_line),
+ return std::min(static_cast<types::global_dof_index>(3*dof_handler.get_fe().dofs_per_vertex +
+ 2*dof_handler.get_fe().dofs_per_line),
dof_handler.n_dofs());
}
switch (dof_handler.tria->max_adjacent_cells())
{
case 4:
- max_couplings=19*dof_handler.get_finite_element().dofs_per_vertex +
- 28*dof_handler.get_finite_element().dofs_per_line +
- 8*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=19*dof_handler.get_fe().dofs_per_vertex +
+ 28*dof_handler.get_fe().dofs_per_line +
+ 8*dof_handler.get_fe().dofs_per_quad;
break;
case 5:
- max_couplings=21*dof_handler.get_finite_element().dofs_per_vertex +
- 31*dof_handler.get_finite_element().dofs_per_line +
- 9*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=21*dof_handler.get_fe().dofs_per_vertex +
+ 31*dof_handler.get_fe().dofs_per_line +
+ 9*dof_handler.get_fe().dofs_per_quad;
break;
case 6:
- max_couplings=28*dof_handler.get_finite_element().dofs_per_vertex +
- 42*dof_handler.get_finite_element().dofs_per_line +
- 12*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=28*dof_handler.get_fe().dofs_per_vertex +
+ 42*dof_handler.get_fe().dofs_per_line +
+ 12*dof_handler.get_fe().dofs_per_quad;
break;
case 7:
- max_couplings=30*dof_handler.get_finite_element().dofs_per_vertex +
- 45*dof_handler.get_finite_element().dofs_per_line +
- 13*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=30*dof_handler.get_fe().dofs_per_vertex +
+ 45*dof_handler.get_fe().dofs_per_line +
+ 13*dof_handler.get_fe().dofs_per_quad;
break;
case 8:
- max_couplings=37*dof_handler.get_finite_element().dofs_per_vertex +
- 56*dof_handler.get_finite_element().dofs_per_line +
- 16*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=37*dof_handler.get_fe().dofs_per_vertex +
+ 56*dof_handler.get_fe().dofs_per_line +
+ 16*dof_handler.get_fe().dofs_per_quad;
break;
// the following numbers are not based on actual counting but by
// example, for dofs_per_vertex, the sequence above is 19, 21, 28,
// 30, 37, and is continued as follows):
case 9:
- max_couplings=39*dof_handler.get_finite_element().dofs_per_vertex +
- 59*dof_handler.get_finite_element().dofs_per_line +
- 17*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=39*dof_handler.get_fe().dofs_per_vertex +
+ 59*dof_handler.get_fe().dofs_per_line +
+ 17*dof_handler.get_fe().dofs_per_quad;
break;
case 10:
- max_couplings=46*dof_handler.get_finite_element().dofs_per_vertex +
- 70*dof_handler.get_finite_element().dofs_per_line +
- 20*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=46*dof_handler.get_fe().dofs_per_vertex +
+ 70*dof_handler.get_fe().dofs_per_line +
+ 20*dof_handler.get_fe().dofs_per_quad;
break;
case 11:
- max_couplings=48*dof_handler.get_finite_element().dofs_per_vertex +
- 73*dof_handler.get_finite_element().dofs_per_line +
- 21*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=48*dof_handler.get_fe().dofs_per_vertex +
+ 73*dof_handler.get_fe().dofs_per_line +
+ 21*dof_handler.get_fe().dofs_per_quad;
break;
case 12:
- max_couplings=55*dof_handler.get_finite_element().dofs_per_vertex +
- 84*dof_handler.get_finite_element().dofs_per_line +
- 24*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=55*dof_handler.get_fe().dofs_per_vertex +
+ 84*dof_handler.get_fe().dofs_per_line +
+ 24*dof_handler.get_fe().dofs_per_quad;
break;
case 13:
- max_couplings=57*dof_handler.get_finite_element().dofs_per_vertex +
- 87*dof_handler.get_finite_element().dofs_per_line +
- 25*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=57*dof_handler.get_fe().dofs_per_vertex +
+ 87*dof_handler.get_fe().dofs_per_line +
+ 25*dof_handler.get_fe().dofs_per_quad;
break;
case 14:
- max_couplings=63*dof_handler.get_finite_element().dofs_per_vertex +
- 98*dof_handler.get_finite_element().dofs_per_line +
- 28*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=63*dof_handler.get_fe().dofs_per_vertex +
+ 98*dof_handler.get_fe().dofs_per_line +
+ 28*dof_handler.get_fe().dofs_per_quad;
break;
case 15:
- max_couplings=65*dof_handler.get_finite_element().dofs_per_vertex +
- 103*dof_handler.get_finite_element().dofs_per_line +
- 29*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=65*dof_handler.get_fe().dofs_per_vertex +
+ 103*dof_handler.get_fe().dofs_per_line +
+ 29*dof_handler.get_fe().dofs_per_quad;
break;
case 16:
- max_couplings=72*dof_handler.get_finite_element().dofs_per_vertex +
- 114*dof_handler.get_finite_element().dofs_per_line +
- 32*dof_handler.get_finite_element().dofs_per_quad;
+ max_couplings=72*dof_handler.get_fe().dofs_per_vertex +
+ 114*dof_handler.get_fe().dofs_per_line +
+ 32*dof_handler.get_fe().dofs_per_quad;
break;
default:
types::global_dof_index max_couplings;
if (max_adjacent_cells <= 8)
- max_couplings=7*7*7*dof_handler.get_finite_element().dofs_per_vertex +
- 7*6*7*3*dof_handler.get_finite_element().dofs_per_line +
- 9*4*7*3*dof_handler.get_finite_element().dofs_per_quad +
- 27*dof_handler.get_finite_element().dofs_per_hex;
+ max_couplings=7*7*7*dof_handler.get_fe().dofs_per_vertex +
+ 7*6*7*3*dof_handler.get_fe().dofs_per_line +
+ 9*4*7*3*dof_handler.get_fe().dofs_per_quad +
+ 27*dof_handler.get_fe().dofs_per_hex;
else
{
Assert (false, ExcNotImplemented());
{
dof_handler.vertex_dofs
.resize(dof_handler.tria->n_vertices() *
- dof_handler.get_finite_element().dofs_per_vertex,
+ dof_handler.get_fe().dofs_per_vertex,
numbers::invalid_dof_index);
for (unsigned int i=0; i<dof_handler.tria->n_levels(); ++i)
dof_handler.levels.back()->dof_object.dofs
.resize (dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_finite_element().dofs_per_line,
+ dof_handler.get_fe().dofs_per_line,
numbers::invalid_dof_index);
dof_handler.levels.back()->cell_dof_indices_cache
.resize (dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_finite_element().dofs_per_cell,
+ dof_handler.get_fe().dofs_per_cell,
numbers::invalid_dof_index);
}
}
{
dof_handler.vertex_dofs
.resize(dof_handler.tria->n_vertices() *
- dof_handler.get_finite_element().dofs_per_vertex,
+ dof_handler.get_fe().dofs_per_vertex,
numbers::invalid_dof_index);
for (unsigned int i=0; i<dof_handler.tria->n_levels(); ++i)
dof_handler.levels.back()->dof_object.dofs
.resize (dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_finite_element().dofs_per_quad,
+ dof_handler.get_fe().dofs_per_quad,
numbers::invalid_dof_index);
dof_handler.levels.back()->cell_dof_indices_cache
.resize (dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_finite_element().dofs_per_cell,
+ dof_handler.get_fe().dofs_per_cell,
numbers::invalid_dof_index);
}
{
dof_handler.faces->lines.dofs
.resize (dof_handler.tria->n_raw_lines() *
- dof_handler.get_finite_element().dofs_per_line,
+ dof_handler.get_fe().dofs_per_line,
numbers::invalid_dof_index);
}
}
{
dof_handler.vertex_dofs
.resize(dof_handler.tria->n_vertices() *
- dof_handler.get_finite_element().dofs_per_vertex,
+ dof_handler.get_fe().dofs_per_vertex,
numbers::invalid_dof_index);
for (unsigned int i=0; i<dof_handler.tria->n_levels(); ++i)
dof_handler.levels.back()->dof_object.dofs
.resize (dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_finite_element().dofs_per_hex,
+ dof_handler.get_fe().dofs_per_hex,
numbers::invalid_dof_index);
dof_handler.levels.back()->cell_dof_indices_cache
.resize (dof_handler.tria->n_raw_cells(i) *
- dof_handler.get_finite_element().dofs_per_cell,
+ dof_handler.get_fe().dofs_per_cell,
numbers::invalid_dof_index);
}
dof_handler.faces.reset (new internal::DoFHandler::DoFFaces<3>);
{
dof_handler.faces->lines.dofs
.resize (dof_handler.tria->n_raw_lines() *
- dof_handler.get_finite_element().dofs_per_line,
+ dof_handler.get_fe().dofs_per_line,
numbers::invalid_dof_index);
dof_handler.faces->quads.dofs
.resize (dof_handler.tria->n_raw_quads() *
- dof_handler.get_finite_element().dofs_per_quad,
+ dof_handler.get_fe().dofs_per_quad,
numbers::invalid_dof_index);
}
}
dof_handler.clear_mg_space ();
const dealii::Triangulation<1, spacedim> &tria = dof_handler.get_triangulation();
- const unsigned int &dofs_per_line = dof_handler.get_finite_element ().dofs_per_line;
+ const unsigned int &dofs_per_line = dof_handler.get_fe ().dofs_per_line;
const unsigned int &n_levels = tria.n_levels ();
for (unsigned int i = 0; i < n_levels; ++i)
{
Assert (min_level[vertex] < n_levels, ExcInternalError ());
Assert (max_level[vertex] >= min_level[vertex], ExcInternalError ());
- dof_handler.mg_vertex_dofs[vertex].init (min_level[vertex], max_level[vertex], dof_handler.get_finite_element ().dofs_per_vertex);
+ dof_handler.mg_vertex_dofs[vertex].init (min_level[vertex], max_level[vertex], dof_handler.get_fe ().dofs_per_vertex);
}
else
Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation"));
dof_handler.clear_mg_space ();
- const dealii::FiniteElement<2, spacedim> &fe = dof_handler.get_finite_element ();
+ const dealii::FiniteElement<2, spacedim> &fe = dof_handler.get_fe ();
const dealii::Triangulation<2, spacedim> &tria = dof_handler.get_triangulation();
const unsigned int &n_levels = tria.n_levels ();
Assert (dof_handler.get_triangulation().n_levels () > 0, ExcMessage ("Invalid triangulation"));
dof_handler.clear_mg_space ();
- const dealii::FiniteElement<3, spacedim> &fe = dof_handler.get_finite_element ();
+ const dealii::FiniteElement<3, spacedim> &fe = dof_handler.get_fe ();
const dealii::Triangulation<3, spacedim> &tria = dof_handler.get_triangulation();
const unsigned int &n_levels = tria.n_levels ();
{
std::set<int> boundary_dofs;
- const unsigned int dofs_per_face = get_finite_element().dofs_per_face;
+ const unsigned int dofs_per_face = get_fe().dofs_per_face;
std::vector<types::global_dof_index> dofs_on_face(dofs_per_face);
// loop over all faces of all cells
std::set<types::global_dof_index> boundary_dofs;
- const unsigned int dofs_per_face = get_finite_element().dofs_per_face;
+ const unsigned int dofs_per_face = get_fe().dofs_per_face;
std::vector<types::global_dof_index> dofs_on_face(dofs_per_face);
// same as in the previous
switch (dim)
{
case 1:
- return get_finite_element().dofs_per_vertex;
+ return get_fe().dofs_per_vertex;
case 2:
- return (3*get_finite_element().dofs_per_vertex +
- 2*get_finite_element().dofs_per_line);
+ return (3*get_fe().dofs_per_vertex +
+ 2*get_fe().dofs_per_line);
case 3:
// we need to take refinement of
// one boundary face into
// harm since the matrix will cry
// foul if its requirements are
// not satisfied
- return (19*get_finite_element().dofs_per_vertex +
- 28*get_finite_element().dofs_per_line +
- 8*get_finite_element().dofs_per_quad);
+ return (19*get_fe().dofs_per_vertex +
+ 28*get_fe().dofs_per_line +
+ 8*get_fe().dofs_per_quad);
default:
Assert (false, ExcNotImplemented());
return numbers::invalid_unsigned_int;
{
// distribute dofs of vertices
- if (dof_handler.get_finite_element().dofs_per_vertex > 0)
+ if (dof_handler.get_fe().dofs_per_vertex > 0)
for (unsigned int v=0; v<GeometryInfo<1>::vertices_per_cell; ++v)
{
if (cell->vertex_dof_index (v,0) == numbers::invalid_dof_index)
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_vertex; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_vertex; ++d)
{
Assert ((cell->vertex_dof_index (v,d) ==
numbers::invalid_dof_index),
cell->set_vertex_dof_index (v, d, next_free_dof++);
}
else
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_vertex; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_vertex; ++d)
Assert ((cell->vertex_dof_index (v,d) !=
numbers::invalid_dof_index),
ExcInternalError());
}
// dofs of line
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_line; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_line; ++d)
cell->set_dof_index (d, next_free_dof++);
return next_free_dof;
const typename DoFHandler<2,spacedim>::active_cell_iterator &cell,
types::global_dof_index next_free_dof)
{
- if (dof_handler.get_finite_element().dofs_per_vertex > 0)
+ if (dof_handler.get_fe().dofs_per_vertex > 0)
// number dofs on vertices
for (unsigned int vertex=0; vertex<GeometryInfo<2>::vertices_per_cell; ++vertex)
// check whether dofs for this vertex have been distributed
// (checking the first dof should be good enough)
if (cell->vertex_dof_index(vertex, 0) == numbers::invalid_dof_index)
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_vertex; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_vertex; ++d)
cell->set_vertex_dof_index (vertex, d, next_free_dof++);
// for the four sides
- if (dof_handler.get_finite_element().dofs_per_line > 0)
+ if (dof_handler.get_fe().dofs_per_line > 0)
for (unsigned int side=0; side<GeometryInfo<2>::faces_per_cell; ++side)
{
const typename DoFHandler<2,spacedim>::line_iterator
// numbered (checking the first dof should be good enough)
if (line->dof_index(0) == numbers::invalid_dof_index)
// if not: distribute dofs
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_line; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_line; ++d)
line->set_dof_index (d, next_free_dof++);
}
// dofs of quad
- if (dof_handler.get_finite_element().dofs_per_quad > 0)
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_quad; ++d)
+ if (dof_handler.get_fe().dofs_per_quad > 0)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_quad; ++d)
cell->set_dof_index (d, next_free_dof++);
return next_free_dof;
const typename DoFHandler<3,spacedim>::active_cell_iterator &cell,
types::global_dof_index next_free_dof)
{
- if (dof_handler.get_finite_element().dofs_per_vertex > 0)
+ if (dof_handler.get_fe().dofs_per_vertex > 0)
// number dofs on vertices
for (unsigned int vertex=0; vertex<GeometryInfo<3>::vertices_per_cell; ++vertex)
// check whether dofs for this vertex have been distributed
// (checking the first dof should be good enough)
if (cell->vertex_dof_index(vertex, 0) == numbers::invalid_dof_index)
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_vertex; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_vertex; ++d)
cell->set_vertex_dof_index (vertex, d, next_free_dof++);
// for the lines
- if (dof_handler.get_finite_element().dofs_per_line > 0)
+ if (dof_handler.get_fe().dofs_per_line > 0)
for (unsigned int l=0; l<GeometryInfo<3>::lines_per_cell; ++l)
{
const typename DoFHandler<3,spacedim>::line_iterator
// numbered (checking the first dof should be good enough)
if (line->dof_index(0) == numbers::invalid_dof_index)
// if not: distribute dofs
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_line; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_line; ++d)
line->set_dof_index (d, next_free_dof++);
}
// for the quads
- if (dof_handler.get_finite_element().dofs_per_quad > 0)
+ if (dof_handler.get_fe().dofs_per_quad > 0)
for (unsigned int q=0; q<GeometryInfo<3>::quads_per_cell; ++q)
{
const typename DoFHandler<3,spacedim>::quad_iterator
// numbered (checking the first dof should be good enough)
if (quad->dof_index(0) == numbers::invalid_dof_index)
// if not: distribute dofs
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_quad; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_quad; ++d)
quad->set_dof_index (d, next_free_dof++);
}
// dofs of hex
- if (dof_handler.get_finite_element().dofs_per_hex > 0)
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_hex; ++d)
+ if (dof_handler.get_fe().dofs_per_hex > 0)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_hex; ++d)
cell->set_dof_index (d, next_free_dof++);
return next_free_dof;
// make sure the entry in the equivalence
// table exists
ensure_existence_of_dof_identities<0>
- (dof_handler.get_finite_element(first_fe_index),
- dof_handler.get_finite_element(other_fe_index),
+ (dof_handler.get_fe(first_fe_index),
+ dof_handler.get_fe(other_fe_index),
vertex_dof_identities[first_fe_index][other_fe_index]);
// then loop through the identities we
// really is unused
Assert (dof_handler.get_triangulation()
.vertex_used((i-dof_handler.vertex_dofs.begin()) /
- dof_handler.get_finite_element().dofs_per_vertex)
+ dof_handler.get_fe().dofs_per_vertex)
== false,
ExcInternalError ());
}
= dealii::internal::DoFAccessor::Implementation::
nth_active_vertex_fe_index (dof_handler, vertex_index, f);
- for (unsigned int d=0; d<dof_handler.get_finite_element(fe_index).dofs_per_vertex; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe(fe_index).dofs_per_vertex; ++d)
{
const types::global_dof_index old_dof_index
= dealii::internal::DoFAccessor::Implementation::
{
const unsigned int fe_index = cell->active_fe_index ();
- for (unsigned int d=0; d<dof_handler.get_finite_element(fe_index).template n_dofs_per_object<dim>(); ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe(fe_index).template n_dofs_per_object<dim>(); ++d)
{
const types::global_dof_index old_dof_index = cell->dof_index(d,fe_index);
if (old_dof_index != numbers::invalid_dof_index)
const unsigned int fe_index
= line->nth_active_fe_index (f);
- for (unsigned int d=0; d<dof_handler.get_finite_element(fe_index).dofs_per_line; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe(fe_index).dofs_per_line; ++d)
{
const types::global_dof_index old_dof_index = line->dof_index(d,fe_index);
if (old_dof_index != numbers::invalid_dof_index)
const unsigned int fe_index
= line->nth_active_fe_index (f);
- for (unsigned int d=0; d<dof_handler.get_finite_element(fe_index).dofs_per_line; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe(fe_index).dofs_per_line; ++d)
{
const types::global_dof_index old_dof_index = line->dof_index(d,fe_index);
if (old_dof_index != numbers::invalid_dof_index)
const unsigned int fe_index
= quad->nth_active_fe_index (f);
- for (unsigned int d=0; d<dof_handler.get_finite_element(fe_index).dofs_per_quad; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe(fe_index).dofs_per_quad; ++d)
{
const types::global_dof_index old_dof_index = quad->dof_index(d,fe_index);
if (old_dof_index != numbers::invalid_dof_index)
// if the present vertex lives on the current level
if ((i->get_coarsest_level() <= level) &&
(i->get_finest_level() >= level))
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_vertex; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_vertex; ++d)
{
const dealii::types::global_dof_index idx
- = i->get_index (level, d, dof_handler.get_finite_element().dofs_per_vertex);
+ = i->get_index (level, d, dof_handler.get_fe().dofs_per_vertex);
if (check_validity)
Assert(idx != numbers::invalid_dof_index, ExcInternalError ());
if (idx != numbers::invalid_dof_index)
i->set_index (level, d,
- dof_handler.get_finite_element().dofs_per_vertex,
+ dof_handler.get_fe().dofs_per_vertex,
(indices.size() == 0)?
(new_numbers[idx]) :
(new_numbers[indices.index_within_set(idx)]));
const unsigned int level,
const bool check_validity)
{
- if (dof_handler.get_finite_element().dofs_per_line > 0)
+ if (dof_handler.get_fe().dofs_per_line > 0)
{
// save user flags as they will be modified
std::vector<bool> user_flags;
for (unsigned int l=0; l<GeometryInfo<2>::lines_per_cell; ++l)
if (cell->line(l)->user_flag_set())
{
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_line; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_line; ++d)
{
const dealii::types::global_dof_index idx = cell->line(l)->mg_dof_index(level, d);
if (check_validity)
const unsigned int level,
const bool check_validity)
{
- if (dof_handler.get_finite_element().dofs_per_line > 0 ||
- dof_handler.get_finite_element().dofs_per_quad > 0)
+ if (dof_handler.get_fe().dofs_per_line > 0 ||
+ dof_handler.get_fe().dofs_per_quad > 0)
{
// save user flags as they will be modified
std::vector<bool> user_flags;
for (unsigned int l=0; l<GeometryInfo<3>::lines_per_cell; ++l)
if (cell->line(l)->user_flag_set())
{
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_line; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_line; ++d)
{
const dealii::types::global_dof_index idx = cell->line(l)->mg_dof_index(level, d);
if (check_validity)
for (unsigned int l=0; l<GeometryInfo<3>::quads_per_cell; ++l)
if (cell->quad(l)->user_flag_set())
{
- for (unsigned int d=0; d<dof_handler.get_finite_element().dofs_per_quad; ++d)
+ for (unsigned int d=0; d<dof_handler.get_fe().dofs_per_quad; ++d)
{
const dealii::types::global_dof_index idx = cell->quad(l)->mg_dof_index(level, d);
if (check_validity)
(void)fe_index;
Assert ((fe_index == dealii::DoFHandler<dh_dim, spacedim>::default_fe_index),
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
- Assert (local_index<dof_handler.get_finite_element().template n_dofs_per_object<dim>(),
- ExcIndexRange (local_index, 0, dof_handler.get_finite_element().template n_dofs_per_object<dim>()));
- Assert (obj_index * dof_handler.get_finite_element().template n_dofs_per_object<dim>()+local_index
+ Assert (local_index<dof_handler.get_fe().template n_dofs_per_object<dim>(),
+ ExcIndexRange (local_index, 0, dof_handler.get_fe().template n_dofs_per_object<dim>()));
+ Assert (obj_index * dof_handler.get_fe().template n_dofs_per_object<dim>()+local_index
<
dofs.size(),
ExcInternalError());
- dofs[obj_index * dof_handler.get_finite_element()
+ dofs[obj_index * dof_handler.get_fe()
.template n_dofs_per_object<dim>() + local_index] = global_index;
}
}
ExcDimensionMismatch(reverse.size(), dof.n_dofs(level)));
unsigned int n_global_dofs = dof.n_dofs(level);
- unsigned int n_cell_dofs = dof.get_finite_element().n_dofs_per_cell();
+ unsigned int n_cell_dofs = dof.get_fe().n_dofs_per_cell();
std::vector<bool> already_sorted(n_global_dofs, false);
std::vector<types::global_dof_index> cell_dofs(n_cell_dofs);
}
else
{
- Assert (dof.get_finite_element().has_support_points(),
+ Assert (dof.get_fe().has_support_points(),
typename FiniteElement<DoFHandlerType::dimension>::ExcFEHasNoSupportPoints());
const unsigned int n_dofs = dof.n_dofs(level);
std::vector<std::pair<Point<DoFHandlerType::space_dimension>,unsigned int> > support_point_list
(n_dofs);
- Quadrature<DoFHandlerType::dimension> q_dummy(dof.get_finite_element().get_unit_support_points());
- FEValues<DoFHandlerType::dimension,DoFHandlerType::space_dimension> fe_values (dof.get_finite_element(), q_dummy,
+ Quadrature<DoFHandlerType::dimension> q_dummy(dof.get_fe().get_unit_support_points());
+ FEValues<DoFHandlerType::dimension,DoFHandlerType::space_dimension> fe_values (dof.get_fe(), q_dummy,
update_quadrature_points);
std::vector<bool> already_touched (dof.n_dofs(), false);
- const unsigned int dofs_per_cell = dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> local_dof_indices (dofs_per_cell);
typename DoFHandlerType::level_cell_iterator begin = dof.begin(level);
typename DoFHandlerType::level_cell_iterator end = dof.end(level);
const ComponentMask &component_mask,
std::vector<bool> &selected_dofs)
{
- const FiniteElement<dim,spacedim> &fe = dof.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dof.get_fe();
(void)fe;
Assert(component_mask.represents_n_components(fe.n_components()),
const ComponentMask &component_mask,
std::vector<bool> &selected_dofs)
{
- const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof.get_finite_element();
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof.get_fe();
Assert(component_mask.represents_n_components(n_components(dof)),
ExcMessage ("The given component mask is not sized correctly to represent the "
std::vector<bool> &selected_dofs)
{
// simply defer to the other extract_level_dofs() function
- extract_level_dofs (level, dof, dof.get_finite_element().component_mask(block_mask),
+ extract_level_dofs (level, dof, dof.get_fe().component_mask(block_mask),
selected_dofs);
}
// preset all values by false
std::fill_n (selected_dofs.begin(), dof_handler.n_dofs(), false);
- const FiniteElement<dim,spacedim> &fe = dof_handler.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dof_handler.get_fe();
// this function is similar to the make_sparsity_pattern function,
// see there for more information
// preset all values by false
std::fill_n (selected_dofs.begin(), dof_handler.n_dofs(), false);
- const FiniteElement<dim,spacedim> &fe = dof_handler.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dof_handler.get_fe();
// this function is similar to the make_sparsity_pattern function,
// see there for more information
const ComponentMask &component_mask,
std::vector<std::vector<bool> > &constant_modes)
{
- const unsigned int n_components = dof_handler.get_finite_element(0).n_components();
+ const unsigned int n_components = dof_handler.get_fe(0).n_components();
Assert (component_mask.represents_n_components(n_components),
ExcDimensionMismatch(n_components,
component_mask.size()));
const types::subdomain_id subdomain,
std::vector<unsigned int> &n_dofs_on_subdomain)
{
- Assert (n_dofs_on_subdomain.size() == dof_handler.get_finite_element(0).n_components(),
+ Assert (n_dofs_on_subdomain.size() == dof_handler.get_fe(0).n_components(),
ExcDimensionMismatch (n_dofs_on_subdomain.size(),
- dof_handler.get_finite_element(0).n_components()));
+ dof_handler.get_fe(0).n_components()));
std::fill (n_dofs_on_subdomain.begin(), n_dofs_on_subdomain.end(), 0);
// in debug mode, make sure that there are some cells at least with
internal::get_component_association (dof_handler, std::vector<bool>(),
component_association);
- for (unsigned int c=0; c<dof_handler.get_finite_element(0).n_components(); ++c)
+ for (unsigned int c=0; c<dof_handler.get_fe(0).n_components(); ++c)
{
for (types::global_dof_index i=0; i<dof_handler.n_dofs(); ++i)
if ((subdomain_association[i] == subdomain) &&
bool only_once,
std::vector<unsigned int> target_component)
{
- const unsigned int n_components = dof_handler.get_finite_element(0).n_components();
+ const unsigned int n_components = dof_handler.get_fe(0).n_components();
std::fill (dofs_per_component.begin(), dofs_per_component.end(),
types::global_dof_index(0));
const Table<2, Coupling> &table,
std::vector<Table<2,Coupling> > &tables_by_block)
{
- const FiniteElement<dim,spacedim> &fe = dof_handler.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = dof_handler.get_fe();
const unsigned int nb = fe.n_blocks();
tables_by_block.resize(1);
for (cell=dof_handler.begin(level); cell != endc; ++cell)
if (cell->is_locally_owned_on_level())
++i;
- block_list.reinit(i, dof_handler.n_dofs(), dof_handler.get_finite_element().dofs_per_cell);
+ block_list.reinit(i, dof_handler.n_dofs(), dof_handler.get_fe().dofs_per_cell);
i=0;
for (cell=dof_handler.begin(level); cell != endc; ++cell)
if (cell->is_locally_owned_on_level())
const unsigned int level,
const bool interior_only)
{
- const FiniteElement<DoFHandlerType::dimension> &fe = dof_handler.get_finite_element();
+ const FiniteElement<DoFHandlerType::dimension> &fe = dof_handler.get_fe();
block_list.reinit(1, dof_handler.n_dofs(level), dof_handler.n_dofs(level));
typename DoFHandlerType::level_cell_iterator cell;
typename DoFHandlerType::level_cell_iterator endc = dof_handler.end(level);
const typename DoFHandlerType::level_cell_iterator cell = pcell->child(child);
// For hp, only this line here would have to be replaced.
- const FiniteElement<DoFHandlerType::dimension> &fe = dof_handler.get_finite_element();
+ const FiniteElement<DoFHandlerType::dimension> &fe = dof_handler.get_fe();
const unsigned int n_dofs = fe.dofs_per_cell;
indices.resize(n_dofs);
exclude.resize(n_dofs);
const bool single_cell_patches,
const bool invert_vertex_mapping)
{
- const unsigned int n_blocks = dof_handler.get_finite_element().n_blocks();
+ const unsigned int n_blocks = dof_handler.get_fe().n_blocks();
BlockMask exclude_boundary_dofs = BlockMask(n_blocks,interior_only);
return make_vertex_patches(block_list,
dof_handler,
/**
* A function that returns how many different finite elements a dof
* handler uses. This is one for non-hp DoFHandlers and
- * dof_handler.get_finite_element().size() for the hp-versions.
+ * dof_handler.get_fe().size() for the hp-versions.
*/
template <int dim, int spacedim>
unsigned int
ExcMessage("Could not find a least face dominating FE."));
const FiniteElement<dim,spacedim> &dominating_fe
- = dof_handler.get_finite_element(dominating_fe_index);
+ = dof_handler.get_fe(dominating_fe_index);
// first get the interpolation matrix from the mother
// to the virtual dofs
const unsigned int subface_fe_index
= cell->face(face)->child(sf)->nth_active_fe_index(0);
const FiniteElement<dim,spacedim> &subface_fe
- = dof_handler.get_finite_element(subface_fe_index);
+ = dof_handler.get_fe(subface_fe_index);
// first get the interpolation matrix from the
// subface to the virtual dofs
Assembler::CopyData<dim,spacedim> copy_data;
unsigned int n_interesting_dofs = 0;
- for (unsigned int local_dof=0; local_dof<coarse_grid.get_finite_element().dofs_per_cell; ++local_dof)
- if (coarse_grid.get_finite_element().system_to_component_index(local_dof).first
+ for (unsigned int local_dof=0; local_dof<coarse_grid.get_fe().dofs_per_cell; ++local_dof)
+ if (coarse_grid.get_fe().system_to_component_index(local_dof).first
==
coarse_component)
++n_interesting_dofs;
std::placeholders::_2,
std::placeholders::_3,
coarse_component,
- std::cref(coarse_grid.get_finite_element()),
+ std::cref(coarse_grid.get_fe()),
std::cref(coarse_to_fine_grid_map),
std::cref(parameter_dofs)),
std::bind(©_intergrid_weights_3<dim,spacedim>,
std::placeholders::_1,
coarse_component,
- std::cref(coarse_grid.get_finite_element()),
+ std::cref(coarse_grid.get_fe()),
std::cref(weight_mapping),
is_called_in_parallel,
std::ref(weights)),
std::vector<types::global_dof_index> &weight_mapping)
{
// aliases to the finite elements used by the dof handlers:
- const FiniteElement<dim,spacedim> &coarse_fe = coarse_grid.get_finite_element(),
- &fine_fe = fine_grid.get_finite_element();
+ const FiniteElement<dim,spacedim> &coarse_fe = coarse_grid.get_fe(),
+ &fine_fe = fine_grid.get_fe();
// global numbers of dofs
const types::global_dof_index n_coarse_dofs = coarse_grid.n_dofs(),
std::vector<bool> coarse_dof_is_parameter (coarse_grid.n_dofs());
if (true)
{
- std::vector<bool> mask (coarse_grid.get_finite_element(0).n_components(),
+ std::vector<bool> mask (coarse_grid.get_fe(0).n_components(),
false);
mask[coarse_component] = true;
extract_dofs (coarse_grid, ComponentMask(mask), coarse_dof_is_parameter);
ConstraintMatrix &zero_boundary_constraints,
const ComponentMask &component_mask)
{
- Assert (component_mask.represents_n_components(dof.get_finite_element(0).n_components()),
+ Assert (component_mask.represents_n_components(dof.get_fe(0).n_components()),
ExcMessage ("The number of components in the mask has to be either "
"zero or equal to the number of components in the finite "
"element."));
ExcDimensionMismatch (sparsity.n_rows(), n_dofs));
Assert (sparsity.n_cols() == n_dofs,
ExcDimensionMismatch (sparsity.n_cols(), n_dofs));
- Assert (couplings.n_rows() == dof.get_finite_element(0).n_components(),
- ExcDimensionMismatch(couplings.n_rows(), dof.get_finite_element(0).n_components()));
- Assert (couplings.n_cols() == dof.get_finite_element(0).n_components(),
- ExcDimensionMismatch(couplings.n_cols(), dof.get_finite_element(0).n_components()));
+ Assert (couplings.n_rows() == dof.get_fe(0).n_components(),
+ ExcDimensionMismatch(couplings.n_rows(), dof.get_fe(0).n_components()));
+ Assert (couplings.n_cols() == dof.get_fe(0).n_components(),
+ ExcDimensionMismatch(couplings.n_cols(), dof.get_fe(0).n_components()));
// If we have a distributed::Triangulation only allow locally_owned
// subdomain. Not setting a subdomain is also okay, because we skip
const types::subdomain_id subdomain_id)
{
const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension>
- &fe = dof.get_finite_element();
+ &fe = dof.get_fe();
std::vector<types::global_dof_index> dofs_on_this_cell (fe.dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell (fe.dofs_per_cell);
// specialized functions in the internal namespace
const types::global_dof_index n_dofs = dof.n_dofs();
(void)n_dofs;
- const unsigned int n_comp = dof.get_finite_element(0).n_components();
+ const unsigned int n_comp = dof.get_fe(0).n_components();
(void)n_comp;
Assert (sparsity.n_rows() == n_dofs,
// this cell, are the same
Assert (static_cast<const FiniteElementData<dim>&>(*this->fe) ==
static_cast<const FiniteElementData<dim>&>(
- cell->get_dof_handler().get_finite_element(cell->active_fe_index ())),
+ cell->get_dof_handler().get_fe(cell->active_fe_index ())),
(typename FEValuesBase<dim,spacedim>::ExcFEDontMatch()));
Assert (face_no < GeometryInfo<dim>::faces_per_cell,
// this cell, are the same
Assert (static_cast<const FiniteElementData<dim>&>(*this->fe) ==
static_cast<const FiniteElementData<dim>&>(
- cell->get_dof_handler().get_finite_element(cell->active_fe_index ())),
+ cell->get_dof_handler().get_fe(cell->active_fe_index ())),
(typename FEValuesBase<dim,spacedim>::ExcFEDontMatch()));
Assert (face_no < GeometryInfo<dim>::faces_per_cell,
ExcIndexRange (face_no, 0, GeometryInfo<dim>::faces_per_cell));
const ComponentMask mask)
:
euler_vector(&euler_vector),
- fe(&euler_dof_handler.get_finite_element()),
+ fe(&euler_dof_handler.get_fe()),
euler_dof_handler(&euler_dof_handler),
fe_mask(mask.size() ? mask :
ComponentMask(fe->get_nonzero_components(0).size(), true)),
// object is constructed, which is not necessarily what we want.
//TODO: Only one of these two assertions should be relevant
- AssertDimension (spacedim, shiftmap_dof_handler->get_finite_element().n_dofs_per_vertex());
- AssertDimension (shiftmap_dof_handler->get_finite_element(0).n_components(), spacedim);
+ AssertDimension (spacedim, shiftmap_dof_handler->get_fe().n_dofs_per_vertex());
+ AssertDimension (shiftmap_dof_handler->get_fe(0).n_components(), spacedim);
AssertDimension (shiftmap_dof_handler->n_dofs(), euler_transform_vectors->size());
Assert (dof_cell->active() == true, ExcInactiveCell());
// now get the values of the shift vectors at the vertices
- Vector<double> mapping_values (shiftmap_dof_handler->get_finite_element().dofs_per_cell);
+ Vector<double> mapping_values (shiftmap_dof_handler->get_fe().dofs_per_cell);
dof_cell->get_dof_values (*euler_transform_vectors, mapping_values);
for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
MappingQGeneric<dim,spacedim>(degree),
mapping_q_eulerian (mapping_q_eulerian),
support_quadrature(degree),
- fe_values(mapping_q_eulerian.euler_dof_handler->get_finite_element(),
+ fe_values(mapping_q_eulerian.euler_dof_handler->get_fe(),
support_quadrature,
update_values | update_quadrature_points)
{}
// or create a separate dof handler for the displacements.
const unsigned int n_support_pts = support_quadrature.size();
- const unsigned int n_components = mapping_q_eulerian.euler_dof_handler->get_finite_element(0).n_components();
+ const unsigned int n_components = mapping_q_eulerian.euler_dof_handler->get_fe(0).n_components();
Assert (n_components >= spacedim, ExcDimensionMismatch(n_components, spacedim) );
Assert (sparsity.n_cols() == n_dofs,
ExcDimensionMismatch (sparsity.n_cols(), n_dofs));
- const unsigned int dofs_per_cell = dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
typename DoFHandlerType::cell_iterator cell = dof.begin(level),
endc = dof.end(level);
Assert (sparsity.n_cols() == n_dofs,
ExcDimensionMismatch (sparsity.n_cols(), n_dofs));
- const unsigned int dofs_per_cell = dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
typename DoFHandler<dim,spacedim>::cell_iterator cell = dof.begin(level),
Assert (sparsity.n_cols() == fine_dofs,
ExcDimensionMismatch (sparsity.n_cols(), fine_dofs));
- const unsigned int dofs_per_cell = dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
typename DoFHandler<dim,spacedim>::cell_iterator cell = dof.begin(level),
const Table<2,DoFTools::Coupling> &int_mask,
const Table<2,DoFTools::Coupling> &flux_mask)
{
- const FiniteElement<dim> &fe = dof.get_finite_element();
+ const FiniteElement<dim> &fe = dof.get_fe();
const types::global_dof_index n_dofs = dof.n_dofs(level);
const unsigned int n_comp = fe.n_components();
(void)n_dofs;
const unsigned int level,
const Table<2,DoFTools::Coupling> &flux_mask)
{
- const FiniteElement<dim> &fe = dof.get_finite_element();
+ const FiniteElement<dim> &fe = dof.get_fe();
const unsigned int n_comp = fe.n_components();
(void)n_comp;
Assert (flux_mask.n_cols() == n_comp,
ExcDimensionMismatch (flux_mask.n_cols(), n_comp));
- const unsigned int dofs_per_cell = dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> dofs_on_this_cell(dofs_per_cell);
std::vector<types::global_dof_index> dofs_on_other_cell(dofs_per_cell);
Table<2,bool> support_on_face(dofs_per_cell, GeometryInfo<dim>::faces_per_cell);
bool only_once,
std::vector<unsigned int> target_component)
{
- const FiniteElement<dim> &fe = dof_handler.get_finite_element();
+ const FiniteElement<dim> &fe = dof_handler.get_fe();
const unsigned int n_components = fe.n_components();
const unsigned int nlevels = dof_handler.get_triangulation().n_global_levels();
}
}
// finally sanity check
- Assert (!dof_handler.get_finite_element().is_primitive()
+ Assert (!dof_handler.get_fe().is_primitive()
||
std::accumulate (result[l].begin(),
result[l].end(), 0U)
std::vector<std::vector<types::global_dof_index> > &dofs_per_block,
std::vector<unsigned int> target_block)
{
- const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof_handler.get_finite_element();
+ const FiniteElement<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &fe = dof_handler.get_fe();
const unsigned int n_blocks = fe.n_blocks();
const unsigned int n_levels = dof_handler.get_triangulation().n_global_levels();
ExcDimensionMismatch (non_interface_dofs.size(),
mg_dof_handler.get_triangulation().n_global_levels()));
- const FiniteElement<dim,spacedim> &fe = mg_dof_handler.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = mg_dof_handler.get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
const unsigned int dofs_per_face = fe.dofs_per_face;
std::vector<std::vector<types::global_dof_index> >
tmp_interface_dofs(interface_dofs.size());
- const FiniteElement<dim,spacedim> &fe = mg_dof_handler.get_finite_element();
+ const FiniteElement<dim,spacedim> &fe = mg_dof_handler.get_fe();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
const unsigned int dofs_per_face = fe.dofs_per_face;
const unsigned int selected_block,
std::vector<std::vector<types::global_dof_index> > &ndofs)
{
- const unsigned int n_blocks = mg_dof.get_finite_element().n_blocks();
+ const unsigned int n_blocks = mg_dof.get_fe().n_blocks();
Assert(selected_block < n_blocks, ExcIndexRange(selected_block, 0, n_blocks));
std::vector<bool> selected(n_blocks, false);
const DoFHandler<dim,spacedim> &,
const DoFHandler<dim,spacedim> &mg_dof)
{
- const FiniteElement<dim> &fe = mg_dof.get_finite_element();
+ const FiniteElement<dim> &fe = mg_dof.get_fe();
const unsigned int n_blocks = fe.n_blocks();
const unsigned int dofs_per_cell = fe.dofs_per_cell;
const unsigned int n_levels = mg_dof.get_triangulation().n_levels();
// prolongation matrix for
// this child
const FullMatrix<double> &prolongation
- = mg_dof.get_finite_element().get_prolongation_matrix (child, cell->refinement_case());
+ = mg_dof.get_fe().get_prolongation_matrix (child, cell->refinement_case());
cell->child(child)->get_mg_dof_indices (dof_indices_child);
// prolongation matrix for
// this child
const FullMatrix<double> &prolongation
- = mg_dof.get_finite_element().get_prolongation_matrix (child, cell->refinement_case());
+ = mg_dof.get_fe().get_prolongation_matrix (child, cell->refinement_case());
cell->child(child)->get_mg_dof_indices (dof_indices_child);
const DoFHandler<dim,spacedim> &mg_dof,
unsigned int select)
{
- const FiniteElement<dim> &fe = mg_dof.get_finite_element();
- unsigned int n_blocks = mg_dof.get_finite_element().n_blocks();
+ const FiniteElement<dim> &fe = mg_dof.get_fe();
+ unsigned int n_blocks = mg_dof.get_fe().n_blocks();
selected_block = select;
selected.resize(n_blocks, false);
const DoFHandler<dim,spacedim> &mg_dof,
const std::vector<bool> &sel)
{
- const FiniteElement<dim> &fe = mg_dof.get_finite_element();
- unsigned int n_blocks = mg_dof.get_finite_element().n_blocks();
+ const FiniteElement<dim> &fe = mg_dof.get_fe();
+ unsigned int n_blocks = mg_dof.get_fe().n_blocks();
if (sel.size() != 0)
{
{
std::vector<bool> selected=sel;
std::vector<unsigned int> target_component=target_comp;
- const unsigned int ncomp = mg_dof.get_finite_element(0).n_components();
+ const unsigned int ncomp = mg_dof.get_fe(0).n_components();
// If the selected and
// target_component have size 0,
// is empty
if (target_component.size() == 0)
{
- target_component.resize(mg_dof.get_finite_element(0).n_components());
+ target_component.resize(mg_dof.get_fe(0).n_components());
for (unsigned int i=0; i<target_component.size(); ++i)
target_component[i] = i;
}
else
{
// otherwise, check it for consistency
- Assert (target_component.size() == mg_dof.get_finite_element(0).n_components(),
+ Assert (target_component.size() == mg_dof.get_fe(0).n_components(),
ExcDimensionMismatch(target_component.size(),
- mg_dof.get_finite_element(0).n_components()));
+ mg_dof.get_fe(0).n_components()));
for (unsigned int i=0; i<target_component.size(); ++i)
{
// different.
if (mg_target_component.size() == 0)
{
- mg_target_component.resize(mg_dof.get_finite_element(0).n_components());
+ mg_target_component.resize(mg_dof.get_fe(0).n_components());
for (unsigned int i=0; i<mg_target_component.size(); ++i)
mg_target_component[i] = target_component[i];
}
else
{
- Assert (mg_target_component.size() == mg_dof.get_finite_element(0).n_components(),
+ Assert (mg_target_component.size() == mg_dof.get_fe(0).n_components(),
ExcDimensionMismatch(mg_target_component.size(),
- mg_dof.get_finite_element(0).n_components()));
+ mg_dof.get_fe(0).n_components()));
for (unsigned int i=0; i<mg_target_component.size(); ++i)
{
}
}
- const FiniteElement<dim> &fe = mg_dof.get_finite_element();
+ const FiniteElement<dim> &fe = mg_dof.get_fe();
// Effective number of components
// is the maximum entry in
// prolongation matrix for
// this child
const FullMatrix<double> &prolongation
- = mg_dof.get_finite_element().get_prolongation_matrix (child, cell->refinement_case());
+ = mg_dof.get_fe().get_prolongation_matrix (child, cell->refinement_case());
cell->child(child)->get_mg_dof_indices (dof_indices_child);
// prolongation matrix for
// this child
const FullMatrix<double> &prolongation
- = mg_dof.get_finite_element().get_prolongation_matrix (child, cell->refinement_case());
+ = mg_dof.get_fe().get_prolongation_matrix (child, cell->refinement_case());
cell->child(child)->get_mg_dof_indices (dof_indices_child);
const std::vector<unsigned int> &mg_t_component,
const std::vector<std::set<types::global_dof_index> > &bdry_indices)
{
- const FiniteElement<dim> &fe = mg_dof.get_finite_element();
- unsigned int ncomp = mg_dof.get_finite_element(0).n_components();
+ const FiniteElement<dim> &fe = mg_dof.get_fe();
+ unsigned int ncomp = mg_dof.get_fe(0).n_components();
target_component = t_component;
mg_target_component = mg_t_component;
IndexSet globally_relevant;
DoFTools::extract_locally_relevant_dofs(mg_dof, globally_relevant);
- const unsigned int dofs_per_cell = mg_dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = mg_dof.get_fe().dofs_per_cell;
std::vector<types::global_dof_index> global_dof_indices (dofs_per_cell);
std::vector<types::global_dof_index> level_dof_indices (dofs_per_cell);
const dealii::DoFHandler<dim> &mg_dof)
{
// currently, we have only FE_Q and FE_DGQ type elements implemented
- elem_info.n_components = mg_dof.get_finite_element().element_multiplicity(0);
+ elem_info.n_components = mg_dof.get_fe().element_multiplicity(0);
AssertDimension(Utilities::fixed_power<dim>(fe.dofs_per_cell)*elem_info.n_components,
- mg_dof.get_finite_element().dofs_per_cell);
- AssertDimension(fe.degree, mg_dof.get_finite_element().degree);
+ mg_dof.get_fe().dofs_per_cell);
+ AssertDimension(fe.degree, mg_dof.get_fe().degree);
elem_info.fe_degree = fe.degree;
elem_info.element_is_continuous = fe.dofs_per_vertex > 0;
Assert(fe.dofs_per_vertex < 2, ExcNotImplemented());
elem_info.n_child_cell_dofs = elem_info.n_components*Utilities::fixed_power<dim>(n_child_dofs_1d);
const Quadrature<1> dummy_quadrature(std::vector<Point<1> >(1, Point<1>()));
internal::MatrixFreeFunctions::ShapeInfo<Number> shape_info;
- shape_info.reinit(dummy_quadrature, mg_dof.get_finite_element(), 0);
+ shape_info.reinit(dummy_quadrature, mg_dof.get_fe(), 0);
elem_info.lexicographic_numbering = shape_info.lexicographic_numbering;
// step 1.4: get the 1d prolongation matrix and combine from both children
// ---------------------------- 1. Extract 1D info about the finite element
// step 1.1: create a 1D copy of the finite element from FETools where we
// substitute the template argument
- AssertDimension(mg_dof.get_finite_element().n_base_elements(), 1);
- std::string fe_name = mg_dof.get_finite_element().base_element(0).get_name();
+ AssertDimension(mg_dof.get_fe().n_base_elements(), 1);
+ std::string fe_name = mg_dof.get_fe().base_element(0).get_name();
{
const std::size_t template_starts = fe_name.find_first_of('<');
Assert (fe_name[template_starts+1] == (dim==1?'1':(dim==2?'2':'3')),
for (unsigned int level=0; level<std::min(tria.n_levels(),n_levels-1); ++level)
coarse_level_indices[level].resize(tria.n_raw_cells(level),
numbers::invalid_unsigned_int);
- std::vector<types::global_dof_index> local_dof_indices(mg_dof.get_finite_element().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices(mg_dof.get_fe().dofs_per_cell);
dirichlet_indices.resize(n_levels-1);
// We use the vectors stored ghosted_level_vector in the base class for
parent_index = start_index/elem_info.n_child_cell_dofs + tria.n_cells(level);
parent_child_connect[level][child_index] =
std::make_pair(parent_index, c);
- AssertIndexRange(mg_dof.get_finite_element().dofs_per_cell,
+ AssertIndexRange(mg_dof.get_fe().dofs_per_cell,
static_cast<unsigned short>(-1));
// set Dirichlet boundary conditions (as a list of
// constrained DoFs) for the child
if (mg_constrained_dofs != nullptr)
- for (unsigned int i=0; i<mg_dof.get_finite_element().dofs_per_cell; ++i)
+ for (unsigned int i=0; i<mg_dof.get_fe().dofs_per_cell; ++i)
if (mg_constrained_dofs->is_boundary_index(level,
local_dof_indices[elem_info.lexicographic_numbering[i]]))
dirichlet_indices[level][child_index].push_back(i);
dirichlet_indices[0].emplace_back();
if (mg_constrained_dofs != nullptr)
- for (unsigned int i=0; i<mg_dof.get_finite_element().dofs_per_cell; ++i)
+ for (unsigned int i=0; i<mg_dof.get_fe().dofs_per_cell; ++i)
if (mg_constrained_dofs->is_boundary_index(0, local_dof_indices[elem_info.lexicographic_numbering[i]]))
dirichlet_indices[0].back().push_back(i);
}
(const DoFHandler<dim,spacedim> &mg_dof)
{
const unsigned int n_levels = mg_dof.get_triangulation().n_global_levels();
- const unsigned int dofs_per_cell = mg_dof.get_finite_element().dofs_per_cell;
+ const unsigned int dofs_per_cell = mg_dof.get_fe().dofs_per_cell;
this->sizes.resize(n_levels);
for (unsigned int l=0; l<n_levels; ++l)
{
// set an alias to the prolongation matrix for this child
const FullMatrix<double> &prolongation
- = mg_dof.get_finite_element().get_prolongation_matrix (child,
- cell->refinement_case());
+ = mg_dof.get_fe().get_prolongation_matrix (child,
+ cell->refinement_case());
Assert (prolongation.n() != 0, ExcNoProlongation());
{
// set an alias to the prolongation matrix for this child
prolongation
- = mg_dof.get_finite_element().get_prolongation_matrix (child,
- cell->refinement_case());
+ = mg_dof.get_fe().get_prolongation_matrix (child,
+ cell->refinement_case());
if (this->mg_constrained_dofs != nullptr &&
this->mg_constrained_dofs->have_boundary_indices())
thread_data (n_datasets, n_subdivisions,
n_postprocessor_outputs,
mapping,
- this->get_finite_elements(),
+ this->get_fes(),
update_flags,
cell_to_patch_index_map);
n_subdivisions,
n_postprocessor_outputs,
mapping,
- this->get_finite_elements(),
+ this->get_fes(),
update_flags);
DataOutBase::Patch<dimension-1,space_dimension> sample_patch;
sample_patch.n_subdivisions = n_subdivisions;
n_subdivisions, n_patches_per_circle,
n_postprocessor_outputs,
StaticMappingQ1<dimension,space_dimension>::mapping,
- this->get_finite_elements(),
+ this->get_fes(),
update_flags);
std::vector<DataOutBase::Patch<dimension+1,space_dimension+1> >
new_patches (n_patches_per_circle);
void DataOutStack<dim,spacedim,DoFHandlerType>::add_data_vector (const Vector<number> &vec,
const std::string &name)
{
- const unsigned int n_components = dof_handler->get_finite_element(0).n_components ();
+ const unsigned int n_components = dof_handler->get_fe(0).n_components ();
std::vector<std::string> names;
// if only one component or vector
(names.size() == 1))
||
((vec.size() == dof_handler->n_dofs()) &&
- (names.size() == dof_handler->get_finite_element(0).n_components())),
+ (names.size() == dof_handler->get_fe(0).n_components())),
Exceptions::DataOut::ExcInvalidNumberOfNames (names.size(),
- dof_handler->get_finite_element(0).n_components()));
+ dof_handler->get_fe(0).n_components()));
for (unsigned int i=0; i<names.size(); ++i)
Assert (names[i].find_first_not_of("abcdefghijklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
this->validate_dataset_names();
- const unsigned int n_components = dof_handler->get_finite_element(0).n_components();
+ const unsigned int n_components = dof_handler->get_fe(0).n_components();
const unsigned int n_datasets = dof_data.size() * n_components +
cell_data.size();
// single quadratures,
// and finite elements. if we have
// an hp DoFHandler,
- // dof_handler.get_finite_element() returns a
+ // dof_handler.get_fe() returns a
// collection of which we do a
// shallow copy instead
const hp::QCollection<dim> q_collection (patch_points);
// single quadratures, mappings,
// and finite elements. if we have
// an hp DoFHandler,
- // dof_handler.get_finite_element() returns a
+ // dof_handler.get_fe() returns a
// collection of which we do a
// shallow copy instead
const hp::QCollection<dim> q_collection (midpoint_rule);
Assert (derivative_norm.size() == dof_handler.get_triangulation().n_active_cells(),
ExcVectorLengthVsNActiveCells (derivative_norm.size(),
dof_handler.get_triangulation().n_active_cells()));
- Assert (component < dof_handler.get_finite_element(0).n_components(),
- ExcIndexRange (component, 0, dof_handler.get_finite_element(0).n_components()));
+ Assert (component < dof_handler.get_fe(0).n_components(),
+ ExcIndexRange (component, 0, dof_handler.get_fe(0).n_components()));
typedef std::tuple<TriaActiveIterator<dealii::DoFCellAccessor
<DoFHandlerType<dim, spacedim>, false> >,
= subdomain_id_;
#endif
- const unsigned int n_components = dof_handler.get_finite_element(0).n_components();
+ const unsigned int n_components = dof_handler.get_fe(0).n_components();
const unsigned int n_solution_vectors = solutions.size();
// sanity checks
// Implementation assumes that support
// points locations are dofs locations
- AssertThrow (dof_handler->get_finite_element().has_support_points (), ExcNotImplemented ());
+ AssertThrow (dof_handler->get_fe().has_support_points (), ExcNotImplemented ());
// While in general quadrature points seems
// to refer to Gauss quadrature points, in
// forced to be the support points of the
// FE.
Quadrature<dim>
- support_point_quadrature (dof_handler->get_finite_element().get_unit_support_points ());
- FEValues<dim> fe_values (dof_handler->get_finite_element(),
+ support_point_quadrature (dof_handler->get_fe().get_unit_support_points ());
+ FEValues<dim> fe_values (dof_handler->get_fe(),
support_point_quadrature,
update_quadrature_points);
unsigned int n_support_points
- = dof_handler->get_finite_element().get_unit_support_points ().size ();
+ = dof_handler->get_fe().get_unit_support_points ().size ();
unsigned int n_components
- = dof_handler->get_finite_element(0).n_components ();
+ = dof_handler->get_fe(0).n_components ();
// set up a loop over all the cells in the
// DoFHandler
// setup valid data in the empty
// vectors
unsigned int component
- = dof_handler->get_finite_element().system_to_component_index (support_point).first;
+ = dof_handler->get_fe().system_to_component_index (support_point).first;
current_points [component] = fe_values.quadrature_point (support_point);
current_fe_index [component] = support_point;
}
support_point < n_support_points; support_point++)
{
unsigned int component
- = dof_handler->get_finite_element().system_to_component_index (support_point).first;
+ = dof_handler->get_fe().system_to_component_index (support_point).first;
Point<dim> test_point
= fe_values.quadrature_point (support_point);
std::vector<types::global_dof_index>
- local_dof_indices (dof_handler->get_finite_element().dofs_per_cell);
+ local_dof_indices (dof_handler->get_fe().dofs_per_cell);
std::vector <types::global_dof_index> new_solution_indices;
current_cell->get_dof_indices (local_dof_indices);
// there is an implicit assumption here
// a vector of points, and does not seem to
// be intrinsicly faster than this method.
for (unsigned int component = 0;
- component < dof_handler->get_finite_element(0).n_components (); component++)
+ component < dof_handler->get_fe(0).n_components (); component++)
{
new_solution_indices
.push_back (local_dof_indices[current_fe_index [component]]);
// Implementation assumes that support
// points locations are dofs locations
- AssertThrow (dof_handler->get_finite_element().has_support_points (), ExcNotImplemented ());
+ AssertThrow (dof_handler->get_fe().has_support_points (), ExcNotImplemented ());
// While in general quadrature points seems
// to refer to Gauss quadrature points, in
// this case the quadrature points are
// forced to be the support points of the
// FE.
- Quadrature<dim> support_point_quadrature (dof_handler->get_finite_element().get_unit_support_points ());
- FEValues<dim> fe_values (dof_handler->get_finite_element(), support_point_quadrature, update_quadrature_points);
- unsigned int n_support_points = dof_handler->get_finite_element().get_unit_support_points ().size ();
- unsigned int n_components = dof_handler->get_finite_element(0).n_components ();
+ Quadrature<dim> support_point_quadrature (dof_handler->get_fe().get_unit_support_points ());
+ FEValues<dim> fe_values (dof_handler->get_fe(), support_point_quadrature, update_quadrature_points);
+ unsigned int n_support_points = dof_handler->get_fe().get_unit_support_points ().size ();
+ unsigned int n_components = dof_handler->get_fe(0).n_components ();
// set up a loop over all the cells in the
// DoFHandler
{
// setup valid data in the empty
// vectors
- unsigned int component = dof_handler->get_finite_element().system_to_component_index (support_point).first;
+ unsigned int component = dof_handler->get_fe().system_to_component_index (support_point).first;
temp_points [component] = fe_values.quadrature_point (support_point);
temp_fe_index [component] = support_point;
}
fe_values.reinit (cell);
for (unsigned int support_point = 0; support_point < n_support_points; support_point++)
{
- unsigned int component = dof_handler->get_finite_element().system_to_component_index (support_point).first;
+ unsigned int component = dof_handler->get_fe().system_to_component_index (support_point).first;
Point<dim> test_point = fe_values.quadrature_point (support_point);
for (unsigned int point = 0; point < locations.size (); point++)
}
}
- std::vector<types::global_dof_index> local_dof_indices (dof_handler->get_finite_element().dofs_per_cell);
+ std::vector<types::global_dof_index> local_dof_indices (dof_handler->get_fe().dofs_per_cell);
for (unsigned int point = 0; point < locations.size (); point++)
{
current_cell[point]->get_dof_indices (local_dof_indices);
std::vector<types::global_dof_index> new_solution_indices;
- for (unsigned int component = 0; component < dof_handler->get_finite_element(0).n_components (); component++)
+ for (unsigned int component = 0; component < dof_handler->get_fe(0).n_components (); component++)
{
new_solution_indices.push_back (local_dof_indices[current_fe_index[point][component]]);
}
component_mask.insert (std::make_pair (vector_name, mask));
else
component_mask.insert (std::make_pair (vector_name,
- ComponentMask(std::vector<bool>(dof_handler->get_finite_element(0).n_components(), true))));
+ ComponentMask(std::vector<bool>(dof_handler->get_fe(0).n_components(), true))));
// insert an empty vector of strings
// to ensure each field has an entry
?
mask.n_selected_components()
:
- dof_handler->get_finite_element(0).n_components());
+ dof_handler->get_fe(0).n_components());
int n_datastreams = point_geometry_data.size () * n_stored; // each point has n_stored sub parts
std::vector < std::vector <double> > vector_size (n_datastreams,
typename std::map <std::string, ComponentMask>::iterator mask = component_mask.find(vector_name);
Assert (mask != component_mask.end(), ExcMessage("vector_name not in class"));
- unsigned int n_stored = mask->second.n_selected_components(dof_handler->get_finite_element(0).n_components ());
+ unsigned int n_stored = mask->second.n_selected_components(dof_handler->get_fe(0).n_components ());
typename std::vector <internal::PointValueHistory::PointGeometryData <dim> >::iterator point = point_geometry_data.begin ();
for (unsigned int data_store_index = 0; point != point_geometry_data.end (); ++point, ++data_store_index)
// access the data associated with
// those components
- for (unsigned int store_index = 0, comp = 0; comp < dof_handler->get_finite_element(0).n_components (); comp++)
+ for (unsigned int store_index = 0, comp = 0; comp < dof_handler->get_fe(0).n_components (); comp++)
{
if (mask->second[comp])
{
Assert (!(update_flags & update_normal_vectors),
ExcMessage("The update of normal vectors may not be requested for evaluation of "
"data on cells via DataPostprocessor."));
- FEValues<dim> fe_values (dof_handler->get_finite_element(), quadrature, update_flags);
- unsigned int n_components = dof_handler->get_finite_element(0).n_components ();
+ FEValues<dim> fe_values (dof_handler->get_fe(), quadrature, update_flags);
+ unsigned int n_components = dof_handler->get_fe(0).n_components ();
unsigned int n_quadrature_points = quadrature.size();
unsigned int n_output_variables = data_postprocessor.get_names().size();
typename std::map <std::string, ComponentMask>::iterator mask = component_mask.find(vector_name);
Assert (mask != component_mask.end(), ExcMessage("vector_name not in class"));
- unsigned int n_stored = mask->second.n_selected_components(dof_handler->get_finite_element(0).n_components ());
+ unsigned int n_stored = mask->second.n_selected_components(dof_handler->get_fe(0).n_components ());
typename std::vector <internal::PointValueHistory::PointGeometryData <dim> >::iterator point = point_geometry_data.begin ();
- Vector <number> value (dof_handler->get_finite_element(0).n_components());
+ Vector <number> value (dof_handler->get_fe(0).n_components());
for (unsigned int data_store_index = 0; point != point_geometry_data.end (); ++point, ++data_store_index)
{
// Make a Vector <double> for the value
// comments
to_gnuplot << "# Requested location: " << point->requested_location << "\n";
to_gnuplot << "# DoF_index : Support location (for each component)\n";
- for (unsigned int component = 0; component < dof_handler->get_finite_element(0).n_components (); component++)
+ for (unsigned int component = 0; component < dof_handler->get_fe(0).n_components (); component++)
{
to_gnuplot << "# " << point->solution_indices[component] << " : " << point->support_point_locations [component] << "\n";
}
typename std::vector <internal::PointValueHistory::PointGeometryData <dim> >::iterator point = point_geometry_data.begin ();
for (; point != point_geometry_data.end (); ++point)
{
- for (unsigned int component = 0; component < dof_handler->get_finite_element(0).n_components (); component++)
+ for (unsigned int component = 0; component < dof_handler->get_fe(0).n_components (); component++)
{
dof_vector (point->solution_indices[component]) = 1;
}
locations = std::vector<Point <dim> > ();
- FEValues<dim> fe_values (dof_handler->get_finite_element(), quadrature, update_quadrature_points);
+ FEValues<dim> fe_values (dof_handler->get_fe(), quadrature, update_quadrature_points);
unsigned int n_quadrature_points = quadrature.size();
std::vector<Point<dim> > evaluation_points;
{
out << "# Requested location: " << point->requested_location << "\n";
out << "# DoF_index : Support location (for each component)\n";
- for (unsigned int component = 0; component < dof_handler->get_finite_element(0).n_components (); component++)
+ for (unsigned int component = 0; component < dof_handler->get_fe(0).n_components (); component++)
{
out << point->solution_indices[component] << " : " << point->support_point_locations [component] << "\n";
}
// function
{
const unsigned int this_fe_index = pointerstruct->second.active_fe_index;
- const unsigned int dofs_per_cell=cell->get_dof_handler().get_finite_element(this_fe_index).dofs_per_cell;
+ const unsigned int dofs_per_cell=cell->get_dof_handler().get_fe(this_fe_index).dofs_per_cell;
local_values.reinit(dofs_per_cell, true);
// make sure that the size of the stored indices is the same as
if (cell->child(child)->get_fe().dofs_per_cell >
cell->child(most_general_child)->get_fe().dofs_per_cell)
most_general_child = child;
- const unsigned int target_finite_element_index = cell->child(most_general_child)->active_fe_index();
+ const unsigned int target_fe_index = cell->child(most_general_child)->active_fe_index();
- const unsigned int dofs_per_cell=cell->get_dof_handler().get_finite_element(target_finite_element_index).dofs_per_cell;
+ const unsigned int dofs_per_cell=cell->get_dof_handler().get_fe(target_fe_index).dofs_per_cell;
std::vector<Vector<typename VectorType::value_type> >(in_size,
Vector<typename VectorType::value_type>(dofs_per_cell))
for (unsigned int j=0; j<in_size; ++j)
cell->get_interpolated_dof_values(all_in[j],
dof_values_on_cell[n_cf][j],
- target_finite_element_index);
+ target_fe_index);
cell_map[std::make_pair(cell->level(), cell->index())]
- = Pointerstruct(&dof_values_on_cell[n_cf], target_finite_element_index);
+ = Pointerstruct(&dof_values_on_cell[n_cf], target_fe_index);
++n_cf;
}
}