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

Removed methods save and load from Grid

Notes:

- saving the distributed grid in DistributedGridIO_MeshFunction.h was
  commented out - it was probably just for debugging anyway...
- MPI stuff in tnl-init is commented out - PVTI reader/writer is needed
- loading of a distributed grid is commented out in the specialization
  of loadDistributedMesh - PVTI reader is needed
parent 1280613e
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -54,11 +54,9 @@ void export_Grid( py::module & m, const char* name )
//    void (Grid::* _setDimensions1)(const IndexType) = &Grid::setDimensions;
    void (Grid::* _setDimensions2)(const typename Grid::CoordinatesType &) = &Grid::setDimensions;

    auto grid = py::class_<Grid, TNL::Object>( m, name )
    auto grid = py::class_<Grid>( m, name )
        .def(py::init<>())
        .def_static("getMeshDimension", &Grid::getMeshDimension)
        .def_static("getSerializationType", &Grid::getSerializationType)
        .def("getSerializationTypeVirtual", &Grid::getSerializationTypeVirtual)
        // FIXME: number of parameters depends on the grid dimension
//        .def("setDimensions", _setDimensions1)
        .def("setDimensions", _setDimensions2)
+1 −3
Original line number Diff line number Diff line
@@ -98,11 +98,9 @@ void export_MeshEntity( Scope & scope, const char* name )
template< typename Mesh >
void export_Mesh( py::module & m, const char* name )
{
    auto mesh = py::class_< Mesh, TNL::Object >( m, name )
    auto mesh = py::class_< Mesh >( m, name )
        .def(py::init<>())
        .def_static("getMeshDimension", &Mesh::getMeshDimension)
        .def_static("getSerializationType", &Mesh::getSerializationType)
        .def("getSerializationTypeVirtual", &Mesh::getSerializationTypeVirtual)
        .def("getEntitiesCount", &mesh_getEntitiesCount< Mesh, typename Mesh::Cell >)
        .def("getEntitiesCount", &mesh_getEntitiesCount< Mesh, typename Mesh::Face >)
        .def("getEntitiesCount", &mesh_getEntitiesCount< Mesh, typename Mesh::Vertex >)
+5 −4
Original line number Diff line number Diff line
@@ -66,10 +66,11 @@ class DistributedGridIO<
         CoordinatesType newOrigin;
         newMesh->setOrigin(origin+spaceSteps*localBegin);

         File meshFile;
         meshFile.open( fileName+String("-mesh-")+distrGrid->printProcessCoords()+String(".tnl"), std::ios_base::out );
         newMesh->save( meshFile );
         meshFile.close();
         // FIXME: save was removed from Grid (but this is probably just for debugging...)
//         File meshFile;
//         meshFile.open( fileName+String("-mesh-")+distrGrid->printProcessCoords()+String(".tnl"), std::ios_base::out );
//         newMesh->save( meshFile );
//         meshFile.close();

         VectorType newDof(newMesh-> template getEntitiesCount< typename MeshType::Cell >());

+1 −11
Original line number Diff line number Diff line
@@ -10,8 +10,6 @@

#pragma once

#include <TNL/String.h>
#include <TNL/File.h>
#include <TNL/Devices/Host.h>

namespace TNL {
@@ -28,14 +26,6 @@ public:
   typedef Index IndexType;

   constexpr static int getMeshDimension() { return 1; }
 
   void save( File& file ) const {}

   void load( File& file ) {}

   void save( const String& fileName ) const {}

   void load( const String& fileName ) {}
};

} // namespace Meshes
+1 −2
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@

#pragma once

#include <TNL/Object.h>
#include <TNL/Devices/Host.h>

namespace TNL {
@@ -20,7 +19,7 @@ template< int Dimension,
          typename Real = double,
          typename Device = Devices::Host,
          typename Index = int >
class Grid : public Object
class Grid
{
};

Loading