From 6cdc18cad135b35163f9dc13228d25961582723f Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Mon, 26 Feb 2018 10:13:50 +0100 Subject: [PATCH] Do not use the dune-function method basis.indexSet() It has been removed from dune-functions in the last release (at least). --- dune/gfe/rodassembler.cc | 4 ++-- dune/gfe/rodassembler.hh | 2 +- src/gradient-flow.cc | 4 ++-- src/mixed-cosserat-continuum.cc | 20 ++++++++++---------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dune/gfe/rodassembler.cc b/dune/gfe/rodassembler.cc index fb7e472b..558d284f 100644 --- a/dune/gfe/rodassembler.cc +++ b/dune/gfe/rodassembler.cc @@ -18,7 +18,7 @@ assembleGradient(const std::vector<RigidBodyMotion<double,3> >& sol, { using namespace Dune; - if (sol.size()!=this->basis_.indexSet().size()) + if (sol.size()!=this->basis_.size()) DUNE_THROW(Exception, "Solution vector doesn't match the grid!"); grad.resize(sol.size()); @@ -26,7 +26,7 @@ assembleGradient(const std::vector<RigidBodyMotion<double,3> >& sol, // A view on the FE basis on a single element auto localView = this->basis_.localView(); - auto localIndexSet = this->basis_.indexSet().localIndexSet(); + auto localIndexSet = this->basis_.localIndexSet(); ElementIterator it = this->basis_.gridView().template begin<0>(); ElementIterator endIt = this->basis_.gridView().template end<0>(); diff --git a/dune/gfe/rodassembler.hh b/dune/gfe/rodassembler.hh index 40fadb71..6e1ba19c 100644 --- a/dune/gfe/rodassembler.hh +++ b/dune/gfe/rodassembler.hh @@ -47,7 +47,7 @@ public: RodLocalStiffness<GridView,double>* localStiffness) : GeodesicFEAssembler<Basis, RigidBodyMotion<double,3> >(basis,localStiffness) { - std::vector<RigidBodyMotion<double,3> > referenceConfiguration(basis.indexSet().size()); + std::vector<RigidBodyMotion<double,3> > referenceConfiguration(basis.size()); auto it = basis.gridView().template begin<gridDim>(); auto endIt = basis.gridView().template end<gridDim>(); diff --git a/src/gradient-flow.cc b/src/gradient-flow.cc index e1fef548..3d49ced5 100644 --- a/src/gradient-flow.cc +++ b/src/gradient-flow.cc @@ -170,7 +170,7 @@ int main (int argc, char *argv[]) try BoundaryPatch<GridType::LeafGridView> dirichletBoundary(grid->leafGridView(), dirichletVertices); - BitSetVector<blocksize> dirichletNodes(feBasis.indexSet().size(), false); + BitSetVector<blocksize> dirichletNodes(feBasis.size(), false); constructBoundaryDofs(dirichletBoundary,fufemFeBasis,dirichletNodes); //////////////////////////// @@ -186,7 +186,7 @@ int main (int argc, char *argv[]) try std::vector<TargetSpace::CoordinateType> v; ::Functions::interpolate(fufemFeBasis, v, *pythonInitialIterate); - SolutionType x(feBasis.indexSet().size()); + SolutionType x(feBasis.size()); for (size_t i=0; i<x.size(); i++) x[i] = v[i]; diff --git a/src/mixed-cosserat-continuum.cc b/src/mixed-cosserat-continuum.cc index 2a71adc5..5702b032 100644 --- a/src/mixed-cosserat-continuum.cc +++ b/src/mixed-cosserat-continuum.cc @@ -170,7 +170,7 @@ int main (int argc, char *argv[]) try - std::cout << "Deformation: " << deformationFEBasis.indexSet().size() << ", orientation: " << orientationFEBasis.indexSet().size() << std::endl; + std::cout << "Deformation: " << deformationFEBasis.size() << ", orientation: " << orientationFEBasis.size() << std::endl; // ///////////////////////////////////////// // Read Dirichlet values @@ -208,7 +208,7 @@ int main (int argc, char *argv[]) try BoundaryPatch<GridView> dirichletBoundary(gridView, dirichletVertices); BoundaryPatch<GridView> neumannBoundary(gridView, neumannVertices); - BitSetVector<1> neumannNodes(deformationFEBasis.indexSet().size(), false); + BitSetVector<1> neumannNodes(deformationFEBasis.size(), false); constructBoundaryDofs(neumannBoundary,fufemDeformationFEBasis,neumannNodes); @@ -216,20 +216,20 @@ int main (int argc, char *argv[]) try std::cout << "Neumann boundary has " << neumannBoundary.numFaces() << " faces\n"; - BitSetVector<1> deformationDirichletNodes(deformationFEBasis.indexSet().size(), false); + BitSetVector<1> deformationDirichletNodes(deformationFEBasis.size(), false); constructBoundaryDofs(dirichletBoundary,fufemDeformationFEBasis,deformationDirichletNodes); - BitSetVector<3> deformationDirichletDofs(deformationFEBasis.indexSet().size(), false); - for (size_t i=0; i<deformationFEBasis.indexSet().size(); i++) + BitSetVector<3> deformationDirichletDofs(deformationFEBasis.size(), false); + for (size_t i=0; i<deformationFEBasis.size(); i++) if (deformationDirichletNodes[i][0]) for (int j=0; j<3; j++) deformationDirichletDofs[i][j] = true; - BitSetVector<1> orientationDirichletNodes(orientationFEBasis.indexSet().size(), false); + BitSetVector<1> orientationDirichletNodes(orientationFEBasis.size(), false); constructBoundaryDofs(dirichletBoundary,fufemOrientationFEBasis,orientationDirichletNodes); - BitSetVector<3> orientationDirichletDofs(orientationFEBasis.indexSet().size(), false); - for (size_t i=0; i<orientationFEBasis.indexSet().size(); i++) + BitSetVector<3> orientationDirichletDofs(orientationFEBasis.size(), false); + for (size_t i=0; i<orientationFEBasis.size(); i++) if (orientationDirichletNodes[i][0]) for (int j=0; j<3; j++) orientationDirichletDofs[i][j] = true; @@ -240,7 +240,7 @@ int main (int argc, char *argv[]) try SolutionType x; - x[_0].resize(deformationFEBasis.indexSet().size()); + x[_0].resize(deformationFEBasis.size()); lambda = std::string("lambda x: (") + parameterSet.get<std::string>("initialDeformation") + std::string(")"); PythonFunction<FieldVector<double,dim>, FieldVector<double,3> > pythonInitialDeformation(Python::evaluate(lambda)); @@ -251,7 +251,7 @@ int main (int argc, char *argv[]) try for (size_t i=0; i<x[_0].size(); i++) x[_0][i] = v[i]; - x[_1].resize(orientationFEBasis.indexSet().size()); + x[_1].resize(orientationFEBasis.size()); #if 0 lambda = std::string("lambda x: (") + parameterSet.get<std::string>("initialDeformation") + std::string(")"); PythonFunction<FieldVector<double,dim>, FieldVector<double,3> > pythonInitialDeformation(Python::evaluate(lambda)); -- GitLab