Skip to content
Snippets Groups Projects
Commit 7b04fd88 authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Use Functions::interpolate to set the Dirichlet values

[[Imported from SVN: r9660]]
parent de486c49
No related branches found
No related tags found
No related merge requests found
......@@ -330,18 +330,12 @@ int main (int argc, char *argv[]) try
////////////////////////////////////////////////////////
DirichletValues dirichletValues(homotopyParameter);
std::vector<FieldVector<double,3> > dV;
Functions::interpolate(feBasis, dV, dirichletValues, dirichletDofs);
for (vIt=gridView.begin<dim>(); vIt!=vEndIt; ++vIt) {
int idx = indexSet.index(*vIt);
if (dirichletDofs[idx][0]) {
// Only the positions have Dirichlet values
dirichletValues.evaluate(vIt->geometry().corner(0), x[idx].r);
}
}
for (size_t i=0; i<x.size(); i++)
if (dirichletDofs[i][0])
x[i].r = dV[i];
// /////////////////////////////////////////////////////
// Solve!
......
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