From a84838be1691b900da6c24f894a396e695d80b8a Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Mon, 7 Jun 2010 10:08:54 +0000 Subject: [PATCH] Removed MATRIX_OPERATOR and VECTOR_OPERATOR tags, which are now obsolete. --- AMDiS/libtool | 64 +++++++++++++++++++------------------- AMDiS/src/Operator.cc | 14 ++++++++- AMDiS/src/Operator.h | 45 ++++++--------------------- AMDiS/src/ProblemVec.cc | 8 ----- AMDiS/src/ProblemVec.h | 11 ------- AMDiS/src/RobinBC.cc | 14 ++++----- demo/src/ball.cc | 8 ++--- demo/src/bunny.cc | 15 +++------ demo/src/couple.cc | 8 ++--- demo/src/ellipt.cc | 4 +-- demo/src/heat.cc | 8 ++--- demo/src/neumann.cc | 4 +-- demo/src/parallelellipt.cc | 4 +-- demo/src/parallelheat.cc | 17 ++-------- demo/src/parametric.cc | 6 ++-- demo/src/periodic.cc | 4 +-- demo/src/sphere.cc | 11 ++----- demo/src/torus.cc | 6 ++-- demo/src/vecellipt.cc | 11 +++---- demo/src/vecheat.cc | 16 ++++------ 20 files changed, 103 insertions(+), 175 deletions(-) diff --git a/AMDiS/libtool b/AMDiS/libtool index 1880154f..aab8ab33 100755 --- a/AMDiS/libtool +++ b/AMDiS/libtool @@ -30,10 +30,10 @@ # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. -SED="/usr/bin/sed" +SED="/bin/sed" # Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="/usr/bin/sed -e 1s/^X//" +Xsed="/bin/sed -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. @@ -44,7 +44,7 @@ available_tags=" CXX F77" # ### BEGIN LIBTOOL CONFIG -# Libtool was configured on host p2q079: +# Libtool was configured on host NWRW15: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -66,12 +66,12 @@ fast_install=yes # The host system. host_alias= -host=x86_64-unknown-linux-gnu +host=i686-pc-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=x86_64-unknown-linux-gnu +build=i686-pc-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. @@ -82,13 +82,13 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" +LTCC="gcc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" +CC="gcc" # Is the compiler the GNU C compiler? with_gcc=yes @@ -97,7 +97,7 @@ with_gcc=yes EGREP="grep -E" # The linker used to build libraries. -LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" +LD="/usr/bin/ld" # Whether we need hard or soft links. LN_S="ln -s" @@ -171,7 +171,7 @@ dlopen_self=unknown dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. -link_static_flag="" +link_static_flag="-static" # Compiler flag to turn off builtin functions. no_builtin_flag=" -fno-builtin" @@ -325,10 +325,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM link_all_deplibs=unknown # Compile-time system search path for libraries -sys_lib_search_path_spec=" /fastfs/wir/local/lib/x86_64-suse-linux/4.1.2/ /fastfs/wir/local/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/ /usr/lib/gcc/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/ /lib/x86_64-suse-linux/4.1.2/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.1.2/ /usr/lib/../lib64/ /fastfs/wir/local/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../ /lib/ /usr/lib/" +sys_lib_search_path_spec=" /u/witkowski/local/lib/i386-redhat-linux/4.1.2/ /u/witkowski/local/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../ /lib/i386-redhat-linux/4.1.2/ /lib/ /usr/lib/i386-redhat-linux/4.1.2/ /usr/lib/" # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso " +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib /usr/lib/qt4/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` # End: # ### BEGIN LIBTOOL TAG CONFIG: CXX -# Libtool was configured on host p2q079: +# Libtool was configured on host NWRW15: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -6782,12 +6782,12 @@ fast_install=yes # The host system. host_alias= -host=x86_64-unknown-linux-gnu +host=i686-pc-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=x86_64-unknown-linux-gnu +build=i686-pc-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. @@ -6798,13 +6798,13 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" +LTCC="gcc" # LTCC compiler flags. LTCFLAGS="-g -O2" # A language-specific compiler. -CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpiCC" +CC="g++" # Is the compiler the GNU C compiler? with_gcc=yes @@ -6813,7 +6813,7 @@ with_gcc=yes EGREP="grep -E" # The linker used to build libraries. -LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" +LD="/usr/bin/ld" # Whether we need hard or soft links. LN_S="ln -s" @@ -6887,7 +6887,7 @@ dlopen_self=unknown dlopen_self_static=unknown # Compiler flag to prevent dynamic linking. -link_static_flag="" +link_static_flag="-static" # Compiler flag to turn off builtin functions. no_builtin_flag=" -fno-builtin" @@ -6942,11 +6942,11 @@ striplib="strip --strip-unneeded" # Dependencies to place before the objects being linked to create a # shared library. -predep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtbeginS.o" +predep_objects="/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o" # Dependencies to place after the objects being linked to create a # shared library. -postdep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crtn.o" +postdep_objects="/usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o" # Dependencies to place before the objects being linked to create a # shared library. @@ -6954,11 +6954,11 @@ predeps="" # Dependencies to place after the objects being linked to create a # shared library. -postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s" +postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" # The library search path used internally by the compiler when linking # a shared library. -compiler_lib_search_path="-L/licsoft/libraries/openmpi/1.4.1_gnu4.2.4/64bit/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/fastfs/wir/local/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../.." +compiler_lib_search_path="-L/u/witkowski/local/lib -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.." # Method to check whether dependent libraries are shared objects. deplibs_check_method="pass_all" @@ -7038,10 +7038,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM link_all_deplibs=unknown # Compile-time system search path for libraries -sys_lib_search_path_spec=" /fastfs/wir/local/lib/x86_64-suse-linux/4.1.2/ /fastfs/wir/local/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/ /usr/lib/gcc/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/ /lib/x86_64-suse-linux/4.1.2/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.1.2/ /usr/lib/../lib64/ /fastfs/wir/local/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../ /lib/ /usr/lib/" +sys_lib_search_path_spec=" /u/witkowski/local/lib/i386-redhat-linux/4.1.2/ /u/witkowski/local/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../ /lib/i386-redhat-linux/4.1.2/ /lib/ /usr/lib/i386-redhat-linux/4.1.2/ /usr/lib/" # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso " +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib /usr/lib/qt4/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" @@ -7065,7 +7065,7 @@ include_expsyms="" # ### BEGIN LIBTOOL TAG CONFIG: F77 -# Libtool was configured on host p2q079: +# Libtool was configured on host NWRW15: # Shell to use when invoking shell scripts. SHELL="/bin/sh" @@ -7087,12 +7087,12 @@ fast_install=yes # The host system. host_alias= -host=x86_64-unknown-linux-gnu +host=i686-pc-linux-gnu host_os=linux-gnu # The build system. build_alias= -build=x86_64-unknown-linux-gnu +build=i686-pc-linux-gnu build_os=linux-gnu # An echo program that does not interpret backslashes. @@ -7103,7 +7103,7 @@ AR="ar" AR_FLAGS="cru" # A C compiler. -LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc" +LTCC="gcc" # LTCC compiler flags. LTCFLAGS="-g -O2" @@ -7112,13 +7112,13 @@ LTCFLAGS="-g -O2" CC="g77" # Is the compiler the GNU C compiler? -with_gcc= +with_gcc=yes # An ERE matcher. EGREP="grep -E" # The linker used to build libraries. -LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64" +LD="/usr/bin/ld" # Whether we need hard or soft links. LN_S="ln -s" @@ -7346,10 +7346,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM link_all_deplibs=unknown # Compile-time system search path for libraries -sys_lib_search_path_spec=" /fastfs/wir/local/lib/x86_64-suse-linux/3.3.5/ /fastfs/wir/local/lib/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/ /usr/lib/gcc/x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../ /lib/x86_64-suse-linux/3.3.5/ /lib/ /usr/lib/x86_64-suse-linux/3.3.5/ /usr/lib/" +sys_lib_search_path_spec=" /u/witkowski/local/lib/i386-redhat-linux/3.4.6/ /u/witkowski/local/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../i386-redhat-linux/lib/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../ /lib/i386-redhat-linux/3.4.6/ /lib/ /usr/lib/i386-redhat-linux/3.4.6/ /usr/lib/" # Run-time system search path for libraries -sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso " +sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib /usr/lib/qt4/lib " # Fix the shell variable $srcfile for the compiler. fix_srcfile_path="" diff --git a/AMDiS/src/Operator.cc b/AMDiS/src/Operator.cc index 0610b3e2..a330fc46 100644 --- a/AMDiS/src/Operator.cc +++ b/AMDiS/src/Operator.cc @@ -51,9 +51,21 @@ namespace AMDiS { Operator::Operator(Flag operatorType, const FiniteElemSpace *row, const FiniteElemSpace *col) + { + FUNCNAME("Operator::Operator()"); + + std::cout << "\n\n\n============== ERROR MESSAGE ===============\n"; + std::cout << "You make use of the obsolete constructor Operator::Operator(Flag, FiniteElemSpace*, FiniteElemSpace*). Please\n"; + std::cout << "make use of the new constructor Operator::Operatpr(FiniteElemSpace*, FiniteElemSpace*). So you have just to\n"; + std::cout << "remove the MATRIX_OPERATOR/VECTOR_OPERATOR values from the constuctor call.\n\n\n"; + + exit(0); + } + + + Operator::Operator(const FiniteElemSpace *row, const FiniteElemSpace *col) : rowFeSpace(row), colFeSpace(col ? col : row), - type(operatorType), fillFlag(Mesh::CALL_LEAF_EL | Mesh::FILL_COORDS | Mesh::FILL_DET | Mesh::FILL_GRD_LAMBDA), needDualTraverse(false), diff --git a/AMDiS/src/Operator.h b/AMDiS/src/Operator.h index 759580d4..e6fdd87a 100644 --- a/AMDiS/src/Operator.h +++ b/AMDiS/src/Operator.h @@ -43,12 +43,6 @@ namespace AMDiS { * and the right hand side. It consists of four OperatorTerm lists each storing * Terms of a specific order and type. You can define your own Operator by * creating an empty Operator and than adding OperatorTerms to it. - * An Operator can by of type MATRIX_OPERATOR, if it's used to assemble the - * system matrix on the left hand side, or it can be of type VECTOR_OPERATOR, - * if it's used to assemble the right hand side vector. If an Operator gives - * contributions to both sides of the system it is a MATRIX_OPERATOR and a - * VECTOR_OPERATOR in one instance. This allows to efficiently reuse element - * matrices once calculated. * By calling \ref getElementMatrix() or \ref getElementVector() one can * initiate the assembling procedure. Therefor each Operator has its own * Assembler, especially created for this Operator, by the first call of @@ -57,18 +51,16 @@ namespace AMDiS { class Operator { public: - /** \brief - * Constructs an empty Operator of type operatorType for the given - * FiniteElemSpace. - * The type is given by a Flag that can contain the values MATRIX_OPERATOR, - * VECTOR_OPERATOR, or MATRIX_OPERATOR | VECTOR_OPERATOR. This type specifies - * whether the Operator is used on the left hand side, the right hand side, - * or on both sides of the system. - */ + /// Obsolete consructor. Calling this constructor yields an error. Will be removed + /// in on of the next revisions. Operator(Flag operatorType, const FiniteElemSpace *rowFeSpace, const FiniteElemSpace *colFeSpace = NULL); + /// Constructs an empty Operator of type operatorType for the given FiniteElemSpace. + Operator(const FiniteElemSpace *rowFeSpace, + const FiniteElemSpace *colFeSpace = NULL); + /// Destructor. virtual ~Operator() {} @@ -163,18 +155,6 @@ namespace AMDiS { /// Sets \ref assembler void setAssembler(int rank, Assembler *ass); - /// Returns whether this is a matrix operator. - inline const bool isMatrixOperator() - { - return type.isSet(MATRIX_OPERATOR); - } - - /// Returns whether this is a vector operator - inline const bool isVectorOperator() - { - return type.isSet(VECTOR_OPERATOR); - } - /// Sets \ref fillFlag, the flag used for this Operator while mesh traversal. inline void setFillFlag(Flag f) { @@ -359,10 +339,10 @@ namespace AMDiS { } public: - /// Constant type flag for matrix operators + /// Constant type flag for matrix operators. Obsolete, will be removed! static const Flag MATRIX_OPERATOR; - /// Constant type flag for vector operators + /// Constant type flag for vector operators. Obsolete, will be removed! static const Flag VECTOR_OPERATOR; protected: @@ -381,9 +361,6 @@ namespace AMDiS { /// Number of columns in the element matrix int nCol; - /// Type of this Operator. - Flag type; - /// Flag for mesh traversal Flag fillFlag; @@ -410,10 +387,8 @@ namespace AMDiS { std::vector< std::vector<OperatorTerm*> > zeroOrder; /** \brief - * Pointer to the solution of the last timestep. Can be used if the - * Operator is MATRIX_OPERATOR and VECTOR_OPERATOR for a more efficient - * assemblage of the element vector when the element matrix was already - * computed. + * Pointer to the solution of the last timestep. Can be used for a more efficient + * assemblage of the element vector when the element matrix was already computed. */ const DOFVectorBase<double> *uhOld; diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index 6e56072c..296d0bc3 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -1123,10 +1123,6 @@ namespace AMDiS { break; } } - - OperatorPos opPos = {i, j, factor, estFactor, Operator::MATRIX_OPERATOR}; - operators[op].push_back(opPos); - opFlags[op].setFlag(Operator::MATRIX_OPERATOR); } @@ -1156,10 +1152,6 @@ namespace AMDiS { break; } } - - OperatorPos opPos = {i, -1, factor, estFactor, Operator::VECTOR_OPERATOR}; - operators[op].push_back(opPos); - opFlags[op].setFlag(Operator::VECTOR_OPERATOR); } diff --git a/AMDiS/src/ProblemVec.h b/AMDiS/src/ProblemVec.h index 862574a2..bcf7c8e9 100644 --- a/AMDiS/src/ProblemVec.h +++ b/AMDiS/src/ProblemVec.h @@ -38,13 +38,6 @@ namespace AMDiS { - struct OperatorPos - { - int row, col; - double *factor, *estFactor; - Flag operatorType; - }; - class ProblemVec : public ProblemStatBase, public StandardProblemIteration { @@ -619,10 +612,6 @@ namespace AMDiS { */ bool boundaryConditionSet; - std::map<Operator*, std::vector<OperatorPos> > operators; - - std::map<Operator*, Flag> opFlags; - /// If true, AMDiS prints information about the assembling procedure to the screen. bool writeAsmInfo; }; diff --git a/AMDiS/src/RobinBC.cc b/AMDiS/src/RobinBC.cc index 78133776..bbac5f84 100644 --- a/AMDiS/src/RobinBC.cc +++ b/AMDiS/src/RobinBC.cc @@ -25,7 +25,7 @@ namespace AMDiS { coords = new VectorOfFixVecs<DimVec<double> >*[dim+1]; // for all element sides - for (int i = 0; i < dim+1; i++) { + for (int i = 0; i < dim + 1; i++) { coords[i] = new VectorOfFixVecs<DimVec<double> >(dim, dim, DEFAULT_VALUE, DimVec<double>(dim, DEFAULT_VALUE, @@ -38,7 +38,7 @@ namespace AMDiS { } if (j) { - Operator *jOp = new Operator(Operator::VECTOR_OPERATOR, rowFeSpace); + Operator *jOp = new Operator(rowFeSpace); jOp->addZeroOrderTerm(new CoordsAtQP_ZOT(j)); neumannOperators = new DimVec<SurfaceOperator*>(dim, NO_INIT); @@ -49,8 +49,7 @@ namespace AMDiS { } if (alpha) { - Operator *alphaOp = - new Operator(Operator::MATRIX_OPERATOR, rowFeSpace, colFeSpace); + Operator *alphaOp = new Operator(rowFeSpace, colFeSpace); alphaOp->addZeroOrderTerm(new CoordsAtQP_ZOT(alpha)); robinOperators = new DimVec<SurfaceOperator*>(dim, NO_INIT); @@ -92,19 +91,18 @@ namespace AMDiS { } if (j) { - Operator *jOp = new Operator(Operator::VECTOR_OPERATOR, rowFeSpace); + Operator *jOp = new Operator(rowFeSpace); jOp->addZeroOrderTerm(new VecAtQP_ZOT(j, NULL)); neumannOperators = new DimVec<SurfaceOperator*>(dim, NO_INIT); - for (int i=0; i < dim+1; i++) + for (int i = 0; i < dim + 1; i++) (*neumannOperators)[i] = new SurfaceOperator(jOp, *coords[i]); delete jOp; } if (alpha) { - Operator *alphaOp = - new Operator(Operator::MATRIX_OPERATOR, rowFeSpace, colFeSpace); + Operator *alphaOp = new Operator(rowFeSpace, colFeSpace); alphaOp->addZeroOrderTerm(new VecAtQP_ZOT(alpha, NULL)); robinOperators = new DimVec<SurfaceOperator*>(dim, NO_INIT); diff --git a/demo/src/ball.cc b/demo/src/ball.cc index 486d6310..49c8258d 100644 --- a/demo/src/ball.cc +++ b/demo/src/ball.cc @@ -65,18 +65,16 @@ int main(int argc, char* argv[]) AdaptInfo *adaptInfo = new AdaptInfo("ball->adapt"); // === create adapt === - AdaptStationary *adapt = new AdaptStationary("ball->adapt", - &ball, - adaptInfo); + AdaptStationary *adapt = new AdaptStationary("ball->adapt", &ball, adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, ball.getFeSpace()); + Operator matrixOperator(ball.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); ball.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== int degree = ball.getFeSpace()->getBasisFcts()->getDegree(); - Operator rhsOperator(Operator::VECTOR_OPERATOR, ball.getFeSpace()); + Operator rhsOperator(ball.getFeSpace()); rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree))); ball.addVectorOperator(&rhsOperator); diff --git a/demo/src/bunny.cc b/demo/src/bunny.cc index 45d108e0..0185691c 100644 --- a/demo/src/bunny.cc +++ b/demo/src/bunny.cc @@ -49,10 +49,7 @@ int main(int argc, char* argv[]) // ===== create projection ===== WorldVector<double> ballCenter; ballCenter.set(0.0); - new BallProject(1, - VOLUME_PROJECTION, - ballCenter, - 1.0); + new BallProject(1, VOLUME_PROJECTION, ballCenter, 1.0); // ===== create and init the scalar problem ===== ProblemScal bunny("bunny"); @@ -62,19 +59,15 @@ int main(int argc, char* argv[]) AdaptInfo *adaptInfo = new AdaptInfo("bunny->adapt"); // === create adapt === - AdaptStationary *adapt = new AdaptStationary("bunny->adapt", - &bunny, - adaptInfo); + AdaptStationary *adapt = new AdaptStationary("bunny->adapt", &bunny, adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, - bunny.getFeSpace()); + Operator matrixOperator(bunny.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); bunny.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== - Operator rhsOperator(Operator::VECTOR_OPERATOR, - bunny.getFeSpace()); + Operator rhsOperator(bunny.getFeSpace()); int degree = bunny.getFeSpace()->getBasisFcts()->getDegree(); diff --git a/demo/src/couple.cc b/demo/src/couple.cc index 0bf37831..f3181ecd 100644 --- a/demo/src/couple.cc +++ b/demo/src/couple.cc @@ -142,21 +142,21 @@ int main(int argc, char* argv[]) adoptFlag); // ===== create operators for problem1 ===== - Operator matrixOperator1(Operator::MATRIX_OPERATOR, problem1.getFeSpace()); + Operator matrixOperator1(problem1.getFeSpace()); matrixOperator1.addSecondOrderTerm(new Laplace_SOT); problem1.addMatrixOperator(&matrixOperator1); int degree = problem1.getFeSpace()->getBasisFcts()->getDegree(); - Operator rhsOperator1(Operator::VECTOR_OPERATOR, problem1.getFeSpace()); + Operator rhsOperator1(problem1.getFeSpace()); rhsOperator1.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree))); problem1.addVectorOperator(&rhsOperator1); // ===== create operators for problem2 ===== - Operator matrixOperator2(Operator::MATRIX_OPERATOR, problem2.getFeSpace()); + Operator matrixOperator2(problem2.getFeSpace()); matrixOperator2.addZeroOrderTerm(new Simple_ZOT); problem2.addMatrixOperator(&matrixOperator2); - Operator rhsOperator2(Operator::VECTOR_OPERATOR, problem2.getFeSpace()); + Operator rhsOperator2(problem2.getFeSpace()); rhsOperator2.addZeroOrderTerm(new VecAtQP_ZOT(problem1.getSolution(), new Identity(degree))); problem2.addVectorOperator(&rhsOperator2); diff --git a/demo/src/ellipt.cc b/demo/src/ellipt.cc index 4498e05e..93a2d7d1 100644 --- a/demo/src/ellipt.cc +++ b/demo/src/ellipt.cc @@ -66,14 +66,14 @@ int main(int argc, char* argv[]) // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, ellipt.getFeSpace()); + Operator matrixOperator(ellipt.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); ellipt.addMatrixOperator(matrixOperator); // ===== create rhs operator ===== int degree = ellipt.getFeSpace()->getBasisFcts()->getDegree(); - Operator rhsOperator(Operator::VECTOR_OPERATOR, ellipt.getFeSpace()); + Operator rhsOperator(ellipt.getFeSpace()); rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree))); ellipt.addVectorOperator(rhsOperator); diff --git a/demo/src/heat.cc b/demo/src/heat.cc index a605ae8e..a3a42d05 100644 --- a/demo/src/heat.cc +++ b/demo/src/heat.cc @@ -204,8 +204,7 @@ int main(int argc, char** argv) double zero = 0.0; // create laplace - Operator A(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR, - heatSpace.getFeSpace()); + Operator A(heatSpace.getFeSpace()); A.addSecondOrderTerm(new Laplace_SOT); A.setUhOld(heat.getOldSolution()); if (*(heat.getThetaPtr()) != 0.0) @@ -214,15 +213,14 @@ int main(int argc, char** argv) heatSpace.addVectorOperator(A, heat.getTheta1Ptr(), &zero); // create zero order operator - Operator C(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR, - heatSpace.getFeSpace()); + Operator C(heatSpace.getFeSpace()); C.addZeroOrderTerm(new Simple_ZOT); C.setUhOld(heat.getOldSolution()); heatSpace.addMatrixOperator(C, heat.getTau1Ptr(), heat.getTau1Ptr()); heatSpace.addVectorOperator(C, heat.getTau1Ptr(), heat.getTau1Ptr()); // create RHS operator - Operator F(Operator::VECTOR_OPERATOR, heatSpace.getFeSpace()); + Operator F(heatSpace.getFeSpace()); F.addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct)); heatSpace.addVectorOperator(F); diff --git a/demo/src/neumann.cc b/demo/src/neumann.cc index dc134bdd..88990c8f 100644 --- a/demo/src/neumann.cc +++ b/demo/src/neumann.cc @@ -63,13 +63,13 @@ int main(int argc, char* argv[]) adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, neumann.getFeSpace()); + Operator matrixOperator(neumann.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); neumann.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== int degree = neumann.getFeSpace()->getBasisFcts()->getDegree(); - Operator rhsOperator(Operator::VECTOR_OPERATOR, neumann.getFeSpace()); + Operator rhsOperator(neumann.getFeSpace()); rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree))); neumann.addVectorOperator(&rhsOperator); diff --git a/demo/src/parallelellipt.cc b/demo/src/parallelellipt.cc index 8b19ff43..0b3e40e1 100644 --- a/demo/src/parallelellipt.cc +++ b/demo/src/parallelellipt.cc @@ -72,13 +72,13 @@ int main(int argc, char* argv[]) adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, ellipt.getFeSpace()); + Operator matrixOperator(ellipt.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); ellipt.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== int degree = ellipt.getFeSpace()->getBasisFcts()->getDegree(); - Operator rhsOperator(Operator::VECTOR_OPERATOR, ellipt.getFeSpace()); + Operator rhsOperator(ellipt.getFeSpace()); rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree))); ellipt.addVectorOperator(&rhsOperator); diff --git a/demo/src/parallelheat.cc b/demo/src/parallelheat.cc index 9927c532..c0168c47 100644 --- a/demo/src/parallelheat.cc +++ b/demo/src/parallelheat.cc @@ -184,34 +184,23 @@ int main(int argc, char** argv) double zero = 0.0; // create laplace - Operator *A = new Operator(Operator::MATRIX_OPERATOR | - Operator::VECTOR_OPERATOR, - heatSpace->getFeSpace()); - + Operator *A = new Operator(heatSpace->getFeSpace()); A->addSecondOrderTerm(new Laplace_SOT); - A->setUhOld(heat->getOldSolution()); heatSpace->addMatrixOperator(A, &one, &one); // create zero order operator - Operator *C = new Operator(Operator::MATRIX_OPERATOR | - Operator::VECTOR_OPERATOR, - heatSpace->getFeSpace()); - + Operator *C = new Operator(heatSpace->getFeSpace()); C->addZeroOrderTerm(new Simple_ZOT); - C->setUhOld(heat->getOldSolution()); heatSpace->addMatrixOperator(C, heat->getTau1Ptr(), heat->getTau1Ptr()); heatSpace->addVectorOperator(C, heat->getTau1Ptr(), heat->getTau1Ptr()); // create RHS operator - Operator *F = new Operator(Operator::VECTOR_OPERATOR, - heatSpace->getFeSpace()); - + Operator *F = new Operator(heatSpace->getFeSpace()); F->addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct)); - heatSpace->addVectorOperator(F); // ===== create boundary functions ===== diff --git a/demo/src/parametric.cc b/demo/src/parametric.cc index c5097634..47655c2f 100644 --- a/demo/src/parametric.cc +++ b/demo/src/parametric.cc @@ -141,14 +141,12 @@ int main(int argc, char* argv[]) adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, - parametric.getFeSpace()); + Operator matrixOperator(parametric.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); parametric.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== - Operator rhsOperator(Operator::VECTOR_OPERATOR, - parametric.getFeSpace()); + Operator rhsOperator( parametric.getFeSpace()); int degree = parametric.getFeSpace()->getBasisFcts()->getDegree(); diff --git a/demo/src/periodic.cc b/demo/src/periodic.cc index 6330155f..314291d7 100644 --- a/demo/src/periodic.cc +++ b/demo/src/periodic.cc @@ -53,13 +53,13 @@ int main(int argc, char* argv[]) adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, periodic.getFeSpace()); + Operator matrixOperator(periodic.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); periodic.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== int degree = periodic.getFeSpace()->getBasisFcts()->getDegree(); - Operator rhsOperator(Operator::VECTOR_OPERATOR, periodic.getFeSpace()); + Operator rhsOperator(periodic.getFeSpace()); rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree))); periodic.addVectorOperator(&rhsOperator); diff --git a/demo/src/sphere.cc b/demo/src/sphere.cc index 9b83b208..142c9260 100644 --- a/demo/src/sphere.cc +++ b/demo/src/sphere.cc @@ -37,10 +37,7 @@ int main(int argc, char* argv[]) // ===== create projection ===== WorldVector<double> ballCenter; ballCenter.set(0.0); - new BallProject(1, - BOUNDARY_PROJECTION, - ballCenter, - 1.0); + new BallProject(1, BOUNDARY_PROJECTION, ballCenter, 1.0); // ===== create and init the scalar problem ===== ProblemScal sphere("sphere"); @@ -55,14 +52,12 @@ int main(int argc, char* argv[]) adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, - sphere.getFeSpace()); + Operator matrixOperator(sphere.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); sphere.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== - Operator rhsOperator(Operator::VECTOR_OPERATOR, - sphere.getFeSpace()); + Operator rhsOperator(sphere.getFeSpace()); int degree = sphere.getFeSpace()->getBasisFcts()->getDegree(); diff --git a/demo/src/torus.cc b/demo/src/torus.cc index 98bb884b..7e9a20cb 100644 --- a/demo/src/torus.cc +++ b/demo/src/torus.cc @@ -116,14 +116,12 @@ int main(int argc, char* argv[]) adaptInfo); // ===== create matrix operator ===== - Operator matrixOperator(Operator::MATRIX_OPERATOR, - torus.getFeSpace()); + Operator matrixOperator(torus.getFeSpace()); matrixOperator.addSecondOrderTerm(new Laplace_SOT); torus.addMatrixOperator(&matrixOperator); // ===== create rhs operator ===== - Operator rhsOperator(Operator::VECTOR_OPERATOR, - torus.getFeSpace()); + Operator rhsOperator(torus.getFeSpace()); int degree = torus.getFeSpace()->getBasisFcts()->getDegree(); diff --git a/demo/src/vecellipt.cc b/demo/src/vecellipt.cc index 605738ed..8283d78d 100644 --- a/demo/src/vecellipt.cc +++ b/demo/src/vecellipt.cc @@ -64,25 +64,22 @@ int main(int argc, char* argv[]) // ===== create matrix operators ===== - Operator matrixOperator00(Operator::MATRIX_OPERATOR, - vecellipt.getFeSpace(0), vecellipt.getFeSpace(0)); + Operator matrixOperator00(vecellipt.getFeSpace(0), vecellipt.getFeSpace(0)); matrixOperator00.addSecondOrderTerm(new Laplace_SOT); vecellipt.addMatrixOperator(matrixOperator00, 0, 0); - Operator matrixOperator10(Operator::MATRIX_OPERATOR, - vecellipt.getFeSpace(1), vecellipt.getFeSpace(0)); + Operator matrixOperator10(vecellipt.getFeSpace(1), vecellipt.getFeSpace(0)); matrixOperator10.addZeroOrderTerm(new Simple_ZOT); vecellipt.addMatrixOperator(matrixOperator10, 1, 0); - Operator matrixOperator11(Operator::MATRIX_OPERATOR, - vecellipt.getFeSpace(1), vecellipt.getFeSpace(1)); + Operator matrixOperator11(vecellipt.getFeSpace(1), vecellipt.getFeSpace(1)); matrixOperator11.addZeroOrderTerm(new Simple_ZOT(-1.0)); vecellipt.addMatrixOperator(matrixOperator11, 1, 1); // ===== create rhs operator ===== int degree = vecellipt.getFeSpace(0)->getBasisFcts()->getDegree(); - Operator rhsOperator0(Operator::VECTOR_OPERATOR, vecellipt.getFeSpace(0)); + Operator rhsOperator0(vecellipt.getFeSpace(0)); rhsOperator0.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree))); vecellipt.addVectorOperator(rhsOperator0, 0); diff --git a/demo/src/vecheat.cc b/demo/src/vecheat.cc index 3936632e..815c2685 100644 --- a/demo/src/vecheat.cc +++ b/demo/src/vecheat.cc @@ -259,13 +259,11 @@ int main(int argc, char** argv) double zero = 0.0; // create laplace - Operator A00 (Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR, - vecheatSpace.getFeSpace(0), vecheatSpace.getFeSpace(0)); + Operator A00 (vecheatSpace.getFeSpace(0), vecheatSpace.getFeSpace(0)); A00.addSecondOrderTerm(new Laplace_SOT); A00.setUhOld(vecheat.getOldSolution()->getDOFVector(0)); - Operator A11(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR, - vecheatSpace.getFeSpace(1), vecheatSpace.getFeSpace(1)); + Operator A11(vecheatSpace.getFeSpace(1), vecheatSpace.getFeSpace(1)); A11.addSecondOrderTerm(new Laplace_SOT); A11.setUhOld(vecheat.getOldSolution()->getDOFVector(1)); @@ -280,8 +278,7 @@ int main(int argc, char** argv) } // create zero order operator - Operator C00(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR, - vecheatSpace.getFeSpace(0), vecheatSpace.getFeSpace(0)); + Operator C00(vecheatSpace.getFeSpace(0), vecheatSpace.getFeSpace(0)); C00.addZeroOrderTerm(new Simple_ZOT); C00.setUhOld(vecheat.getOldSolution()->getDOFVector(0)); vecheatSpace.addMatrixOperator(C00, 0, 0, @@ -289,8 +286,7 @@ int main(int argc, char** argv) vecheatSpace.addVectorOperator(C00, 0, vecheat.getTau1Ptr(), vecheat.getTau1Ptr()); - Operator C11(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR, - vecheatSpace.getFeSpace(1), vecheatSpace.getFeSpace(1)); + Operator C11(vecheatSpace.getFeSpace(1), vecheatSpace.getFeSpace(1)); C11.addZeroOrderTerm(new Simple_ZOT); C11.setUhOld(vecheat.getOldSolution()->getDOFVector(1)); vecheatSpace.addMatrixOperator(C11, 1, 1, @@ -299,11 +295,11 @@ int main(int argc, char** argv) vecheat.getTau1Ptr(), vecheat.getTau1Ptr()); // create RHS operator - Operator F0(Operator::VECTOR_OPERATOR, vecheatSpace.getFeSpace(0)); + Operator F0(vecheatSpace.getFeSpace(0)); F0.addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct0)); vecheatSpace.addVectorOperator(F0, 0); - Operator F1 = Operator(Operator::VECTOR_OPERATOR, vecheatSpace.getFeSpace(1)); + Operator F1 = Operator(vecheatSpace.getFeSpace(1)); F1.addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct1)); vecheatSpace.addVectorOperator(F1, 1); -- GitLab