Skip to content
Snippets Groups Projects
Commit c49beaba authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Moved tools directory up.

parent 7422bde6
No related branches found
No related tags found
No related merge requests found
dimension of world: 2
elliptMesh->macro file name: ./macro/macro.stand.2d
elliptMesh->global refinements: 0
elliptMesh->global refinements: 2
ellipt->mesh: elliptMesh
ellipt->dim: 2
......@@ -19,11 +19,11 @@ ellipt->estimator->error norm: 1 % 1: H1_NORM, 2: L2_NORM
ellipt->estimator->C0: 0.1 % constant of element residual
ellipt->estimator->C1: 0.1 % constant of jump residual
ellipt->marker->strategy: 2 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->marker->strategy: 0 % 0: no adaption 1: GR 2: MS 3: ES 4:GERS
ellipt->marker->MSGamma: 0.5
ellipt->adapt->tolerance: 1e-4
ellipt->adapt->max iteration: 10
ellipt->adapt->max iteration: 0
ellipt->adapt->refine bisections: 2
ellipt->output->filename: ellipt
......
......@@ -83,9 +83,41 @@ int main(int argc, char* argv[])
// ===== start adaption loop =====
adapt.adapt();
// adapt.adapt();
// Speichert hier bei jedem 2D-Element die DOFs auf dem Element.
std::vector<DegreeOfFreedom> localDofs(3);
// Damit wir jeden DOF nur einmal aufrufen, speichern wir hier jeden
// besuchten DOF.
std::set<DegreeOfFreedom> dofsVisited;
// Okay, einfach das Gitter traversieren.
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(ellipt.getMesh(), -1, Mesh::CALL_LEAF_EL | Mesh::FILL_COORDS);
while (elInfo) {
// Zuerst lassen wir uns die DOFs des aktuellen Elements in localDofs abspeichern.
ellipt.getFeSpace()->getBasisFcts()->getLocalIndices(elInfo->getElement(),
ellipt.getFeSpace()->getAdmin(),
localDofs);
// Dann durchlaufen wir die drei DOFs (ist also fix für lineare Elemente in 2D!!!!)
for (int i = 0; i < 3; i++) {
// Falls der DOF noch nicht ausgegeben wurde.
if (dofsVisited.count(localDofs[i]) == 0) {
// Gib globalen DOF Index und seine Welt-Koordinaten aus.
std::cout << "DOF " << localDofs[i] << ": "
<< elInfo->getCoord(i)[0] << " " << elInfo->getCoord(i)[1] << "\n";
// Merke dir den DOF, dass er schon ausgegebe wurde.
dofsVisited.insert(localDofs[i]);
}
}
elInfo = stack.traverseNext(elInfo);
}
ellipt.writeFiles(adaptInfo, true);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment