From: Jaeryun Yim Date: Thu, 14 Jul 2016 07:38:09 +0000 (+0900) Subject: Rename the class for P1NC element: FE_P1NCNonparametric -> FE_P1NC X-Git-Tag: v8.5.0-rc1~624^2~29 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=146b5554a9b2880ebba2a44682ddf1bd90e54c39;p=dealii.git Rename the class for P1NC element: FE_P1NCNonparametric -> FE_P1NC + Delete the class FE_P1NCParametric (header, source, tests)] --- diff --git a/include/deal.II/fe/fe_p1nc.h b/include/deal.II/fe/fe_p1nc.h index 4f03ef3931..ff32ebcff6 100644 --- a/include/deal.II/fe/fe_p1nc.h +++ b/include/deal.II/fe/fe_p1nc.h @@ -29,180 +29,7 @@ DEAL_II_NAMESPACE_OPEN /*@{*/ -// parametric version of P1 Nonconforming FE -class FE_P1NCParametric : public FiniteElement<2,2> -{ -private: - - - static - std::vector - get_nonzero_component(); - - - /** - * Return the vector consists of the numbers of degrees of freedom per objects. - */ - static - std::vector - get_dpo_vector (); - - - class InternalData : public FiniteElement<2,2>::InternalDataBase - { - public: - - Table<2,double > shape_values; - Table<2,Tensor<1,2> > shape_gradients; - mutable std::vector > transformed_shape_gradients ; - Table<2,Tensor<2,2> > shape_hessians; - }; - - /** - * Compute the data on the reference domain. - */ -virtual FiniteElement<2,2>::InternalDataBase * - get_data (const UpdateFlags update_flags, - const Mapping<2,2> &, - const Quadrature<2> &, - dealii::internal::FEValues::FiniteElementRelatedData<2,2> &output_data) const ; - - - - -/** - * Compute the data on the current cell. - */ - virtual - void - fill_fe_values (const Triangulation<2,2>::cell_iterator &cell, - const CellSimilarity::Similarity , - const Quadrature<2> &quadrature, - const Mapping<2,2> &mapping, - const Mapping<2,2>::InternalDataBase &, - const internal::FEValues::MappingRelatedData<2,2> &mapping_data, - const FiniteElement<2,2>::InternalDataBase &fe_internal, - internal::FEValues::FiniteElementRelatedData<2,2> &output_data) const; - - - - - /** - * Compute the data on the face of the current cell. - */ - virtual - void - fill_fe_face_values (const Triangulation<2,2>::cell_iterator &cell, - const unsigned int face_no, - const Quadrature<1> &quadrature, - const Mapping<2,2> &mapping, - const Mapping<2,2>::InternalDataBase &mapping_internal, - const dealii::internal::FEValues::MappingRelatedData<2,2> &mapping_data, - const InternalDataBase &fe_internal, - dealii::internal::FEValues::FiniteElementRelatedData<2,2> &output_data) const; - - - - - /** - * Compute the data on the subface of the current cell. - */ - virtual - void - fill_fe_subface_values (const Triangulation<2,2>::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, - const Quadrature<1> &quadrature, - const Mapping<2,2> &mapping, - const Mapping<2,2>::InternalDataBase &mapping_internal, - const dealii::internal::FEValues::MappingRelatedData<2,2> &mapping_data, - const InternalDataBase &fe_internal, - dealii::internal::FEValues::FiniteElementRelatedData<2,2> &output_data) const; - - - -public: - /** - * Constructor for parametric version of P1 nonconforming element. - */ - FE_P1NCParametric() ; - - - /** - * Return the name of the class for the element. - */ - virtual std::string get_name () const ; - - /** - * Return the update flags which are needed. - */ - virtual UpdateFlags requires_update_flags (const UpdateFlags flags) const ; - - /** - * Return the unit face support points. - */ - const std::vector > &get_unit_face_support_points () const ; - - /** - * Return the unit face support point with given index. - */ - Point<1> unit_face_support_point (const unsigned index) const ; - - bool has_face_support_points () const ; - - /** - * Copy constructor. - */ - virtual FiniteElement<2,2> *clone () const ; - - /** - * Destructor. - */ - virtual ~FE_P1NCParametric (); - - - - - /** - * The value of the basis function with index i at given point. - */ - virtual double shape_value (const unsigned int i, - const Point<2> &p) const ; - - /** - * The gradient of the basis function with index i at given point. - */ - virtual Tensor<1,2> shape_grad (const unsigned int i, - const Point<2> &p) const ; - - /** - * The Hessian matrix of the basis function with index i at given point. - * Notice that it always returns the trivial matrix because the element space contains polynomials upto the degree 1. - */ - virtual Tensor<2,2> shape_grad_grad (const unsigned int i, - const Point<2> &p) const ; - - -protected: - - /** - * Create the constraints matrix for hanging edges. - */ - void initialize_constraints () ; - -}; - - - - - - - - - - -// Nonparametric version of P1 Nonconforming FE -class FE_P1NCNonparametric : public FiniteElement<2,2> +class FE_P1NC : public FiniteElement<2,2> { private: @@ -289,7 +116,7 @@ public: /** * Constructor for nonparametric version of P1 nonconforming element. */ - FE_P1NCNonparametric() ; + FE_P1NC() ; /** * Return the name of the class for the element. @@ -309,7 +136,7 @@ public: /** * Destructor. */ - virtual ~FE_P1NCNonparametric (); + virtual ~FE_P1NC (); protected: diff --git a/source/fe/fe_p1nc.cc b/source/fe/fe_p1nc.cc index f9efbf4fe5..161b461344 100644 --- a/source/fe/fe_p1nc.cc +++ b/source/fe/fe_p1nc.cc @@ -19,514 +19,8 @@ DEAL_II_NAMESPACE_OPEN -// FE_P1NCParametric - -std::vector -FE_P1NCParametric::get_nonzero_component() -{ - const unsigned int dofs_per_cell = 4; - std::vector masks (dofs_per_cell); - for (unsigned int i=0; i -FE_P1NCParametric::get_dpo_vector () -{ - std::vector dpo(3); - dpo[0] = 1; // dofs per object: vertex - dpo[1] = 0; // line - dpo[2] = 0; // quad - return dpo; -} - - -FiniteElement<2,2>::InternalDataBase * -FE_P1NCParametric::get_data (const UpdateFlags update_flags, - const Mapping<2,2> &, - const Quadrature<2> &quadrature, - dealii::internal::FEValues::FiniteElementRelatedData<2,2> &) const -{ - - InternalData *data = new InternalData; - - - data->update_each = requires_update_flags(update_flags); - - const UpdateFlags flags(data->update_each); - const unsigned int n_q_points = quadrature.size(); - - - // initialize shape value - if (flags & update_values) - data->shape_values.reinit (this->dofs_per_cell, - n_q_points); - - // initialize shape gradient - if (flags & update_gradients) - { - data->shape_gradients.reinit (this->dofs_per_cell, - n_q_points); - data->transformed_shape_gradients.resize (n_q_points); - } - - - // update - if (flags & (update_values | update_gradients)) - for (unsigned int i=0; idofs_per_cell; ++k) - { - data->shape_values[k][i] = shape_value(k,quadrature.point(i)); - } - - - if (flags & update_gradients) - for (unsigned int k=0; kdofs_per_cell; ++k) - { - data->shape_gradients[k][i] = shape_grad(k,quadrature.point(i)); - } - - } - - - // initialize shape hessian - if (flags & update_hessians) - data->shape_hessians.reinit (this->dofs_per_cell, - n_q_points); - // update - if (flags & update_hessians) - for (unsigned int i=0; idofs_per_cell; ++k) - { - data->shape_hessians[k][i] = shape_grad_grad(k,quadrature.point(i)); - } - } - - - return data; - -} - - -void -FE_P1NCParametric::fill_fe_values (const Triangulation<2,2>::cell_iterator &, - const CellSimilarity::Similarity cell_similarity, - const Quadrature<2> &quadrature, - const Mapping<2,2> &mapping, - const Mapping<2,2>::InternalDataBase &mapping_internal, - const internal::FEValues::MappingRelatedData<2,2> &mapping_data, - const FiniteElement<2,2>::InternalDataBase &fe_internal, - internal::FEValues::FiniteElementRelatedData<2,2> &output_data) const - -{ - - Assert (dynamic_cast (&fe_internal) != 0, ExcInternalError()); - const InternalData &fe_data = static_cast (fe_internal); - - const UpdateFlags flags(fe_data.update_each); - - // std::cout<<" ? Flag ? " - // << (flags) - // <dofs_per_cell; ++k) - { - // shape value - if (flags & update_values) - for (unsigned int i=0; idofs_per_cell; ++k) - mapping.transform (make_array_view(fe_data.shape_hessians, k), - mapping_covariant_gradient, - mapping_internal, - make_array_view(output_data.shape_hessians, k)); - - for (unsigned int k=0; kdofs_per_cell; ++k) - for (unsigned int i=0; i::cell_iterator &cell, - const unsigned int face_no, - const Quadrature<1> &quadrature, - const Mapping<2,2> &mapping, - const Mapping<2,2>::InternalDataBase &mapping_internal, - const dealii::internal::FEValues::MappingRelatedData<2,2> &, - const InternalDataBase &fe_internal, - dealii::internal::FEValues::FiniteElementRelatedData<2,2> &output_data) const - - -{ - - Assert (dynamic_cast (&fe_internal) != 0, ExcInternalError()); - const InternalData &fe_data = static_cast (fe_internal); - - - const QProjector<2>::DataSetDescriptor offset - = QProjector<2>::DataSetDescriptor::face (face_no, - cell->face_orientation(face_no), - cell->face_flip(face_no), - cell->face_rotation(face_no), - quadrature.size()); - - const UpdateFlags flags(fe_data.update_each); - - for (unsigned int k=0; kdofs_per_cell; ++k) - { - if (flags & update_values) - for (unsigned int i=0; i > transformed_shape_gradients - = make_array_view(fe_data.transformed_shape_gradients, offset, quadrature.size()); - - mapping.transform(make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()), - mapping_covariant, - mapping_internal, - transformed_shape_gradients); - - for (unsigned int i=0; i::cell_iterator &cell, - const unsigned int face_no, - const unsigned int sub_no, - const Quadrature<1> &quadrature, - const Mapping<2,2> &mapping, - const Mapping<2,2>::InternalDataBase &mapping_internal, - const dealii::internal::FEValues::MappingRelatedData<2,2> &, - const InternalDataBase &fe_internal, - dealii::internal::FEValues::FiniteElementRelatedData<2,2> &output_data) const - -{ - - Assert (dynamic_cast (&fe_internal) != 0, ExcInternalError()); - const InternalData &fe_data = static_cast (fe_internal); - - - - const QProjector<2>::DataSetDescriptor offset - = QProjector<2>::DataSetDescriptor::subface (face_no, sub_no, - cell->face_orientation(face_no), - cell->face_flip(face_no), - cell->face_rotation(face_no), - quadrature.size(), - cell->subface_case(face_no)); - - const UpdateFlags flags(fe_data.update_each); - - for (unsigned int k=0; kdofs_per_cell; ++k) - { - if (flags & update_values) - for (unsigned int i=0; i > transformed_shape_gradients - = make_array_view(fe_data.transformed_shape_gradients, offset, quadrature.size()); - - mapping.transform(make_array_view(fe_data.shape_gradients, k, offset, quadrature.size()), - mapping_covariant, - mapping_internal, - transformed_shape_gradients); - - for (unsigned int i=0; i(FiniteElementData<2>(get_dpo_vector(), - 1, - 1, - FiniteElementData<2>::L2), - std::vector (1, false), - get_nonzero_component()) -{ - - // support points: 4 vertices - unit_support_points.resize(4) ; - unit_support_points[0][0] = 0.0 ; - unit_support_points[0][1] = 0.0 ; - unit_support_points[1][0] = 1.0 ; - unit_support_points[1][1] = 0.0 ; - unit_support_points[2][0] = 0.0 ; - unit_support_points[2][1] = 1.0 ; - unit_support_points[3][0] = 1.0 ; - unit_support_points[3][1] = 1.0 ; - - // face support points: 2 end vertices - unit_face_support_points.resize(2); - unit_face_support_points[0][0] = 0.0 ; - unit_face_support_points[1][0] = 1.0 ; - - - // constraints matrix initialization - initialize_constraints () ; -} - - - -std::string FE_P1NCParametric::get_name () const -{ - return "FE_P1NCParametric"; -} - - - -UpdateFlags FE_P1NCParametric::requires_update_flags (const UpdateFlags flags) const -{ - UpdateFlags out = update_default; - - if (flags & update_values) - out |= update_values; - if (flags & update_gradients) - out |= update_gradients | update_covariant_transformation; - if (flags & update_cell_normal_vectors) - out |= update_cell_normal_vectors | update_JxW_values; - if (flags & update_hessians) - out |= update_hessians | update_gradients | update_covariant_transformation | update_jacobian_pushed_forward_grads; - - return out; -} - - -const std::vector > &FE_P1NCParametric::get_unit_face_support_points () const -{ - - Assert ((unit_face_support_points.size() == 0) || - (unit_face_support_points.size() == this->dofs_per_face), - ExcInternalError()); - return unit_face_support_points; -} - -Point<1> FE_P1NCParametric::unit_face_support_point (const unsigned index) const -{ - Assert (index < this->dofs_per_face, - ExcIndexRange (index, 0, this->dofs_per_face)); - Assert (unit_face_support_points.size() == this->dofs_per_face, - ExcFEHasNoSupportPoints ()); - return unit_face_support_points[index]; -} - -bool FE_P1NCParametric::has_face_support_points () const -{ - return (unit_face_support_points.size() != 0); -} - -FiniteElement<2,2> *FE_P1NCParametric::clone () const -{ - return new FE_P1NCParametric(*this); -} - -FE_P1NCParametric::~FE_P1NCParametric () {} - -// Define the exact value of the shape function for the P1NC scalar -// function in the unit cell = (0,1)^2. -// -// 2-----------------|------------------3 -// | | -// | | -// | | -// | | -// | | -// | | -// | | -// | | -// | | -// - - -// | | -// | | -// | | -// | | -// | | -// | | -// | | -// | | -// | | -// 0-----------------|------------------1 -// - - -double FE_P1NCParametric::shape_value (const unsigned int i, - const Point<2> &p) const -{ - - - double value = 0.0 ; - - // P1NC with a half value - switch (i) - { - case 0: - value = -p[0]-p[1]+1.5 ; - break ; - case 1: - value = p[0]-p[1]+0.5 ; - break ; - case 2: - value = -p[0]+p[1]+0.5 ; - break ; - case 3: - value = p[0]+p[1]-0.5 ; - break ; - default: - value = 0.0 ; - }; - - return value*0.5 ; - -} - - - - -Tensor<1,2> FE_P1NCParametric::shape_grad (const unsigned int i, - const Point<2> &p) const -{ - Tensor<1,2> grad ; - - - // P1NC with a half value - switch (i) - { - case 0: - grad[0] = -1.0 ; - grad[1] = -1.0 ; - break ; - case 1: - grad[0] = 1.0 ; - grad[1] = -1.0 ; - break ; - case 2: - grad[0] = -1.0 ; - grad[1] = 1.0 ; - break ; - case 3: - grad[0] = 1.0 ; - grad[1] = 1.0 ; - break ; - default: - grad = 0.0 ; - }; - - return grad*0.5 ; - -} - - -Tensor<2,2> FE_P1NCParametric::shape_grad_grad (const unsigned int i, - const Point<2> &p) const -{ - Tensor<2,2> grad_grad ; - - - switch (i) - { - case 0: - grad_grad[0][0] = 0.0 ; - grad_grad[0][1] = 0.0 ; - grad_grad[1][0] = 0.0 ; - grad_grad[1][1] = 0.0 ; - return grad_grad ; - case 1: - grad_grad[0][0] = 0.0 ; - grad_grad[0][1] = 0.0 ; - grad_grad[1][0] = 0.0 ; - grad_grad[1][1] = 0.0 ; - return grad_grad ; - case 2: - grad_grad[0][0] = 0.0 ; - grad_grad[0][1] = 0.0 ; - grad_grad[1][0] = 0.0 ; - grad_grad[1][1] = 0.0 ; - return grad_grad ; - case 3: - grad_grad[0][0] = 0.0 ; - grad_grad[0][1] = 0.0 ; - grad_grad[1][0] = 0.0 ; - grad_grad[1][1] = 0.0 ; - return grad_grad ; - default: - return grad_grad ; - }; - -} - - -void FE_P1NCParametric::initialize_constraints () -{ - - std::vector > constraint_points; - // Add midpoint - constraint_points.push_back (Point<1> (0.5)); - - interface_constraints - .TableBase<2,double>::reinit (interface_constraints_size()); - - - interface_constraints(0,0) = 0.5 ; - interface_constraints(0,1) = 0.5 ; - -} - - - - - - - - -// FE_P1NCNonparametric - std::vector -FE_P1NCNonparametric::get_nonzero_component() +FE_P1NC::get_nonzero_component() { const unsigned int dofs_per_cell = 4; std::vector masks (dofs_per_cell); @@ -537,7 +31,7 @@ FE_P1NCNonparametric::get_nonzero_component() std::vector -FE_P1NCNonparametric::get_dpo_vector () +FE_P1NC::get_dpo_vector () { std::vector dpo(3); dpo[0] = 1; // dofs per object: vertex @@ -548,7 +42,7 @@ FE_P1NCNonparametric::get_dpo_vector () FiniteElement<2,2>::InternalDataBase * -FE_P1NCNonparametric::get_data (const UpdateFlags update_flags, +FE_P1NC::get_data (const UpdateFlags update_flags, const Mapping<2,2> &, const Quadrature<2> &, dealii::internal::FEValues::FiniteElementRelatedData<2,2> &) const @@ -567,7 +61,7 @@ FE_P1NCNonparametric::get_data (const UpdateFlags update_flags, void -FE_P1NCNonparametric::fill_fe_values (const Triangulation<2,2>::cell_iterator &cell, +FE_P1NC::fill_fe_values (const Triangulation<2,2>::cell_iterator &cell, const CellSimilarity::Similarity , const Quadrature<2> &quadrature, const Mapping<2,2> &mapping, @@ -690,7 +184,7 @@ FE_P1NCNonparametric::fill_fe_values (const Triangulation<2,2>::cell_iterator void -FE_P1NCNonparametric::fill_fe_face_values (const Triangulation<2,2>::cell_iterator &cell, +FE_P1NC::fill_fe_face_values (const Triangulation<2,2>::cell_iterator &cell, const unsigned int face_no, const Quadrature<1> &quadrature, const Mapping<2,2> &mapping, @@ -813,7 +307,7 @@ FE_P1NCNonparametric::fill_fe_face_values (const Triangulation<2,2>::cell_iterat void -FE_P1NCNonparametric::fill_fe_subface_values (const Triangulation<2,2>::cell_iterator &cell, +FE_P1NC::fill_fe_subface_values (const Triangulation<2,2>::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature<1> &quadrature, @@ -932,7 +426,7 @@ FE_P1NCNonparametric::fill_fe_subface_values (const Triangulation<2,2>::cell_ite -FE_P1NCNonparametric::FE_P1NCNonparametric() +FE_P1NC::FE_P1NC() : FiniteElement<2,2>(FiniteElementData<2>(get_dpo_vector(), 1, @@ -948,19 +442,19 @@ FE_P1NCNonparametric::FE_P1NCNonparametric() unit_face_support_points[1][0] = 1.0 ; - // CONSTRAINTS MATRIX INITIALIZATION + // initialize constraints matrix initialize_constraints () ; } -std::string FE_P1NCNonparametric::get_name () const +std::string FE_P1NC::get_name () const { - return "FE_P1NCNonparametric"; + return "FE_P1NC"; } -UpdateFlags FE_P1NCNonparametric::requires_update_flags (const UpdateFlags flags) const +UpdateFlags FE_P1NC::requires_update_flags (const UpdateFlags flags) const { UpdateFlags out = update_default; @@ -979,17 +473,17 @@ UpdateFlags FE_P1NCNonparametric::requires_update_flags (const UpdateFlags f } -FiniteElement<2,2> *FE_P1NCNonparametric::clone () const +FiniteElement<2,2> *FE_P1NC::clone () const { - return new FE_P1NCNonparametric(*this); + return new FE_P1NC(*this); } -FE_P1NCNonparametric::~FE_P1NCNonparametric () {} +FE_P1NC::~FE_P1NC () {} -void FE_P1NCNonparametric::initialize_constraints () +void FE_P1NC::initialize_constraints () { std::vector > constraint_points; diff --git a/tests/fe/p1nc_01.cc b/tests/fe/p1nc_01.cc index 357b1fd2e1..e1da4e4dad 100644 --- a/tests/fe/p1nc_01.cc +++ b/tests/fe/p1nc_01.cc @@ -41,7 +41,7 @@ check() Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0, 5); - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_02.cc b/tests/fe/p1nc_02.cc index ad615aa6b5..a3d49c3d56 100644 --- a/tests/fe/p1nc_02.cc +++ b/tests/fe/p1nc_02.cc @@ -53,7 +53,7 @@ check() GridGenerator::hyper_cube (triangulation, 0., 5.); GridTools::transform (&stretch, triangulation) ; - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_03.cc b/tests/fe/p1nc_03.cc index 3856fc2fcf..f249a92a95 100644 --- a/tests/fe/p1nc_03.cc +++ b/tests/fe/p1nc_03.cc @@ -57,7 +57,7 @@ check() GridGenerator::hyper_cube (triangulation, 0., 1.); GridTools::transform (&affine, triangulation) ; - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_04.cc b/tests/fe/p1nc_04.cc index f6bcdc68e7..217e994624 100644 --- a/tests/fe/p1nc_04.cc +++ b/tests/fe/p1nc_04.cc @@ -57,7 +57,7 @@ check() GridGenerator::hyper_cube (triangulation, 0., 1.); GridTools::transform (&bilinear, triangulation) ; - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_05.cc b/tests/fe/p1nc_05.cc index b1efa9058b..93a041620f 100644 --- a/tests/fe/p1nc_05.cc +++ b/tests/fe/p1nc_05.cc @@ -41,7 +41,7 @@ check() Triangulation triangulation; GridGenerator::hyper_cube (triangulation, 0, 5); - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_06.cc b/tests/fe/p1nc_06.cc index da4d46b715..46e9ba345d 100644 --- a/tests/fe/p1nc_06.cc +++ b/tests/fe/p1nc_06.cc @@ -53,7 +53,7 @@ check() GridGenerator::hyper_cube (triangulation, 0., 5.); GridTools::transform (&stretch, triangulation) ; - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_07.cc b/tests/fe/p1nc_07.cc index bdcdadfe8d..ad8f0c8efb 100644 --- a/tests/fe/p1nc_07.cc +++ b/tests/fe/p1nc_07.cc @@ -57,7 +57,7 @@ check() GridGenerator::hyper_cube (triangulation, 0., 1.); GridTools::transform (&affine, triangulation) ; - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_08.cc b/tests/fe/p1nc_08.cc index 4a433771cb..22c6ddfafc 100644 --- a/tests/fe/p1nc_08.cc +++ b/tests/fe/p1nc_08.cc @@ -57,7 +57,7 @@ check() GridGenerator::hyper_cube (triangulation, 0., 1.); GridTools::transform (&bilinear, triangulation) ; - FE_P1NCNonparametric fe; + FE_P1NC fe; DoFHandler dof_handler (triangulation); dof_handler.distribute_dofs(fe); diff --git a/tests/fe/p1nc_parametric_01.cc b/tests/fe/p1nc_parametric_01.cc deleted file mode 100644 index 436d30f4ff..0000000000 --- a/tests/fe/p1nc_parametric_01.cc +++ /dev/null @@ -1,77 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 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. -// -// --------------------------------------------------------------------- - - - -// check the P1NC parametric element on a square - -#include "../tests.h" -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define PRECISION 5 - - - -template -void -check() -{ - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation, 0, 5); - - FE_P1NCParametric fe; - DoFHandler dof_handler (triangulation); - dof_handler.distribute_dofs(fe); - - QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_values | update_q_points); - fe_values.reinit (dof_handler.begin_active()); - - for (unsigned int q=0; q(); -} - - - diff --git a/tests/fe/p1nc_parametric_01.output b/tests/fe/p1nc_parametric_01.output deleted file mode 100644 index 5436e9b991..0000000000 --- a/tests/fe/p1nc_parametric_01.output +++ /dev/null @@ -1,10 +0,0 @@ - -DEAL::index=0 position=0.56351 0.56351 values=0.63730 0.25000 0.25000 -0.13730 -DEAL::index=1 position=2.50000 0.56351 values=0.44365 0.44365 0.05635 0.05635 -DEAL::index=2 position=4.43649 0.56351 values=0.25000 0.63730 -0.13730 0.25000 -DEAL::index=3 position=0.56351 2.50000 values=0.44365 0.05635 0.44365 0.05635 -DEAL::index=4 position=2.50000 2.50000 values=0.25000 0.25000 0.25000 0.25000 -DEAL::index=5 position=4.43649 2.50000 values=0.05635 0.44365 0.05635 0.44365 -DEAL::index=6 position=0.56351 4.43649 values=0.25000 -0.13730 0.63730 0.25000 -DEAL::index=7 position=2.50000 4.43649 values=0.05635 0.05635 0.44365 0.44365 -DEAL::index=8 position=4.43649 4.43649 values=-0.13730 0.25000 0.25000 0.63730 diff --git a/tests/fe/p1nc_parametric_02.cc b/tests/fe/p1nc_parametric_02.cc deleted file mode 100644 index 32f16185c4..0000000000 --- a/tests/fe/p1nc_parametric_02.cc +++ /dev/null @@ -1,89 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 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. -// -// --------------------------------------------------------------------- - - - -// check the P1NC parametric element on a rectangle - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define PRECISION 5 - - -template -Point stretch (const Point &p) -{ - Point q = p ; - q(dim-1) *= 2. ; - - return q ; -} - - - -template -void -check() -{ - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation, 0., 5.); - GridTools::transform (&stretch, triangulation) ; - - FE_P1NCParametric fe; - DoFHandler dof_handler (triangulation); - dof_handler.distribute_dofs(fe); - - QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_values | update_q_points); - fe_values.reinit (dof_handler.begin_active()); - - for (unsigned int q=0; q(); -} - - - diff --git a/tests/fe/p1nc_parametric_02.output b/tests/fe/p1nc_parametric_02.output deleted file mode 100644 index 4d62e4cb59..0000000000 --- a/tests/fe/p1nc_parametric_02.output +++ /dev/null @@ -1,10 +0,0 @@ - -DEAL::index=0 position=0.56351 1.12702 values=0.63730 0.25000 0.25000 -0.13730 -DEAL::index=1 position=2.50000 1.12702 values=0.44365 0.44365 0.05635 0.05635 -DEAL::index=2 position=4.43649 1.12702 values=0.25000 0.63730 -0.13730 0.25000 -DEAL::index=3 position=0.56351 5.00000 values=0.44365 0.05635 0.44365 0.05635 -DEAL::index=4 position=2.50000 5.00000 values=0.25000 0.25000 0.25000 0.25000 -DEAL::index=5 position=4.43649 5.00000 values=0.05635 0.44365 0.05635 0.44365 -DEAL::index=6 position=0.56351 8.87298 values=0.25000 -0.13730 0.63730 0.25000 -DEAL::index=7 position=2.50000 8.87298 values=0.05635 0.05635 0.44365 0.44365 -DEAL::index=8 position=4.43649 8.87298 values=-0.13730 0.25000 0.25000 0.63730 diff --git a/tests/fe/p1nc_parametric_03.cc b/tests/fe/p1nc_parametric_03.cc deleted file mode 100644 index f7ae39b3be..0000000000 --- a/tests/fe/p1nc_parametric_03.cc +++ /dev/null @@ -1,93 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 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. -// -// --------------------------------------------------------------------- - - - -// check the P1NC parametric element on a parallelogram - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define PRECISION 5 - - -template -Point affine (const Point &p) -{ - Point q = p ; - if (dim>=2) - { - q(0) = 2.*p(0) + p(1) ; - q(1) = p(0) + 3.*p(1) ; - } - - return q ; -} - - - -template -void -check() -{ - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation, 0., 1.); - GridTools::transform (&affine, triangulation) ; - - FE_P1NCParametric fe; - DoFHandler dof_handler (triangulation); - dof_handler.distribute_dofs(fe); - - QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_values | update_q_points); - fe_values.reinit (dof_handler.begin_active()); - - for (unsigned int q=0; q(); -} - - - diff --git a/tests/fe/p1nc_parametric_03.output b/tests/fe/p1nc_parametric_03.output deleted file mode 100644 index 4f8444a193..0000000000 --- a/tests/fe/p1nc_parametric_03.output +++ /dev/null @@ -1,10 +0,0 @@ - -DEAL::index=0 position=0.33810 0.45081 values=0.63730 0.25000 0.25000 -0.13730 -DEAL::index=1 position=1.11270 0.83810 values=0.44365 0.44365 0.05635 0.05635 -DEAL::index=2 position=1.88730 1.22540 values=0.25000 0.63730 -0.13730 0.25000 -DEAL::index=3 position=0.72540 1.61270 values=0.44365 0.05635 0.44365 0.05635 -DEAL::index=4 position=1.50000 2.00000 values=0.25000 0.25000 0.25000 0.25000 -DEAL::index=5 position=2.27460 2.38730 values=0.05635 0.44365 0.05635 0.44365 -DEAL::index=6 position=1.11270 2.77460 values=0.25000 -0.13730 0.63730 0.25000 -DEAL::index=7 position=1.88730 3.16190 values=0.05635 0.05635 0.44365 0.44365 -DEAL::index=8 position=2.66190 3.54919 values=-0.13730 0.25000 0.25000 0.63730 diff --git a/tests/fe/p1nc_parametric_04.cc b/tests/fe/p1nc_parametric_04.cc deleted file mode 100644 index 0773503ca6..0000000000 --- a/tests/fe/p1nc_parametric_04.cc +++ /dev/null @@ -1,77 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 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. -// -// --------------------------------------------------------------------- - - - -// check the P1NC parametric element's gradient on a square - -#include "../tests.h" -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define PRECISION 5 - - - -template -void -check() -{ - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation, 0, 5); - - FE_P1NCParametric fe; - DoFHandler dof_handler (triangulation); - dof_handler.distribute_dofs(fe); - - QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_gradients | update_q_points); - fe_values.reinit (dof_handler.begin_active()); - - for (unsigned int q=0; q(); -} - - - diff --git a/tests/fe/p1nc_parametric_04.output b/tests/fe/p1nc_parametric_04.output deleted file mode 100644 index 51ce573974..0000000000 --- a/tests/fe/p1nc_parametric_04.output +++ /dev/null @@ -1,10 +0,0 @@ - -DEAL::index=0 position=0.56351 0.56351 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=1 position=2.50000 0.56351 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=2 position=4.43649 0.56351 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=3 position=0.56351 2.50000 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=4 position=2.50000 2.50000 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=5 position=4.43649 2.50000 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=6 position=0.56351 4.43649 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=7 position=2.50000 4.43649 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] -DEAL::index=8 position=4.43649 4.43649 values=[-0.10000 -0.10000] [0.10000 -0.10000] [-0.10000 0.10000] [0.10000 0.10000] diff --git a/tests/fe/p1nc_parametric_05.cc b/tests/fe/p1nc_parametric_05.cc deleted file mode 100644 index 991ac01d1f..0000000000 --- a/tests/fe/p1nc_parametric_05.cc +++ /dev/null @@ -1,89 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 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. -// -// --------------------------------------------------------------------- - - - -// check the P1NC parametric element's gradient on a rectangle - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define PRECISION 5 - - -template -Point stretch (const Point &p) -{ - Point q = p ; - q(dim-1) *= 2. ; - - return q ; -} - - - -template -void -check() -{ - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation, 0., 5.); - GridTools::transform (&stretch, triangulation) ; - - FE_P1NCParametric fe; - DoFHandler dof_handler (triangulation); - dof_handler.distribute_dofs(fe); - - QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_gradients | update_q_points); - fe_values.reinit (dof_handler.begin_active()); - - for (unsigned int q=0; q(); -} - - - diff --git a/tests/fe/p1nc_parametric_05.output b/tests/fe/p1nc_parametric_05.output deleted file mode 100644 index 2d11da0b3d..0000000000 --- a/tests/fe/p1nc_parametric_05.output +++ /dev/null @@ -1,10 +0,0 @@ - -DEAL::index=0 position=0.56351 1.12702 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=1 position=2.50000 1.12702 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=2 position=4.43649 1.12702 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=3 position=0.56351 5.00000 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=4 position=2.50000 5.00000 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=5 position=4.43649 5.00000 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=6 position=0.56351 8.87298 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=7 position=2.50000 8.87298 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] -DEAL::index=8 position=4.43649 8.87298 values=[-0.10000 -0.05000] [0.10000 -0.05000] [-0.10000 0.05000] [0.10000 0.05000] diff --git a/tests/fe/p1nc_parametric_06.cc b/tests/fe/p1nc_parametric_06.cc deleted file mode 100644 index 0d70de6579..0000000000 --- a/tests/fe/p1nc_parametric_06.cc +++ /dev/null @@ -1,93 +0,0 @@ -// --------------------------------------------------------------------- -// -// Copyright (C) 2015 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. -// -// --------------------------------------------------------------------- - - - -// check the P1NC parametric element's gradient on a parallelogram - -#include "../tests.h" -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define PRECISION 5 - - -template -Point affine (const Point &p) -{ - Point q = p ; - if (dim>=2) - { - q(0) = 2.*p(0) + p(1) ; - q(1) = p(0) + 3.*p(1) ; - } - - return q ; -} - - - -template -void -check() -{ - Triangulation triangulation; - GridGenerator::hyper_cube (triangulation, 0., 1.); - GridTools::transform (&affine, triangulation) ; - - FE_P1NCParametric fe; - DoFHandler dof_handler (triangulation); - dof_handler.distribute_dofs(fe); - - QGauss quadrature(3); - FEValues fe_values (fe, quadrature, update_gradients | update_q_points); - fe_values.reinit (dof_handler.begin_active()); - - for (unsigned int q=0; q(); -} - - - diff --git a/tests/fe/p1nc_parametric_06.output b/tests/fe/p1nc_parametric_06.output deleted file mode 100644 index d9f5209314..0000000000 --- a/tests/fe/p1nc_parametric_06.output +++ /dev/null @@ -1,10 +0,0 @@ - -DEAL::index=0 position=0.33810 0.45081 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=1 position=1.11270 0.83810 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=2 position=1.88730 1.22540 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=3 position=0.72540 1.61270 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=4 position=1.50000 2.00000 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=5 position=2.27460 2.38730 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=6 position=1.11270 2.77460 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=7 position=1.88730 3.16190 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000] -DEAL::index=8 position=2.66190 3.54919 values=[-0.20000 -0.10000] [0.40000 -0.30000] [-0.40000 0.30000] [0.20000 0.10000]