Commit 9ec7f607 authored by Thomas Witkowski's avatar Thomas Witkowski

This and that.

parent fbe10859
......@@ -14,9 +14,8 @@ namespace AMDiS {
localBounds.resize(omp_get_overall_max_threads());
dofIndices.resize(omp_get_overall_max_threads());
allocatedMemoryLocalBounds = feSpace->getBasisFcts()->getNumber();
for (int i = 0; i < static_cast<int>(localBounds.size()); i++) {
for (int i = 0; i < static_cast<int>(localBounds.size()); i++)
localBounds[i] = GET_MEMORY(BoundaryType, allocatedMemoryLocalBounds);
}
}
BoundaryManager::BoundaryManager(BoundaryManager &bm)
......@@ -25,16 +24,14 @@ namespace AMDiS {
allocatedMemoryLocalBounds = bm.allocatedMemoryLocalBounds;
localBounds.resize(bm.localBounds.size());
dofIndices.resize(bm.localBounds.size());
for (int i = 0; i < static_cast<int>(localBounds.size()); i++) {
for (int i = 0; i < static_cast<int>(localBounds.size()); i++)
localBounds[i] = GET_MEMORY(BoundaryType, allocatedMemoryLocalBounds);
}
}
BoundaryManager::~BoundaryManager()
{
for (int i = 0; i < static_cast<int>(localBounds.size()); i++) {
for (int i = 0; i < static_cast<int>(localBounds.size()); i++)
FREE_MEMORY(localBounds[i], BoundaryType, allocatedMemoryLocalBounds);
}
}
double BoundaryManager::boundResidual(ElInfo *elInfo,
......
......@@ -919,12 +919,11 @@ namespace AMDiS {
static int localVecSize = 0;
const DegreeOfFreedom **dof = el->getDOF();
const int *indi;
int nrDOFs, n0, node0, num = 0;
GeoIndex posIndex;
DegreeOfFreedom* result;
if (indices) {
result = indices;
} else {
......@@ -934,7 +933,7 @@ namespace AMDiS {
localVecSize = nBasFcts;
result = localVec;
}
for (int pos = 0, j = 0; pos <= dim; pos++) {
posIndex = INDEX_OF_DIM(pos, dim);
nrDOFs = admin->getNumberOfDOFs(posIndex);
......@@ -945,7 +944,7 @@ namespace AMDiS {
num = Global::getGeo(posIndex, dim);
for (int i = 0; i < num; node0++, i++) {
indi = orderOfPositionIndices(el, posIndex, i);
const int *indi = orderOfPositionIndices(el, posIndex, i);
for (int k = 0; k < nrDOFs; k++) {
result[j++] = dof[node0][n0 + indi[k]];
......
......@@ -131,10 +131,10 @@ namespace AMDiS {
const BoundaryType *localBound,
int nBasFcts)
{
if(matrix == masterMatrix_) {
if (matrix == masterMatrix_) {
int dim = rowFESpace->getMesh()->getDim();
if(dim > 1) {
if (dim > 1) {
int i, j;
DOFAdmin *admin = rowFESpace->getAdmin();
......@@ -153,11 +153,11 @@ namespace AMDiS {
GeoIndex sideGeoIndex = INDEX_OF_DIM(dim-1, dim);
for(side = 0; side < dim + 1; side++) {
for (side = 0; side < dim + 1; side++) {
if(elInfo->getBoundary(sideGeoIndex, side) == boundaryType) {
if (elInfo->getBoundary(sideGeoIndex, side) == boundaryType) {
for(vertex = 0; vertex < dim; vertex++) {
for (vertex = 0; vertex < dim; vertex++) {
index = element->getVertexOfPosition(sideGeoIndex,
side,
vertex);
......@@ -165,7 +165,6 @@ namespace AMDiS {
}
Element *neigh = elInfo->getNeighbour(side);
basFcts->getLocalIndices(neigh, admin, neighIndices_);
int oppVertex = 0;
......
......@@ -545,15 +545,6 @@ namespace AMDiS {
MSG("%d DOFs for %s\n",
feSpace->getAdmin()->getUsedDOFs(), feSpace->getName().c_str());
Flag assembleFlag =
flag |
systemMatrix->getAssembleFlag() |
rhs->getAssembleFlag();
if (useGetBound)
assembleFlag |= Mesh::FILL_BOUND;
// systemMatrix->clear();
rhs->set(0.0);
DOFMatrix::base_matrix_type& base_matrix= systemMatrix->getBaseMatrix();
......@@ -581,7 +572,12 @@ namespace AMDiS {
BoundaryType *bound;
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, assembleFlag);
ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_LEAF_EL |
Mesh::FILL_BOUND |
Mesh::FILL_COORDS |
Mesh::FILL_DET |
Mesh::FILL_GRD_LAMBDA |
Mesh::FILL_NEIGH);
while (elInfo) {
if (useGetBound) {
......
......@@ -56,31 +56,25 @@ namespace AMDiS {
markFlag = 3;
}
if (toDo.isSet(BUILD)) {
if (toDo.isSet(BUILD))
problem_->buildBeforeRefine(adaptInfo, markFlag);
}
// refine
if (toDo.isSet(ADAPT) && markFlag.isSet(MESH_REFINED)) {
if (toDo.isSet(ADAPT) && markFlag.isSet(MESH_REFINED))
flag = problem_->refineMesh(adaptInfo);
}
if (toDo.isSet(BUILD)) {
if (toDo.isSet(BUILD))
problem_->buildBeforeCoarsen(adaptInfo, markFlag);
}
// coarsen
if (toDo.isSet(ADAPT) && markFlag.isSet(MESH_COARSENED)) {
if (toDo.isSet(ADAPT) && markFlag.isSet(MESH_COARSENED))
flag |= problem_->coarsenMesh(adaptInfo);
}
if (toDo.isSet(BUILD)) {
if (toDo.isSet(BUILD))
problem_->buildAfterCoarsen(adaptInfo, markFlag, true, true);
}
if (toDo.isSet(BUILD_RHS)) {
if (toDo.isSet(BUILD_RHS))
problem_->buildAfterCoarsen(adaptInfo, markFlag, false, true);
}
return flag;
}
......
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