diff --git a/doc/doxygen/concepts b/doc/doxygen/concepts deleted file mode 100644 index 1e26b1c5f623fe3c0de55992f7cb6b669b787974..0000000000000000000000000000000000000000 --- a/doc/doxygen/concepts +++ /dev/null @@ -1,12 +0,0 @@ -/** -\namespace STL -\brief <i>preudo namespace</i> for STL concepts -*/ - - -/** -\interface STL::RandomAccessContainer -\brief the STL random-access-container interface - -see http://www.sgi.com/tech/stl/RandomAccessContainer.html . -*/ diff --git a/dune/common/fvector.hh b/dune/common/fvector.hh index 759466acfb3090fca40ceb5c765feac59fc475cd..72e5ea75c0026425f1cdb15fa5bc40e347b3e0b2 100644 --- a/dune/common/fvector.hh +++ b/dune/common/fvector.hh @@ -463,16 +463,16 @@ namespace Dune { /** \brief copy constructor */ FieldVector ( const FieldVector &other ) { - for( size_type i = 0; i < SIZE; ++i ) - p[ i ] = other[ i ]; - // std::memcpy(p,other.p,SIZE*sizeof(K)); + // for( size_type i = 0; i < SIZE; ++i ) + // p[ i ] = other[ i ]; + std::memcpy(p,other.p,SIZE*sizeof(K)); } /** \brief Assigment from other vector */ FieldVector& operator= (const FieldVector& other) { - // std::memcpy(p,other.p,SIZE*sizeof(K)); - for (size_type i=0; i<SIZE; i++) - p[i] = other[i]; + std::memcpy(p,other.p,SIZE*sizeof(K)); + // for (size_type i=0; i<SIZE; i++) + // p[i] = other[i]; return *this; } diff --git a/dune/common/geometrytype.hh b/dune/common/geometrytype.hh index c7c22974ff8c42267cb369d67a8b704c8ef9f4bf..b00ce6d1484b118ed05016c5d640d48796857cc6 100644 --- a/dune/common/geometrytype.hh +++ b/dune/common/geometrytype.hh @@ -162,55 +162,44 @@ namespace Dune { return basicType_ < other.basicType_; } - friend inline std::ostream& operator<< (std::ostream& s, const GeometryType& a); - }; - - /** \brief Prints the type to an output stream */ - inline std::ostream& operator<< (std::ostream& s, const GeometryType& a) - { - switch (a.basicType_) { - case GeometryType::simplex : - s << "(simplex, " << a.dim_ << ")"; - break; - case GeometryType::cube : - s << "(cube, " << a.dim_ << ")"; - break; - case GeometryType::pyramid : - s << "pyramid"; - break; - case GeometryType::prism : - s << "prism"; - break; - case GeometryType::none : - s << "(none, " << a.dim_ << ")"; - break; - default : - s << "invalid geometry type"; + /** \brief Prints the type to an output stream */ + friend std::ostream& operator<< (std::ostream& s, const GeometryType& a) + { + switch (a.basicType_) { + case simplex : + s << "(simplex, " << a.dim_ << ")"; + break; + case cube : + s << "(cube, " << a.dim_ << ")"; + break; + case pyramid : + s << "pyramid"; + break; + case prism : + s << "prism"; + break; + case none : + s << "(none, " << a.dim_ << ")"; + break; + default : + s << "invalid geometry type"; + } + + return s; } - return s; - } + + }; /** \brief Prints a GeometryType::BasicType to an output stream */ inline std::ostream& operator<< (std::ostream& s, GeometryType::BasicType type) { switch (type) { - case GeometryType::simplex : - s << "simplex"; - break; - case GeometryType::cube : - s << "cube"; - break; - case GeometryType::pyramid : - s << "pyramid"; - break; - case GeometryType::prism : - s << "prism"; - break; - case GeometryType::none : - s << "none"; - break; - default : - s << "[unknown GeometryType::BasicType: " << int(type) << "]"; + case GeometryType::simplex : s << "simplex"; break; + case GeometryType::cube : s << "cube"; break; + case GeometryType::pyramid : s << "pyramid"; break; + case GeometryType::prism : s << "prism"; break; + case GeometryType::none : s << "none"; break; + default : s << "[unknown GeometryType::BasicType: " << int(type) << "]"; } return s; } diff --git a/dune/common/mpihelper.hh b/dune/common/mpihelper.hh index a46dfea00380fd61899a4be50553c1f289238b5f..8d7d8e80e012e02b192c48c6c721f079793fa84c 100644 --- a/dune/common/mpihelper.hh +++ b/dune/common/mpihelper.hh @@ -77,7 +77,7 @@ namespace Dune /** * @brief The type of the mpi communicator. */ - struct MPICommunicator {}; + typedef int MPICommunicator; /** * @brief Get the default communicator. @@ -86,7 +86,7 @@ namespace Dune */ static MPICommunicator getCommunicator() { - return MPICommunicator(); + return -1; } static CollectiveCommunication<MPICommunicator> @@ -208,7 +208,7 @@ namespace Dune { rank_ = -1; size_ = -1; - static int is_initialized = MPI_Init(&argc, &argv); + MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD,&rank_); MPI_Comm_size(MPI_COMM_WORLD,&size_); diff --git a/dune/common/test/fassigntest.cc b/dune/common/test/fassigntest.cc index 23ab734bda575e9b5c0bed6820a5634cb29c1016..f364558bb6683e0275455defd81b6406cf35545a 100644 --- a/dune/common/test/fassigntest.cc +++ b/dune/common/test/fassigntest.cc @@ -5,20 +5,18 @@ #include <iostream> #include <dune/common/fvector.hh> #include <dune/common/fassign.hh> -#include <dune/common/geometrytype.hh> using namespace Dune; int main(int argc, char** argv) try { - Dune::GeometryType t(Dune::GeometryType::cube, 4); - std::cout << t << "\n"; - Dune::FieldVector<double,3> pos; + pos <<= 1, 0, 0; - return 0; } catch (Exception e) { + std::cout << e << std::endl; + }