Liebe Gitlab-Nutzer, 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 a125580e authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

New code style for the first demos.

parent bebadadf
......@@ -43,23 +43,20 @@ namespace AMDiS {
ProblemInstatScal::ProblemInstatScal(std::string name_,
ProblemScal *prob,
ProblemStatBase *initialProb)
ProblemScal *prob, ProblemStatBase *initialProb)
: ProblemInstat(name_, initialProb),
problemStat(prob),
oldSolution(NULL)
{}
ProblemInstatScal::ProblemInstatScal(std::string name_,
ProblemScal& prob)
ProblemInstatScal::ProblemInstatScal(std::string name_, ProblemScal& prob)
: ProblemInstat(name_, NULL),
problemStat(&prob),
oldSolution(NULL)
{}
ProblemInstatScal::ProblemInstatScal(std::string name_,
ProblemScal& prob,
ProblemStatBase& initialProb)
ProblemScal& prob, ProblemStatBase& initialProb)
: ProblemInstat(name_, &initialProb),
problemStat(&prob),
oldSolution(NULL)
......@@ -127,13 +124,25 @@ namespace AMDiS {
}
ProblemInstatVec::ProblemInstatVec(std::string name_,
ProblemVec *prob,
ProblemStatBase *initialProb)
ProblemVec *prob, ProblemStatBase *initialProb)
: ProblemInstat(name_, initialProb),
problemStat(prob),
oldSolution(NULL)
{}
ProblemInstatVec::ProblemInstatVec(std::string name_, ProblemVec &prob)
: ProblemInstat(name_, NULL),
problemStat(&prob),
oldSolution(NULL)
{}
ProblemInstatVec::ProblemInstatVec(std::string name_,
ProblemVec &prob, ProblemStatBase &initialProb)
: ProblemInstat(name_, &initialProb),
problemStat(&prob),
oldSolution(NULL)
{}
ProblemInstatVec::~ProblemInstatVec()
{
delete oldSolution;
......
......@@ -183,6 +183,10 @@ namespace AMDiS {
ProblemVec *prob,
ProblemStatBase *initialProb = NULL);
ProblemInstatVec(std::string name, ProblemVec &prob);
ProblemInstatVec(std::string name, ProblemVec &prob, ProblemStatBase &initialProb);
/// Destructor.
virtual ~ProblemInstatVec();
......
......@@ -68,19 +68,25 @@ namespace AMDiS {
solution->interpol(fct);
}
void ProblemScal::addMatrixOperator(Operator *op,
double *factor,
double *estFactor)
void ProblemScal::addMatrixOperator(Operator *op, double *factor, double *estFactor)
{
systemMatrix->addOperator(op, factor, estFactor);
}
void ProblemScal::addVectorOperator(Operator *op,
double *factor,
double *estFactor)
void ProblemScal::addMatrixOperator(Operator &op, double *factor, double *estFactor)
{
systemMatrix->addOperator(&op, factor, estFactor);
}
void ProblemScal::addVectorOperator(Operator *op, double *factor, double *estFactor)
{
rhs->addOperator(op, factor, estFactor);
}
void ProblemScal::addVectorOperator(Operator &op, double *factor, double *estFactor)
{
rhs->addOperator(&op, factor, estFactor);
}
void ProblemScal::addDirichletBC(BoundaryType type,
AbstractFunction<double, WorldVector<double> >* b)
......@@ -94,8 +100,7 @@ namespace AMDiS {
solution->getBoundaryManager()->addBoundaryCondition(dirichlet);
}
void ProblemScal::addDirichletBC(BoundaryType type,
DOFVector<double> *vec)
void ProblemScal::addDirichletBC(BoundaryType type, DOFVector<double> *vec)
{
DirichletBC *dirichlet = new DirichletBC(type, vec);
if (systemMatrix)
......@@ -126,8 +131,7 @@ namespace AMDiS {
}
void ProblemScal::addRobinBC(BoundaryType type,
DOFVector<double> *n,
DOFVector<double> *r)
DOFVector<double> *n, DOFVector<double> *r)
{
RobinBC *robin = new RobinBC(type, n, r, feSpace);
if (rhs)
......
......@@ -170,10 +170,18 @@ namespace AMDiS {
void addMatrixOperator(Operator *op,
double *factor = NULL, double *estFactor = NULL);
/// Adds an Operator to \ref systemMatrix.
void addMatrixOperator(Operator &op,
double *factor = NULL, double *estFactor = NULL);
/// Adds an Operator to \ref rhs.
void addVectorOperator(Operator *op,
double *factor = NULL, double *estFactor = NULL);
/// Adds an Operator to \ref rhs.
void addVectorOperator(Operator &op,
double *factor = NULL, double *estFactor = NULL);
/// Adds dirichlet boundary conditions.
virtual void addDirichletBC(BoundaryType type,
AbstractFunction<double, WorldVector<double> >* b);
......
......@@ -1043,10 +1043,8 @@ namespace AMDiS {
solution->interpol(fct);
}
void ProblemVec::addMatrixOperator(Operator *op,
int i, int j,
double *factor,
double *estFactor)
void ProblemVec::addMatrixOperator(Operator *op, int i, int j,
double *factor, double *estFactor)
{
FUNCNAME("ProblemVec::addMatrixOperator()");
......@@ -1079,9 +1077,14 @@ namespace AMDiS {
opFlags[op].setFlag(Operator::MATRIX_OPERATOR);
}
void ProblemVec::addVectorOperator(Operator *op, int i,
double *factor,
double *estFactor)
void ProblemVec::addMatrixOperator(Operator &op, int i, int j,
double *factor, double *estFactor)
{
addMatrixOperator(&op, i, j, factor, estFactor);
}
void ProblemVec::addVectorOperator(Operator *op, int i,
double *factor, double *estFactor)
{
FUNCNAME("ProblemVec::addVectorOperator()");
......@@ -1101,6 +1104,12 @@ namespace AMDiS {
opFlags[op].setFlag(Operator::VECTOR_OPERATOR);
}
void ProblemVec::addVectorOperator(Operator &op, int i,
double *factor, double *estFactor)
{
addVectorOperator(&op, i, factor, estFactor);
}
void ProblemVec::addDirichletBC(BoundaryType type, int row, int col,
AbstractFunction<double, WorldVector<double> >* b)
{
......
......@@ -222,13 +222,19 @@ namespace AMDiS {
/// Adds an Operator to \ref A.
void addMatrixOperator(Operator *op, int i, int j,
double *factor = NULL,
double *estFactor = NULL);
double *factor = NULL, double *estFactor = NULL);
/// Adds an Operator to \ref A.
void addMatrixOperator(Operator &op, int i, int j,
double *factor = NULL, double *estFactor = NULL);
/// Adds an Operator to \ref rhs.
void addVectorOperator(Operator *op, int i,
double *factor = NULL,
double *estFactor = NULL);
double *factor = NULL, double *estFactor = NULL);
/// Adds an Operator to \ref rhs.
void addVectorOperator(Operator &op, int i,
double *factor = NULL, double *estFactor = NULL);
/// Adds dirichlet boundary conditions.
virtual void addDirichletBC(BoundaryType type, int row, int col,
......
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