Commit 02d0cc3a authored by Naumann, Andreas's avatar Naumann, Andreas
Browse files

CreatorMap: pollutionError added

AdaptInfo: test-cout added (could be deleted)
ConditionalEstimator: should run over all elements, but there's an error (adapts only one times)
parent 50c66bbc
# Makefile.in generated by automake 1.9.6 from Makefile.am.
# Makefile.in generated by automake 1.10.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
......@@ -13,15 +13,11 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
......@@ -35,27 +31,30 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
install-sh ltmain.sh missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno configure.status.lineno
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
......@@ -71,14 +70,6 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMDIS_DEBUG_FALSE = @AMDIS_DEBUG_FALSE@
AMDIS_DEBUG_TRUE = @AMDIS_DEBUG_TRUE@
AMDIS_INTEL_FALSE = @AMDIS_INTEL_FALSE@
AMDIS_INTEL_TRUE = @AMDIS_INTEL_TRUE@
AMDIS_OPENMP_FALSE = @AMDIS_OPENMP_FALSE@
AMDIS_OPENMP_TRUE = @AMDIS_OPENMP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
......@@ -97,40 +88,40 @@ CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DUNE_DIR = @DUNE_DIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_BOOST_FALSE = @ENABLE_BOOST_FALSE@
ENABLE_BOOST_TRUE = @ENABLE_BOOST_TRUE@
ENABLE_DUNE_FALSE = @ENABLE_DUNE_FALSE@
ENABLE_DUNE_TRUE = @ENABLE_DUNE_TRUE@
ENABLE_MKL_FALSE = @ENABLE_MKL_FALSE@
ENABLE_MKL_TRUE = @ENABLE_MKL_TRUE@
ENABLE_UMFPACK_FALSE = @ENABLE_UMFPACK_FALSE@
ENABLE_UMFPACK_TRUE = @ENABLE_UMFPACK_TRUE@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
FGREP = @FGREP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_DIR = @MPI_DIR@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OPENMP_FLAG = @OPENMP_FLAG@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......@@ -144,21 +135,14 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_PARALLEL_AMDIS_FALSE = @USE_PARALLEL_AMDIS_FALSE@
USE_PARALLEL_AMDIS_TRUE = @USE_PARALLEL_AMDIS_TRUE@
USE_PARALLEL_DOMAIN_AMDIS_FALSE = @USE_PARALLEL_DOMAIN_AMDIS_FALSE@
USE_PARALLEL_DOMAIN_AMDIS_TRUE = @USE_PARALLEL_DOMAIN_AMDIS_TRUE@
VERSION = @VERSION@
ac_ct_AR = @ac_ct_AR@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
......@@ -170,28 +154,41 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = lib bin
EXTRA_DIST = demo
all: all-recursive
......@@ -238,8 +235,7 @@ clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
-rm -f libtool config.lt
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
......@@ -272,8 +268,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
......@@ -317,8 +312,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
......@@ -343,8 +338,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
......@@ -354,13 +349,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
......@@ -375,23 +369,22 @@ distclean-tags:
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
test -d $(distdir) || mkdir $(distdir)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
......@@ -405,7 +398,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(mkdir_p) "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
......@@ -413,6 +406,8 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
......@@ -420,7 +415,7 @@ distdir: $(DISTFILES)
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
......@@ -430,6 +425,10 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
......@@ -456,6 +455,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
......@@ -495,7 +496,7 @@ distcheck: dist
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
......@@ -565,12 +566,20 @@ info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
......@@ -591,24 +600,26 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-info-am
uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-libtool clean-recursive \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-shar dist-tarZ dist-zip distcheck distclean \
distclean-generic distclean-libtool distclean-recursive \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
tags tags-recursive uninstall uninstall-am uninstall-info-am
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \
distclean distclean-generic distclean-libtool distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -195,8 +195,11 @@ namespace AMDiS {
{
int size = scalContents.getSize();
for (int i = 0; i < size; i++)
{
std::cout<<"est_sum:"<<scalContents[i]->est_sum<<" spaceTol:"<<scalContents[i]->spaceTolerance<<std::endl;
if (!(scalContents[i]->est_sum < scalContents[i]->spaceTolerance))
return false;
}
return true;
}
......
......@@ -27,17 +27,17 @@ namespace AMDiS {
(elInfo->getElement()->getElementData(PARTITION_ED));
TEST_EXIT_DBG(elInfo->getElement()->isLeaf())("element not leaf\n");
TEST_EXIT_DBG(elData)("no partitoin data on leaf element %d (rank %d)\n",
TEST_EXIT_DBG(elData)("no partition data on leaf element %d (rank %d)\n",
elInfo->getElement()->getIndex(),
MPI::COMM_WORLD.Get_rank());
PartitionStatus status = elData->getPartitionStatus();
if(status == IN || status == OVERLAP) {
//if(status == IN || status == OVERLAP) {
decoratedEstimator_->estimateElement(elInfo);
} else {
elInfo->getElement()->setMark(0);
}
//} else {
// elInfo->getElement()->setMark(0);
//}
elInfo = stack.traverseNext(elInfo);
}
......@@ -46,10 +46,10 @@ namespace AMDiS {
PartitionElementData *elData = dynamic_cast<PartitionElementData*>
(elInfo->getElement()->getElementData(PARTITION_ED));
PartitionStatus status = elData->getPartitionStatus();
if(status == IN) {
//if(status == IN) {
elementCount_++;
partition_sum += elInfo->getElement()->getEstimation(row_);
}
//}
elInfo = stack.traverseNext(elInfo);
}
......
......@@ -8,6 +8,7 @@
#include "Estimator.h"
#include "RecoveryEstimator.h"
#include "ResidualEstimator.h"
#include "pollutionError_konvex.h"
#include "LeafData.h"
#include "SurfaceRegion_ED.h"
#include "DOFMatrix.h"
......@@ -99,6 +100,9 @@ namespace AMDiS {
creator = new RecoveryEstimator::Creator;
addCreator("recovery", creator);
creator = new PollutionErrorKonvex::Creator;
addCreator("pollution2d",creator);
}
template<>
......
......@@ -1355,7 +1355,7 @@ namespace AMDiS {
#ifdef DEBUG
//test mesh
TraverseStack testStack;
/*TraverseStack testStack;
ElInfo* testElInfo = testStack.traverseFirst(mesh, -1, Mesh::CALL_EVERY_EL_PREORDER);
while(testElInfo)
{
......@@ -1367,7 +1367,7 @@ namespace AMDiS {
std::cout<<"none";
std::cout<<"\t"<<testElement->getIndex()<<"\t"<<testElInfo->getLevel()<<std::endl;
testElInfo=testStack.traverseNext(testElInfo);
}
}*/
//end test
#endif
......
#include "pollutionError_konvex.h"
#include "mpi.h"
namespace AMDiS
{
bool AMDiS::PollutionErrorKonvex::BoundaryTraverseStack::proofConditions(ElInfo *elInfo)
{
if(elInfo==NULL) return false;
Element *curEl=elInfo->getElement();
PartitionElementData *ped=static_cast<PartitionElementData*>(curEl->getElementData(PARTITION_ED));
TEST_EXIT_DBG(ped!=NULL)("No PartitionElementData found");
if(ped!=NULL && ped->getPartitionStatus()==OVERLAP)
{
//check neighbour
int nrNeigh=curEl->getGeo(NEIGH);
for(int i=0;i<nrNeigh;i++)
{
Element* curNeigh=elInfo->getNeighbour(i);
if(curNeigh!=NULL)
{
ped=static_cast<PartitionElementData*>(curNeigh->getElementData(PARTITION_ED));
if(ped!=NULL && ped->getPartitionStatus()==ps)
{
return true;
}
}
}
}
return false;
}
ElInfo * AMDiS::PollutionErrorKonvex::BoundaryTraverseStack::traverseFirst(Mesh *mesh,PartitionStatus ps_)
{
FUNCNAME("PollutionErrorKonvex::BoundaryTraverseStack::traverseFirst");
ElInfo *swap=TraverseStack::traverseFirst(mesh,-1,
Mesh::CALL_LEAF_EL | Mesh::FILL_COORDS | Mesh::FILL_NEIGH);
ps=ps_;
if(swap!=NULL && !proofConditions(swap))
swap=traverseNext(swap);
return swap;
}
ElInfo * AMDiS::PollutionErrorKonvex::BoundaryTraverseStack::traverseNext(ElInfo *old)
{
FUNCNAME("PollutionErrorKonvex::BoundaryTraverseStack::traverseNext");
ElInfo *swap=TraverseStack::traverseNext(old);
while(swap!=NULL && !proofConditions(swap))
{
swap=TraverseStack::traverseNext(swap);
}
return swap;
}
PollutionErrorKonvex::PollutionErrorKonvex(std::string name, int r):ResidualEstimator(name,r)
{
FUNCNAME("PollutionErrorKonvexEstimator::PollutionErrorKonvexEstimator()");
GET_PARAMETER(0,name+"->C1p","%f",&C1p);
GET_PARAMETER(0,name+"->C2p","%f",&C2p);
/*C1=sqrt(C1);
C2=sqrt(C2);*/
}
void PollutionErrorKonvex::init(double timestep)
{
FUNCNAME("PollutionErrorKonvex::init");
ResidualEstimator::init(timestep);
//set the distance (ie. width of the overlapped area)
//approximate the overlapped area as rectangle. then set d=max(edge1, edge2)
//retrieve all elements at the boundary overlapped -> out
BoundaryTraverseStack* bts=new BoundaryTraverseStack();
ElInfo* curEl=bts->traverseFirst(mesh,OUT);
FixVec<WorldVector<double>, VERTEX> &fv=curEl->getCoords();
//std::cout<<"got fixvec"<<std::endl;
WorldVector<double>* koordinaten=fv.begin();
double xomin,xomax;
xomin=xomax=(*koordinaten)[0];
double yomin,yomax;
yomin=yomax=(*koordinaten)[1];
for(;koordinaten!=fv.end();koordinaten++)
{
xomin=min(xomin,(*koordinaten)[0]);
xomax=max(xomax,(*koordinaten)[0]);
yomin=min(yomin,(*koordinaten)[1]);
yomax=max(yomax,(*koordinaten)[1]);
}
curEl=bts->traverseNext(curEl);
//find xmax,xmin,ymax and ymin
while(curEl!=NULL)
{
fv=curEl->getCoords();
for(koordinaten=fv.begin();koordinaten!=fv.end();koordinaten++)
{
xomin=min(xomin,(*koordinaten)[0]);
xomax=max(xomax,(*koordinaten)[0]);
yomin=min(yomin,(*koordinaten)[1]);
yomax=max(yomax,(*koordinaten)[1]);
}
curEl=bts->traverseNext(curEl);
}
//retrieve all elements at the boundary overlapped -> in
curEl=bts->traverseFirst(mesh,OUT);
fv=curEl->getCoords();
koordinaten=fv.begin();
double ximin,ximax;
ximin=ximax=(*koordinaten)[0];
double yimin,yimax;
yimin=yimax=(*koordinaten)[1];
for(;koordinaten!=fv.end();koordinaten++)
{
ximin=min(ximin,(*koordinaten)[0]);