Commit 048c0586 authored by Blake Nelson's avatar Blake Nelson

*** empty log message ***


git-svn-id: https://gforge.sci.utah.edu/svn/nektar/trunk@363 305cdda6-5ce1-45b3-a98d-dfc68c8b3305
parent bc257d21
......@@ -211,4 +211,4 @@ namespace Nektar
/**
* %Log%
*/
\ No newline at end of file
*/
......@@ -230,4 +230,4 @@ namespace Nektar
{0, 0, 1, 0.5160516828, 0.3894384191, 0.0945098981},
{0, 0, 1, 0.5043443688, 0.3260983223, 0.1695573088}};
}
}
\ No newline at end of file
}
......@@ -108,10 +108,9 @@ namespace Nektar
~LinearSystem() {}
template<unsigned int dim>
NekVector<DataType, dim, space> Solve(boost::shared_ptr<NekVector<DataType, dim, space> > b) const
template<typename VectorType>
VectorType Solve(const boost::shared_ptr<const VectorType>& b) const
{
typedef NekVector<DataType, dim, space> VectorType;
VectorType x(*b);
LinearSystemSolver<MatrixType, VectorType>::Solve(A, *b, x);
return x;
......
......@@ -59,6 +59,9 @@ namespace Nektar
result.push_back(boost::lexical_cast<DataType>(*strIter));
}
}
catch(boost::bad_lexical_cast&)
{
}
return result;
}
......@@ -70,7 +73,7 @@ namespace Nektar
typedef NekVector<DataType, dim, space> VectorType;
DataType result(0);
for(VectorType::const_iterator iter = v.begin(); iter != v.end(); ++iter)
for(typename VectorType::const_iterator iter = v.begin(); iter != v.end(); ++iter)
{
result += NekVectorTypeTraits<DataType>::abs(*iter);
}
......@@ -84,7 +87,7 @@ namespace Nektar
typedef NekVector<DataType, dim, space> VectorType;
DataType result(0);
for(VectorType::const_iterator iter = v.begin(); iter != v.end(); ++iter)
for(typename VectorType::const_iterator iter = v.begin(); iter != v.end(); ++iter)
{
DataType v = NekVectorTypeTraits<DataType>::abs(*iter);
result += v*v;
......@@ -225,5 +228,5 @@ namespace Nektar
}
#endif NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_VECTOR_COMMON_HPP
#endif //NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_NEK_VECTOR_COMMON_HPP
......@@ -86,7 +86,7 @@ namespace Nektar
{
std::vector<DataType> values = fromString<DataType>(vectorValues);
m_dimension = values.size();
m_impl = MemoryManager::AllocateSharedArray<DataType>(m_dimension);
m_data = MemoryManager::AllocateSharedArray<DataType>(m_dimension);
std::copy(values.begin(), values.end(), m_data);
ASSERTL1(m_dimension > 0, "Error converting string values to vector");
......@@ -275,7 +275,7 @@ namespace Nektar
typename boost::call_traits<DataType>::const_reference operator()(unsigned int i) const
{
ASSERTL1(( i >= 0) && (i < GetDimension()), "Invalid access to m_data via parenthesis operator");
return m_[i];
return m_data[i];
}
typename boost::call_traits<DataType>::reference operator[](unsigned int i)
......
......@@ -43,7 +43,7 @@ namespace Nektar
enum PointerWrapper { eWrapper, eCopy };
}
#endif NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_POINTER_WRAPPER_H
#endif //NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_POINTER_WRAPPER_H
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