ARudik / feelpp

Automatically exported from code.google.com/p/feelpp
0 stars 0 forks source link

Serialize the mesh data structure #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Serialize the mesh data structure and provide save()/load() interface

Original issue reported on code.google.com by christop...@feelpp.org on 22 Apr 2012 at 3:30

GoogleCodeExporter commented 9 years ago
The current implementation being debugged now allows to do something like this

{{{

    tic();
    auto is_mesh_loaded = mesh->load( _name="mymesh",_path=".",_type="text" );
    toc( "load" );

    if ( !is_mesh_loaded )
    {
        tic();
        Log() << "Generating mesh using gmsh...\n";
        mesh = createGMSHMesh( _mesh=new mesh_type,
                               _update=MESH_CHECK|MESH_UPDATE_FACES|MESH_UPDATE_EDGES|MESH_RENUMBER,
                               _desc=domain( _name=( boost::format( "%1%-%2%" ) % shape % Dim ).str() ,
                                             _shape=shape,
                                             _dim=Dim,
                                             _h=X[0] ),
                               _partitions=this->comm().size() );
        Log() << "Saving mesh...\n";
        mesh->save( _name="mymesh",_path=".",_type="text" );
        toc("generate+save");
    }
    else
    {
        tic();
        mesh->save( _name="mymesh2",_path=".",_type="text" );
        toc("save");
    }

}}}

Original comment by christop...@feelpp.org on 22 Apr 2012 at 3:32

GoogleCodeExporter commented 9 years ago
The implementation of this feature is available in the branch serialmesh on 
Feel++ google code (git)

Original comment by christop...@feelpp.org on 25 Apr 2012 at 6:53

GoogleCodeExporter commented 9 years ago
The implementation of this feature is available in the branch serialmesh on 
Feel++ google code (git)
The status  is that the save()/load() function are implemented and are working. 
The isssue is that send/recv using boost.mpi still does not work (I am 
investigating this...)

Original comment by christop...@feelpp.org on 25 Apr 2012 at 6:54

GoogleCodeExporter commented 9 years ago

Original comment by christop...@feelpp.org on 8 May 2012 at 9:59

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 393d590e4a94.

in case of two procs exchange the mesh: you can visualize them the two meshes
and see they have been swapped from the initial partitioning

Original comment by christop...@feelpp.org on 22 May 2012 at 9:49

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 61b08ad76118.

added encode() and decode() in mesh data structure to compress it 
it is used to send/receive meshes

Original comment by christop...@feelpp.org on 22 May 2012 at 9:49

GoogleCodeExporter commented 9 years ago
This issue was updated by revision fbf6aeb2df2c.

in case of two procs exchange the mesh: you can visualize them the two meshes
and see they have been swapped from the initial partitioning

git-svn-id: 
svn+ssh://forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/life/trunk/life/trunk
@9034 18f2cc81-8059-4896-b63e-f2d89ec8fd72

Original comment by christop...@feelpp.org on 22 May 2012 at 11:06

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 8d09165f58ea.

git-svn-id: 
svn+ssh://forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/life/trunk/life/trunk
@9035 18f2cc81-8059-4896-b63e-f2d89ec8fd72

Original comment by christop...@feelpp.org on 22 May 2012 at 11:06

GoogleCodeExporter commented 9 years ago
The change for this is done now.See doc/manual/tutorial/mymesh.cpp for some 
examples

Original comment by christop...@feelpp.org on 22 May 2012 at 11:13