Commit 878c6c03 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* bool refineInterpol removed

parent c9f0c305
......@@ -402,14 +402,6 @@ namespace AMDiS {
return matrix[n];
};
/** \brief
* Returns whether interpolation should be performed after refinement
* (false by default)
*/
virtual bool refineInterpol() {
return false;
};
/** \brief
* Returns whether restriction should be performed after coarsening
* (false by default)
......
......@@ -32,7 +32,9 @@ namespace AMDiS {
template<>
void DOFVector<WorldVector<double> >::refineInterpol(RCNeighbourList& list, int n)
{
if(n < 1) return;
if (n < 1)
return;
int dim = feSpace->getMesh()->getDim();
Element *el = list.getElement(0);
int n0 = feSpace->getAdmin()->getNumberOfPreDOFs(VERTEX);
......
......@@ -317,7 +317,6 @@ namespace AMDiS {
DOFVector()
: DOFVectorBase<T>(),
feSpace(NULL),
refineInter(false),
coarsenOperation(NO_OPERATION)
{}
......@@ -368,13 +367,6 @@ namespace AMDiS {
virtual void compressDOFIndexed(int first, int last,
std::vector<DegreeOfFreedom> &newDof);
/** \brief
* Sets \ref refineInter to b
*/
inline void refineInterpol(bool b) {
refineInter = b;
}
/** \brief
* Sets \ref coarsenOperation to op
*/
......@@ -394,17 +386,10 @@ namespace AMDiS {
*/
inline void coarseRestrict(RCNeighbourList&, int) {}
/** \brief
* Returns \ref refineInter
*/
inline bool refineInterpol() {
return refineInter;
}
/** \brief
* Interpolation after refinement.
*/
inline void refineInterpol(RCNeighbourList&, int) {};
inline void refineInterpol(RCNeighbourList&, int) {}
/** \brief
* Returns \ref vec
......@@ -665,11 +650,6 @@ namespace AMDiS {
*/
std::vector<T> vec;
/** \brief
* Specifies whether interpolation should be performed after refinement
*/
bool refineInter;
/** \brief
* Specifies what operation should be performed after coarsening
*/
......
......@@ -55,7 +55,6 @@ namespace AMDiS {
template<typename T>
DOFVector<T>::DOFVector(const FiniteElemSpace* f, std::string n)
: DOFVectorBase<T>(f, n),
refineInter(false),
coarsenOperation(NO_OPERATION)
{
init(f, n);
......@@ -809,21 +808,23 @@ namespace AMDiS {
template<typename T>
DOFVector<T>& DOFVector<T>::operator=(const DOFVector<T>& rhs )
{
feSpace=rhs.feSpace;
vec=rhs.vec;
this->elementVector=NULL;
interFct=rhs.interFct;
refineInter=rhs.refineInter;
coarsenOperation=rhs.coarsenOperation;
this->operators=rhs.operators;
this->operatorFactor=rhs.operatorFactor;
feSpace = rhs.feSpace;
vec = rhs.vec;
this->elementVector = NULL;
interFct = rhs.interFct;
coarsenOperation = rhs.coarsenOperation;
this->operators = rhs.operators;
this->operatorFactor = rhs.operatorFactor;
if (rhs.boundaryManager) {
if(this->boundaryManager) delete this->boundaryManager;
if (this->boundaryManager)
delete this->boundaryManager;
this->boundaryManager = new BoundaryManager(*rhs.boundaryManager);
// boundaryManager->setDOFVector(this);
}
else
} else {
this->boundaryManager=NULL;
}
return *this;
}
......
......@@ -12,7 +12,10 @@ namespace AMDiS {
FiniteElemSpace::FiniteElemSpace(DOFAdmin* admin_,
const BasisFunction* bas_fcts_,
Mesh* aMesh, const std::string& aString)
: name(aString), admin(admin_), basFcts(bas_fcts_), mesh(aMesh)
: name(aString),
admin(admin_),
basFcts(bas_fcts_),
mesh(aMesh)
{
FUNCNAME("FiniteElemSpace::FiniteElemSpace()");
......@@ -20,14 +23,15 @@ namespace AMDiS {
if (!admin) {
const DOFAdmin *admin_local = NULL;
int i, j;
const DimVec<int> *ndof = NULL;
ndof = basFcts->getNumberOfDOFs();
TEST_EXIT(ndof)("no n_dof or basFcts->n_dof\n");
for (i = 0; i < mesh->getNumberOfDOFAdmin(); i++) {
for (int i = 0; i < mesh->getNumberOfDOFAdmin(); i++) {
admin_local = &(mesh->getDOFAdmin(i));
int j;
for (j = 0; j <= mesh->getDim(); j++) {
if (admin_local->getNumberOfDOFs(j) != (*ndof)[j]) break;
if (admin_local->getNumberOfDOFs(j) != (*ndof)[j])
break;
}
if (j > mesh->getDim()) break;
admin_local = NULL;
......
......@@ -69,7 +69,7 @@ namespace AMDiS {
/** \brief
* destructor
*/
virtual ~FiniteElemSpace() {};
virtual ~FiniteElemSpace() {}
/** \brief
* Returns \ref name
......
......@@ -53,7 +53,7 @@ namespace AMDiS {
: ProblemInstat(name_, initialProb),
problemStat(prob),
oldSolution(NULL)
{};
{}
ProblemInstatScal::~ProblemInstatScal()
......@@ -94,7 +94,6 @@ namespace AMDiS {
} else {
// create oldSolution
oldSolution = NEW DOFVector<double>(problemStat->getFESpace(), name + "->uOld");
oldSolution->refineInterpol(true);
oldSolution->setCoarsenOperation(COARSE_INTERPOL);
if (problemStat->getEstimator()) {
dynamic_cast<Estimator*>(problemStat->getEstimator())
......@@ -168,7 +167,6 @@ namespace AMDiS {
for (int i = 0; i < size; i++) {
oldSolution->setDOFVector(i, NEW DOFVector<double>(problemStat->getFESpace(i),
name + "->uOld"));
oldSolution->getDOFVector(i)->refineInterpol(true);
oldSolution->getDOFVector(i)->setCoarsenOperation(COARSE_INTERPOL);
if(problemStat->getEstimator(i)) {
......
......@@ -411,10 +411,9 @@ namespace AMDiS {
{
// === create vectors and system matrix ===
systemMatrix_ = NEW DOFMatrix(feSpace_, feSpace_, "system matrix");
rhs_ = NEW DOFVector<double>(feSpace_, "rhs");
solution_ = NEW DOFVector<double>(feSpace_, "solution");
rhs_ = NEW DOFVector<double>(feSpace_, "rhs");
solution_ = NEW DOFVector<double>(feSpace_, "solution");
solution_->refineInterpol(true);
solution_->setCoarsenOperation(COARSE_INTERPOL);
solution_->set(0.0); /* initialize u_h ! */
......
......@@ -292,7 +292,6 @@ namespace AMDiS {
numberedName = name_ + std::string(number);
solution_->setDOFVector(i, NEW DOFVector<double>(componentSpaces[i],
numberedName));
solution_->getDOFVector(i)->refineInterpol(true);
solution_->getDOFVector(i)->setCoarsenOperation(COARSE_INTERPOL);
solution_->getDOFVector(i)->set(0.0);
}
......
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