/
get_functions_cartesian.cc
44 lines (35 loc) · 1.33 KB
/
get_functions_cartesian.cc
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
// ---------------------------------------------------------------------
//
// Copyright (C) 2013 - 2018 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.md at
// the top level directory of deal.II.
//
// ---------------------------------------------------------------------
// this function tests the correctness of the implementation of matrix free
// operations in getting the function values, the function gradients, and the
// function Laplacians on a cartesian mesh (hyper cube). This tests whether
// cartesian meshes are treated correctly. The test case is without any
// constraints
#include "../tests.h"
#include "get_functions_common.h"
template <int dim, int fe_degree>
void
test()
{
Triangulation<dim> tria;
GridGenerator::hyper_cube(tria);
tria.refine_global(1);
FE_Q<dim> fe(fe_degree);
DoFHandler<dim> dof(tria);
dof.distribute_dofs(fe);
AffineConstraints<double> constraints;
constraints.close();
do_test<dim, fe_degree, double>(dof, constraints);
}