Commit 6c30ac09 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

small changes in some baseProblems

parent 6059fd73
...@@ -125,48 +125,48 @@ void CahnHilliard::fillOperators() ...@@ -125,48 +125,48 @@ void CahnHilliard::fillOperators()
// c // c
Operator *opChMnew = new Operator(feSpace, feSpace); Operator *opChMnew = new Operator(feSpace, feSpace);
opChMnew->addZeroOrderTerm(new Simple_ZOT); opChMnew->addTerm(new Simple_ZOT);
Operator *opChMold = new Operator(feSpace, feSpace); Operator *opChMold = new Operator(feSpace, feSpace);
opChMold->addZeroOrderTerm(new VecAtQP_ZOT(prob->getSolution()->getDOFVector(0))); opChMold->addTerm(new VecAtQP_ZOT(prob->getSolution()->getDOFVector(0)));
// -nabla*(grad(c)) // -nabla*(grad(c))
Operator *opChL = new Operator(feSpace, feSpace); Operator *opChL = new Operator(feSpace, feSpace);
opChL->addSecondOrderTerm(new Simple_SOT); opChL->addTerm(new Simple_SOT);
// div(M(c)grad(mu)), with M(c)=gamma/4*(c^2-1)^2 // div(M(c)grad(mu)), with M(c)=gamma/4*(c^2-1)^2
Operator *opChLM = new Operator(feSpace, feSpace); Operator *opChLM = new Operator(feSpace, feSpace);
if (useMobility) { if (useMobility) {
if (doubleWell == 0) if (doubleWell == 0)
opChLM->addSecondOrderTerm(new VecAtQP_SOT( opChLM->addTerm(new VecAtQP_SOT(
prob->getSolution()->getDOFVector(0), prob->getSolution()->getDOFVector(0),
new MobilityCH0(gamma, degree))); new MobilityCH0(gamma, degree)));
else else
opChLM->addSecondOrderTerm(new VecAtQP_SOT( opChLM->addTerm(new VecAtQP_SOT(
prob->getSolution()->getDOFVector(0), prob->getSolution()->getDOFVector(0),
new MobilityCH1(gamma, degree))); new MobilityCH1(gamma, degree)));
} else } else
opChLM->addSecondOrderTerm(new Simple_SOT(gamma)); opChLM->addTerm(new Simple_SOT(gamma));
// -2*c_old^3 + 3/2*c_old^2 // -2*c_old^3 + 3/2*c_old^2
Operator *opChMPowExpl = new Operator(feSpace, feSpace); Operator *opChMPowExpl = new Operator(feSpace, feSpace);
opChMPowExpl->addZeroOrderTerm(new VecAtQP_ZOT( opChMPowExpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0), prob->getSolution()->getDOFVector(0),
new AMDiS::Pow<3>(-2.0, 3*degree))); new AMDiS::Pow<3>(-2.0, 3*degree)));
if (doubleWell == 0) { if (doubleWell == 0) {
opChMPowExpl->addZeroOrderTerm(new VecAtQP_ZOT( opChMPowExpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0), prob->getSolution()->getDOFVector(0),
new AMDiS::Pow<2>(3.0/2.0, 2*degree))); new AMDiS::Pow<2>(3.0/2.0, 2*degree)));
} }
// -3*c_old^2 * c // -3*c_old^2 * c
Operator *opChMPowImpl = new Operator(feSpace, feSpace); Operator *opChMPowImpl = new Operator(feSpace, feSpace);
opChMPowImpl->addZeroOrderTerm(new VecAtQP_ZOT( opChMPowImpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0), prob->getSolution()->getDOFVector(0),
new AMDiS::Pow<2>(-3.0, 2*degree))); new AMDiS::Pow<2>(-3.0, 2*degree)));
if (doubleWell == 0) { if (doubleWell == 0) {
opChMPowImpl->addZeroOrderTerm(new VecAtQP_ZOT( opChMPowImpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0), prob->getSolution()->getDOFVector(0),
NULL, 3.0)); NULL, 3.0));
opChMPowImpl->addZeroOrderTerm(new Simple_ZOT(-0.5)); opChMPowImpl->addTerm(new Simple_ZOT(-0.5));
} else { } else {
opChMPowImpl->addZeroOrderTerm(new Simple_ZOT(1.0)); opChMPowImpl->addZeroOrderTerm(new Simple_ZOT(1.0));
} }
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
{ {
for (size_t i = 0; i < baseProblems.size(); i++) { for (size_t i = 0; i < baseProblems.size(); i++) {
for (size_t j = 0; j < baseProblems[i]->getNumProblems(); j++) for (size_t j = 0; j < baseProblems[i]->getNumProblems(); j++)
addProblem(dynamic_cast<ProblemType*>(baseProblems[i]->getProblem(j))); this->addProblem(dynamic_cast<ProblemType*>(baseProblems[i]->getProblem(j)));
addIterationInterface(baseProblems[i]); addIterationInterface(baseProblems[i]);
addTimeInterface(baseProblems[i]); addTimeInterface(baseProblems[i]);
...@@ -108,7 +108,7 @@ protected: ...@@ -108,7 +108,7 @@ protected:
std::vector<BaseProblemType*> baseProblems; std::vector<BaseProblemType*> baseProblems;
unsigned dim; // dimension of the meshes unsigned dim; // dimension of the meshes
unsigned dow; // dimension of the world unsigned dow; // dimension of the world
}; };
......
...@@ -24,6 +24,7 @@ NavierStokes_TH_MultiPhase::NavierStokes_TH_MultiPhase(const std::string &name_, ...@@ -24,6 +24,7 @@ NavierStokes_TH_MultiPhase::NavierStokes_TH_MultiPhase(const std::string &name_,
viscosity2(1.0), viscosity2(1.0),
density1(1.0), density1(1.0),
density2(1.0), density2(1.0),
phaseFieldType(0),
densityPhase(NULL), densityPhase(NULL),
viscosityPhase(NULL), viscosityPhase(NULL),
multiPhase(NULL) multiPhase(NULL)
......
...@@ -31,12 +31,12 @@ using namespace AMDiS; ...@@ -31,12 +31,12 @@ using namespace AMDiS;
* Navier-Stokes problem, using Taylor Hood elements * Navier-Stokes problem, using Taylor Hood elements
* and theta-scheme time-integration * and theta-scheme time-integration
*/ */
class NavierStokes_TaylorHood : public BaseProblem<ExtendedProblemStat> class NavierStokes_TaylorHood : public BaseProblem<ProblemStat>
{ {
public: // typedefs public: // typedefs
typedef NavierStokes_TaylorHood self; typedef NavierStokes_TaylorHood self;
typedef BaseProblem<ExtendedProblemStat> super; typedef BaseProblem<ProblemStat> super;
public: // methods public: // methods
......
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