Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

Commit 64fe2d8a authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Make use of mtl dense matrizes for parts of the assembling process.

parent b538f51c
......@@ -54,6 +54,7 @@ namespace AMDiS {
class Operator;
class ProblemInstat;
class ProblemIterationInterface;
class ProblemTimeInterface;
class ProblemVec;
class Projection;
class PreconditionerScal;
......@@ -65,17 +66,20 @@ namespace AMDiS {
class VertexVector;
template<typename ReturnType, typename ArgumentType> class AbstractFunction;
template<typename T> class DOFIndexed;
template<typename T> class DOFVectorBase;
template<typename T> class DOFVector;
template<typename T> class DimVec;
template<typename T> class DimMat;
template<typename ITLSolver> class ITL_OEMSolver;
template<typename T> class ITL_Preconditioner;
template<typename T> class Matrix;
template<typename T> class MatVecMultiplier;
template<typename T> class SolverMatrix;
template<typename T> class Vector;
template<typename T> class WorldVector;
template <typename ITLSolver> class ITL_OEMSolver;
template<typename T> class WorldMatrix;
template<typename T> class VectorOfFixVecs;
} // namespace AMDiS
#endif // AMDIS_AMDIS_FWD_INCLUDE
......@@ -27,10 +27,6 @@
namespace AMDiS {
// ============================================================================
// ===== class AbstractFunction ===============================================
// ============================================================================
/**
* \ingroup Common
*
......@@ -46,35 +42,25 @@ namespace AMDiS {
class AbstractFunction
{
public:
/** \brief
* Constructor.
*/
/// Constructor.
AbstractFunction(int degree = 0) :
degree_(degree)
{}
virtual ~AbstractFunction() {}
/** \brief
* Returns \ref degree_.
*/
/// Returns \ref degree_.
inline int getDegree() const {
return degree_;
}
/** \brief
* Deligates the evaluation to overriden method f.
*/
/// Deligates the evaluation to overriden method f.
virtual ReturnType operator()(const ArgumentType& x) const = 0;
protected:
int degree_;
};
// ============================================================================
// ===== class BinaryAbstractFunction =========================================
// ============================================================================
/**
* \ingroup Common
*
......@@ -87,25 +73,19 @@ namespace AMDiS {
class BinaryAbstractFunction
{
public:
/** \brief
* Constructor.
*/
/// Constructor.
BinaryAbstractFunction(int degree = 0) :
degree_(degree)
{};
{}
virtual ~BinaryAbstractFunction() {};
virtual ~BinaryAbstractFunction() {}
/** \brief
* Returns \ref degree_.
*/
/// Returns \ref degree_.
inline int getDegree() const {
return degree_;
};
}
/** \brief
* Deligates the evaluation to overriden method f.
*/
/// Deligates the evaluation to overriden method f.
virtual ReturnType operator()(const ArgumentType1& x,
const ArgumentType2& y) const = 0;
......@@ -113,10 +93,6 @@ namespace AMDiS {
int degree_;
};
// ============================================================================
// ===== class TertiaryAbstractFunction =======================================
// ============================================================================
/**
* \ingroup Common
*
......@@ -130,25 +106,19 @@ namespace AMDiS {
class TertiaryAbstractFunction
{
public:
/** \brief
* Constructor.
*/
/// Constructor.
TertiaryAbstractFunction(int degree = 0) :
degree_(degree)
{};
{}
virtual ~TertiaryAbstractFunction() {};
virtual ~TertiaryAbstractFunction() {}
/** \brief
* Returns \ref degree_.
*/
/// Returns \ref degree_.
inline int getDegree() const {
return degree_;
};
}
/** \brief
* function evaluation.
*/
/// function evaluation.
virtual ReturnType operator()(const ArgumentType1& x,
const ArgumentType2& y,
const ArgumentType3& z) const = 0;
......@@ -157,11 +127,6 @@ namespace AMDiS {
int degree_;
};
// ============================================================================
// ===== class QuartAbstractFunction =======================================
// ============================================================================
/**
* \ingroup Common
*
......@@ -176,25 +141,19 @@ namespace AMDiS {
class QuartAbstractFunction
{
public:
/** \brief
* Constructor.
*/
/// Constructor.
QuartAbstractFunction(int degree = 0) :
degree_(degree)
{};
{}
virtual ~QuartAbstractFunction() {};
virtual ~QuartAbstractFunction() {}
/** \brief
* Returns \ref degree_.
*/
/// Returns \ref degree_.
inline int getDegree() const {
return degree_;
};
}
/** \brief
* function evaluation.
*/
/// function evaluation.
virtual ReturnType operator()(const ArgumentType1& x,
const ArgumentType2& y,
const ArgumentType3& z,
......
......@@ -23,17 +23,10 @@
#define AMDIS_ADAPTBASE_H
#include <string>
#include "AMDiS_fwd.h"
namespace AMDiS {
class ProblemIterationInterface;
class ProblemTimeInterface;
class AdaptInfo;
// ============================================================================
// ===== class AdaptBase ======================================================
// ============================================================================
/// Interface for adaption loops.
class AdaptBase
{
......
......@@ -29,10 +29,6 @@
namespace AMDiS {
// ===========================================================================
// ===== class AdaptInfo =====================================================
// ===========================================================================
/**
* \ingroup Adaption
*
......@@ -49,9 +45,7 @@ namespace AMDiS {
*/
class ScalContent {
public:
/** \brief
* Constructor.
*/
/// Constructor.
ScalContent(std::string prefix)
: est_sum(0.0),
est_t_sum(0.0),
......@@ -86,49 +80,31 @@ namespace AMDiS {
timeErrLow = totalTol * relTimeErr * timeTheta2;
}
/** \brief
* Sum of all error estimates
*/
/// Sum of all error estimates
double est_sum;
/** \brief
* Sum of all time error estimates
*/
/// Sum of all time error estimates
double est_t_sum;
/** \brief
* maximal local error estimate.
*/
/// maximal local error estimate.
double est_max;
/** \brief
* Maximum of all time error estimates
*/
/// Maximum of all time error estimates
double est_t_max;
/** \brief
* Tolerance for the (absolute or relative) error
*/
/// Tolerance for the (absolute or relative) error
double spaceTolerance;
/** \brief
* Time tolerance.
*/
/// Time tolerance.
double timeTolerance;
/** \brief
* Lower bound for the time error.
*/
/// Lower bound for the time error.
double timeErrLow;
/** \brief
* true if coarsening is allowed, false otherwise.
*/
/// true if coarsening is allowed, false otherwise.
int coarsenAllowed;
/** \brief
* true if refinement is allowed, false otherwise.
*/
/// true if refinement is allowed, false otherwise.
int refinementAllowed;
/** \brief
......@@ -136,20 +112,18 @@ namespace AMDiS {
* performed when an element is marked for refinement; usually the value is
* 1 or DIM
*/
int refineBisections;
int refineBisections;
/** \brief
* parameter to tell the marking strategy how many bisections should
* be undone when an element is marked for coarsening; usually the value is
* 1 or DIM
*/
int coarseBisections;
int coarseBisections;
};
public:
/** \brief
* Constructor.
*/
/// Constructor.
AdaptInfo(std::string name_, int size = 1)
: name(name_),
spaceIteration(-1),
......@@ -197,13 +171,10 @@ namespace AMDiS {
}
}
/** \brief
* Destructor.
*/
/// Destructor.
virtual ~AdaptInfo() {
for (int i = 0; i < scalContents.getSize(); i++) {
for (int i = 0; i < scalContents.getSize(); i++)
delete scalContents[i];
}
}
inline void reset()
......@@ -220,185 +191,135 @@ namespace AMDiS {
GET_PARAMETER(0, name + "->timestep", "%f", &timestep);
}
/** \brief
* Returns whether space tolerance is reached.
*/
/// Returns whether space tolerance is reached.
virtual bool spaceToleranceReached() {
int size = scalContents.getSize();
for (int i = 0; i < size; i++) {
if (!(scalContents[i]->est_sum < scalContents[i]->spaceTolerance)) {
for (int i = 0; i < size; i++)
if (!(scalContents[i]->est_sum < scalContents[i]->spaceTolerance))
return false;
}
}
return true;
}
/** \brief
* Returns whether space tolerance of component i is reached.
*/
/// Returns whether space tolerance of component i is reached.
virtual bool spaceToleranceReached(int i) {
if (!(scalContents[i]->est_sum < scalContents[i]->spaceTolerance)) {
if (!(scalContents[i]->est_sum < scalContents[i]->spaceTolerance))
return false;
} else {
else
return true;
}
}
/** \brief
* Returns whether time tolerance is reached.
*/
/// Returns whether time tolerance is reached.
virtual bool timeToleranceReached() {
int size = scalContents.getSize();
for (int i = 0; i < size; i++) {
if (!(scalContents[i]->est_t_sum < scalContents[i]->timeTolerance)) {
for (int i = 0; i < size; i++)
if (!(scalContents[i]->est_t_sum < scalContents[i]->timeTolerance))
return false;
}
}
return true;
}
/** \brief
* Returns whether time tolerance of component i is reached.
*/
/// Returns whether time tolerance of component i is reached.
virtual bool timeToleranceReached(int i) {
if (!(scalContents[i]->est_t_sum < scalContents[i]->timeTolerance)) {
if (!(scalContents[i]->est_t_sum < scalContents[i]->timeTolerance))
return false;
} else {
else
return true;
}
}
/** \brief
* Returns whether time error is under its lower bound.
*/
/// Returns whether time error is under its lower bound.
virtual bool timeErrorLow() {
int size = scalContents.getSize();
for (int i = 0; i < size; i++) {
if (!(scalContents[i]->est_t_sum < scalContents[i]->timeErrLow)) {
for (int i = 0; i < size; i++)
if (!(scalContents[i]->est_t_sum < scalContents[i]->timeErrLow))
return false;
}
}
return true;
}
/** \brief
* Print debug information about time error and its bound.
*/
/// Print debug information about time error and its bound.
void printTimeErrorLowInfo() {
for (int i = 0; i < scalContents.getSize(); i++) {
for (int i = 0; i < scalContents.getSize(); i++)
std::cout << " Time error estimate = " << scalContents[i]->est_t_sum
<< " Time error bound = " << scalContents[i]->timeErrLow << "\n";
}
}
/** \brief
* Returns \ref spaceIteration.
*/
/// Returns \ref spaceIteration.
inline int getSpaceIteration() {
return spaceIteration;
}
/** \brief
* Sets \ref spaceIteration.
*/
/// Sets \ref spaceIteration.
inline void setSpaceIteration(int it) {
spaceIteration = it;
}
/** \brief
* Returns \ref maxSpaceIteration.
*/
/// Returns \ref maxSpaceIteration.
inline int getMaxSpaceIteration() {
return maxSpaceIteration;
}
/** \brief
* Sets \ref maxSpaceIteration.
*/
/// Sets \ref maxSpaceIteration.
inline void setMaxSpaceIteration(int it) {
maxSpaceIteration = it;
}
/** \brief
* Increments \ref spaceIteration by 1;
*/
/// Increments \ref spaceIteration by 1;
inline void incSpaceIteration() {
spaceIteration++;
}
/** \brief
* Sets \ref timestepIteration.
*/
/// Sets \ref timestepIteration.
inline void setTimestepIteration(int it) {
timestepIteration = it;
}
/** \brief
* Returns \ref timestepIteration.
*/
/// Returns \ref timestepIteration.
inline int getTimestepIteration() {
return timestepIteration;
}
/** \brief
* Increments \ref timestepIteration by 1;
*/
/// Increments \ref timestepIteration by 1;
inline void incTimestepIteration() {
timestepIteration++;
}
/** \brief
* Returns \ref maxTimestepIteration.
*/
/// Returns \ref maxTimestepIteration.
inline int getMaxTimestepIteration() {
return maxTimestepIteration;
}
/** \brief
* Sets \ref maxTimestepIteration.
*/
/// Sets \ref maxTimestepIteration.
inline void setMaxTimestepIteration(int it) {
maxTimestepIteration = it;
}
/** \brief
* Sets \ref timeIteration.
*/
/// Sets \ref timeIteration.
inline void setTimeIteration(int it) {
timeIteration = it;
}
/** \brief
* Returns \ref timeIteration.
*/
/// Returns \ref timeIteration.
inline int getTimeIteration() {
return timeIteration;
}
/** \brief
* Increments \ref timesIteration by 1;
*/
/// Increments \ref timesIteration by 1;
inline void incTimeIteration() {
timeIteration++;
}
/** \brief
* Returns \ref maxTimeIteration.
*/
/// Returns \ref maxTimeIteration.
inline int getMaxTimeIteration() {
return maxTimeIteration;
}
/** \brief
* Sets \ref maxTimeIteration.
*/
/// Sets \ref maxTimeIteration.
inline void setMaxTimeIteration(int it) {
maxTimeIteration = it;
}
/** \brief
* Returns \ref timestepNumber.
*/
/// Returns \ref timestepNumber.
inline int getTimestepNumber() {
return timestepNumber;
}
......@@ -408,100 +329,72 @@ namespace AMDiS {
return nTimesteps;
}
/** \brief
* Increments \ref timestepNumber by 1;
*/
/// Increments \ref timestepNumber by 1;
inline void incTimestepNumber() {
timestepNumber++;
}
/** \brief
* Sets \ref est_sum.
*/
/// Sets \ref est_sum.
inline void setEstSum(double e, int index) {
scalContents[index]->est_sum = e;
}
/** \brief
* Sets \ref est_max.
*/
/// Sets \ref est_max.
inline void setEstMax(double e, int index) {
scalContents[index]->est_max = e;
}
/** \brief
* Sets \ref est_max.
*/
/// Sets \ref est_max.
inline void setTimeEstMax(double e, int index) {
scalContents[index]->est_t_max = e;
}
/** \brief
* Sets \ref est_t_sum.
*/
/// Sets \ref est_t_sum.
inline void setTimeEstSum(double e, int index) {
scalContents[index]->est_t_sum = e;
}
/** \brief
* Returns \ref est_sum.
*/
/// Returns \ref est_sum.
inline double getEstSum(int index) {
return scalContents[index]->est_sum;
}
/** \brief
* Returns \ref est_t_sum.
*/
/// Returns \ref est_t_sum.
inline double getEstTSum(int index) {
return scalContents[index]->est_t_sum;
}
/** \brief
* Returns \ref est_max.
*/
/// Returns \ref est_max.
inline double getEstMax(int index) {
return scalContents[index]->est_max;
}
/** \brief
* Returns \ref est_max.
*/
/// Returns \ref est_max.
inline double getTimeEstMax(int index) {
return scalContents[index]->est_t_max;
}