Commit a13af864 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

some small corrections in DOFVector added

parent d5274317
...@@ -424,21 +424,21 @@ namespace AMDiS { ...@@ -424,21 +424,21 @@ namespace AMDiS {
Mesh::FILL_COORDS); Mesh::FILL_COORDS);
if (basisFcts->isNodal()) { if (basisFcts->isNodal()) {
while (elInfo) { while (elInfo) {
Element *el = elInfo->getElement(); Element *el = elInfo->getElement();
basisFcts->getLocalIndices(el, feSpace->getAdmin(), myLocalIndices); basisFcts->getLocalIndices(el, feSpace->getAdmin(), myLocalIndices);
source->getLocalVector(el, sourceLocalCoeffs); source->getLocalVector(el, sourceLocalCoeffs);
for (int i = 0; i < nBasisFcts; i++) { for (int i = 0; i < nBasisFcts; i++) {
if (vec[myLocalIndices[i]] == 0.0) { if (vec[myLocalIndices[i]] == 0.0) {
coords = basisFcts->getCoords(i); coords = basisFcts->getCoords(i);
vec[myLocalIndices[i]] = sourceBasisFcts->evalUh(*coords, sourceLocalCoeffs) * factor; vec[myLocalIndices[i]] = sourceBasisFcts->evalUh(*coords, sourceLocalCoeffs) * factor;
}
} }
elInfo = stack.traverseNext(elInfo);
} }
elInfo = stack.traverseNext(elInfo); } else {
}
} else {
// nonnodal base: // nonnodal base:
ElementFunctionWorld<double> F(source, factor); ElementFunctionWorld<double> F(source, factor);
......
...@@ -1174,9 +1174,6 @@ namespace AMDiS { ...@@ -1174,9 +1174,6 @@ namespace AMDiS {
void mv(MatrixTranspose transpose, const DOFMatrix &a, const DOFVector<T>&x, void mv(MatrixTranspose transpose, const DOFMatrix &a, const DOFVector<T>&x,
DOFVector<T> &result, bool add) DOFVector<T> &result, bool add)
{ {
// Unfortunately needed
// using namespace mtl;
FUNCNAME("DOFVector<T>::mv()"); FUNCNAME("DOFVector<T>::mv()");
TEST_EXIT(a.getRowFeSpace() && a.getColFeSpace() && TEST_EXIT(a.getRowFeSpace() && a.getColFeSpace() &&
...@@ -1699,28 +1696,6 @@ namespace AMDiS { ...@@ -1699,28 +1696,6 @@ namespace AMDiS {
} }
} }
// Some free functions used in MTL4
// template <typename T>
// inline std::size_t size(const AMDiS::DOFVector<T>& v)
// {
// return v.getSize();
// }
//
// template <typename T>
// inline std::size_t num_rows(const AMDiS::DOFVector<T>& v)
// {
// return v.getSize();
// }
//
//
// template <typename T>
// inline std::size_t num_cols(const AMDiS::DOFVector<T>& v)
// {
// return 1;
// }
template <typename T> template <typename T>
inline void set_to_zero(AMDiS::DOFVector<T>& v) inline void set_to_zero(AMDiS::DOFVector<T>& v)
{ {
...@@ -1917,10 +1892,11 @@ namespace AMDiS { ...@@ -1917,10 +1892,11 @@ namespace AMDiS {
} }
// NOTE: We have to synchronize the vectors in PARALLEL_DOMAIN_AMDIS mode // NOTE: We have to synchronize the vectors in PARALLEL_DOMAIN_AMDIS mode
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS #ifdef HAVE_PARALLEL_DOMAIN_AMDIS
Parallel::MeshDistributor::globalMeshDistributor->synchAddVector(*result); Parallel::MeshDistributor::globalMeshDistributor->checkMeshChange(false);
Parallel::MeshDistributor::globalMeshDistributor->synchAddVector(volume); Parallel::MeshDistributor::globalMeshDistributor->synchAddVector(*result);
Parallel::MeshDistributor::globalMeshDistributor->synchAddVector(volume);
#endif #endif
DOFVector<double>::Iterator volIt(&volume, USED_DOFS); DOFVector<double>::Iterator volIt(&volume, USED_DOFS);
......
Supports Markdown
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