From: Guido Kanschat Date: Tue, 6 Mar 2001 14:48:29 +0000 (+0000) Subject: mapping merge and normalize X-Git-Tag: v8.0.0~19643 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ece706e6eafdbd475c34e7226ab005da5cb7a1c;p=dealii.git mapping merge and normalize git-svn-id: https://svn.dealii.org/trunk@4124 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/common/scripts/normalize.pl b/deal.II/common/scripts/normalize.pl index 03946a3ef2..1ab5c82fae 100644 --- a/deal.II/common/scripts/normalize.pl +++ b/deal.II/common/scripts/normalize.pl @@ -25,6 +25,10 @@ s/^\s+Time =.*//; s/^\s+Date =.*//; s/Time tag:.*//g; +# Exceptions + +s/line <\d+> of\s?//; + # Make small exponentials zero s/-?\d\.\d+e-1\d+/0.00/g; diff --git a/tests/Makefile.rules b/tests/Makefile.rules new file mode 100644 index 0000000000..1586562092 --- /dev/null +++ b/tests/Makefile.rules @@ -0,0 +1,60 @@ +###################################################################### +# $Id$ +# +# Copyright (C) 201, the deal.II authors +# +# Common make rules for test files +###################################################################### + + +normalize = $D/common/scripts/normalize.pl + +verbose = off + +############################################################ +# Postprocessing +############################################################ + +%.output:%.testcase + @echo =====Running======= $< + @./$< + @perl -pi $(normalize) $@ + +ifeq ($(verbose),on) +%.check:%.output + @if diff $< $(patsubst %.output,%.checked, $<); then \ + echo '=====OK============' $< ; \ + touch $@ ; \ + else \ + echo '+++++Error+++++++++' $< ; \ + fi +else +%.check:%.output + @if diff $< $(patsubst %.output,%.checked, $<) > /dev/null ; then \ + echo '=====OK============' $< ; \ + touch $@ ; \ + else \ + echo '+++++Error+++++++++' $< ' details with "make verbose=on"'; \ + fi +endif + +############################################################ +# Cleanup targets +############################################################ + +clean: + rm -f Makefile.depend *.o *.go *.output + +veryclean: clean + rm -f *.testcase *.inp *.gpl *.eps *.gnuplot + +############################################################ +# Automatic generation of dependencies +############################################################ + +all-cc-files = $(shell echo *.cc) + +Makefile.depend: $(all-cc-files) + @echo =====Dependencies== $@ + @$(CXX) $(CXXFLAGS.g) $^ -M > $@ + @perl -pi -e 's/(^[^.]+)\.o:/\1.o \1.go:/;' $@ diff --git a/tests/base/Makefile.in b/tests/base/Makefile.in index 8b034a8735..8ae96852a8 100644 --- a/tests/base/Makefile.in +++ b/tests/base/Makefile.in @@ -186,42 +186,5 @@ target1: $(target1-o-files) $(libraries) @echo =====linking======= $< @$(CXX) $(LDFLAGS) $(flags) -o $@ $^ - -############################################################ -# Postprocessing -############################################################ - -%.output:%.testcase - @echo =====Running======= $< - @./$< - @perl -pi.bak -e 's/JobId.*//;s/value.*//;' $@ - @rm $@.bak - -%.check:%.output - @-diff $< $(patsubst %.output,%.checked, $<) && echo '=====OK============' - @touch $@ -############################################################ -# Cleanup targets -############################################################ - -clean: - rm -f Make.depend *.o *.go *.output - -veryclean: clean - rm -f *.testcase *.inp *.gpl *.eps *.gnuplot - -############################################################ -# Automatic generation of dependencies -############################################################ - -all-cc-files = $(shell echo *.cc) - -Make.depend: $(all-cc-files) - @echo =====Dependencies== Make.depend - @$(CXX) $(flags) $^ -M > $@ - @perl -pi -e 's/(^[^.]+)\.o:/\1.o \1.go:/;' $@ - -include Make.depend - - - +include ../Makefile.rules +include Makefile.depend diff --git a/tests/base/reference.checked b/tests/base/reference.checked index a7cebf4a52..fce2c783ac 100644 --- a/tests/base/reference.checked +++ b/tests/base/reference.checked @@ -11,7 +11,7 @@ DEAL::Construct C DEAL::Construct D DEAL::Destruct D -------------------------------------------------------- -An error occurred in line <45> of file in function +An error occurred in file in function Subscriptor::~Subscriptor() The violated condition was: counter == 0 diff --git a/tests/deal.II/Makefile.in b/tests/deal.II/Makefile.in index 1f13aa1ffe..1e1aea7370 100644 --- a/tests/deal.II/Makefile.in +++ b/tests/deal.II/Makefile.in @@ -11,7 +11,6 @@ D = @DEAL2_DIR@ include $D/common/Make.global_options - ############################################################ # Set debug-mode as a default ############################################################ @@ -351,52 +350,6 @@ target1: $(target1-o-files) $(libraries) ############################################################ -# Postprocessing -############################################################ - -wave-test-3.output: wave-test-3.testcase - @echo =====Running======= $< - @./$< - @perl -pi -e 's/JobId.*//; \ - s/value.*//; \ - s/Creation Date.*//g; \ - s/Time tag:.*//g; \ - s/(\.\d\d)\d*/\1/g;' $@ - -%.output:%.testcase - @echo =====Running======= $< - @./$< - @perl -pi -e 's/JobId.*//;\ - s/value.*//;\ - s/-?\d\.\d+e-1[4-9]/0/g;\ - s/%%Creation Date:.*//;\ - s/# Time =.*//; \ - s/# Date =.*//; \ - s/^\s+Time =.*//;\ - s/^\s+Date =.*//;' $@ - -%.check:%.output - @-diff $< $(patsubst %.output,%.checked, $<) && echo '=====OK============' $< - @touch $@ -############################################################ -# Cleanup targets -############################################################ - -clean: - rm -f Make.depend *.o *.go *.output - -veryclean: clean - rm -f *.testcase *.inp *.gpl *.eps *.gnuplot - -############################################################ -# Automatic generation of dependencies ############################################################ - -all-cc-files = $(shell echo *.cc) - -Make.depend: $(all-cc-files) - @echo =====Dependencies== Make.depend - @$(CXX) $(CXXFLAGS.g) $^ -M > $@ - @perl -pi -e 's/(^[^.]+)\.o:/\1.o \1.go:/;' $@ - -include Make.depend +include ../Makefile.rules +include Makefile.depend diff --git a/tests/fe/Makefile.in b/tests/fe/Makefile.in index 7f60aa37bf..9a2a3904aa 100644 --- a/tests/fe/Makefile.in +++ b/tests/fe/Makefile.in @@ -11,6 +11,7 @@ D = @DEAL2_DIR@ include $D/common/Make.global_options +normalize = $D/common/scripts/normalize.pl ############################################################ # Set debug-mode as a default @@ -88,7 +89,7 @@ else fe_data_test-o-files = $(fe_data_test-cc-files:.cc=.o) endif -fe_data_test: $(fe_data_test-o-files) $(libraries) +fe_data_test.testcase: $(fe_data_test-o-files) $(libraries) @echo =====linking======= $< @$(CXX) $(flags) -o $@ $^ @@ -102,7 +103,7 @@ else shapes-o-files = $(shapes-cc-files:.cc=.o) endif -shapes: $(shapes-o-files) $(libraries) +shapes.testcase: $(shapes-o-files) $(libraries) @echo =====linking======= $< @$(CXX) $(flags) -o $@ $^ @@ -116,7 +117,7 @@ else derivatives-o-files = $(derivatives-cc-files:.cc=.o) endif -derivatives: $(derivatives-o-files) $(libraries) +derivatives.testcase: $(derivatives-o-files) $(libraries) @echo =====linking======= $< @$(CXX) $(flags) -o $@ $^ @@ -157,7 +158,7 @@ else mapping-o-files = $(mapping-cc-files:.cc=.o) endif -mapping: $(mapping-o-files) $(libraries) +mapping.testcase: $(mapping-o-files) $(libraries) @echo =====linking======= $< @$(CXX) $(flags) -o $@ $^ @@ -193,17 +194,12 @@ performance: $(performance-o-files) $(libraries) # Continue with other targets if needed ############################################################ -check: fe_data_test mapping shapes - @echo Running programs - ./fe_data_test - @perl -pi -e 's/JobId.*//;' fe_data_test.dat - ./mapping - @perl -pi -e 's/JobId.*//;' mapping.dat - ./shapes +check: fe_data_test.check mapping.check derivatives.check shapes.check @echo Checking results $(MAKE) dodiff %.check: %.dat + @$(PERL) -pi $(normalize) $< @diff $@ed $< @touch $@ @@ -213,27 +209,7 @@ check = $(dat:.dat=.check) dodiff: $(check) @echo OK -############################################################ -# Cleanup targets -############################################################ - -clean: - rm -f *.o *.go *.inp *.gpl *.eps *.gnuplot *.dat - -veryclean: clean - rm -f fe_data_test mapping shapes - -############################################################ -# Automatic generation of dependencies -############################################################ - -all-cc-files = $(fe_data_test-cc-files) $(mapping-cc-files) $(shapes-cc-files) - -Makefile.depend: $(all-cc-files) - @echo =====Dependecies=== Makefile.depend - @$(CXX) $(flags) $^ -M > $@ - @perl -pi~ -e 's/(^[^.]+)\.o:/\1.o \1.go:/;' $@ - +include ../Makefile.rules include Makefile.depend .PHONY: clean veryclean check diff --git a/tests/fe/derivatives.cc b/tests/fe/derivatives.cc index 44a0553f32..2c09029543 100644 --- a/tests/fe/derivatives.cc +++ b/tests/fe/derivatives.cc @@ -132,10 +132,12 @@ void plot_FE_DGQ_shape_functions() int main() { - ofstream logfile ("derivatives.log"); - deallog.attach (logfile); - logfile.precision(3); - + ofstream logfile ("derivatives.output"); + logfile.precision (2); + logfile.setf(ios::fixed); + deallog.attach(logfile); + deallog.depth_console(0); + deallog.push ("1d"); plot_FE_Q_shape_functions<1>(); deallog.pop (); diff --git a/tests/fe/fe_data_test.cc b/tests/fe/fe_data_test.cc index cd7c3810d6..1f8f9324ba 100644 --- a/tests/fe/fe_data_test.cc +++ b/tests/fe/fe_data_test.cc @@ -65,7 +65,7 @@ void test_fe_datas() int main(int,char) { - ofstream logfile("fe_data_test.dat"); + ofstream logfile("fe_data_test.output"); deallog.attach(logfile); deallog.depth_console(0); diff --git a/tests/fe/mapping.cc b/tests/fe/mapping.cc index ff693b26f6..8b42b39c78 100644 --- a/tests/fe/mapping.cc +++ b/tests/fe/mapping.cc @@ -478,10 +478,12 @@ void mapping_test() int main() { - ofstream logfile("mapping.dat"); - logfile.precision(3); + ofstream logfile ("mapping.output"); + logfile.precision (2); + logfile.setf(ios::fixed); deallog.attach(logfile); deallog.depth_console(0); + // ----------------------- // Tests for dim=1 // ----------------------- diff --git a/tests/fe/shapes.cc b/tests/fe/shapes.cc index 2b79f0925d..ef1060d177 100644 --- a/tests/fe/shapes.cc +++ b/tests/fe/shapes.cc @@ -4,6 +4,7 @@ // Show the shape functions implemented. #include +#include #include #include #include @@ -223,6 +224,12 @@ void plot_FE_DGQ_shape_functions() int main() { + ofstream logfile ("shapes.output"); + logfile.precision (2); + logfile.setf(ios::fixed); + deallog.attach(logfile); + deallog.depth_console(0); + plot_FE_Q_shape_functions<1>(); plot_FE_Q_shape_functions<2>(); plot_FE_DGQ_shape_functions<2>(); diff --git a/tests/lac/Makefile.in b/tests/lac/Makefile.in index 234fee5215..57b486a871 100644 --- a/tests/lac/Makefile.in +++ b/tests/lac/Makefile.in @@ -238,37 +238,5 @@ target1: $(target1-o-files) $(libraries) $(CXX) $(LDFLAGS) -g -o $@ $^ $(LIBS) -############################################################ -# Postprocessing -############################################################ - -%.output:%.testcase - @echo =====Running======= $< - @./$< - @perl -pi -e 's/JobId.*//;s/value.*//;s/error occur.*//;' $@ - -%.check:%.output - @-diff $< $(patsubst %.output,%.checked, $<) && echo '=====OK============' - @touch $@ -############################################################ -# Cleanup targets -############################################################ - -clean: - rm -f Makefile.depend *.o *.go *.output T - -veryclean: clean - rm -f *.testcase *.inp *.gpl *.eps *.gnuplot - -############################################################ -# Automatic generation of dependencies -############################################################ - -all-cc-files = $(shell echo *.cc) - -Makefile.depend: $(all-cc-files) - @echo =====Dependencies== Makefile.depend - @$(CXX) $(flags) $^ -M > $@ - @perl -pi -e 's/(^[^.]+)\.o:/\1.o \1.g.o:/;' $@ - +include ../Makefile.rules include Makefile.depend diff --git a/tests/lac/block_matrices.checked b/tests/lac/block_matrices.checked index cdf08f7c9a..cd414dce2d 100644 --- a/tests/lac/block_matrices.checked +++ b/tests/lac/block_matrices.checked @@ -39,23 +39,23 @@ DEAL::Row 18 sparsity: 01010000111010000101010000101 DEAL::Row=18: expected length=11, actual length=11 DEAL::196==196 DEAL::196==196 -DEAL::vmult 0 72.000 72.000 -DEAL::vmult 1 2658.000 2658.000 -DEAL::vmult 2 6332.500 6332.500 -DEAL::vmult 3 6288.000 6288.000 -DEAL::vmult 4 10810.500 10810.500 -DEAL::vmult 5 12221.500 12221.500 -DEAL::vmult 6 18749.000 18749.000 -DEAL::vmult 7 14275.500 14275.500 -DEAL::vmult 8 20949.000 20949.000 -DEAL::vmult 9 20999.000 20999.000 -DEAL::vmult 10 29845.500 29845.500 -DEAL::vmult 11 29848.500 29848.500 -DEAL::vmult 12 31135.500 31135.500 -DEAL::vmult 13 29638.500 29638.500 -DEAL::vmult 14 40618.000 40618.000 -DEAL::vmult 15 39010.000 39010.000 -DEAL::vmult 16 39234.000 39234.000 -DEAL::vmult 17 51127.500 51127.500 -DEAL::vmult 18 51714.500 51714.500 -DEAL::matrix_scalar_product 15416941535.500 15416941535.500 +DEAL::vmult 0 72.00 72.00 +DEAL::vmult 1 2658.00 2658.00 +DEAL::vmult 2 6332.50 6332.50 +DEAL::vmult 3 6288.00 6288.00 +DEAL::vmult 4 10810.50 10810.50 +DEAL::vmult 5 12221.50 12221.50 +DEAL::vmult 6 18749.00 18749.00 +DEAL::vmult 7 14275.50 14275.50 +DEAL::vmult 8 20949.00 20949.00 +DEAL::vmult 9 20999.00 20999.00 +DEAL::vmult 10 29845.50 29845.50 +DEAL::vmult 11 29848.50 29848.50 +DEAL::vmult 12 31135.50 31135.50 +DEAL::vmult 13 29638.50 29638.50 +DEAL::vmult 14 40618.00 40618.00 +DEAL::vmult 15 39010.00 39010.00 +DEAL::vmult 16 39234.00 39234.00 +DEAL::vmult 17 51127.50 51127.50 +DEAL::vmult 18 51714.50 51714.50 +DEAL::matrix_scalar_product 15416941535.50 15416941535.50 diff --git a/tests/lac/block_vector.checked b/tests/lac/block_vector.checked index afc376fa5f..fa7e84e700 100644 --- a/tests/lac/block_vector.checked +++ b/tests/lac/block_vector.checked @@ -28,7 +28,7 @@ DEAL:BlockIndices:reinit::1 1 0 DEAL:BlockIndices:reinit::2 1 1 DEAL:BlockIndices::Range -------------------------------------------------------- -An +An error occurred in file in function struct pair BlockIndices::global_to_local(unsigned int) const The violated condition was: i in function unsigned int BlockIndices::local_to_global(unsigned int, unsigned int) const The violated condition was: index < start_indices[block+1]-start_indices[block] @@ -48,7 +48,7 @@ Additional Information: Index 2 is not in [0,2[ -------------------------------------------------------- -------------------------------------------------------- -An +An error occurred in file in function unsigned int BlockIndices::local_to_global(unsigned int, unsigned int) const The violated condition was: block < n_blocks diff --git a/tests/lac/full_matrix.checked b/tests/lac/full_matrix.checked index 03db31ab5f..cc08cff6c2 100644 --- a/tests/lac/full_matrix.checked +++ b/tests/lac/full_matrix.checked @@ -11,70 +11,70 @@ DEAL::Inverse(dim=6): DEAL::Inverse(dim=7): DEAL::Inverse(dim=8): DEAL::Inverse(dim=9): -5.403e-01 -8.415e-01 -8.415e-01 5.403e-01 - 1.000e+00 - 1.000e+00 - 1.000e+00 -DEAL::l1-norm: 1.382 -5.403e-01 8.415e-01 --8.415e-01 5.403e-01 - 1.000e+00 - 1.000e+00 - 1.000e+00 -DEAL::linfty-norm: 1.382 -DEAL::Frobenius-norm: 2.236 -1.000e+00 - -4.161e-01 -9.093e-01 - 9.093e-01 -4.161e-01 - 1.000e+00 - 1.000e+00 -DEAL::l1-norm: 1.325 -1.000e+00 - -4.161e-01 9.093e-01 - -9.093e-01 -4.161e-01 - 1.000e+00 - 1.000e+00 -DEAL::linfty-norm: 1.325 -DEAL::Frobenius-norm: 2.236 -1.000e+00 - 1.000e+00 - -9.900e-01 -1.411e-01 - 1.411e-01 -9.900e-01 - 1.000e+00 -DEAL::l1-norm: 1.131 -1.000e+00 - 1.000e+00 - -9.900e-01 1.411e-01 - -1.411e-01 -9.900e-01 - 1.000e+00 -DEAL::linfty-norm: 1.131 -DEAL::Frobenius-norm: 2.236 -1.000e+00 - 1.000e+00 - 1.000e+00 - -6.536e-01 7.568e-01 - -7.568e-01 -6.536e-01 -DEAL::l1-norm: 1.410 -1.000e+00 - 1.000e+00 - 1.000e+00 - -6.536e-01 -7.568e-01 - 7.568e-01 -6.536e-01 -DEAL::linfty-norm: 1.410 -DEAL::Frobenius-norm: 2.236 -1.708e+00 -1.892e-01 4.093e-01 -3.813e-02 4.415e-02 --1.892e-01 2.704e+00 6.399e-01 -5.962e-02 6.903e-02 -4.093e-01 6.399e-01 1.636e+00 2.203e-01 -2.551e-01 --3.813e-02 -5.962e-02 2.203e-01 4.552e+00 5.184e-01 -4.415e-02 6.903e-02 -2.551e-01 5.184e-01 4.400e+00 +5.40e-01 -8.41e-01 +8.41e-01 5.40e-01 + 1.00e+00 + 1.00e+00 + 1.00e+00 +DEAL::l1-norm: 1.38 +5.40e-01 8.41e-01 +-8.41e-01 5.40e-01 + 1.00e+00 + 1.00e+00 + 1.00e+00 +DEAL::linfty-norm: 1.38 +DEAL::Frobenius-norm: 2.23 +1.00e+00 + -4.16e-01 -9.09e-01 + 9.09e-01 -4.16e-01 + 1.00e+00 + 1.00e+00 +DEAL::l1-norm: 1.32 +1.00e+00 + -4.16e-01 9.09e-01 + -9.09e-01 -4.16e-01 + 1.00e+00 + 1.00e+00 +DEAL::linfty-norm: 1.32 +DEAL::Frobenius-norm: 2.23 +1.00e+00 + 1.00e+00 + -9.90e-01 -1.41e-01 + 1.41e-01 -9.90e-01 + 1.00e+00 +DEAL::l1-norm: 1.13 +1.00e+00 + 1.00e+00 + -9.90e-01 1.41e-01 + -1.41e-01 -9.90e-01 + 1.00e+00 +DEAL::linfty-norm: 1.13 +DEAL::Frobenius-norm: 2.23 +1.00e+00 + 1.00e+00 + 1.00e+00 + -6.53e-01 7.56e-01 + -7.56e-01 -6.53e-01 +DEAL::l1-norm: 1.41 +1.00e+00 + 1.00e+00 + 1.00e+00 + -6.53e-01 -7.56e-01 + 7.56e-01 -6.53e-01 +DEAL::linfty-norm: 1.41 +DEAL::Frobenius-norm: 2.23 +1.70e+00 -1.89e-01 4.09e-01 -3.81e-02 4.41e-02 +-1.89e-01 2.70e+00 6.39e-01 -5.96e-02 6.90e-02 +4.09e-01 6.39e-01 1.63e+00 2.20e-01 -2.55e-01 +-3.81e-02 -5.96e-02 2.20e-01 4.55e+00 5.18e-01 +4.41e-02 6.90e-02 -2.55e-01 5.18e-01 4.40e+00 DEAL::Eigen DEAL::Eigen -6.460e-01 9.460e-02 -2.046e-01 1.907e-02 -2.208e-02 -9.460e-02 4.235e-01 -1.951e-01 1.817e-02 -2.104e-02 --2.046e-01 -1.951e-01 7.536e-01 -4.693e-02 5.433e-02 -1.907e-02 1.817e-02 -4.693e-02 2.257e-01 -2.980e-02 --2.208e-02 -2.104e-02 5.433e-02 -2.980e-02 2.345e-01 +6.46e-01 9.46e-02 -2.04e-01 1.90e-02 -2.20e-02 +9.46e-02 4.23e-01 -1.95e-01 1.81e-02 -2.10e-02 +-2.04e-01 -1.95e-01 7.53e-01 -4.69e-02 5.43e-02 +1.90e-02 1.81e-02 -4.69e-02 2.25e-01 -2.98e-02 +-2.20e-02 -2.10e-02 5.43e-02 -2.98e-02 2.34e-01 DEAL::Eigen DEAL::Eigen DEAL::GrowingVectorMemory:Overall allocated vectors: 8 diff --git a/tests/lac/solver.checked b/tests/lac/solver.checked index d71d6dd314..f4a57cd01d 100644 --- a/tests/lac/solver.checked +++ b/tests/lac/solver.checked @@ -1,6 +1,6 @@ DEAL::Size 4 Unknowns 9 -DEAL::SOR-diff:0.000 +DEAL::SOR-diff:0.00 DEAL:no:cg::Starting DEAL:no:cg::Convergence step 3 DEAL:no:Bicgstab::Starting @@ -30,7 +30,7 @@ DEAL:sor:GMRES::Convergence step 5 DEAL:sor:QMRS::Starting DEAL:sor:QMRS::Failure step 100 DEAL::Size 12 Unknowns 121 -DEAL::SOR-diff:0.000 +DEAL::SOR-diff:0.00 DEAL:no:cg::Starting DEAL:no:cg::Convergence step 15 DEAL:no:Bicgstab::Starting @@ -60,7 +60,7 @@ DEAL:sor:GMRES::Convergence step 20 DEAL:sor:QMRS::Starting DEAL:sor:QMRS::Failure step 100 DEAL::Size 36 Unknowns 1225 -DEAL::SOR-diff:0.000 +DEAL::SOR-diff:0.00 DEAL:no:cg::Starting DEAL:no:cg::Convergence step 49 DEAL:no:Bicgstab::Starting