Commit fd82b971 authored by Backofen, Rainer's avatar Backofen, Rainer

demo updated to rev1210 see ChangeLog

parent 039ce59f
......@@ -70,13 +70,13 @@ int main(int argc, char* argv[])
adaptInfo);
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR, ball.getFESpace());
Operator matrixOperator(Operator::MATRIX_OPERATOR, ball.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
ball.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
int degree = ball.getFESpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, ball.getFESpace());
int degree = ball.getFeSpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, ball.getFeSpace());
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
ball.addVectorOperator(&rhsOperator);
......
......@@ -68,15 +68,15 @@ int main(int argc, char* argv[])
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR,
bunny.getFESpace());
bunny.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
bunny.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
Operator rhsOperator(Operator::VECTOR_OPERATOR,
bunny.getFESpace());
bunny.getFeSpace());
int degree = bunny.getFESpace()->getBasisFcts()->getDegree();
int degree = bunny.getFeSpace()->getBasisFcts()->getDegree();
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
bunny.addVectorOperator(&rhsOperator);
......
......@@ -142,21 +142,21 @@ int main(int argc, char* argv[])
adoptFlag);
// ===== create operators for problem1 =====
Operator matrixOperator1(Operator::MATRIX_OPERATOR, problem1.getFESpace());
Operator matrixOperator1(Operator::MATRIX_OPERATOR, problem1.getFeSpace());
matrixOperator1.addSecondOrderTerm(new Laplace_SOT);
problem1.addMatrixOperator(&matrixOperator1);
int degree = problem1.getFESpace()->getBasisFcts()->getDegree();
Operator rhsOperator1(Operator::VECTOR_OPERATOR, problem1.getFESpace());
int degree = problem1.getFeSpace()->getBasisFcts()->getDegree();
Operator rhsOperator1(Operator::VECTOR_OPERATOR, problem1.getFeSpace());
rhsOperator1.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
problem1.addVectorOperator(&rhsOperator1);
// ===== create operators for problem2 =====
Operator matrixOperator2(Operator::MATRIX_OPERATOR, problem2.getFESpace());
Operator matrixOperator2(Operator::MATRIX_OPERATOR, problem2.getFeSpace());
matrixOperator2.addZeroOrderTerm(new Simple_ZOT);
problem2.addMatrixOperator(&matrixOperator2);
Operator rhsOperator2(Operator::VECTOR_OPERATOR, problem2.getFESpace());
Operator rhsOperator2(Operator::VECTOR_OPERATOR, problem2.getFeSpace());
rhsOperator2.addZeroOrderTerm(new VecAtQP_ZOT(problem1.getSolution(),
new Identity(degree)));
problem2.addVectorOperator(&rhsOperator2);
......
......@@ -66,14 +66,14 @@ int main(int argc, char* argv[])
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR, ellipt.getFESpace());
Operator matrixOperator(Operator::MATRIX_OPERATOR, ellipt.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
ellipt.addMatrixOperator(matrixOperator);
// ===== create rhs operator =====
int degree = ellipt.getFESpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, ellipt.getFESpace());
int degree = ellipt.getFeSpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, ellipt.getFeSpace());
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
ellipt.addVectorOperator(rhsOperator);
......
......@@ -194,7 +194,7 @@ int main(int argc, char** argv)
// ===== create rhs functions =====
int degree = heatSpace.getFESpace()->getBasisFcts()->getDegree();
int degree = heatSpace.getFeSpace()->getBasisFcts()->getDegree();
F *rhsFct = new F(degree);
rhsFct->setTimePtr(heat.getRHSTimePtr());
......@@ -205,7 +205,7 @@ int main(int argc, char** argv)
// create laplace
Operator A(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR,
heatSpace.getFESpace());
heatSpace.getFeSpace());
A.addSecondOrderTerm(new Laplace_SOT);
A.setUhOld(heat.getOldSolution());
if (*(heat.getThetaPtr()) != 0.0)
......@@ -215,14 +215,14 @@ int main(int argc, char** argv)
// create zero order operator
Operator C(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR,
heatSpace.getFESpace());
heatSpace.getFeSpace());
C.addZeroOrderTerm(new Simple_ZOT);
C.setUhOld(heat.getOldSolution());
heatSpace.addMatrixOperator(C, heat.getTau1Ptr(), heat.getTau1Ptr());
heatSpace.addVectorOperator(C, heat.getTau1Ptr(), heat.getTau1Ptr());
// create RHS operator
Operator F(Operator::VECTOR_OPERATOR, heatSpace.getFESpace());
Operator F(Operator::VECTOR_OPERATOR, heatSpace.getFeSpace());
F.addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct));
heatSpace.addVectorOperator(F);
......
......@@ -63,13 +63,13 @@ int main(int argc, char* argv[])
adaptInfo);
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR, neumann.getFESpace());
Operator matrixOperator(Operator::MATRIX_OPERATOR, neumann.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
neumann.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
int degree = neumann.getFESpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, neumann.getFESpace());
int degree = neumann.getFeSpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, neumann.getFeSpace());
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
neumann.addVectorOperator(&rhsOperator);
......
......@@ -72,13 +72,13 @@ int main(int argc, char* argv[])
adaptInfo);
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR, ellipt.getFESpace());
Operator matrixOperator(Operator::MATRIX_OPERATOR, ellipt.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
ellipt.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
int degree = ellipt.getFESpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, ellipt.getFESpace());
int degree = ellipt.getFeSpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, ellipt.getFeSpace());
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
ellipt.addVectorOperator(&rhsOperator);
......
......@@ -175,7 +175,7 @@ int main(int argc, char** argv)
adaptInfoInitial);
// ===== create rhs functions =====
int degree = heatSpace->getFESpace()->getBasisFcts()->getDegree();
int degree = heatSpace->getFeSpace()->getBasisFcts()->getDegree();
F *rhsFct = new F(degree);
rhsFct->setTimePtr(heat->getTimePtr());
......@@ -186,7 +186,7 @@ int main(int argc, char** argv)
// create laplace
Operator *A = new Operator(Operator::MATRIX_OPERATOR |
Operator::VECTOR_OPERATOR,
heatSpace->getFESpace());
heatSpace->getFeSpace());
A->addSecondOrderTerm(new Laplace_SOT);
......@@ -197,7 +197,7 @@ int main(int argc, char** argv)
// create zero order operator
Operator *C = new Operator(Operator::MATRIX_OPERATOR |
Operator::VECTOR_OPERATOR,
heatSpace->getFESpace());
heatSpace->getFeSpace());
C->addZeroOrderTerm(new Simple_ZOT);
......@@ -208,7 +208,7 @@ int main(int argc, char** argv)
// create RHS operator
Operator *F = new Operator(Operator::VECTOR_OPERATOR,
heatSpace->getFESpace());
heatSpace->getFeSpace());
F->addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct));
......
......@@ -60,7 +60,7 @@ public:
// ===== create coords vector =====
for (int i = 0; i < Global::getGeo(WORLD); i++)
parametricCoords[i] = new DOFVector<double>(this->getFESpace(),
parametricCoords[i] = new DOFVector<double>(this->getFeSpace(),
"parametric coords");
// ===== create parametric object =====
......@@ -76,7 +76,7 @@ public:
void buildBeforeCoarsen(AdaptInfo *adaptInfo, Flag flag) {
FUNCNAME("ParametricSphere::buildAfterCoarsen()");
MSG("calculation of parametric coordinates\n");
int preDOFs = this->getFESpace()->getAdmin()->getNumberOfPreDOFs(VERTEX);
int preDOFs = this->getFeSpace()->getAdmin()->getNumberOfPreDOFs(VERTEX);
int dim = this->getMesh()->getDim();
int dow = Global::getGeo(WORLD);
WorldVector<double> vertexCoords;
......@@ -142,15 +142,15 @@ int main(int argc, char* argv[])
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR,
parametric.getFESpace());
parametric.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
parametric.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
Operator rhsOperator(Operator::VECTOR_OPERATOR,
parametric.getFESpace());
parametric.getFeSpace());
int degree = parametric.getFESpace()->getBasisFcts()->getDegree();
int degree = parametric.getFeSpace()->getBasisFcts()->getDegree();
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
parametric.addVectorOperator(&rhsOperator);
......
......@@ -53,13 +53,13 @@ int main(int argc, char* argv[])
adaptInfo);
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR, periodic.getFESpace());
Operator matrixOperator(Operator::MATRIX_OPERATOR, periodic.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
periodic.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
int degree = periodic.getFESpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, periodic.getFESpace());
int degree = periodic.getFeSpace()->getBasisFcts()->getDegree();
Operator rhsOperator(Operator::VECTOR_OPERATOR, periodic.getFeSpace());
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
periodic.addVectorOperator(&rhsOperator);
......
......@@ -56,15 +56,15 @@ int main(int argc, char* argv[])
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR,
sphere.getFESpace());
sphere.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
sphere.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
Operator rhsOperator(Operator::VECTOR_OPERATOR,
sphere.getFESpace());
sphere.getFeSpace());
int degree = sphere.getFESpace()->getBasisFcts()->getDegree();
int degree = sphere.getFeSpace()->getBasisFcts()->getDegree();
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
sphere.addVectorOperator(&rhsOperator);
......
......@@ -117,15 +117,15 @@ int main(int argc, char* argv[])
// ===== create matrix operator =====
Operator matrixOperator(Operator::MATRIX_OPERATOR,
torus.getFESpace());
torus.getFeSpace());
matrixOperator.addSecondOrderTerm(new Laplace_SOT);
torus.addMatrixOperator(&matrixOperator);
// ===== create rhs operator =====
Operator rhsOperator(Operator::VECTOR_OPERATOR,
torus.getFESpace());
torus.getFeSpace());
int degree = torus.getFESpace()->getBasisFcts()->getDegree();
int degree = torus.getFeSpace()->getBasisFcts()->getDegree();
F f(degree);
rhsOperator.addZeroOrderTerm(new CoordsAtQP_ZOT(&f));
......@@ -144,7 +144,7 @@ int main(int argc, char* argv[])
DegreeOfFreedom dof;
WorldVector<double> x;
const FiniteElemSpace *feSpace = torus.getFESpace();
const FiniteElemSpace *feSpace = torus.getFeSpace();
const BasisFunction *basFcts = feSpace->getBasisFcts();
int numBasFcts = basFcts->getNumber();
DegreeOfFreedom *localIndices = new DegreeOfFreedom[numBasFcts];
......
......@@ -65,24 +65,24 @@ int main(int argc, char* argv[])
// ===== create matrix operators =====
Operator matrixOperator00(Operator::MATRIX_OPERATOR,
vecellipt.getFESpace(0), vecellipt.getFESpace(0));
vecellipt.getFeSpace(0), vecellipt.getFeSpace(0));
matrixOperator00.addSecondOrderTerm(new Laplace_SOT);
vecellipt.addMatrixOperator(matrixOperator00, 0, 0);
Operator matrixOperator10(Operator::MATRIX_OPERATOR,
vecellipt.getFESpace(1), vecellipt.getFESpace(0));
vecellipt.getFeSpace(1), vecellipt.getFeSpace(0));
matrixOperator10.addZeroOrderTerm(new Simple_ZOT);
vecellipt.addMatrixOperator(matrixOperator10, 1, 0);
Operator matrixOperator11(Operator::MATRIX_OPERATOR,
vecellipt.getFESpace(1), vecellipt.getFESpace(1));
vecellipt.getFeSpace(1), vecellipt.getFeSpace(1));
matrixOperator11.addZeroOrderTerm(new Simple_ZOT(-1.0));
vecellipt.addMatrixOperator(matrixOperator11, 1, 1);
// ===== create rhs operator =====
int degree = vecellipt.getFESpace(0)->getBasisFcts()->getDegree();
Operator rhsOperator0(Operator::VECTOR_OPERATOR, vecellipt.getFESpace(0));
int degree = vecellipt.getFeSpace(0)->getBasisFcts()->getDegree();
Operator rhsOperator0(Operator::VECTOR_OPERATOR, vecellipt.getFeSpace(0));
rhsOperator0.addZeroOrderTerm(new CoordsAtQP_ZOT(new F(degree)));
vecellipt.addVectorOperator(rhsOperator0, 0);
......
......@@ -249,9 +249,9 @@ int main(int argc, char** argv)
// ===== create rhs functions =====
F *rhsFct0 = new F(vecheatSpace.getFESpace(0)->getBasisFcts()->getDegree());
F *rhsFct0 = new F(vecheatSpace.getFeSpace(0)->getBasisFcts()->getDegree());
rhsFct0->setTimePtr(vecheat.getRHSTimePtr());
F *rhsFct1 = new F(vecheatSpace.getFESpace(1)->getBasisFcts()->getDegree());
F *rhsFct1 = new F(vecheatSpace.getFeSpace(1)->getBasisFcts()->getDegree());
rhsFct1->setTimePtr(vecheat.getRHSTimePtr());
// ===== create operators =====
......@@ -260,12 +260,12 @@ int main(int argc, char** argv)
// create laplace
Operator A00 (Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR,
vecheatSpace.getFESpace(0), vecheatSpace.getFESpace(0));
vecheatSpace.getFeSpace(0), vecheatSpace.getFeSpace(0));
A00.addSecondOrderTerm(new Laplace_SOT);
A00.setUhOld(vecheat.getOldSolution()->getDOFVector(0));
Operator A11(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR,
vecheatSpace.getFESpace(1), vecheatSpace.getFESpace(1));
vecheatSpace.getFeSpace(1), vecheatSpace.getFeSpace(1));
A11.addSecondOrderTerm(new Laplace_SOT);
A11.setUhOld(vecheat.getOldSolution()->getDOFVector(1));
......@@ -281,7 +281,7 @@ int main(int argc, char** argv)
// create zero order operator
Operator C00(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR,
vecheatSpace.getFESpace(0), vecheatSpace.getFESpace(0));
vecheatSpace.getFeSpace(0), vecheatSpace.getFeSpace(0));
C00.addZeroOrderTerm(new Simple_ZOT);
C00.setUhOld(vecheat.getOldSolution()->getDOFVector(0));
vecheatSpace.addMatrixOperator(C00, 0, 0,
......@@ -290,7 +290,7 @@ int main(int argc, char** argv)
Operator C11(Operator::MATRIX_OPERATOR | Operator::VECTOR_OPERATOR,
vecheatSpace.getFESpace(1), vecheatSpace.getFESpace(1));
vecheatSpace.getFeSpace(1), vecheatSpace.getFeSpace(1));
C11.addZeroOrderTerm(new Simple_ZOT);
C11.setUhOld(vecheat.getOldSolution()->getDOFVector(1));
vecheatSpace.addMatrixOperator(C11, 1, 1,
......@@ -299,11 +299,11 @@ int main(int argc, char** argv)
vecheat.getTau1Ptr(), vecheat.getTau1Ptr());
// create RHS operator
Operator F0(Operator::VECTOR_OPERATOR, vecheatSpace.getFESpace(0));
Operator F0(Operator::VECTOR_OPERATOR, vecheatSpace.getFeSpace(0));
F0.addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct0));
vecheatSpace.addVectorOperator(F0, 0);
Operator F1 = Operator(Operator::VECTOR_OPERATOR, vecheatSpace.getFESpace(1));
Operator F1 = Operator(Operator::VECTOR_OPERATOR, vecheatSpace.getFeSpace(1));
F1.addZeroOrderTerm(new CoordsAtQP_ZOT(rhsFct1));
vecheatSpace.addVectorOperator(F1, 1);
......
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