From df0e60350c7f23bd05d63bae81cbfc2b7e440b3c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 6 Sep 2009 15:13:07 +0000 Subject: [PATCH] Slightly adjust testcase. git-svn-id: https://svn.dealii.org/trunk@19400 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/deal.II/point_value_history_01.cc | 41 +-- .../point_value_history_01/cmp/generic | 243 ++++++++++++++++-- 2 files changed, 251 insertions(+), 33 deletions(-) diff --git a/tests/deal.II/point_value_history_01.cc b/tests/deal.II/point_value_history_01.cc index d6003afb75..9fe8a2f941 100644 --- a/tests/deal.II/point_value_history_01.cc +++ b/tests/deal.II/point_value_history_01.cc @@ -1,6 +1,6 @@ //---------------------------- point_value_history_01.cc --------------------------- // $Id$ -// Version: $Name$ +// Version: $Name$ // // Copyright (C) 2009 by the deal.II authors and Michael Rapson // @@ -99,7 +99,7 @@ void TestPointValueHistory::run() post_processed.reinit(dof_handler.n_dofs()); poles.reinit(dof_handler.n_dofs()); - // set up a simple linear discrete time system so that time plots vary + // set up a simple linear discrete time system so that time plots vary // over the mesh but can be easily checked. The basic idea is to have each // component of the fe_system to depend on a specific dimension (i.e component 0 // depends on dim 0, etc. % dim handles the case where there are more components @@ -146,7 +146,7 @@ void TestPointValueHistory::run() unsigned int n_inputs = 1; PointValueHistory node_monitor (dof_handler, n_inputs); PointValueHistory no_dof_handler (n_inputs); - + // check that the assignment operator is valid test_copy = node_monitor; test_copy.add_point(Point<2>::Point(1, 0.2)); @@ -159,7 +159,7 @@ void TestPointValueHistory::run() test_copy.evaluate_field("Solution", solution); std::vector input_value(n_inputs, 1); test_copy.push_back_independent(input_value); - test_copy.write_gnuplot("Test_Copy"); + test_copy.write_gnuplot("point_value_history_01/Test_Copy"); test_copy.status(deallog.get_file_stream()); test_copy.clear (); // end of assignment operator check @@ -167,7 +167,7 @@ void TestPointValueHistory::run() { node_monitor.add_field_name("Solution"); node_monitor.add_field_name("Post Processed Vector"); // not sensitive to spaces - + // two alternatives here, adding a point at a time or a vector of points // 2d points std::vector > point_vector(5, Point < 2 > ::Point()); @@ -211,9 +211,9 @@ void TestPointValueHistory::run() post_processed = solution; post_processed.add(2.0); // simple post processing, giving it a dc offset } - node_monitor.write_gnuplot("node"); - no_dof_handler.write_gnuplot("no_dof"); - + node_monitor.write_gnuplot("point_value_history_01/node"); + no_dof_handler.write_gnuplot("point_value_history_01/no_dof"); + node_monitor.status (deallog.get_file_stream()); no_dof_handler.status (deallog.get_file_stream()); @@ -222,24 +222,35 @@ void TestPointValueHistory::run() // copy all the data into deallog and // delete those files const std::string filenames[] - = { "node_00.gpl", "node_01.gpl", "node_02.gpl", - "node_03.gpl", "node_04.gpl", - "node_indep.gpl", - "Test_Copy_00.gpl", "Test_Copy_indep.gpl", "no_dof_indep.gpl" }; - + = { "point_value_history_01/node_00.gpl", + "point_value_history_01/node_01.gpl", + "point_value_history_01/node_02.gpl", + "point_value_history_01/node_03.gpl", + "point_value_history_01/node_04.gpl", + "point_value_history_01/node_05.gpl", + "point_value_history_01/node_indep.gpl", + "point_value_history_01/Test_Copy_00.gpl", + "point_value_history_01/Test_Copy_indep.gpl", + "point_value_history_01/no_dof_indep.gpl" }; + for (unsigned int i=0; i> s; - deallog << s; + std::getline (in, s); + deallog << s << std::endl; } std::remove (filenames[i].c_str()); + + deallog << std::endl; } } diff --git a/tests/deal.II/point_value_history_01/cmp/generic b/tests/deal.II/point_value_history_01/cmp/generic index 283148b25c..9fcb7e6f96 100644 --- a/tests/deal.II/point_value_history_01/cmp/generic +++ b/tests/deal.II/point_value_history_01/cmp/generic @@ -1,19 +1,226 @@ -DEAL::dim=1, test=0 -DEAL::4 -DEAL::2 -DEAL::dim=1, test=1 -DEAL::4 -DEAL::2 -DEAL::dim=2, test=0 -DEAL::80 -DEAL::4 -DEAL::dim=2, test=1 -DEAL::40 -DEAL::2 -DEAL::dim=3, test=0 -DEAL::448 -DEAL::8 -DEAL::dim=3, test=1 -DEAL::168 -DEAL::2 +***PointValueHistory status output*** + +Closed: 1 +Cleared: 0 +Geometric Data +# DoF_index : Location (for each component) +138 : 1.0 0.25 +139 : 1.0 0.25 +181 : 1.0 0.25 + + +Independent value(s): 1 : 1 +Solution: 3 : 1 + +***end of status output*** + +***PointValueHistory status output*** + +Closed: 1 +Cleared: 0 +Geometric Data +# DoF_index : Location (for each component) +0 : 0.0 0.0 +1 : 0.0 0.0 +162 : 0.0 0.0 + +8 : 0.25 0.0 +9 : 0.25 0.0 +163 : 0.25 0.0 + +46 : 0.25 0.50 +47 : 0.25 0.50 +169 : 0.25 0.50 + +48 : 0.50 0.50 +49 : 0.50 0.50 +170 : 0.50 0.50 + +96 : 0.75 0.75 +97 : 0.75 0.75 +177 : 0.75 0.75 + +138 : 1.0 0.25 +139 : 1.0 0.25 +181 : 1.0 0.25 + + +Independent value(s): 1 : 10 +Post Processed Vector: 18 : 10 +Solution: 18 : 10 + +***end of status output*** + +***PointValueHistory status output*** + +Closed: 1 +Cleared: 0 +Geometric Data +No nodes stored currently + +Independent value(s): 1 : 10 + +***end of status output*** + +DEAL::Starting data files +DEAL::Copying output file point_value_history_01/node_00.gpl +DEAL::# DoF_index : Location (for each component) +DEAL::# 0 : 0 0 +DEAL::# 1 : 0 0 +DEAL::# 162 : 0 0 +DEAL:: +DEAL::# +DEAL::0 1 3 3 3 1 1 1 +DEAL::1e-06 1 3 3 2.9 1 1 0.9 +DEAL::2e-06 1 3 3 2.81 1 1 0.81 +DEAL::3e-06 1 3 3 2.729 1 1 0.729 +DEAL::4e-06 1 3 3 2.6561 1 1 0.6561 +DEAL::5e-06 1 3 3 2.59049 1 1 0.59049 +DEAL::6e-06 1 3 3 2.53144 1 1 0.531441 +DEAL::7e-06 1 3 3 2.4783 1 1 0.478297 +DEAL::8e-06 1 3 3 2.43047 1 1 0.430467 +DEAL::9e-06 1 3 3 2.38742 1 1 0.38742 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/node_01.gpl +DEAL::# DoF_index : Location (for each component) +DEAL::# 8 : 0.25 0 +DEAL::# 9 : 0.25 0 +DEAL::# 163 : 0.25 0 +DEAL:: +DEAL::# +DEAL::0 1 3 3 3 1 1 1 +DEAL::1e-06 1 2.94444 3 2.9 0.944444 1 0.9 +DEAL::2e-06 1 2.89198 3 2.81 0.891975 1 0.81 +DEAL::3e-06 1 2.84242 3 2.729 0.842421 1 0.729 +DEAL::4e-06 1 2.79562 3 2.6561 0.79562 1 0.6561 +DEAL::5e-06 1 2.75142 3 2.59049 0.751419 1 0.59049 +DEAL::6e-06 1 2.70967 3 2.53144 0.709673 1 0.531441 +DEAL::7e-06 1 2.67025 3 2.4783 0.670247 1 0.478297 +DEAL::8e-06 1 2.63301 3 2.43047 0.633011 1 0.430467 +DEAL::9e-06 1 2.59784 3 2.38742 0.597844 1 0.38742 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/node_02.gpl +DEAL::# DoF_index : Location (for each component) +DEAL::# 46 : 0.25 0.5 +DEAL::# 47 : 0.25 0.5 +DEAL::# 169 : 0.25 0.5 +DEAL:: +DEAL::# +DEAL::0 1 3 3 3 1 1 1 +DEAL::1e-06 1 2.88889 2.77778 2.9 0.888889 0.777778 0.9 +DEAL::2e-06 1 2.79012 2.60494 2.81 0.790123 0.604938 0.81 +DEAL::3e-06 1 2.70233 2.47051 2.729 0.702332 0.470508 0.729 +DEAL::4e-06 1 2.6243 2.36595 2.6561 0.624295 0.36595 0.6561 +DEAL::5e-06 1 2.55493 2.28463 2.59049 0.554929 0.284628 0.59049 +DEAL::6e-06 1 2.49327 2.22138 2.53144 0.49327 0.221377 0.531441 +DEAL::7e-06 1 2.43846 2.17218 2.4783 0.438462 0.172182 0.478297 +DEAL::8e-06 1 2.38974 2.13392 2.43047 0.389744 0.13392 0.430467 +DEAL::9e-06 1 2.34644 2.10416 2.38742 0.346439 0.10416 0.38742 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/node_03.gpl +DEAL::# DoF_index : Location (for each component) +DEAL::# 48 : 0.5 0.5 +DEAL::# 49 : 0.5 0.5 +DEAL::# 170 : 0.5 0.5 +DEAL:: +DEAL::# +DEAL::0 1 3 3 3 1 1 1 +DEAL::1e-06 1 2.77778 2.77778 2.9 0.777778 0.777778 0.9 +DEAL::2e-06 1 2.60494 2.60494 2.81 0.604938 0.604938 0.81 +DEAL::3e-06 1 2.47051 2.47051 2.729 0.470508 0.470508 0.729 +DEAL::4e-06 1 2.36595 2.36595 2.6561 0.36595 0.36595 0.6561 +DEAL::5e-06 1 2.28463 2.28463 2.59049 0.284628 0.284628 0.59049 +DEAL::6e-06 1 2.22138 2.22138 2.53144 0.221377 0.221377 0.531441 +DEAL::7e-06 1 2.17218 2.17218 2.4783 0.172182 0.172182 0.478297 +DEAL::8e-06 1 2.13392 2.13392 2.43047 0.13392 0.13392 0.430467 +DEAL::9e-06 1 2.10416 2.10416 2.38742 0.10416 0.10416 0.38742 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/node_04.gpl +DEAL::# DoF_index : Location (for each component) +DEAL::# 96 : 0.75 0.75 +DEAL::# 97 : 0.75 0.75 +DEAL::# 177 : 0.75 0.75 +DEAL:: +DEAL::# +DEAL::0 1 3 3 3 1 1 1 +DEAL::1e-06 1 2.66667 2.66667 2.9 0.666667 0.666667 0.9 +DEAL::2e-06 1 2.44444 2.44444 2.81 0.444444 0.444444 0.81 +DEAL::3e-06 1 2.2963 2.2963 2.729 0.296296 0.296296 0.729 +DEAL::4e-06 1 2.19753 2.19753 2.6561 0.197531 0.197531 0.6561 +DEAL::5e-06 1 2.13169 2.13169 2.59049 0.131687 0.131687 0.59049 +DEAL::6e-06 1 2.08779 2.08779 2.53144 0.0877915 0.0877915 0.531441 +DEAL::7e-06 1 2.05853 2.05853 2.4783 0.0585277 0.0585277 0.478297 +DEAL::8e-06 1 2.03902 2.03902 2.43047 0.0390184 0.0390184 0.430467 +DEAL::9e-06 1 2.02601 2.02601 2.38742 0.0260123 0.0260123 0.38742 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/node_05.gpl +DEAL::# DoF_index : Location (for each component) +DEAL::# 138 : 1 0.25 +DEAL::# 139 : 1 0.25 +DEAL::# 181 : 1 0.25 +DEAL:: +DEAL::# +DEAL::0 1 3 3 3 1 1 1 +DEAL::1e-06 1 2.77778 2.94444 2.9 0.777778 0.944444 0.9 +DEAL::2e-06 1 2.60494 2.89198 2.81 0.604938 0.891975 0.81 +DEAL::3e-06 1 2.47051 2.84242 2.729 0.470508 0.842421 0.729 +DEAL::4e-06 1 2.36595 2.79562 2.6561 0.36595 0.79562 0.6561 +DEAL::5e-06 1 2.28463 2.75142 2.59049 0.284628 0.751419 0.59049 +DEAL::6e-06 1 2.22138 2.70967 2.53144 0.221377 0.709673 0.531441 +DEAL::7e-06 1 2.17218 2.67025 2.4783 0.172182 0.670247 0.478297 +DEAL::8e-06 1 2.13392 2.63301 2.43047 0.13392 0.633011 0.430467 +DEAL::9e-06 1 2.10416 2.59784 2.38742 0.10416 0.597844 0.38742 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/node_indep.gpl +DEAL::# Data independent of mesh location +DEAL::# +DEAL::0 1 +DEAL::1e-06 1 +DEAL::2e-06 1 +DEAL::3e-06 1 +DEAL::4e-06 1 +DEAL::5e-06 1 +DEAL::6e-06 1 +DEAL::7e-06 1 +DEAL::8e-06 1 +DEAL::9e-06 1 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/Test_Copy_00.gpl +DEAL::# DoF_index : Location (for each component) +DEAL::# 138 : 1 0.25 +DEAL::# 139 : 1 0.25 +DEAL::# 181 : 1 0.25 +DEAL:: +DEAL::# +DEAL::0.1 1 1 1 1 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/Test_Copy_indep.gpl +DEAL::# Data independent of mesh location +DEAL::# +DEAL::0.1 1 +DEAL:: +DEAL:: +DEAL::Copying output file point_value_history_01/no_dof_indep.gpl +DEAL::# Data independent of mesh location +DEAL::# +DEAL::0 1 +DEAL::1e-06 1 +DEAL::2e-06 1 +DEAL::3e-06 1 +DEAL::4e-06 1 +DEAL::5e-06 1 +DEAL::6e-06 1 +DEAL::7e-06 1 +DEAL::8e-06 1 +DEAL::9e-06 1 +DEAL:: +DEAL:: -- 2.39.5