1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
// ---------------------------------------------------------------------
//
// Copyright (C) 2001 - 2017 by the deal.II authors
//
// This file is part of the deal.II library.
//
// The deal.II library is free software; you can use it, redistribute
// it, and/or modify it under the terms of the GNU Lesser General
// Public License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// The full text of the license can be found in the file LICENSE at
// the top level of the deal.II distribution.
//
// ---------------------------------------------------------------------
#include <deal.II/base/geometry_info.h>
#include <deal.II/fe/fe.h>
DEAL_II_NAMESPACE_OPEN
template <int dim>
FiniteElementData<dim>::
FiniteElementData (const std::vector<unsigned int> &dofs_per_object,
const unsigned int n_components,
const unsigned int degree,
const Conformity conformity,
const BlockIndices &block_indices)
:
dofs_per_vertex(dofs_per_object[0]),
dofs_per_line(dofs_per_object[1]),
dofs_per_quad(dim>1? dofs_per_object[2]:0),
dofs_per_hex(dim>2? dofs_per_object[3]:0),
first_line_index(GeometryInfo<dim>::vertices_per_cell
* dofs_per_vertex),
first_quad_index(first_line_index+
GeometryInfo<dim>::lines_per_cell
* dofs_per_line),
first_hex_index(first_quad_index+
GeometryInfo<dim>::quads_per_cell
* dofs_per_quad),
first_face_line_index(GeometryInfo<dim-1>::vertices_per_cell
* dofs_per_vertex),
first_face_quad_index((dim==3 ?
GeometryInfo<dim-1>::vertices_per_cell
* dofs_per_vertex :
GeometryInfo<dim>::vertices_per_cell
* dofs_per_vertex) +
GeometryInfo<dim-1>::lines_per_cell
* dofs_per_line),
dofs_per_face(GeometryInfo<dim>::vertices_per_face * dofs_per_vertex +
GeometryInfo<dim>::lines_per_face * dofs_per_line +
GeometryInfo<dim>::quads_per_face *dofs_per_quad),
dofs_per_cell (GeometryInfo<dim>::vertices_per_cell * dofs_per_vertex +
GeometryInfo<dim>::lines_per_cell * dofs_per_line +
GeometryInfo<dim>::quads_per_cell * dofs_per_quad +
GeometryInfo<dim>::hexes_per_cell *dofs_per_hex),
components(n_components),
degree(degree),
conforming_space(conformity),
block_indices_data(block_indices.size() == 0
?
BlockIndices(1, dofs_per_cell)
:
block_indices)
{
Assert(dofs_per_object.size()==dim+1, ExcDimensionMismatch(dofs_per_object.size()-1,dim));
}
template <int dim>
bool FiniteElementData<dim>::operator== (const FiniteElementData<dim> &f) const
{
return ((dofs_per_vertex == f.dofs_per_vertex) &&
(dofs_per_line == f.dofs_per_line) &&
(dofs_per_quad == f.dofs_per_quad) &&
(dofs_per_hex == f.dofs_per_hex) &&
(components == f.components) &&
(degree == f.degree) &&
(conforming_space == f.conforming_space));
}
template class FiniteElementData<1>;
template class FiniteElementData<2>;
template class FiniteElementData<3>;
DEAL_II_NAMESPACE_CLOSE
|