Commit dd8ffdf7 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* big update

parent 6020c0d7
...@@ -84,6 +84,7 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \ ...@@ -84,6 +84,7 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \
$(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \ $(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \
$(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \ $(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \
$(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \ $(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \
$(SOURCE_DIR)/ComponentTraverseInfo.h $(SOURCE_DIR)/ComponentTraverseInfo.cc \
$(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh $(SOURCE_DIR)/CreatorMap.cc \ $(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh $(SOURCE_DIR)/CreatorMap.cc \
$(SOURCE_DIR)/CreatorInterface.h \ $(SOURCE_DIR)/CreatorInterface.h \
$(SOURCE_DIR)/ElementFunction.h \ $(SOURCE_DIR)/ElementFunction.h \
......
...@@ -112,6 +112,8 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \ ...@@ -112,6 +112,8 @@ am__libamdis_la_SOURCES_DIST = $(PARALLEL_DIR)/ConditionalEstimator.h \
$(SOURCE_DIR)/ElementPartition_ED.h \ $(SOURCE_DIR)/ElementPartition_ED.h \
$(SOURCE_DIR)/SurfacePartition_ED.h \ $(SOURCE_DIR)/SurfacePartition_ED.h \
$(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \ $(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \
$(SOURCE_DIR)/ComponentTraverseInfo.h \
$(SOURCE_DIR)/ComponentTraverseInfo.cc \
$(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh \ $(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh \
$(SOURCE_DIR)/CreatorMap.cc $(SOURCE_DIR)/CreatorInterface.h \ $(SOURCE_DIR)/CreatorMap.cc $(SOURCE_DIR)/CreatorInterface.h \
$(SOURCE_DIR)/ElementFunction.h \ $(SOURCE_DIR)/ElementFunction.h \
...@@ -270,7 +272,8 @@ am_libamdis_la_OBJECTS = $(am__objects_1) \ ...@@ -270,7 +272,8 @@ am_libamdis_la_OBJECTS = $(am__objects_1) \
libamdis_la-StandardProblemIteration.lo \ libamdis_la-StandardProblemIteration.lo \
libamdis_la-ProblemScal.lo libamdis_la-ProblemVec.lo \ libamdis_la-ProblemScal.lo libamdis_la-ProblemVec.lo \
libamdis_la-DualTraverse.lo libamdis_la-ElementData.lo \ libamdis_la-DualTraverse.lo libamdis_la-ElementData.lo \
libamdis_la-CreatorMap.lo libamdis_la-ProblemInterpolScal.lo \ libamdis_la-ComponentTraverseInfo.lo libamdis_la-CreatorMap.lo \
libamdis_la-ProblemInterpolScal.lo \
libamdis_la-ProblemInterpolVec.lo libamdis_la-MacroReader.lo \ libamdis_la-ProblemInterpolVec.lo libamdis_la-MacroReader.lo \
libamdis_la-ValueReader.lo libamdis_la-Projection.lo \ libamdis_la-ValueReader.lo libamdis_la-Projection.lo \
libamdis_la-SubAssembler.lo libamdis_la-ZeroOrderAssembler.lo \ libamdis_la-SubAssembler.lo libamdis_la-ZeroOrderAssembler.lo \
...@@ -525,6 +528,7 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \ ...@@ -525,6 +528,7 @@ $(SOURCE_DIR)/ProblemVec.h $(SOURCE_DIR)/ProblemVec.cc \
$(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \ $(SOURCE_DIR)/DualTraverse.h $(SOURCE_DIR)/DualTraverse.cc \
$(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \ $(SOURCE_DIR)/ElementPartition_ED.h $(SOURCE_DIR)/SurfacePartition_ED.h \
$(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \ $(SOURCE_DIR)/ElementData.h $(SOURCE_DIR)/ElementData.cc \
$(SOURCE_DIR)/ComponentTraverseInfo.h $(SOURCE_DIR)/ComponentTraverseInfo.cc \
$(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh $(SOURCE_DIR)/CreatorMap.cc \ $(SOURCE_DIR)/CreatorMap.h $(SOURCE_DIR)/CreatorMap.hh $(SOURCE_DIR)/CreatorMap.cc \
$(SOURCE_DIR)/CreatorInterface.h \ $(SOURCE_DIR)/CreatorInterface.h \
$(SOURCE_DIR)/ElementFunction.h \ $(SOURCE_DIR)/ElementFunction.h \
...@@ -783,6 +787,7 @@ distclean-compile: ...@@ -783,6 +787,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CoarseningManager1d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CoarseningManager1d.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CoarseningManager2d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CoarseningManager2d.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CoarseningManager3d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CoarseningManager3d.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ComponentTraverseInfo.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ConditionalEstimator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ConditionalEstimator.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CreatorMap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-CreatorMap.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-DOFAdmin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-DOFAdmin.Plo@am__quote@
...@@ -1082,6 +1087,13 @@ libamdis_la-ElementData.lo: $(SOURCE_DIR)/ElementData.cc ...@@ -1082,6 +1087,13 @@ libamdis_la-ElementData.lo: $(SOURCE_DIR)/ElementData.cc
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-ElementData.lo `test -f '$(SOURCE_DIR)/ElementData.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/ElementData.cc @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-ElementData.lo `test -f '$(SOURCE_DIR)/ElementData.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/ElementData.cc
libamdis_la-ComponentTraverseInfo.lo: $(SOURCE_DIR)/ComponentTraverseInfo.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -MT libamdis_la-ComponentTraverseInfo.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-ComponentTraverseInfo.Tpo" -c -o libamdis_la-ComponentTraverseInfo.lo `test -f '$(SOURCE_DIR)/ComponentTraverseInfo.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/ComponentTraverseInfo.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-ComponentTraverseInfo.Tpo" "$(DEPDIR)/libamdis_la-ComponentTraverseInfo.Plo"; else rm -f "$(DEPDIR)/libamdis_la-ComponentTraverseInfo.Tpo"; exit 1; fi
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(SOURCE_DIR)/ComponentTraverseInfo.cc' object='libamdis_la-ComponentTraverseInfo.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-ComponentTraverseInfo.lo `test -f '$(SOURCE_DIR)/ComponentTraverseInfo.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/ComponentTraverseInfo.cc
libamdis_la-CreatorMap.lo: $(SOURCE_DIR)/CreatorMap.cc libamdis_la-CreatorMap.lo: $(SOURCE_DIR)/CreatorMap.cc
@am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -MT libamdis_la-CreatorMap.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-CreatorMap.Tpo" -c -o libamdis_la-CreatorMap.lo `test -f '$(SOURCE_DIR)/CreatorMap.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/CreatorMap.cc; \ @am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -MT libamdis_la-CreatorMap.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-CreatorMap.Tpo" -c -o libamdis_la-CreatorMap.lo `test -f '$(SOURCE_DIR)/CreatorMap.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/CreatorMap.cc; \
@am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-CreatorMap.Tpo" "$(DEPDIR)/libamdis_la-CreatorMap.Plo"; else rm -f "$(DEPDIR)/libamdis_la-CreatorMap.Tpo"; exit 1; fi @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libamdis_la-CreatorMap.Tpo" "$(DEPDIR)/libamdis_la-CreatorMap.Plo"; else rm -f "$(DEPDIR)/libamdis_la-CreatorMap.Tpo"; exit 1; fi
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include "MemoryManager.h" #include "MemoryManager.h"
#include "MemoryPool.h" #include "MemoryPool.h"
#include "Mesh.h" #include "Mesh.h"
#include "ComponentTraverseInfo.h"
#include "Newton.h" #include "Newton.h"
#include "NewtonS.h" #include "NewtonS.h"
#include "NonLinSolver.h" #include "NonLinSolver.h"
......
...@@ -51,16 +51,16 @@ namespace AMDiS { ...@@ -51,16 +51,16 @@ namespace AMDiS {
*/ */
AbstractFunction(int degree = 0) : AbstractFunction(int degree = 0) :
degree_(degree) degree_(degree)
{}; {}
virtual ~AbstractFunction() {}; virtual ~AbstractFunction() {}
/** \brief /** \brief
* Returns \ref degree_. * Returns \ref degree_.
*/ */
inline int getDegree() const { inline int getDegree() const {
return degree_; return degree_;
}; }
/** \brief /** \brief
* Deligates the evaluation to overriden method f. * Deligates the evaluation to overriden method f.
......
...@@ -34,30 +34,24 @@ namespace AMDiS { ...@@ -34,30 +34,24 @@ namespace AMDiS {
// ===== class AdaptBase ====================================================== // ===== class AdaptBase ======================================================
// ============================================================================ // ============================================================================
/** \brief /// Interface for adaption loops.
* Interface for adaption loops.
*/
class AdaptBase class AdaptBase
{ {
public: public:
/** \brief /// Constructor
* Constructor AdaptBase(const std::string& sname,
*/
AdaptBase(const std::string& name,
ProblemIterationInterface *problemIteration, ProblemIterationInterface *problemIteration,
AdaptInfo *adapt, AdaptInfo *adapt,
ProblemTimeInterface *problemTime = NULL, ProblemTimeInterface *problemTime = NULL,
AdaptInfo *initialAdaptInfo = NULL) AdaptInfo *initialAdaptInfo = NULL)
: name_(name), : name(sname),
problemIteration_(problemIteration), problemIteration_(problemIteration),
adaptInfo(adapt), adaptInfo(adapt),
problemTime_(problemTime), problemTime_(problemTime),
initialAdaptInfo_(initialAdaptInfo) initialAdaptInfo_(initialAdaptInfo)
{} {}
/** \brief /// Destructor
* Destructor
*/
virtual ~AdaptBase() {} virtual ~AdaptBase() {}
/** \brief /** \brief
...@@ -66,68 +60,52 @@ namespace AMDiS { ...@@ -66,68 +60,52 @@ namespace AMDiS {
*/ */
virtual int adapt() = 0; virtual int adapt() = 0;
/** \brief /// Returns \ref name
* Returns \ref name_
*/
inline const std::string& getName() const { inline const std::string& getName() const {
return name_; return name;
} }
/** \brief /// Returns \ref problemIteration_
* Returns \ref problemIteration_
*/
inline ProblemIterationInterface *getProblemIteration() { inline ProblemIterationInterface *getProblemIteration() {
return problemIteration_; return problemIteration_;
} }
///
inline void setProblemIteration(ProblemIterationInterface *pii) { inline void setProblemIteration(ProblemIterationInterface *pii) {
problemIteration_ = pii; problemIteration_ = pii;
} }
/** \brief /// Returns \ref adaptInfo
* Returns \ref adaptInfo
*/
inline AdaptInfo *getAdaptInfo() { inline AdaptInfo *getAdaptInfo() {
return adaptInfo; return adaptInfo;
} }
/** \brief /// Returns \ref problemTime_
* Returns \ref problemTime_
*/
inline ProblemTimeInterface *getProblemTime() { inline ProblemTimeInterface *getProblemTime() {
return problemTime_; return problemTime_;
} }
///
inline void setProblemTime(ProblemTimeInterface *pti) { inline void setProblemTime(ProblemTimeInterface *pti) {
problemTime_ = pti; problemTime_ = pti;
} }
/** \brief /// Returns \ref initialAdaptInfo_
* Returns \ref initialAdaptInfo_
*/
inline AdaptInfo *getInitialAdaptInfo() { inline AdaptInfo *getInitialAdaptInfo() {
return initialAdaptInfo_; return initialAdaptInfo_;
} }
protected: protected:
/** \brief /// Name of the adaption loop
* Name of the adaption loop std::string name;
*/
std::string name_;
/** \brief /// Problem iteration interface
* Problem iteration interface
*/
ProblemIterationInterface *problemIteration_; ProblemIterationInterface *problemIteration_;
/** \brief /// Main adapt info
* Main adapt info
*/
AdaptInfo *adaptInfo; AdaptInfo *adaptInfo;
/** \brief /// problem time interface
* problem time interface
*/
ProblemTimeInterface *problemTime_; ProblemTimeInterface *problemTime_;
/** \brief /** \brief
...@@ -136,9 +114,7 @@ namespace AMDiS { ...@@ -136,9 +114,7 @@ namespace AMDiS {
*/ */
AdaptInfo *initialAdaptInfo_; AdaptInfo *initialAdaptInfo_;
/** \brief /// Info level
* Info level
*/
static int info_; static int info_;
}; };
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
namespace AMDiS { namespace AMDiS {
AdaptInstationary::AdaptInstationary(const char *name, AdaptInstationary::AdaptInstationary(const std::string &name,
ProblemIterationInterface *problemStat, ProblemIterationInterface *problemStat,
AdaptInfo *info, AdaptInfo *info,
ProblemTimeInterface *problemInstat, ProblemTimeInterface *problemInstat,
...@@ -20,7 +20,7 @@ namespace AMDiS { ...@@ -20,7 +20,7 @@ namespace AMDiS {
{ {
FUNCNAME("AdaptInstationary::AdaptInstationary()"); FUNCNAME("AdaptInstationary::AdaptInstationary()");
initialize(name_); initialize(name);
fixedTimestep_ = (info->getMinTimestep() == info->getMaxTimestep()); fixedTimestep_ = (info->getMinTimestep() == info->getMaxTimestep());
......
...@@ -54,7 +54,7 @@ namespace AMDiS { ...@@ -54,7 +54,7 @@ namespace AMDiS {
* Creates a AdaptInstationary object with the given name for the time * Creates a AdaptInstationary object with the given name for the time
* dependent problem problemInstat. * dependent problem problemInstat.
*/ */
AdaptInstationary(const char *name_, AdaptInstationary(const std::string &name,
ProblemIterationInterface *problemStat, ProblemIterationInterface *problemStat,
AdaptInfo *info, AdaptInfo *info,
ProblemTimeInterface *problemInstat, ProblemTimeInterface *problemInstat,
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
namespace AMDiS { namespace AMDiS {
AdaptStationary::AdaptStationary(const char *name, AdaptStationary::AdaptStationary(const std::string &name,
ProblemIterationInterface *prob, ProblemIterationInterface *prob,
AdaptInfo *info) AdaptInfo *info)
: AdaptBase(name, prob, info) : AdaptBase(name, prob, info)
{ {
initialize(); initialize();
...@@ -49,7 +49,7 @@ namespace AMDiS { ...@@ -49,7 +49,7 @@ namespace AMDiS {
{ {
FUNCNAME("AdaptStationary::initialize()"); FUNCNAME("AdaptStationary::initialize()");
GET_PARAMETER(0, name_ + "->info", "%d", &info_); GET_PARAMETER(0, name + "->info", "%d", &info_);
} }
} }
...@@ -58,9 +58,9 @@ namespace AMDiS { ...@@ -58,9 +58,9 @@ namespace AMDiS {
/** \brief /** \brief
* Creates a AdaptStationary object with given name. * Creates a AdaptStationary object with given name.
*/ */
AdaptStationary(const char *name, AdaptStationary(const std::string &name,
ProblemIterationInterface *prob, ProblemIterationInterface *prob,
AdaptInfo *info); AdaptInfo *info);
/** \brief /** \brief
* Destructor * Destructor
......
...@@ -36,20 +36,18 @@ namespace AMDiS { ...@@ -36,20 +36,18 @@ namespace AMDiS {
{ {
FUNCNAME("Assembler::calculateElementMatrix()"); FUNCNAME("Assembler::calculateElementMatrix()");
if (remember && ((factor != 1.0) || (operat->uhOld))) { if (remember && ((factor != 1.0) || (operat->uhOld))) {
rememberElMat = true; rememberElMat = true;
} }
if (rememberElMat && !elementMatrix) if (rememberElMat && !elementMatrix)
elementMatrix = NEW ElementMatrix(nRow, nCol); elementMatrix = NEW ElementMatrix(nRow, nCol);
Element *el = elInfo->getElement(); Element *el = elInfo->getElement();
checkForNewTraverse(); checkForNewTraverse();
checkQuadratures(); checkQuadratures();
if ((el != lastMatEl && el != lastVecEl) || !operat->isOptimized()) { if ((el != lastMatEl && el != lastVecEl) || !operat->isOptimized()) {
initElement(elInfo); initElement(elInfo);
} }
...@@ -65,7 +63,7 @@ namespace AMDiS { ...@@ -65,7 +63,7 @@ namespace AMDiS {
return; return;
} }
} }
ElementMatrix *mat = rememberElMat ? elementMatrix : userMat; ElementMatrix *mat = rememberElMat ? elementMatrix : userMat;
if (secondOrderAssembler) if (secondOrderAssembler)
...@@ -77,9 +75,10 @@ namespace AMDiS { ...@@ -77,9 +75,10 @@ namespace AMDiS {
if (zeroOrderAssembler) if (zeroOrderAssembler)
zeroOrderAssembler->calculateElementMatrix(elInfo, mat); zeroOrderAssembler->calculateElementMatrix(elInfo, mat);
if (rememberElMat && userMat) { if (rememberElMat && userMat) {
axpy(factor, *elementMatrix, *userMat); axpy(factor, *elementMatrix, *userMat);
} }
} }
void Assembler::calculateElementMatrix(const ElInfo *rowElInfo, void Assembler::calculateElementMatrix(const ElInfo *rowElInfo,
...@@ -98,7 +97,7 @@ namespace AMDiS { ...@@ -98,7 +97,7 @@ namespace AMDiS {
if (rememberElMat && !elementMatrix) if (rememberElMat && !elementMatrix)
elementMatrix = NEW ElementMatrix(nRow, nCol); elementMatrix = NEW ElementMatrix(nRow, nCol);
Element *el = rowElInfo->getElement(); Element *el = smallElInfo->getElement();
// checkForNewTraverse(); // checkForNewTraverse();
...@@ -107,7 +106,7 @@ namespace AMDiS { ...@@ -107,7 +106,7 @@ namespace AMDiS {
checkQuadratures(); checkQuadratures();
if ((el != lastMatEl && el != lastVecEl) || !operat->isOptimized()) { if ((el != lastMatEl && el != lastVecEl) || !operat->isOptimized()) {
initElement(rowElInfo); initElement(smallElInfo, largeElInfo);
} }
if (el != lastMatEl || !operat->isOptimized()) { if (el != lastMatEl || !operat->isOptimized()) {
...@@ -124,26 +123,31 @@ namespace AMDiS { ...@@ -124,26 +123,31 @@ namespace AMDiS {
ElementMatrix *mat = rememberElMat ? elementMatrix : userMat; ElementMatrix *mat = rememberElMat ? elementMatrix : userMat;
if (secondOrderAssembler) { if (smallElInfo->getLevel() == largeElInfo->getLevel()) {
secondOrderAssembler->calculateElementMatrix(rowElInfo, colElInfo, if (secondOrderAssembler)
smallElInfo, largeElInfo, mat); secondOrderAssembler->calculateElementMatrix(smallElInfo, mat);
} if (firstOrderAssemblerGrdPsi)
firstOrderAssemblerGrdPsi->calculateElementMatrix(smallElInfo, mat);
if (firstOrderAssemblerGrdPsi) { if (firstOrderAssemblerGrdPhi)
firstOrderAssemblerGrdPsi->calculateElementMatrix(rowElInfo, colElInfo, firstOrderAssemblerGrdPhi->calculateElementMatrix(smallElInfo, mat);
smallElInfo, largeElInfo, mat); if (zeroOrderAssembler)
} zeroOrderAssembler->calculateElementMatrix(smallElInfo, mat);
} else {
if (firstOrderAssemblerGrdPhi) { if (secondOrderAssembler)
firstOrderAssemblerGrdPhi->calculateElementMatrix(rowElInfo, colElInfo, secondOrderAssembler->calculateElementMatrix(rowElInfo, colElInfo,
smallElInfo, largeElInfo, mat); smallElInfo, largeElInfo, mat);
} if (firstOrderAssemblerGrdPsi)
firstOrderAssemblerGrdPsi->calculateElementMatrix(rowElInfo, colElInfo,
if (zeroOrderAssembler) { smallElInfo, largeElInfo, mat);
zeroOrderAssembler->calculateElementMatrix(rowElInfo, colElInfo, if (firstOrderAssemblerGrdPhi)
firstOrderAssemblerGrdPhi->calculateElementMatrix(rowElInfo, colElInfo,
smallElInfo, largeElInfo, mat);
if (zeroOrderAssembler)
zeroOrderAssembler->calculateElementMatrix(rowElInfo, colElInfo,
smallElInfo, largeElInfo, mat); smallElInfo, largeElInfo, mat);
} }
if (rememberElMat && userMat) { if (rememberElMat && userMat) {
axpy(factor, *elementMatrix, *userMat); axpy(factor, *elementMatrix, *userMat);
} }
...@@ -201,6 +205,71 @@ namespace AMDiS { ...@@ -201,6 +205,71 @@ namespace AMDiS {
} }
} }
void Assembler::calculateElementVector(const ElInfo *mainElInfo,
const ElInfo *auxElInfo,
const ElInfo *smallElInfo,
const ElInfo *largeElInfo,
ElementVector *userVec,
double factor)
{
FUNCNAME("Assembler::calculateElementVector()");
if (remember && factor != 1.0) {
rememberElVec = true;
}
if (rememberElVec && !elementVector) {
elementVector = NEW ElementVector(nRow);
}
Element *el = mainElInfo->getElement();
// checkForNewTraverse();
checkQuadratures();
if ((el != lastMatEl && el != lastVecEl) || !operat->isOptimized()) {
initElement(auxElInfo);
}
if (el != lastVecEl || !operat->isOptimized()) {
if (rememberElVec) {
elementVector->set(0.0);
}
lastVecEl = el;
} else {
if (rememberElVec) {
axpy(factor, *elementVector, *userVec);
return;
}
}
ElementVector *vec = rememberElVec ? elementVector : userVec;
if (operat->uhOld && remember) {
if (smallElInfo->getLevel() == largeElInfo->getLevel()) {
matVecAssemble(auxElInfo, vec);
} else {
matVecAssemble(mainElInfo, auxElInfo, smallElInfo, largeElInfo, vec);
}
if (rememberElVec) {
axpy(factor, *elementVector, *userVec);
}
return;
}
ERROR_EXIT("Not yet implemented!\n");
// if (firstOrderAssemblerGrdPsi) {
// firstOrderAssemblerGrdPsi->calculateElementVector(elInfo, vec);
// }
// if (zeroOrderAssembler) {
// zeroOrderAssembler->calculateElementVector(elInfo, vec);
// }
// if (rememberElVec) {
// axpy(factor, *elementVector, *userVec);
// }
}
void Assembler::matVecAssemble(const ElInfo *elInfo, ElementVector *vec) void Assembler::matVecAssemble(const ElInfo *elInfo, ElementVector *vec)
{ </