Commit 276a067a authored by Praetorius, Simon's avatar Praetorius, Simon

CouplingBaseProblem added

parent 6c30ac09
/******************************************************************************
*
* Extension of AMDiS - Adaptive multidimensional simulations
*
* Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
* Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
*
* Authors: Simon Praetorius et al.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*
* See also license.opensource.txt in the distribution.
*
******************************************************************************/
#ifndef EXTENSIONS_GENERIC_LOOPS_H
#define EXTENSIONS_GENERIC_LOOPS_H
#include "boost/tuple/tuple.hpp"
#define _GET_ boost::tuples::get
#define _GET_TYPE_ boost::tuples::element
#define _LENGTH_ boost::tuples::length
namespace tools {
// for-loop over sequence of values
template<typename Seq, long I, long N, class F>
struct FOR_SUBSEQ
{
static void loop() {
F::call(); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop();
}
static void loop_idx() {
F::call(I); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop_idx();
}
static void loop(Seq& s) {
F::call(_GET_<I>(s)); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop(s);
}
static void loop_idx(Seq& s) {
F::call(I,_GET_<I>(s)); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop_idx(s);
}
template<typename T>
static void loop1(Seq& s, T& t) {
F::call(_GET_<I>(s), t); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1(s, t);
}
template<typename T>
static void loop1_idx(Seq& s, T& t) {
F::call(I, _GET_<I>(s), t); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1_idx(s, t);
}
template<typename T1, typename T2>
static void loop1(Seq& s, T1& t1, T2& t2) {
F::call(_GET_<I>(s), t1, t2); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1(s, t1, t2);
}
template<typename T1, typename T2>
static void loop1_idx(Seq& s, T1& t1, T2& t2) {
F::call(I, _GET_<I>(s), t1, t2); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1_idx(s, t1, t2);
}
template<typename T>
static void loop2(T& t, Seq& s) {
F::call(t, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop2(t, s);
}
template<typename T>
static void loop2_idx(T& t, Seq& s) {
F::template call<I>(t, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop2_idx(t, s);
}
template<typename T0, typename T2>
static void loop2(T0& t0, Seq& s, T2& t2) {
F::call(t0, _GET_<I>(s), t2);
FOR_SUBSEQ<Seq, I+1, N, F>::loop2(t0, s, t2);
}
template<typename T0, typename T2>
static void loop2_idx(T0& t0, Seq& s, T2& t2) {
F::template call<I>(t0, _GET_<I>(s), t2);
FOR_SUBSEQ<Seq, I+1, N, F>::loop2_idx(t0, s, t2);
}
template<typename T0, typename T1>
static void loop3(T0& t0, T1& t1, Seq& s) {
F::call(t0, t1, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop3(t0, t1, s);
}
template<typename T0, typename T1>
static void loop3_idx(T0& t0, T1& t1, Seq& s) {
F::call(I, t0, t1, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop3_idx(t0, t1, s);
}
};
// initial/break condition for 'for-loop' over sequences: I==N
template<typename Seq, long N, class F>
struct FOR_SUBSEQ<Seq,N,N,F>
{
static void loop() {}
static void loop_idx() {}
static void loop(Seq& t) {}
static void loop_idx(Seq& t) {}
template<typename T>
static void loop1(Seq& s, T& t) {}
template<typename T>
static void loop1_idx(Seq& s, T& t) {}
template<typename T1, typename T2>
static void loop1(Seq& s, T1& t1, T2& t2) {}
template<typename T1, typename T2>
static void loop1_idx(Seq& s, T1& t1, T2& t2) {}
template<typename T>
static void loop2(T& t, Seq& s) {}
template<typename T>
static void loop2_idx(T& t, Seq& s) {}
template<typename T0, typename T2>
static void loop2(T0& t0, Seq& s, T2& t2) {}
template<typename T0, typename T2>
static void loop2_idx(T0& t0, Seq& s, T2& t2) {}
template<typename T0, typename T1>
static void loop3(T0& t0, T1& t1, Seq& s) {}
template<typename T0, typename T1>
static void loop3_idx(T0& t0, T1& t1, Seq& s) {}
};
/// \brief
/// interface for loop over sequence of values
/// for i in {seq[0]..seq[end]}
///
template<class F>
struct FOR_EACH
{
template<typename Seq>
static void loop() { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop(); }
template<typename Seq>
static void loop_idx() { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop_idx(); }
template<typename Seq>
static void loop(Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop(s); }
template<typename Seq>
static void loop_idx(Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop_idx(s); }
template<typename Seq, typename T>
static void loop1(Seq& s, T& t) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1(s, t); }
template<typename Seq, typename T>
static void loop1_idx(Seq& s, T& t) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1_idx(s, t); }
template<typename Seq, typename T1, typename T2>
static void loop1(Seq& s, T1& t1, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1(s, t1, t2); }
template<typename Seq, typename T1, typename T2>
static void loop1_idx(Seq& s, T1& t1, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1_idx(s, t1, t2); }
template<typename T, typename Seq>
static void loop2(T& t, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2(t, s); }
template<typename T, typename Seq>
static void loop2_idx(T& t, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2_idx(t, s); }
template<typename T0, typename Seq, typename T2>
static void loop2(T0& t0, Seq& s, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2(t0, s, t2); }
template<typename T0, typename Seq, typename T2>
static void loop2_idx(T0& t0, Seq& s, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2_idx(t0, s, t2); }
template<typename T0, typename T1, typename Seq>
static void loop3(T0& t0, T1& t1, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop3(t0, t1, s); }
template<typename T0, typename T1, typename Seq>
static void loop3_idx(T0& t0, T1& t1, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop3_idx(t0, t1, s); }
};
} // namespace tools
#endif // EXTENSIONS_GENERIC_LOOPS_H
\ No newline at end of file
/******************************************************************************
*
* Extension of AMDiS - Adaptive multidimensional simulations
*
* Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
* Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
*
* Authors: Simon Praetorius et al.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*
* See also license.opensource.txt in the distribution.
*
******************************************************************************/
#ifndef EXTENSIONS_GENERIC_LOOPS_H
#define EXTENSIONS_GENERIC_LOOPS_H
#include <tuple>
#define _GET_ std::get
#define _GET_TYPE_ std::tuple_element
#define _LENGTH_ std::tuple_size
namespace tools {
// for-loop over sequence of values
template<typename Seq, long I, long N, class F>
struct FOR_SUBSEQ
{
static void loop() {
F::call(); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop();
}
static void loop_idx() {
F::call(I); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop_idx();
}
static void loop(Seq& s) {
F::call(_GET_<I>(s)); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop(s);
}
static void loop_idx(Seq& s) {
F::call(I,_GET_<I>(s)); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop_idx(s);
}
template<typename T>
static void loop1(Seq& s, T& t) {
F::call(_GET_<I>(s), t); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1(s, t);
}
template<typename T>
static void loop1_idx(Seq& s, T& t) {
F::call(I, _GET_<I>(s), t); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1_idx(s, t);
}
template<typename T1, typename T2>
static void loop1(Seq& s, T1& t1, T2& t2) {
F::call(_GET_<I>(s), t1, t2); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1(s, t1, t2);
}
template<typename T1, typename T2>
static void loop1_idx(Seq& s, T1& t1, T2& t2) {
F::call(I, _GET_<I>(s), t1, t2); // your implementation here
FOR_SUBSEQ<Seq, I+1, N, F>::loop1_idx(s, t1, t2);
}
template<typename T>
static void loop2(T& t, Seq& s) {
F::call(t, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop2(t, s);
}
template<typename T>
static void loop2_idx(T& t, Seq& s) {
F::template call<I>(t, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop2_idx(t, s);
}
template<typename T0, typename T2>
static void loop2(T0& t0, Seq& s, T2& t2) {
F::call(t0, _GET_<I>(s), t2);
FOR_SUBSEQ<Seq, I+1, N, F>::loop2(t0, s, t2);
}
template<typename T0, typename T2>
static void loop2_idx(T0& t0, Seq& s, T2& t2) {
F::template call<I>(t0, _GET_<I>(s), t2);
FOR_SUBSEQ<Seq, I+1, N, F>::loop2_idx(t0, s, t2);
}
template<typename T0, typename T1>
static void loop3(T0& t0, T1& t1, Seq& s) {
F::call(t0, t1, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop3(t0, t1, s);
}
template<typename T0, typename T1>
static void loop3_idx(T0& t0, T1& t1, Seq& s) {
F::call(I, t0, t1, _GET_<I>(s));
FOR_SUBSEQ<Seq, I+1, N, F>::loop3_idx(t0, t1, s);
}
};
// initial/break condition for 'for-loop' over sequences: I==N
template<typename Seq, long N, class F>
struct FOR_SUBSEQ<Seq,N,N,F>
{
static void loop() {}
static void loop_idx() {}
static void loop(Seq& t) {}
static void loop_idx(Seq& t) {}
template<typename T>
static void loop1(Seq& s, T& t) {}
template<typename T>
static void loop1_idx(Seq& s, T& t) {}
template<typename T1, typename T2>
static void loop1(Seq& s, T1& t1, T2& t2) {}
template<typename T1, typename T2>
static void loop1_idx(Seq& s, T1& t1, T2& t2) {}
template<typename T>
static void loop2(T& t, Seq& s) {}
template<typename T>
static void loop2_idx(T& t, Seq& s) {}
template<typename T0, typename T2>
static void loop2(T0& t0, Seq& s, T2& t2) {}
template<typename T0, typename T2>
static void loop2_idx(T0& t0, Seq& s, T2& t2) {}
template<typename T0, typename T1>
static void loop3(T0& t0, T1& t1, Seq& s) {}
template<typename T0, typename T1>
static void loop3_idx(T0& t0, T1& t1, Seq& s) {}
};
/// \brief
/// interface for loop over sequence of values
/// for i in {seq[0]..seq[end]}
///
template<class F>
struct FOR_EACH
{
template<typename Seq>
static void loop() { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop(); }
template<typename Seq>
static void loop_idx() { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop_idx(); }
template<typename Seq>
static void loop(Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop(s); }
template<typename Seq>
static void loop_idx(Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop_idx(s); }
template<typename Seq, typename T>
static void loop1(Seq& s, T& t) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1(s, t); }
template<typename Seq, typename T>
static void loop1_idx(Seq& s, T& t) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1_idx(s, t); }
template<typename Seq, typename T1, typename T2>
static void loop1(Seq& s, T1& t1, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1(s, t1, t2); }
template<typename Seq, typename T1, typename T2>
static void loop1_idx(Seq& s, T1& t1, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop1_idx(s, t1, t2); }
template<typename T, typename Seq>
static void loop2(T& t, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2(t, s); }
template<typename T, typename Seq>
static void loop2_idx(T& t, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2_idx(t, s); }
template<typename T0, typename Seq, typename T2>
static void loop2(T0& t0, Seq& s, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2(t0, s, t2); }
template<typename T0, typename Seq, typename T2>
static void loop2_idx(T0& t0, Seq& s, T2& t2) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop2_idx(t0, s, t2); }
template<typename T0, typename T1, typename Seq>
static void loop3(T0& t0, T1& t1, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop3(t0, t1, s); }
template<typename T0, typename T1, typename Seq>
static void loop3_idx(T0& t0, T1& t1, Seq& s) { FOR_SUBSEQ<Seq, 0, _LENGTH_<Seq>::value, F>::loop3_idx(t0, t1, s); }
};
} // namespace tools
#endif // EXTENSIONS_GENERIC_LOOPS_H
\ No newline at end of file
......@@ -23,8 +23,7 @@ using namespace AMDiS;
namespace Helpers {
void calcMaxOnXAxis(DOFVector<double> *rho, std::vector<std::pair<WorldVector<double>, double> > &maxima)
{ FUNCNAME("Helpers::calcMaxOnXAxis()");
{
std::vector<WorldVector<double> > x;
std::vector<double> y;
......@@ -47,7 +46,7 @@ namespace Helpers {
void calcMaxOnYAxis(DOFVector<double> *rho, std::vector<std::pair<WorldVector<double>, double> > &maxima)
{ FUNCNAME("Helpers::calcMaxOnYAxis()");
{
std::vector<WorldVector<double> > x;
std::vector<double> y;
......@@ -72,7 +71,7 @@ namespace Helpers {
void transformMesh(Mesh *mesh, WorldVector<double> scale, WorldVector<double> shift, WorldVector<double> rotate)
{ FUNCNAME("Helpers::scaleMesh()");
{
int dow = Global::getGeo(WORLD);
mtl::dense2D<double> Rx(dow,dow),Ry(dow,dow),Rz(dow,dow),T_(dow,dow),S(dow,dow);
......@@ -124,8 +123,7 @@ namespace Helpers {
void scaleMesh(Mesh *mesh, WorldVector<double> shift, WorldVector<double> scale)
{ FUNCNAME("Helpers::scaleMesh()");
{
deque<MacroElement*>::iterator macro;
for(macro = mesh->firstMacroElement(); macro != mesh->endOfMacroElements(); macro++) {
......@@ -141,8 +139,7 @@ namespace Helpers {
// scale by different values in all directions
void scaleMesh(Mesh *mesh, WorldVector<double> scale)
{ FUNCNAME("Helpers::scaleMesh()");
{
WorldVector<double> shift; shift.set(0.0);
scaleMesh(mesh,shift,scale);
}
......@@ -150,8 +147,7 @@ namespace Helpers {
// scale by different values in all directions
void scaleMesh(std::vector<Mesh*> meshes, WorldVector<double> scale)
{ FUNCNAME("Helpers::scaleMesh()");
{
WorldVector<double> shift; shift.set(0.0);
for (size_t i = 0; i < meshes.size(); i++)
scaleMesh(meshes[i],shift,scale);
......@@ -160,8 +156,7 @@ namespace Helpers {
// scale and shift by the same values in all directions
void scaleMesh(Mesh *mesh, double shift, double scale)
{ FUNCNAME("Helpers::scaleMesh()");
{
WorldVector<double> wShift, wScale;
wShift.set(shift);
wScale.set(scale);
......@@ -177,8 +172,7 @@ namespace Helpers {
long i;
in.open(file.c_str());
if (!in)
throw(std::runtime_error("ERROR! Could not read value file."));
TEST_EXIT(in)("Could not read value file.\n");
DOFIterator<double> dofIter(dofvec, USED_DOFS);
......@@ -190,14 +184,12 @@ namespace Helpers {
}
in.close();
if (i != size)
throw(std::runtime_error("#vertices != dofIter.size()"));
TEST_EXIT(i == size)("#vertices != dofIter.size()\n");
}
WorldVector<double> getMeshDimension(Mesh *mesh)
{ FUNCNAME("Helpers::getMeshDimension()");
{
WorldVector<double> dimension; dimension.set(-1.e10);
TraverseStack stack;
......@@ -216,8 +208,7 @@ namespace Helpers {
void getMeshDimension(Mesh *mesh, WorldVector<double> &min_corner, WorldVector<double> &max_corner)
{ FUNCNAME("Helpers::getMeshDimension()");
{
max_corner.set(-1.e10);
min_corner.set(1.e10);
......
......@@ -236,8 +236,6 @@ namespace Helpers {
inline double calcMeshSizes(Mesh* mesh, double& minH, double& maxH, int& minLevel, int& maxLevel)
{
FUNCNAME("Helpers::calcMeshSizes()");
FixVec<WorldVector<double>, VERTEX> coords(mesh->getDim(), NO_INIT);
TraverseStack stack;
......@@ -299,7 +297,7 @@ namespace Helpers {
/// inverse power method to find minimal eigenvalue of matrix A and appropriate eigenvector x, using m iterations
template <class LinearSolver, class Matrix, class EigenVector>
inline double inverse_iteration(LinearSolver& solver, const Matrix& A, EigenVector& x, int m)
{ FUNCNAME("Helpers::inverse_iteration()");
{
EigenVector y( size(x) ), res( size(x) );
double lambda = 0.0, lambda_old = 0.0, relErr;
......@@ -326,8 +324,7 @@ namespace Helpers {
/// calculate approximation to condition number of matrix A using the LinearSolver solver
template <class LinSolver, class Matrix>
inline double condition (LinSolver& solver, const Matrix& A, int m=10)
{ FUNCNAME("Helpers::condition()");
{
mtl::dense_vector<double> x(num_rows(A)), y(num_rows(A));
mtl::seed<double> seed;
random(x, seed);
......@@ -358,8 +355,7 @@ namespace Helpers {
WorldVector<double> p;
if (nPoints <= 1)
throw(std::runtime_error("Zu wenig Punkte fuer eine Interpolation!"));
TEST_EXIT(nPoints > 1)("Zu wenig Punkte fuer eine Interpolation!\n");
for (int i = 0; i < nPoints; ++i) {
double lambda = static_cast<double>(i)/static_cast<double>(nPoints - 1.0);
......
......@@ -100,6 +100,8 @@ public:
numRefinements0(15),
globalRefined(false)
{
FUNCNAME("RefinementLevel::RefinementLevel()");
mesh = feSpace->getMesh();
switch (mesh->getDim()) {
case 1:
......@@ -121,7 +123,7 @@ public:
numRefinements = numRefinements0;
}
~RefinementLevel() {
virtual ~RefinementLevel() {
delete coarseningManager;
delete refinementManager;
}
......@@ -141,7 +143,7 @@ public:
// build mesh for phasefield-function
bool meshChanged = true;
Flag markFlag;
int oldMinLevel = 100, oldMaxLevel = 0, oldNr = 0, oldOldNr = 0;
int oldNr = 0, oldOldNr = 0;
int i = 0;
while (meshChanged && i < numRefinements) {
markElements(markFlag);
......@@ -156,8 +158,6 @@ public:
}
i++;
oldMinLevel = minLevel;
oldMaxLevel = maxLevel;
oldOldNr = oldNr;
oldNr = nr;
}
......@@ -178,8 +178,6 @@ public:
void calcMeshSizes(double& minH, double& maxH, int& minLevel, int& maxLevel)
{
FUNCNAME("RefinementLevel::calcMeshSizes()");
FixVec<WorldVector<double>, VERTEX> coords(mesh->getDim(), NO_INIT);
TraverseStack stack;
......@@ -211,8 +209,6 @@ public:
double calcMeshSize(ElInfo *elInfo)
{
FUNCNAME("RefinementLevel::calcMeshSizes()");
FixVec<WorldVector<double>, VERTEX> coords(mesh->getDim(), NO_INIT);
coords = elInfo->getCoords();
double h = 0.0;
......@@ -248,8 +244,6 @@ public:
bool refineMesh(Flag markFlag, bool onlyRefine)
{
FUNCNAME("RefinementLevel::refineMesh()");
int oldSize = mesh->getNumberOfVertices();
if (markFlag.isSet(1))
refinementManager->refineMesh(mesh);
......
......@@ -32,12 +32,12 @@ class RefinementLevelCoords : public RefinementLevel<WorldVector<double>, int >
{
public:
RefinementLevelCoords(const FiniteElemSpace *feSpace_, MeshRefinementFunction<WorldVector<double>, int >* refineFct_) :
RefinementLevel<WorldVector<double>, int >(feSpace_, refineFct_) { };
RefinementLevel<WorldVector<double>, int >(feSpace_, refineFct_) { }
~RefinementLevelCoords() {}
void markElements(Flag &markFlag)
{
FUNCNAME("RefinementLevelCoords::markElements()");
FixVec<WorldVector<double>, VERTEX> coords(mesh->getDim(), NO_INIT);
WorldVector<double> center;
......@@ -67,7 +67,7 @@ public:
markFlag = 1;
if (elMarkCoarsen)
markFlag |= 2;
};
}
};
......@@ -80,12 +80,12 @@ class RefinementLevelCoords2 : public RefinementLevel<double, int >
{
public:
RefinementLevelCoords2(const FiniteElemSpace *feSpace_, MeshRefinementFunction<double, int >* refineFct_, AbstractFunction<double, WorldVector<double> > *fct_) :
RefinementLevel<double, int >(feSpace_, refineFct_), fct(fct_) { };
RefinementLevel<double, int >(feSpace_, refineFct_), fct(fct_) { }
~RefinementLevelCoords2() {}
void markElements(Flag &markFlag)
{
FUNCNAME("RefinementLevelCoords::markElements()");
FixVec<WorldVector<double>, VERTEX> coords(mesh->getDim(), NO_INIT);
WorldVector<double> center;
......@@ -116,7 +116,7 @@ public:
markFlag = 1;
if (elMarkCoarsen)
markFlag |= 2;
};
}
private:
AbstractFunction<double, WorldVector<double> > *fct;
......@@ -133,12 +133,12 @@ class RefinementLevelDOF : public RefinementLevel<double, int>
public: