Skip to content
Snippets Groups Projects
Commit c1a43696 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Use localIndexSet only with dune-functions 2.6 and earlier

parent d0de5feb
No related branches found
No related tags found
No related merge requests found
...@@ -525,9 +525,11 @@ int main (int argc, char *argv[]) try ...@@ -525,9 +525,11 @@ int main (int argc, char *argv[]) try
std::cout << " ++++ element " << gridView.indexSet().index(element) << " ++++" << std::endl; std::cout << " ++++ element " << gridView.indexSet().index(element) << " ++++" << std::endl;
auto localView = feBasis.localView(); auto localView = feBasis.localView();
auto localIndexSet = feBasis.localIndexSet();
localView.bind(element); localView.bind(element);
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
auto localIndexSet = feBasis.localIndexSet();
localIndexSet.bind(localView); localIndexSet.bind(localView);
#endif
const int numOfBaseFct = localView.size(); const int numOfBaseFct = localView.size();
...@@ -535,7 +537,11 @@ int main (int argc, char *argv[]) try ...@@ -535,7 +537,11 @@ int main (int argc, char *argv[]) try
std::vector<TargetSpace> localSolution(numOfBaseFct); std::vector<TargetSpace> localSolution(numOfBaseFct);
for (int i=0; i<numOfBaseFct; i++) for (int i=0; i<numOfBaseFct; i++)
#if DUNE_VERSION_LT(DUNE_FUNCTIONS,2,7)
localSolution[i] = x[localIndexSet.index(i)]; localSolution[i] = x[localIndexSet.index(i)];
#else
localSolution[i] = x[localView.index(i)];
#endif
std::vector<Dune::FieldVector<double,embeddedBlocksize> > localADGradient(numOfBaseFct); std::vector<Dune::FieldVector<double,embeddedBlocksize> > localADGradient(numOfBaseFct);
std::vector<Dune::FieldVector<double,embeddedBlocksize> > localADVMGradient(numOfBaseFct); // VM: vector-mode std::vector<Dune::FieldVector<double,embeddedBlocksize> > localADVMGradient(numOfBaseFct); // VM: vector-mode
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment