Commit f9190a81 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Removed getSerializationType() methods from Vector - they should be saved as Array

parent d8cdf031
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -51,12 +51,6 @@ public:
   /** \brief Returns type of vector Real value, Device type and the type of Index. */
   virtual String getTypeVirtual() const;

   /** \brief Returns (host) type of vector Real value, Device type and the type of Index. */
   static String getSerializationType();

   /** \brief Returns (host) type of vector Real value, Device type and the type of Index. */
   virtual String getSerializationTypeVirtual() const;

   /**
    * \brief Returns a modifiable view of the vector.
    */
+0 −20
Original line number Diff line number Diff line
@@ -39,26 +39,6 @@ getTypeVirtual() const
   return this->getType();
}

template< typename Real,
          typename Device,
          typename Index >
String
Vector< Real, Device, Index >::
getSerializationType()
{
   return HostType::getType();
}

template< typename Real,
          typename Device,
          typename Index >
String
Vector< Real, Device, Index >::
getSerializationTypeVirtual() const
{
   return this->getSerializationType();
}

template< typename Real,
          typename Device,
          typename Index >
+0 −6
Original line number Diff line number Diff line
@@ -17,12 +17,6 @@
namespace TNL {
namespace Containers {

template< typename Real, typename Device, typename Index >
class Vector;

template< int Size, typename Real >
class StaticVector;

template< typename Real = double,
          typename Device = Devices::Host,
          typename Index = int >
+6 −3
Original line number Diff line number Diff line
@@ -436,7 +436,8 @@ bool computeDifference( const MeshPointer& meshPointer, const String& objectType
{
   if( objectType == "Functions::MeshFunction" )
      return computeDifferenceOfMeshFunctions< MeshPointer, Value, Real, Index >( meshPointer, parameters );
   if( objectType == "Containers::Vector" )
   if( objectType == "Containers::Array" ||
       objectType == "Containers::Vector" )  // TODO: remove deprecated names (Vector is saved as Array)
      return computeDifferenceOfVectors< MeshPointer, Value, Real, Index >( meshPointer, parameters );
   std::cerr << "Unknown object type " << objectType << "." << std::endl;
   return false;
@@ -450,7 +451,8 @@ bool setIndexType( const MeshPointer& meshPointer,
                   const Config::ParameterContainer& parameters )
{
   String indexType;
   if( parsedObjectType[ 0 ] == "Containers::Vector" )
   if( parsedObjectType[ 0 ] == "Containers::Array" ||
       parsedObjectType[ 0 ] == "Containers::Vector" )  // TODO: remove deprecated names (Vector is saved as Array)
      indexType = parsedObjectType[ 3 ];

   if( parsedObjectType[ 0 ] == "Functions::MeshFunction" )
@@ -525,7 +527,8 @@ bool setValueType( const MeshPointer& meshPointer,

   if( parsedObjectType[ 0 ] == "Functions::MeshFunction" )
      elementType = parsedObjectType[ 3 ];
   if( parsedObjectType[ 0 ] == "Containers::Vector" )
   if( parsedObjectType[ 0 ] == "Containers::Array" ||
       parsedObjectType[ 0 ] == "Containers::Vector" )  // TODO: remove deprecated names (Vector is saved as Array)
      elementType = parsedObjectType[ 1 ];


+1 −2
Original line number Diff line number Diff line
@@ -263,8 +263,7 @@ bool resolveMesh( const std::vector< String >& parsedMeshType,
                  const Config::ParameterContainer& parameters )
{
  std::cout << "+ -> Setting mesh type to " << parsedMeshType[ 0 ] << " ... " << std::endl;
   if( parsedMeshType[ 0 ] == "Meshes::Grid" ||
       parsedMeshType[ 0 ] == "tnlGrid" )  // TODO: remove deprecated type name
   if( parsedMeshType[ 0 ] == "Meshes::Grid" )
   {
      typedef Meshes::Grid< Dimension, RealType, Devices::Host, IndexType > MeshType;
      return resolveRealType< MeshType >( parameters );
Loading