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

Several small changes.

parent f2631315
......@@ -43,6 +43,7 @@ LIBS += -lboost_iostreams -lboost_filesystem -lboost_system -lboost_date_time
ifeq ($(strip $(USE_UMFPACK)), 1)
LIBS += $(UMFPACK_LIB)
CPPFLAGS += -DHAVE_UMFPACK -DMTL_HAS_UMFPACK
endif
ifeq ($(strip $(USE_MKL)), 1)
......@@ -104,7 +105,7 @@ endif
ifeq ($(strip $(DEBUG)), 0)
CPPFLAGS += -O3
else
CPPFLAGS += -g -O0
CPPFLAGS += -g -O0 -DDEBUG=1
endif
ifeq ($(strip $(USE_OPENMP)), 1)
......
......@@ -7,24 +7,21 @@ namespace AMDiS {
BoundaryType newBound(BoundaryType oldBound, BoundaryType newBound)
{
if (newBound <= INTERIOR) {
/*************************************************************************/
/* face on NEUMANN-boundary or interior face; weak type */
/*************************************************************************/
return(oldBound);
// Face on NEUMANN-boundary or interior face; weak type.
return oldBound;
} else {
/*************************************************************************/
/* node is already node on the DIRICHLET boundary */
/*************************************************************************/
// Node is already node on the DIRICHLET boundary.
if (oldBound > newBound)
return(oldBound);
return oldBound;
else
return(newBound);
return newBound;
}
/**************************************************************************/
/* new face is interior face; node type is always stronger */
/**************************************************************************/
return(newBound);
// New face is interior face; node type is always stronger.
return newBound;
}
}
......@@ -245,10 +245,8 @@ namespace AMDiS {
std::vector<Operator*>::iterator it = operators.begin();
std::vector<double*>::iterator factorIt = operatorFactor.begin();
for (; it != operators.end(); ++it, ++factorIt)
if ((*it)->getNeedDualTraverse() == false) {
// MSG("OP NO NEED DT!\n");
if ((*it)->getNeedDualTraverse() == false)
(*it)->getElementMatrix(elInfo, elementMatrix, *factorIt ? **factorIt : 1.0);
}
if (factor != 1.0)
elementMatrix *= factor;
......
......@@ -73,10 +73,7 @@ namespace AMDiS {
///
virtual ~OEMSolver()
{
if (leftPrecon) delete leftPrecon;
if (rightPrecon) delete rightPrecon;
}
{}
void initParameters()
{
......@@ -96,8 +93,6 @@ namespace AMDiS {
*/
void setLeftPrecon(ITL_BasePreconditioner* p)
{
if (leftPrecon)
delete leftPrecon;
leftPrecon = p;
}
......@@ -108,8 +103,6 @@ namespace AMDiS {
*/
void setRightPrecon(ITL_BasePreconditioner* p)
{
if (rightPrecon)
delete rightPrecon;
rightPrecon = p;
}
......@@ -124,8 +117,7 @@ namespace AMDiS {
DOFVector<double>& x,
DOFVector<double>& b)
{
mtl::dense_vector<value_type> xx(x.getUsedSize()),
bb(b.getUsedSize());
mtl::dense_vector<value_type> xx(x.getUsedSize()), bb(b.getUsedSize());
// Copy rhs vector
int counter = 0;
......
......@@ -58,7 +58,7 @@ namespace AMDiS {
};
/// Constructor
UmfPackSolver(::std::string name)
UmfPackSolver(std::string name)
: OEMSolver(name),
solver(0),
store_symbolic(0),
......@@ -93,7 +93,7 @@ namespace AMDiS {
solver->update();
}
int code= (*solver)(x, b);
int code = (*solver)(x, b);
mtl::dense_vector<value_type> r(b);
r -= A * x;
residual = two_norm(r);
......
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