Commit f2142a3b authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

And updated extensions due to new function signature of Mesh::getDofIndexCoords()

parent d9e38a34
......@@ -30,7 +30,7 @@ namespace experimental {
{
DOFVector<WorldVector<double> > coords(feSpace, "coords");
feSpace->getMesh()->dofCompress();
feSpace->getMesh()->getDofIndexCoords(feSpace, coords);
feSpace->getMesh()->getDofIndexCoords(coords);
for (DegreeOfFreedom i = 0; i < coords.getUsedSize(); i++) {
PointType location(coords[i]);
......
......@@ -280,7 +280,7 @@ void getNormals(FiniteElemSpace *feSpace, DOFVector<WorldVector<double> > *norma
}
DOFVector<WorldVector<double> > coordsDOF(feSpace, "coords");
mesh->getDofIndexCoords(feSpace, coordsDOF);
mesh->getDofIndexCoords(coordsDOF);
Helpers::getNormalsWeighted(feSpace, normals);
VtkWriter::writeFile(normals, "normals_weighted.vtu");
......@@ -473,4 +473,4 @@ void plot(std::vector<double> &values, int numRows, int numCols, std::string sym
std::cout<<lines[i]<<std::endl;
}
} // end namespace Helpers
\ No newline at end of file
} // end namespace Helpers
......@@ -197,7 +197,7 @@ namespace details {
association.clear();
DOFVector<WorldVector<double> > coords(feSpace, "coords");
feSpace->getMesh()->getDofIndexCoords(feSpace, coords);
feSpace->getMesh()->getDofIndexCoords(coords);
for (size_t i = 0; i < indices.size(); i++)
{
DegreeOfFreedom idx2;
......@@ -216,9 +216,9 @@ namespace details {
* the 'periodicMap' associates a second DegreeOfFreedom.
**/
inline void getPeriodicAssociation(const FiniteElemSpace* feSpace,
AbstractFunction<bool, WorldVector<double> >* meshIndicator,
AbstractFunction<WorldVector<double>, WorldVector<double> >* periodicMap,
std::vector<std::pair<DegreeOfFreedom, DegreeOfFreedom> > &association)
AbstractFunction<bool, WorldVector<double> >* meshIndicator,
AbstractFunction<WorldVector<double>, WorldVector<double> >* periodicMap,
std::vector<std::pair<DegreeOfFreedom, DegreeOfFreedom> > &association)
{
std::vector<DegreeOfFreedom> indices;
details::getBoundaryIndices(feSpace, meshIndicator, indices);
......@@ -226,7 +226,7 @@ namespace details {
association.clear();
DOFVector<WorldVector<double> > coords(feSpace, "coords");
feSpace->getMesh()->getDofIndexCoords(feSpace, coords);
feSpace->getMesh()->getDofIndexCoords(coords);
for (size_t i = 0; i < indices.size(); i++)
{
DegreeOfFreedom idx2;
......@@ -238,7 +238,10 @@ namespace details {
}
}
inline void getDOFValues(const FiniteElemSpace* feSpace, AbstractFunction<double, WorldVector<double> >* values, std::vector<DegreeOfFreedom> &indices, std::vector<double> &dofValues)
inline void getDOFValues(const FiniteElemSpace* feSpace,
AbstractFunction<double, WorldVector<double> >* values,
std::vector<DegreeOfFreedom> &indices,
std::vector<double> &dofValues)
{
WorldVector<double> x;
for (size_t i = 0; i < indices.size(); i++) {
......@@ -247,11 +250,13 @@ namespace details {
}
}
inline void getDOFValues(const FiniteElemSpace* feSpace, DOFVector<double>* values, std::vector<DegreeOfFreedom> &indices, std::vector<double> &dofValues)
inline void getDOFValues(const FiniteElemSpace* feSpace,
DOFVector<double>* values,
std::vector<DegreeOfFreedom> &indices,
std::vector<double> &dofValues)
{
for (size_t i = 0; i < indices.size(); i++) {
for (size_t i = 0; i < indices.size(); i++)
dofValues.push_back((*values)[indices[i]]);
}
}
} // end namespace
......@@ -433,12 +438,11 @@ struct DirichletBcData {
}
DOFVector<WorldVector<double> > coords(feSpace, "coords");
feSpace->getMesh()->getDofIndexCoords(feSpace, coords);
feSpace->getMesh()->getDofIndexCoords(coords);
for (size_t i = 0; i < indices_.size(); i++) {
for (size_t i = 0; i < indices_.size(); i++)
list.push_back(SingularDirichletBC(row, col, indices_[i], values_[i]));
}
MSG_DBG("Dirichle BC at %d DOFs added.\n",indices_.size());
}
......
......@@ -93,7 +93,7 @@ namespace AMDiS {
}
DOFVector<WorldVector<double> > coords(dofVectors[0]->getFeSpace(), "coords");
dofVectors[0]->getFeSpace()->getMesh()->getDofIndexCoords(dofVectors[0]->getFeSpace(), coords);
dofVectors[0]->getFeSpace()->getMesh()->getDofIndexCoords(coords);
experimental::KD_Tree tree(Global::getGeo(WORLD), pointList, 10);
tree.index->buildIndex();
......
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