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 d27ffdee authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

TimeObject added.

parent b5effb66
......@@ -84,6 +84,7 @@
#include "SystemVector.h"
#include "TecPlotWriter.h"
#include "Tetrahedron.h"
#include "TimedObject.h"
#include "Traverse.h"
#include "Triangle.h"
#include "ValueWriter.h"
......
......@@ -32,7 +32,6 @@
#include "Flag.h"
#include "RCNeighbourList.h"
#include "DOFAdmin.h"
#include "DOFIterator.h"
#include "DOFIndexed.h"
#include "Boundary.h"
#include "Serializable.h"
......@@ -99,12 +98,30 @@ namespace AMDiS {
}
// Only to get rid of the abstract functions, I hope they are not used
std::vector<bool>::iterator begin() {ERROR_EXIT("Shouldn't be used, only fake."); std::vector<bool> v; return v.begin();}
std::vector<bool>::iterator end() {ERROR_EXIT("Shouldn't be used, only fake."); std::vector<bool> v; return v.end();}
std::vector<bool>::iterator begin()
{
ERROR_EXIT("Shouldn't be used, only fake."); std::vector<bool> v;
return v.begin();
}
std::vector<bool>::iterator end()
{
ERROR_EXIT("Shouldn't be used, only fake."); std::vector<bool> v;
return v.end();
}
bool dummy; // Must be deleted later
bool& operator[](int i) {ERROR_EXIT("Shouldn't be used, only fake."); return dummy;}
const bool& operator[](int i) const {ERROR_EXIT("Shouldn't be used, only fake."); return dummy;}
bool& operator[](int i)
{
ERROR_EXIT("Shouldn't be used, only fake.");
return dummy;
}
const bool& operator[](int i) const
{
ERROR_EXIT("Shouldn't be used, only fake.");
return dummy;
}
/// DOFMatrix does not need to be compressed before assembling, when using MTL4.
void compressDOFIndexed(int first, int last, std::vector<DegreeOfFreedom> &newDOF) {}
......
......@@ -205,15 +205,20 @@ namespace AMDiS {
masterMatrix_ = NULL;
}
matrix->print();
using namespace mtl;
std::cout << "ASSOC = " << std::endl;
for (int i = 0; i < 10; i++)
std::cout << i << " = " << (*associated)[i] << std::endl;
DOFAdmin* admin = rowFESpace->getAdmin();
std::vector<int> dofMap(admin->getUsedSize());
for (int i = 0; i < admin->getUsedSize(); i++) {
dofMap[i] = (*associated)[i];
std::cout << "map " << i << " to " << dofMap[i] << std::endl;
}
// Compute reorder matrix (newRow and newCol yields transposed!!!)
matrix::traits::reorder<>::type R= matrix::reorder(*associated);
DOFMatrix::base_matrix_type &A= matrix->getBaseMatrix(), B, D, E, TR;
matrix::traits::reorder<>::type R= matrix::reorder(dofMap);
DOFMatrix::base_matrix_type &A= matrix->getBaseMatrix(), B, D, E, TR;
A*= 0.5;
// Half of entries with decreased row index + half of the strict lower origing
......@@ -225,7 +230,7 @@ namespace AMDiS {
D= bands(TR, 0, 1);
E= A * strict_lower(R) + lower(A);
B+= D * E;
swap(A, B);
swap(A, B);
}
void PeriodicBC::exitVector(DOFVectorBase<double>* vector)
......
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==
// ============================================================================
// == ==
// == crystal growth group ==
// == ==
// == Stiftung caesar ==
// == Ludwig-Erhard-Allee 2 ==
// == 53175 Bonn ==
// == germany ==
// == ==
// ============================================================================
// == ==
// == http://www.caesar.de/cg/AMDiS ==
// == ==
// ============================================================================
/** \file TimedObject.h */
#ifndef AMDIS_TIMEDOBJECT_H
#define AMDIS_TIMEDOBJECT_H
namespace AMDiS {
// ===========================================================================
// ===== class TimedObject ===================================================
// ===========================================================================
/** \brief
* This class can be used as base class for time dependent objects where
* different objects refer to the same time. Herefore a pointer to
* a double value is stored, pointing to a time value, which can be
* managed in one central object, maybe the problem class.
*/
class TimedObject
{
public:
/** \brief
* Constructor.
*/
TimedObject() : timePtr(NULL) {};
/** \brief
* Sets the time pointer.
*/
inline void setTimePtr(double *timePtr_) { timePtr = timePtr_; };
/** \brief
* Returns the time pointer.
*/
inline double *getTimePtr() { return timePtr; };
protected:
/** \brief
* Pointer to the externally managed time value.
*/
double *timePtr;
};
}
#endif // AMDIS_TIMEDOBJECT_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment