Skip to content
Snippets Groups Projects
Commit c19ab699 authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

adapt to API changes

[[Imported from SVN: r9849]]
parent ae3f08d1
Branches
No related tags found
No related merge requests found
...@@ -12,18 +12,18 @@ ...@@ -12,18 +12,18 @@
#include <dune/disc/elasticity/linearelasticityassembler.hh> #include <dune/disc/elasticity/linearelasticityassembler.hh>
#include <dune/disc/operators/p1operator.hh> #include <dune/disc/operators/p1operator.hh>
#include "../common/sampleonbitfield.hh" #include <dune/ag-common/sampleonbitfield.hh>
#include "../common/prolongboundarypatch.hh" #include <dune/ag-common/prolongboundarypatch.hh>
#include "../common/readbitfield.hh" #include <dune/ag-common/readbitfield.hh>
#include "../common/linearipopt.hh" #include <dune/ag-common/linearipopt.hh>
#include "../common/blockgsstep.hh" #include <dune/ag-common/blockgsstep.hh>
#include "../common/multigridstep.hh" #include <dune/ag-common/multigridstep.hh>
#include "../common/multigridtransfer.hh" #include <dune/ag-common/multigridtransfer.hh>
#include "../common/iterativesolver.hh" #include <dune/ag-common/iterativesolver.hh>
#include "../common/energynorm.hh" #include <dune/ag-common/energynorm.hh>
#include "src/hierarchicestimator.hh" #include <dune/ag-common/hierarchicestimator.hh>
#define IPOPT_BASE #define IPOPT_BASE
...@@ -175,7 +175,7 @@ int main (int argc, char *argv[]) try ...@@ -175,7 +175,7 @@ int main (int argc, char *argv[]) try
EnergyNorm<OperatorType, VectorType> energyNorm(multigridStep); EnergyNorm<OperatorType, VectorType> energyNorm(multigridStep);
IterativeSolver<OperatorType, VectorType> solver(&multigridStep, IterativeSolver<VectorType> solver(&multigridStep,
numIt, numIt,
tolerance, tolerance,
&energyNorm, &energyNorm,
......
...@@ -10,15 +10,13 @@ ...@@ -10,15 +10,13 @@
#include <dune/istl/io.hh> #include <dune/istl/io.hh>
#include "../common/prolongboundarypatch.hh" #include <dune/ag-common/prolongboundarypatch.hh>
#include "../common/readbitfield.hh" #include <dune/ag-common/readbitfield.hh>
#include <dune/ag-common/quadraticipopt.hh>
#include "../common/linearipopt.hh" #include <dune/ag-common/iterativesolver.hh>
#include <dune/ag-common/energynorm.hh>
#include "../contact/src/contactmmgstep.hh" #include "../contact/src/contactmmgstep.hh"
#include "../common/iterativesolver.hh"
#include "../common/energynorm.hh"
// Choose a solver // Choose a solver
#define IPOPT #define IPOPT
...@@ -107,7 +105,7 @@ int main (int argc, char *argv[]) try ...@@ -107,7 +105,7 @@ int main (int argc, char *argv[]) try
for (int i=0; i<numLevels-1; i++) for (int i=0; i<numLevels-1; i++)
grid.globalRefine(1); grid.globalRefine(1);
prolongBoundaryPatch(dirichletBoundary); PatchProlongator<GridType>::prolong(dirichletBoundary);
std::vector<BitField> dirichletNodes(numLevels); std::vector<BitField> dirichletNodes(numLevels);
for (int i=0; i<numLevels; i++) { for (int i=0; i<numLevels; i++) {
...@@ -135,7 +133,7 @@ int main (int argc, char *argv[]) try ...@@ -135,7 +133,7 @@ int main (int argc, char *argv[]) try
// Create a solver // Create a solver
#if defined IPOPT #if defined IPOPT
LinearIPOptSolver<VectorType> solver; QuadraticIPOptSolver<OperatorType,VectorType> solver;
solver.dirichletNodes_ = &dirichletNodes[maxlevel]; solver.dirichletNodes_ = &dirichletNodes[maxlevel];
...@@ -200,7 +198,7 @@ int main (int argc, char *argv[]) try ...@@ -200,7 +198,7 @@ int main (int argc, char *argv[]) try
#warning You have to specify a solver! #warning You have to specify a solver!
#endif #endif
typedef OgdenAssembler<GridType, 1> Assembler; typedef OgdenAssembler<GridType> Assembler;
Assembler ogdenAssembler(grid); Assembler ogdenAssembler(grid);
for (int i=0; i<numHomotopySteps; i++) { for (int i=0; i<numHomotopySteps; i++) {
...@@ -257,8 +255,8 @@ int main (int argc, char *argv[]) try ...@@ -257,8 +255,8 @@ int main (int argc, char *argv[]) try
//std::cout << x << std::endl; //std::cout << x << std::endl;
// Output result // Output result
AmiraMeshWriter<GridType>::writeGrid(grid, "resultGrid"); LeafAmiraMeshWriter<GridType>::writeGrid(grid, "resultGrid");
AmiraMeshWriter<GridType>::writeBlockVector(grid, x, "resultGridFunc"); LeafAmiraMeshWriter<GridType>::writeBlockVector(grid, x, "resultGridFunc");
} catch (Exception e) { } catch (Exception e) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment