Commit c5501d36 authored by Siqi Ling's avatar Siqi Ling
Browse files

small change

parent 6cf1994a
...@@ -76,9 +76,7 @@ struct DDProblemInstat : ProblemInstat ...@@ -76,9 +76,7 @@ struct DDProblemInstat : ProblemInstat
epsilon(0.1), epsilon(0.1),
maxLevel(15), maxLevel(15),
temperRefment(NULL), temperRefment(NULL),
temperRefFct(NULL), temperRefFct(NULL)
c(radius, center),
ic(radius, center)
{ {
Parameters::get("radius", radius); Parameters::get("radius", radius);
Parameters::get("epsilon", epsilon); Parameters::get("epsilon", epsilon);
...@@ -108,6 +106,14 @@ struct DDProblemInstat : ProblemInstat ...@@ -108,6 +106,14 @@ struct DDProblemInstat : ProblemInstat
if (temperRefment) if (temperRefment)
delete temperRefment; delete temperRefment;
temperRefment = NULL; temperRefment = NULL;
if (c)
delete c;
c = NULL;
if (ic)
delete ic;
ic = NULL;
} }
void initialize(Flag initFlag, void initialize(Flag initFlag,
...@@ -118,15 +124,18 @@ struct DDProblemInstat : ProblemInstat ...@@ -118,15 +124,18 @@ struct DDProblemInstat : ProblemInstat
ProblemInstat::initialize(INIT_NOTHING); ProblemInstat::initialize(INIT_NOTHING);
c = new Circle(radius, center);
ic = new InverseCircle(radius, center);
phase = new DOFVector<double>(problemStat->getFeSpace(1), "phase2"); phase = new DOFVector<double>(problemStat->getFeSpace(1), "phase2");
phaseRefFct = new SignedDistRefinement(problemStat->getMesh(1)); phaseRefFct = new SignedDistRefinement(problemStat->getMesh(1));
phaseRefment = new RefinementLevelCoords2(problemStat->getFeSpace(1), phaseRefment = new RefinementLevelCoords2(problemStat->getFeSpace(1),
phaseRefFct, &c); phaseRefFct, c);
if (problemStat->getMeshes().size() == 2) { if (problemStat->getMeshes().size() == 2) {
temperRefFct = new MySignedDistRefinement(problemStat->getMesh(0)); temperRefFct = new MySignedDistRefinement(problemStat->getMesh(0));
temperRefment = new RefinementLevelCoords2(problemStat->getFeSpace(0), temperRefment = new RefinementLevelCoords2(problemStat->getFeSpace(0),
temperRefFct, &c); temperRefFct, c);
} }
} }
...@@ -138,7 +147,7 @@ struct DDProblemInstat : ProblemInstat ...@@ -138,7 +147,7 @@ struct DDProblemInstat : ProblemInstat
Timer t; Timer t;
SignedDistFctToPhaseField* p = SignedDistFctToPhaseField* p =
new SignedDistFctToPhaseField(epsilon, &ic, 3.0); new SignedDistFctToPhaseField(epsilon, ic, 3.0);
phaseRefment->refine(maxLevel); phaseRefment->refine(maxLevel);
phase->interpol(p); phase->interpol(p);
...@@ -183,8 +192,8 @@ protected: ...@@ -183,8 +192,8 @@ protected:
RefinementLevelCoords2* phaseRefment; RefinementLevelCoords2* phaseRefment;
RefinementLevelCoords2* temperRefment; RefinementLevelCoords2* temperRefment;
Circle c; Circle* c;
InverseCircle ic; InverseCircle* ic;
DOFVector<double>* phase; DOFVector<double>* phase;
......
Supports Markdown
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