]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Small changes. Use Makefile template for each directory.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 27 Apr 1998 09:30:49 +0000 (09:30 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 27 Apr 1998 09:30:49 +0000 (09:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@198 0785d39b-7218-0410-832d-ea1e28bc413d

24 files changed:
deal.II/deal.II/Attic/examples/Makefile
deal.II/deal.II/Attic/examples/convergence/Makefile
deal.II/deal.II/Attic/examples/convergence/convergence.cc
deal.II/deal.II/Attic/examples/dof/Makefile
deal.II/deal.II/Attic/examples/dof/dof_test.cc
deal.II/deal.II/Attic/examples/error-estimation/Makefile
deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc
deal.II/deal.II/Attic/examples/grid/Makefile
deal.II/deal.II/Attic/examples/grid/grid_test.cc
deal.II/deal.II/Attic/examples/poisson/Makefile
deal.II/deal.II/Attic/examples/poisson/poisson.h
deal.II/deal.II/Attic/examples/poisson/problem.cc
tests/big-tests/Makefile
tests/big-tests/convergence/Makefile
tests/big-tests/convergence/convergence.cc
tests/big-tests/dof/Makefile
tests/big-tests/dof/dof_test.cc
tests/big-tests/error-estimation/Makefile
tests/big-tests/error-estimation/error-estimation.cc
tests/big-tests/grid/Makefile
tests/big-tests/grid/grid_test.cc
tests/big-tests/poisson/Makefile
tests/big-tests/poisson/poisson.h
tests/big-tests/poisson/problem.cc

index fb4b0f3c2939e090fc85e2f2fe5c0cdfd1d67d94..f170a75f13c69daaddc15719eb151da9fbcf3cc5 100644 (file)
 # $Id$
 
-CXX=c++
-INCLUDE   = -I../include -I../../lac/include -I../../base/include
-CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
-            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions
-CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
-           -funroll-loops -felide-constructors -fnonnull-objects \
-           -fno-rtti -fno-exceptions
+# list the directories we want to visit
+subdirs = grid/ dof/ poisson/ convergence/ error-estimation/
 
-LIBPATH   = -L../lib -L../../lac/lib
-LIBFILES.g= ../lib/libbasic.g.a ../lib/libgrid.g.a \
-            ../lib/libfe.g.a ../lib/libnumerics.g.a \
-            ../../lac/lib/liblac.g.a
-LIBFILES  = $(LIBFILES.g:.g.a=.a)
-LIBS.g    = $(LIBPATH) -lgrid.g -lfe.g -lnumerics.g -llac.g -lbasic.g
-LIBS      = $(LIBS.g:.g=)
+# define lists of targets: for each directory we produce a target name
+# for compilation, running and cleaning by appending the action to
+# the directory name (replacing the slash by ".action")
+compile = $(subdirs:/=.compile)
+run     = $(subdirs:/=.run)
+clean   = $(subdirs:/=.clean)
 
+# define global targets which are to be excuted in every subdirectory
+compile: $(compile)
+run    : $(run)
+# for cleaning up: do this also for the present directory
+clean  : $(clean)
+       rm -f *~
 
-ifeq ($(shell uname),Linux)
-CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
-endif
 
-ifeq ($(shell uname),SunOS)
-CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
-endif
+# define the action of the targets for the specific subdirectories
+$(compile) :
+       cd $(@:.compile=) ; make
 
-cc-files = grid/grid_test.cc dof/dof_test.cc poisson/poisson.cc \
-           convergence/convergence.cc error-estimation/error-estimation
-o-files  = $(cc-files:.cc=.o)
-h-files  = $(wildcard ../include/*.h)
+$(run) :
+       cd $(@:.run=) ; make run
 
-examples: $(cc-files:.cc=)
-
-%.o : %.cc
-       @echo ================= Compiling $<
-       @$(CXX) $(CXXFLAGS.g) $(INCLUDE) -o $@ -g -c $<
-
-grid/grid_test: grid/grid_test.o $(LIBFILES)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS) -o $@ $< $(LIBS.g)
-
-dof/dof_test: dof/dof_test.o $(LIBFILES.g)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS.g) -o $@ $< $(LIBS.g) -lg++
-
-poisson/poisson:
-       @cd poisson ; make
-
-convergence/convergence: convergence/convergence.o $(LIBFILES.g)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS.g) -o $@ $< $(LIBS) ../../mia/control.o
-
-error-estimation/error-estimation: error-estimation/error-estimation.o $(LIBFILES.g)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS.g) -o $@ $< $(LIBS) ../../mia/control.o
-
-
-run: run_grid_test run_dof_test run_poisson_test run_convergence_test run_error_test
-
-run_grid_test:
-       cd grid ; grid_test 4 ; mv grid.1 grid.4
-       cd grid ; grid_test 3 ; mv grid.1 grid.3
-       cd grid ; grid_test 2 ; mv grid.1 grid.2
-       cd grid ; grid_test 1
-       cd grid ; gnuplot make_ps
-
-run_dof_test:
-       cd dof ; dof_test dof_test.prm
-       cd dof ; gnuplot make_ps
-
-run_poisson_test:
-       cd poisson ; make run
-
-run_convergence_test:
-       cd convergence ; convergence
-       cd convergence ; gnuplot make_ps
-
-run_error_test:
-       cd error-estimation ; error-estimation
-       cd error-estimation ; gnuplot make_ps
-
-clean:
-       cd grid ; rm -f grid.[1234] *.eps *.o *~ grid_test
-       cd dof  ; rm -f grid.* sparsity.* *.o *~ dof_test
-       cd poisson ; make clean
-       cd convergence ; rm -f *.o convergence *~ *.eps gnuplot.*
-       cd error-estimation ; rm -f *.o error-estimation *~ *.eps gnuplot.*
-
-
-.PHONY: run run_grid_test run_dof_test run_poisson_test run_convergence_test run_error_test clean
-
-
-#Rule to generate the dependency file. This file is
-#automagically remade whenever needed, i.e. whenever
-#one of the cc-/h-files changed. Make detects whether
-#to remake this file upon inclusion at the bottom
-#of this file.
-Makefile.dep: $(cc-files) $(h-files)
-       @echo ================= Making $@
-       @$(CXX) $(INCLUDE) -M $(cc-files) > Makefile.dep
-
-include Makefile.dep
+$(clean) :
+       cd $(@:.clean=) ; make clean
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e61c79cd7903a6052bb8d5f855703873ecd5a649 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = convergence
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = ../../../mia/control.o
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = 
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = gnuplot* *.eps
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index ecea08cec306140fe85c7a108b506359c3c5b0c4..daeaafbf60b6260679b519a10f595fc951eb3440 100644 (file)
@@ -251,8 +251,8 @@ void PoissonProblem<dim>::run (const unsigned int level) {
   n_dofs.push_back (dof->n_dofs());
 
   cout << "    Assembling matrices..." << endl;
-  UpdateFields update_flags = UpdateFields(update_q_points  | update_gradients |
-                                          update_jacobians | update_JxW_values);
+  UpdateFlags update_flags = UpdateFlags(update_q_points  | update_gradients |
+                                        update_jacobians | update_JxW_values);
   
   ProblemBase<dim>::DirichletBC dirichlet_bc;
   dirichlet_bc[0] = boundary_values;
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..27d3fa5778ee940a976d6f7850cfe05dc3697d62 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = dof_test
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = 
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = $(target).prm
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = grid* sparsity* *.eps
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index c49075b912e0b01f196ff83d4275166f1058cc4f..254ba9a5ec94bb9795d93b7358b170c6c6eb9662 100644 (file)
@@ -245,7 +245,7 @@ void TestCases<dim>::run (ParameterHandler &prm) {
 
 
   cout << "    Distributing degrees of freedom..." << endl;
-  FEQuadratic<dim> fe;
+  FELinear<dim> fe;
   dof->distribute_dofs (fe);
 
   cout << "    Renumbering degrees of freedom..." << endl;
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a8d321929c97f65c5b307bf0d4e32f7a221e75d6 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = error-estimation
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = ../../../mia/control.o
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = 
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = 
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = gnuplot* 
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index 5ea362273f11d2cf2f35e244d53a75dd8b2cc784..1d43aeb913bf080495d4a2ca6bd616912b1a5058 100644 (file)
@@ -252,8 +252,8 @@ void PoissonProblem<dim>::run (const unsigned int level) {
   n_dofs.push_back (dof->n_dofs());
 
   cout << "    Assembling matrices..." << endl;
-  UpdateFields update_flags = UpdateFields(update_q_points  | update_gradients |
-                                          update_jacobians | update_JxW_values);
+  UpdateFlags update_flags = UpdateFlags(update_q_points  | update_gradients |
+                                        update_jacobians | update_JxW_values);
   
   ProblemBase<dim>::DirichletBC dirichlet_bc;
   dirichlet_bc[0] = boundary_values;
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7d9c8ede0ee3f0260a8c91a0c94fb71e1ecf15b6 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = grid_test
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = 
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = 1
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = grid_test 2 ; grid_test 3 ; grid_test 4 ; gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = grid.? *.eps
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index b2ab9eb7c8b23a48f63b43f7906d83fb4ffec885..a42dd5937dc64e93bab056f3a72e92847c5083cb 100644 (file)
@@ -3,11 +3,11 @@
 #include <grid/tria_boundary.h>
 #include <grid/tria_iterator.h>
 #include <grid/tria.h>
+#include <fstream>
+#include <string>
 #include <cmath>
-#include <fstream.h>
-extern "C" {
-#  include <stdlib.h>
-}
+#include <cstdlib>
+
 
 
 // 1: continuous refinement of the unit square always in the middle
@@ -182,7 +182,10 @@ void test (const int test_case, const Point<dim> &) {
   
        
                                   // output the grid
-  ofstream out("grid.1");
+  string filename("grid.");
+  filename += ('0'+test_case);
+  
+  ofstream out(filename.c_str());
   tria.print_gnuplot (out);
     
   cout << "     Total number of cells        = " << tria.n_cells() << endl
index 44ea89487b4d6c62ce15a0827728ed1d3ac460e4..c76bce9865b1e7330a0fc611b3f96b62579a89a0 100644 (file)
@@ -1,4 +1,40 @@
 # $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = poisson
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = ../../../mia/control.o
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = $(target).prm
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = gnuplot* *.eps
+
+
+
+
+###############################################################################
+# Internals
 
 CXX       = c++
 INCLUDE   = -I../../include -I../../../lac/include \
@@ -10,6 +46,8 @@ CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
            -funroll-loops -felide-constructors -fnonnull-objects \
            -fno-rtti -fno-exceptions $(INCLUDE)
 
+
+# if on specific systems, change compiler path
 ifeq ($(shell uname),Linux)
 CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
 endif
@@ -18,46 +56,81 @@ ifeq ($(shell uname),SunOS)
 CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
 endif
 
-LIBPATH   = -L../../lib -L../../../lac/lib
-LIBFILES.g= ../../lib/libbasic.g.a ../../lib/libgrid.g.a \
-            ../../lib/libfe.g.a ../../lib/libnumerics.g.a \
-            ../../../lac/lib/liblac.g.a
-LIBFILES  = $(LIBFILES.g:.g.a=.a)
-LIBS.g    = $(LIBPATH) -lbasic.g -lgrid.g -lfe.g -lnumerics.g -llac.g
-LIBS      = $(LIBS.g:.g=)
 
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
 
-cc-files = $(wildcard *.cc)
-o-files  = $(cc-files:.cc=.o)
-go-files = $(cc-files:.cc=.go)
-h-files  = $(wildcard ../include/*/*.h)
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
 
 
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
 
 
-%.go : %.cc poisson.h
+# rule to make object files
+%.go : %.cc
        @echo ============================ Compiling with debugging information:   $<
        @echo $(CXX) ... -c $< -o $@
        @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-%.o : %.cc poisson.h
+%.o : %.cc
        @echo ============================ Compiling with optimization:   $<
        @echo $(CXX) ... -c $< -o $@
        @$(CXX) $(CXXFLAGS) -c $< -o $@
 
 
-poisson: $(go-files) $(LIBFILES.g)
-       @echo ============================ Linking poisson
-       @$(CXX) -g $(CXXFLAGS.g) $(go-files) -o $@ ../../../mia/control.o $(LIBS.g) -lg++
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
 
 
-run: poisson
-       poisson poisson.prm
-       gnuplot make_ps
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
 
 
-clean:
-       rm -f *.o *.go *~ poisson gnuplot.* *.eps
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
 
 
+include Makefile.dep
 
-.PHONY: run clean
index 74224e3837c0dab3b9fe686ab842631f1754793a..5c5b53a00c857ed2c1fe1c41749a12c724efcbd1 100644 (file)
@@ -86,6 +86,8 @@ class PoissonProblem : public ProblemBase<dim>,
     
     Function<dim>      *rhs;
     Function<dim>      *boundary_values;
+
+    Boundary<dim>      *boundary;
 };
 
 
index 553a0c36cd0a9fc7f948480bc46179c0b74f98d0..ed039acba3e4071fe8fab197268dd5cf45b02461 100644 (file)
@@ -152,7 +152,7 @@ double RHSPoly<dim>::operator () (const Point<dim> &p) const {
 
 template <int dim>
 PoissonProblem<dim>::PoissonProblem () :
-               tria(0), dof(0), rhs(0), boundary_values(0) {};
+               tria(0), dof(0), rhs(0), boundary_values(0), boundary(0) {};
 
 
 
@@ -181,6 +181,12 @@ void PoissonProblem<dim>::clear () {
       boundary_values = 0;
     };
 
+  if (boundary != 0)
+    {
+      delete boundary;
+      boundary = 0;
+    };
+  
   ProblemBase<dim>::clear ();
 };
 
@@ -245,6 +251,8 @@ bool PoissonProblem<dim>::make_grid (ParameterHandler &prm) {
   switch (test_case) 
     {
       case 1:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            make_zoom_in_grid ();
            break;
       case 2:
@@ -252,26 +260,32 @@ bool PoissonProblem<dim>::make_grid (ParameterHandler &prm) {
                                             // unit radius
       {
            static const Point<dim> origin;
-           static const HyperBallBoundary<dim> boundary(origin, 1.);
+           boundary = new HyperBallBoundary<dim>(origin, 1.);
            tria->create_hyper_ball (origin, 1.);
-           tria->set_boundary (&boundary);
+           tria->set_boundary (boundary);
            break;
       };
       case 3:
                                             // set the boundary function
       {
-           static const CurvedLine<dim> boundary;
+           boundary = new CurvedLine<dim>();
            tria->create_hypercube ();
-           tria->set_boundary (&boundary);
+           tria->set_boundary (boundary);
            break;
       };
       case 4:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            make_random_grid ();
            break;
       case 5:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            tria->create_hypercube ();
            break;
       case 6:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            tria->create_hypercube ();
            tria->refine_global (1);
            for (unsigned int i=0; i<5; ++i)
@@ -282,6 +296,8 @@ bool PoissonProblem<dim>::make_grid (ParameterHandler &prm) {
              };
            break;
       case 7:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            tria->create_hyper_L ();
            break;
       default:
@@ -432,10 +448,12 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
   cout << dof->n_dofs() << " degrees of freedom." << endl;
 
   cout << "    Assembling matrices..." << endl;
-  UpdateFields update_flags = UpdateFields(update_gradients | update_JxW_values);
   ProblemBase<dim>::DirichletBC dirichlet_bc;
   dirichlet_bc[0] = boundary_values;
-  assemble (equation, quadrature, fe, update_flags, dirichlet_bc);
+  assemble (equation, quadrature, fe,
+           UpdateFlags(update_gradients | update_JxW_values |
+                       update_jacobians | update_q_points),
+           dirichlet_bc, *boundary);
 
   cout << "    Solving..." << endl;
   solve ();
index fb4b0f3c2939e090fc85e2f2fe5c0cdfd1d67d94..f170a75f13c69daaddc15719eb151da9fbcf3cc5 100644 (file)
 # $Id$
 
-CXX=c++
-INCLUDE   = -I../include -I../../lac/include -I../../base/include
-CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
-            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions
-CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
-           -funroll-loops -felide-constructors -fnonnull-objects \
-           -fno-rtti -fno-exceptions
+# list the directories we want to visit
+subdirs = grid/ dof/ poisson/ convergence/ error-estimation/
 
-LIBPATH   = -L../lib -L../../lac/lib
-LIBFILES.g= ../lib/libbasic.g.a ../lib/libgrid.g.a \
-            ../lib/libfe.g.a ../lib/libnumerics.g.a \
-            ../../lac/lib/liblac.g.a
-LIBFILES  = $(LIBFILES.g:.g.a=.a)
-LIBS.g    = $(LIBPATH) -lgrid.g -lfe.g -lnumerics.g -llac.g -lbasic.g
-LIBS      = $(LIBS.g:.g=)
+# define lists of targets: for each directory we produce a target name
+# for compilation, running and cleaning by appending the action to
+# the directory name (replacing the slash by ".action")
+compile = $(subdirs:/=.compile)
+run     = $(subdirs:/=.run)
+clean   = $(subdirs:/=.clean)
 
+# define global targets which are to be excuted in every subdirectory
+compile: $(compile)
+run    : $(run)
+# for cleaning up: do this also for the present directory
+clean  : $(clean)
+       rm -f *~
 
-ifeq ($(shell uname),Linux)
-CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
-endif
 
-ifeq ($(shell uname),SunOS)
-CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
-endif
+# define the action of the targets for the specific subdirectories
+$(compile) :
+       cd $(@:.compile=) ; make
 
-cc-files = grid/grid_test.cc dof/dof_test.cc poisson/poisson.cc \
-           convergence/convergence.cc error-estimation/error-estimation
-o-files  = $(cc-files:.cc=.o)
-h-files  = $(wildcard ../include/*.h)
+$(run) :
+       cd $(@:.run=) ; make run
 
-examples: $(cc-files:.cc=)
-
-%.o : %.cc
-       @echo ================= Compiling $<
-       @$(CXX) $(CXXFLAGS.g) $(INCLUDE) -o $@ -g -c $<
-
-grid/grid_test: grid/grid_test.o $(LIBFILES)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS) -o $@ $< $(LIBS.g)
-
-dof/dof_test: dof/dof_test.o $(LIBFILES.g)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS.g) -o $@ $< $(LIBS.g) -lg++
-
-poisson/poisson:
-       @cd poisson ; make
-
-convergence/convergence: convergence/convergence.o $(LIBFILES.g)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS.g) -o $@ $< $(LIBS) ../../mia/control.o
-
-error-estimation/error-estimation: error-estimation/error-estimation.o $(LIBFILES.g)
-       @echo ================= Linking $@
-       @$(CXX) $(CXXFLAGS.g) -o $@ $< $(LIBS) ../../mia/control.o
-
-
-run: run_grid_test run_dof_test run_poisson_test run_convergence_test run_error_test
-
-run_grid_test:
-       cd grid ; grid_test 4 ; mv grid.1 grid.4
-       cd grid ; grid_test 3 ; mv grid.1 grid.3
-       cd grid ; grid_test 2 ; mv grid.1 grid.2
-       cd grid ; grid_test 1
-       cd grid ; gnuplot make_ps
-
-run_dof_test:
-       cd dof ; dof_test dof_test.prm
-       cd dof ; gnuplot make_ps
-
-run_poisson_test:
-       cd poisson ; make run
-
-run_convergence_test:
-       cd convergence ; convergence
-       cd convergence ; gnuplot make_ps
-
-run_error_test:
-       cd error-estimation ; error-estimation
-       cd error-estimation ; gnuplot make_ps
-
-clean:
-       cd grid ; rm -f grid.[1234] *.eps *.o *~ grid_test
-       cd dof  ; rm -f grid.* sparsity.* *.o *~ dof_test
-       cd poisson ; make clean
-       cd convergence ; rm -f *.o convergence *~ *.eps gnuplot.*
-       cd error-estimation ; rm -f *.o error-estimation *~ *.eps gnuplot.*
-
-
-.PHONY: run run_grid_test run_dof_test run_poisson_test run_convergence_test run_error_test clean
-
-
-#Rule to generate the dependency file. This file is
-#automagically remade whenever needed, i.e. whenever
-#one of the cc-/h-files changed. Make detects whether
-#to remake this file upon inclusion at the bottom
-#of this file.
-Makefile.dep: $(cc-files) $(h-files)
-       @echo ================= Making $@
-       @$(CXX) $(INCLUDE) -M $(cc-files) > Makefile.dep
-
-include Makefile.dep
+$(clean) :
+       cd $(@:.clean=) ; make clean
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..e61c79cd7903a6052bb8d5f855703873ecd5a649 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = convergence
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = ../../../mia/control.o
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = 
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = gnuplot* *.eps
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index ecea08cec306140fe85c7a108b506359c3c5b0c4..daeaafbf60b6260679b519a10f595fc951eb3440 100644 (file)
@@ -251,8 +251,8 @@ void PoissonProblem<dim>::run (const unsigned int level) {
   n_dofs.push_back (dof->n_dofs());
 
   cout << "    Assembling matrices..." << endl;
-  UpdateFields update_flags = UpdateFields(update_q_points  | update_gradients |
-                                          update_jacobians | update_JxW_values);
+  UpdateFlags update_flags = UpdateFlags(update_q_points  | update_gradients |
+                                        update_jacobians | update_JxW_values);
   
   ProblemBase<dim>::DirichletBC dirichlet_bc;
   dirichlet_bc[0] = boundary_values;
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..27d3fa5778ee940a976d6f7850cfe05dc3697d62 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = dof_test
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = 
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = $(target).prm
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = grid* sparsity* *.eps
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index c49075b912e0b01f196ff83d4275166f1058cc4f..254ba9a5ec94bb9795d93b7358b170c6c6eb9662 100644 (file)
@@ -245,7 +245,7 @@ void TestCases<dim>::run (ParameterHandler &prm) {
 
 
   cout << "    Distributing degrees of freedom..." << endl;
-  FEQuadratic<dim> fe;
+  FELinear<dim> fe;
   dof->distribute_dofs (fe);
 
   cout << "    Renumbering degrees of freedom..." << endl;
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..a8d321929c97f65c5b307bf0d4e32f7a221e75d6 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = error-estimation
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = ../../../mia/control.o
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = 
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = 
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = gnuplot* 
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index 5ea362273f11d2cf2f35e244d53a75dd8b2cc784..1d43aeb913bf080495d4a2ca6bd616912b1a5058 100644 (file)
@@ -252,8 +252,8 @@ void PoissonProblem<dim>::run (const unsigned int level) {
   n_dofs.push_back (dof->n_dofs());
 
   cout << "    Assembling matrices..." << endl;
-  UpdateFields update_flags = UpdateFields(update_q_points  | update_gradients |
-                                          update_jacobians | update_JxW_values);
+  UpdateFlags update_flags = UpdateFlags(update_q_points  | update_gradients |
+                                        update_jacobians | update_JxW_values);
   
   ProblemBase<dim>::DirichletBC dirichlet_bc;
   dirichlet_bc[0] = boundary_values;
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7d9c8ede0ee3f0260a8c91a0c94fb71e1ecf15b6 100644 (file)
@@ -0,0 +1,136 @@
+# $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = grid_test
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = 
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = 1
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = grid_test 2 ; grid_test 3 ; grid_test 4 ; gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = grid.? *.eps
+
+
+
+
+###############################################################################
+# Internals
+
+CXX       = c++
+INCLUDE   = -I../../include -I../../../lac/include \
+            -I../../../base/include -I../../../mia/include
+CXXFLAGS.g= -DDEBUG -g -Wall -W -pedantic -Wconversion \
+            -Winline -Woverloaded-virtual -fno-rtti -fno-exceptions \
+            $(INCLUDE)
+CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
+           -funroll-loops -felide-constructors -fnonnull-objects \
+           -fno-rtti -fno-exceptions $(INCLUDE)
+
+
+# if on specific systems, change compiler path
+ifeq ($(shell uname),Linux)
+CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
+endif
+
+ifeq ($(shell uname),SunOS)
+CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
+endif
+
+
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
+
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
+
+
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
+
+
+# rule to make object files
+%.go : %.cc
+       @echo ============================ Compiling with debugging information:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS.g) -c $< -o $@
+%.o : %.cc
+       @echo ============================ Compiling with optimization:   $<
+       @echo $(CXX) ... -c $< -o $@
+       @$(CXX) $(CXXFLAGS) -c $< -o $@
+
+
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
+
+
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
+
+
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
+
+
+include Makefile.dep
+
index b2ab9eb7c8b23a48f63b43f7906d83fb4ffec885..a42dd5937dc64e93bab056f3a72e92847c5083cb 100644 (file)
@@ -3,11 +3,11 @@
 #include <grid/tria_boundary.h>
 #include <grid/tria_iterator.h>
 #include <grid/tria.h>
+#include <fstream>
+#include <string>
 #include <cmath>
-#include <fstream.h>
-extern "C" {
-#  include <stdlib.h>
-}
+#include <cstdlib>
+
 
 
 // 1: continuous refinement of the unit square always in the middle
@@ -182,7 +182,10 @@ void test (const int test_case, const Point<dim> &) {
   
        
                                   // output the grid
-  ofstream out("grid.1");
+  string filename("grid.");
+  filename += ('0'+test_case);
+  
+  ofstream out(filename.c_str());
   tria.print_gnuplot (out);
     
   cout << "     Total number of cells        = " << tria.n_cells() << endl
index 44ea89487b4d6c62ce15a0827728ed1d3ac460e4..c76bce9865b1e7330a0fc611b3f96b62579a89a0 100644 (file)
@@ -1,4 +1,40 @@
 # $Id$
+# Author: Wolfgang Bangerth, 1998
+
+# Template for makefiles for the examples subdirectory. In principle,
+# everything should be done automatically if you set the target file
+# here correctly:
+target   = poisson
+
+# All dependencies between files should be updated by the included
+# file Makefile.dep if necessary. Object files are compiled into
+# the archives ./Obj.a and ./Obj.g.a. By default, the debug version
+# is used to link. It you don't like that, change the following
+# variable to "off"
+debug-mode = on
+
+# If you want your program to be linked with extra object or library
+# files, specify them here:
+user-libs = ../../../mia/control.o
+
+# To run the program, use "make run"; to give parameters to the program,
+# give the parameters to the following variable:
+run-parameters  = $(target).prm
+
+# To execute additional action apart from running the program, fill
+# in this list:
+additional-run-action = gnuplot make_ps
+
+# To specify which files are to be deleted by "make clean" (apart from
+# the usual ones: object files, executables, backups, etc), fill in the
+# following list
+delete-files = gnuplot* *.eps
+
+
+
+
+###############################################################################
+# Internals
 
 CXX       = c++
 INCLUDE   = -I../../include -I../../../lac/include \
@@ -10,6 +46,8 @@ CXXFLAGS  =-O3 -Wuninitialized -finline-functions -ffast-math \
            -funroll-loops -felide-constructors -fnonnull-objects \
            -fno-rtti -fno-exceptions $(INCLUDE)
 
+
+# if on specific systems, change compiler path
 ifeq ($(shell uname),Linux)
 CXX       = /home/wolf/bin/gcc-2.8.1/bin/c++
 endif
@@ -18,46 +56,81 @@ ifeq ($(shell uname),SunOS)
 CXX       = /usr/local/gcc/gcc-2.8.1/bin/c++
 endif
 
-LIBPATH   = -L../../lib -L../../../lac/lib
-LIBFILES.g= ../../lib/libbasic.g.a ../../lib/libgrid.g.a \
-            ../../lib/libfe.g.a ../../lib/libnumerics.g.a \
-            ../../../lac/lib/liblac.g.a
-LIBFILES  = $(LIBFILES.g:.g.a=.a)
-LIBS.g    = $(LIBPATH) -lbasic.g -lgrid.g -lfe.g -lnumerics.g -llac.g
-LIBS      = $(LIBS.g:.g=)
 
+# get lists of files we need
+cc-files    = $(wildcard *.cc)
+o-files     = $(cc-files:.cc=.o)
+go-files    = $(cc-files:.cc=.go)
+h-files     = $(wildcard *.h)
+lib-h-files = $(wildcard ../../include/*/*.h)
 
-cc-files = $(wildcard *.cc)
-o-files  = $(cc-files:.cc=.o)
-go-files = $(cc-files:.cc=.go)
-h-files  = $(wildcard ../include/*/*.h)
+# list of libraries needed to link with
+libs     = ./Obj.a   $(wildcard ../../lib/lib*.a)   ../../../lac/lib/liblac.a
+libs.g   = ./Obj.g.a $(wildcard ../../lib/lib*.g.a) ../../../lac/lib/liblac.g.a
 
 
+# check whether we use debug mode or not
+ifeq ($(debug-mode),on)
+libraries = $(libs.g)
+flags     = $(CXXFLAGS.g)
+endif
+
+ifeq ($(debug-mode),off)
+libraries = $(libs)
+flags     = $(CXXFLAGS)
+endif
+
+
+
+# make rule for the target
+$(target) : $(libraries)
+       @echo ============================ Linking $@
+       @$(CXX) $(flags) -o $@ $(libraries) -lg++ $(user-libs)
+
+# rule how to run the program
+run: $(target)
+       $(target) $(run-parameters)
+       $(additional-run-action)
 
 
-%.go : %.cc poisson.h
+# rule to make object files
+%.go : %.cc
        @echo ============================ Compiling with debugging information:   $<
        @echo $(CXX) ... -c $< -o $@
        @$(CXX) $(CXXFLAGS.g) -c $< -o $@
-%.o : %.cc poisson.h
+%.o : %.cc
        @echo ============================ Compiling with optimization:   $<
        @echo $(CXX) ... -c $< -o $@
        @$(CXX) $(CXXFLAGS) -c $< -o $@
 
 
-poisson: $(go-files) $(LIBFILES.g)
-       @echo ============================ Linking poisson
-       @$(CXX) -g $(CXXFLAGS.g) $(go-files) -o $@ ../../../mia/control.o $(LIBS.g) -lg++
+# rules which files the libraries depend upon
+Obj.a: ./Obj.a($(o-files))
+Obj.g.a: ./Obj.g.a($(go-files))
 
 
-run: poisson
-       poisson poisson.prm
-       gnuplot make_ps
+clean:
+       rm -f *.o *.go *~ Makefile.dep Obj.a Obj.g.a $(target) $(delete-files)
 
 
-clean:
-       rm -f *.o *.go *~ poisson gnuplot.* *.eps
+
+.PHONY: clean
+
+
+#Rule to generate the dependency file. This file is
+#automagically remade whenever needed, i.e. whenever
+#one of the cc-/h-files changed. Make detects whether
+#to remake this file upon inclusion at the bottom
+#of this file.
+#
+#use perl to generate rules for the .go files as well
+#as to make rules not for tria.o and the like, but
+#rather for libnumerics.a(tria.o)
+Makefile.dep: $(cc-files) $(h-files) $(lib-h-files)
+       @echo ============================ Remaking Makefile
+       @perl ../../Make_dep.pl ./Obj $(INCLUDE) $(cc-files) \
+               > Makefile.dep
 
 
+include Makefile.dep
 
-.PHONY: run clean
index 74224e3837c0dab3b9fe686ab842631f1754793a..5c5b53a00c857ed2c1fe1c41749a12c724efcbd1 100644 (file)
@@ -86,6 +86,8 @@ class PoissonProblem : public ProblemBase<dim>,
     
     Function<dim>      *rhs;
     Function<dim>      *boundary_values;
+
+    Boundary<dim>      *boundary;
 };
 
 
index 553a0c36cd0a9fc7f948480bc46179c0b74f98d0..ed039acba3e4071fe8fab197268dd5cf45b02461 100644 (file)
@@ -152,7 +152,7 @@ double RHSPoly<dim>::operator () (const Point<dim> &p) const {
 
 template <int dim>
 PoissonProblem<dim>::PoissonProblem () :
-               tria(0), dof(0), rhs(0), boundary_values(0) {};
+               tria(0), dof(0), rhs(0), boundary_values(0), boundary(0) {};
 
 
 
@@ -181,6 +181,12 @@ void PoissonProblem<dim>::clear () {
       boundary_values = 0;
     };
 
+  if (boundary != 0)
+    {
+      delete boundary;
+      boundary = 0;
+    };
+  
   ProblemBase<dim>::clear ();
 };
 
@@ -245,6 +251,8 @@ bool PoissonProblem<dim>::make_grid (ParameterHandler &prm) {
   switch (test_case) 
     {
       case 1:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            make_zoom_in_grid ();
            break;
       case 2:
@@ -252,26 +260,32 @@ bool PoissonProblem<dim>::make_grid (ParameterHandler &prm) {
                                             // unit radius
       {
            static const Point<dim> origin;
-           static const HyperBallBoundary<dim> boundary(origin, 1.);
+           boundary = new HyperBallBoundary<dim>(origin, 1.);
            tria->create_hyper_ball (origin, 1.);
-           tria->set_boundary (&boundary);
+           tria->set_boundary (boundary);
            break;
       };
       case 3:
                                             // set the boundary function
       {
-           static const CurvedLine<dim> boundary;
+           boundary = new CurvedLine<dim>();
            tria->create_hypercube ();
-           tria->set_boundary (&boundary);
+           tria->set_boundary (boundary);
            break;
       };
       case 4:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            make_random_grid ();
            break;
       case 5:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            tria->create_hypercube ();
            break;
       case 6:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            tria->create_hypercube ();
            tria->refine_global (1);
            for (unsigned int i=0; i<5; ++i)
@@ -282,6 +296,8 @@ bool PoissonProblem<dim>::make_grid (ParameterHandler &prm) {
              };
            break;
       case 7:
+           boundary = new StraightBoundary<dim>();
+           tria->set_boundary (boundary);
            tria->create_hyper_L ();
            break;
       default:
@@ -432,10 +448,12 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
   cout << dof->n_dofs() << " degrees of freedom." << endl;
 
   cout << "    Assembling matrices..." << endl;
-  UpdateFields update_flags = UpdateFields(update_gradients | update_JxW_values);
   ProblemBase<dim>::DirichletBC dirichlet_bc;
   dirichlet_bc[0] = boundary_values;
-  assemble (equation, quadrature, fe, update_flags, dirichlet_bc);
+  assemble (equation, quadrature, fe,
+           UpdateFlags(update_gradients | update_JxW_values |
+                       update_jacobians | update_q_points),
+           dirichlet_bc, *boundary);
 
   cout << "    Solving..." << endl;
   solve ();

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.