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()
// c
Operator *opChMnew = new Operator(feSpace, feSpace);
opChMnew->addZeroOrderTerm(new Simple_ZOT);
opChMnew->addTerm(new Simple_ZOT);
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))
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
Operator *opChLM = new Operator(feSpace, feSpace);
if (useMobility) {
if (doubleWell == 0)
opChLM->addSecondOrderTerm(new VecAtQP_SOT(
opChLM->addTerm(new VecAtQP_SOT(
prob->getSolution()->getDOFVector(0),
new MobilityCH0(gamma, degree)));
else
opChLM->addSecondOrderTerm(new VecAtQP_SOT(
opChLM->addTerm(new VecAtQP_SOT(
prob->getSolution()->getDOFVector(0),
new MobilityCH1(gamma, degree)));
} else
opChLM->addSecondOrderTerm(new Simple_SOT(gamma));
opChLM->addTerm(new Simple_SOT(gamma));
// -2*c_old^3 + 3/2*c_old^2
Operator *opChMPowExpl = new Operator(feSpace, feSpace);
opChMPowExpl->addZeroOrderTerm(new VecAtQP_ZOT(
opChMPowExpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0),
new AMDiS::Pow<3>(-2.0, 3*degree)));
if (doubleWell == 0) {
opChMPowExpl->addZeroOrderTerm(new VecAtQP_ZOT(
opChMPowExpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0),
new AMDiS::Pow<2>(3.0/2.0, 2*degree)));
}
// -3*c_old^2 * c
Operator *opChMPowImpl = new Operator(feSpace, feSpace);
opChMPowImpl->addZeroOrderTerm(new VecAtQP_ZOT(
opChMPowImpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0),
new AMDiS::Pow<2>(-3.0, 2*degree)));
if (doubleWell == 0) {
opChMPowImpl->addZeroOrderTerm(new VecAtQP_ZOT(
opChMPowImpl->addTerm(new VecAtQP_ZOT(
prob->getSolution()->getDOFVector(0),
NULL, 3.0));
opChMPowImpl->addZeroOrderTerm(new Simple_ZOT(-0.5));
opChMPowImpl->addTerm(new Simple_ZOT(-0.5));
} else {
opChMPowImpl->addZeroOrderTerm(new Simple_ZOT(1.0));
}
......
......@@ -52,7 +52,7 @@ public:
{
for (size_t i = 0; i < baseProblems.size(); i++) {
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]);
addTimeInterface(baseProblems[i]);
......
......@@ -24,6 +24,7 @@ NavierStokes_TH_MultiPhase::NavierStokes_TH_MultiPhase(const std::string &name_,
viscosity2(1.0),
density1(1.0),
density2(1.0),
phaseFieldType(0),
densityPhase(NULL),
viscosityPhase(NULL),
multiPhase(NULL)
......
......@@ -31,12 +31,12 @@ using namespace AMDiS;
* Navier-Stokes problem, using Taylor Hood elements
* and theta-scheme time-integration
*/
class NavierStokes_TaylorHood : public BaseProblem<ExtendedProblemStat>
class NavierStokes_TaylorHood : public BaseProblem<ProblemStat>
{
public: // typedefs
typedef NavierStokes_TaylorHood self;
typedef BaseProblem<ExtendedProblemStat> super;
typedef BaseProblem<ProblemStat> super;
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