This is an automated email from the git hooks/post-receive script.
logari81 pushed a commit to branch devel-logari81-internal-variables
in repository getfem.
The following commit(s) were added to
refs/heads/devel-logari81-internal-variables by this push:
new 9d1c444 Add unit test for internal variable condensation
9d1c444 is described below
commit 9d1c4449796fe7b3c3adabeed57977c5d6ac7507
Author: Konstantinos Poulios
AuthorDate: Sat Feb 1 11:28:19 2020 +0100
Add unit test for internal variable condensation
---
tests/Makefile.am | 4 +
tests/test_condensation.cc | 184 +
tests/test_condensation.pl | 105 ++
3 files changed, 293 insertions(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ba8b7a3..296934f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,6 +45,7 @@ check_PROGRAMS = \
test_assembly_assignment \
test_interpolated_fem \
test_internal_variables\
+ test_condensation \
test_range_basis \
laplacian \
laplacian_with_bricks \
@@ -100,6 +101,7 @@ geo_trans_inv_SOURCES = geo_trans_inv.cc
test_int_set_SOURCES = test_int_set.cc
test_interpolated_fem_SOURCES = test_interpolated_fem.cc
test_internal_variables_SOURCES = test_internal_variables.cc
+test_condensation_SOURCES = test_condensation.cc
test_tree_sorted_SOURCES = test_tree_sorted.cc
test_mat_elem_SOURCES = test_mat_elem.cc
test_slice_SOURCES = test_slice.cc
@@ -141,6 +143,7 @@ TESTS = \
test_assembly_assignment.pl \
test_interpolated_fem.pl \
test_internal_variables.pl\
+ test_condensation.pl \
test_range_basis.pl \
laplacian.pl \
laplacian_with_bricks.pl \
@@ -182,6 +185,7 @@ EXTRA_DIST =
\
test_int_set.pl \
test_interpolated_fem.pl\
test_internal_variables.pl \
+ test_condensation.pl\
test_slice.pl \
test_mesh_im_level_set.pl \
thermo_elasticity_electrical_coupling.pl\
diff --git a/tests/test_condensation.cc b/tests/test_condensation.cc
new file mode 100644
index 000..2a3ec22
--- /dev/null
+++ b/tests/test_condensation.cc
@@ -0,0 +1,184 @@
+/*===
+
+ Copyright (C) 2019-2020 Konstantinos Poulios.
+
+ This file is a part of GetFEM++
+
+ GetFEM++ is free software; you can 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 3 of the License, or
+ (at your option) any later version along with the GCC Runtime Library
+ Exception either version 3.1 or (at your option) any later version.
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License and GCC Runtime Library Exception for more details.
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+===*/
+#include "getfem/getfem_regular_meshes.h"
+#include "getfem/getfem_export.h"
+#include "getfem/getfem_model_solvers.h"
+
+using bgeot::dim_type;
+using bgeot::size_type;
+using bgeot::scalar_type;
+using bgeot::base_node;
+
+static bool debug=false;
+
+int main(int argc, char *argv[]) {
+
+ gmm::set_traces_level(1);
+
+ bgeot::md_param PARAM;
+ PARAM.add_int_param("NX", 1);
+ PARAM.add_int_param("NY", 1);
+ PARAM.add_int_param("FEM_ORDER", 1);
+ PARAM.add_int_param("IM_ORDER", 1);
+ PARAM.add_int_param("DIFFICULTY", 0);
+ PARAM.read_command_line(argc, argv);
+ size_type NX = PARAM.int_value("NX", "Number of elements in X direction");
+ size_type NY = PARAM.int_value("NY", "Number of elements in Y direction");
+ dim_type FEM_ORDER = dim_type(PARAM.int_value("FEM_ORDER", "Degree of finite
element basis"));
+ dim_type IM_ORDER = dim_type(PARAM.int_value("IM_ORDER", "Degree of
integration method"));
+ size_type DIFFICULTY = PARAM.int_value("DIFFICULTY", "Difficulty of test");
+
+ getfem::mesh m;
+ getfem::regular_unit_mesh(m, {NX, NY},
bgeot::geometric_trans_descriptor("GT_QK(2, 2)"));
+
+ getfem::mesh_region outer_faces;
+ getfem::outer_faces_of_mesh(m, outer_faces);
+ m.region(98) =