Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist ü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. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit d57f700c authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

some baseproblems extended

parent 0879bc18
......@@ -134,11 +134,11 @@ class RefinementLevel
public:
RefinementLevel(const FiniteElemSpace *feSpace_,
MeshRefinementFunction<T,T2>* refineFct_) :
MeshRefinementFunction<T,T2>* refineFct_ = NULL) :
feSpace(feSpace_),
refineFct(refineFct_),
adaptInfo(nullptr),
refineOperation(nullptr),
adaptInfo(NULL),
refineOperation(NULL),
numRefinements0(15),
globalRefined(false)
{
......@@ -188,7 +188,7 @@ public:
{
FUNCNAME("RefinementLevel::refine()");
if (!globalRefined) {
if (!globalRefined && refineFct) {
MSG("nr of global refinements: %d\n", refineFct->getGlobalSize());
refinementManager->globalRefine(mesh, refineFct->getGlobalSize());
globalRefined = true;
......@@ -473,7 +473,7 @@ public:
{
bool elMarkRefine = false, elMarkCoarsen = false;
Flag traverseFlag = Mesh::CALL_LEAF_EL;
Flag traverseFlag = Mesh::CALL_LEAF_EL | Mesh::FILL_COORDS;
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, traverseFlag);
while(elInfo) {
......
......@@ -23,6 +23,42 @@
using namespace AMDiS;
class RefinementLevelSimple : public RefinementLevel<WorldVector<double>, int >
{
public:
RefinementLevelSimple(const FiniteElemSpace *feSpace_, int level_) :
RefinementLevel<WorldVector<double>, int >(feSpace_), refineLevel(level_) { }
~RefinementLevelSimple() {}
void markElements(Flag &markFlag)
{
bool elMarkRefine = false, elMarkCoarsen = false;
Flag traverseFlag = Mesh::CALL_LEAF_EL;
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, traverseFlag);
while (elInfo) {
int oldLevel = elInfo->getLevel();
elInfo->getElement()->setMark( calcMark(refineLevel, oldLevel) );
elMarkRefine |= elInfo->getElement()->getMark() == 1;
elMarkCoarsen |= elInfo->getElement()->getMark() == -1;
elInfo = stack.traverseNext(elInfo);
}
markFlag = 0;
if (elMarkRefine)
markFlag = 1;
if (elMarkCoarsen)
markFlag |= 2;
}
protected:
int refineLevel;
};
/** \brief
* Refinement structure to perform local anisotropic refinement depending
* on a refineFunction that defines the local refinement level to given
......
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