Coder Social home page Coder Social logo

Comments (8)

ju-liu avatar ju-liu commented on June 14, 2024

Aug 22 我们将VTK_Tools从Tet_Tools中分离出来,并且剥离了一些冗余的读取NodalID & ElementID的函数。提高了程序的灵活性。见从
c893b00

cbcf7a0
的commits

合并发生在 6ddab5d

from perigee.

ju-liu avatar ju-liu commented on June 14, 2024

下面,我们有必要将Gmsh_FileIO中的函数进行清理。并增加写出hex单元到vtk文件的能力。

from perigee.

ju-liu avatar ju-liu commented on June 14, 2024

在vtk的例子页面(https://examples.vtk.org/site/Cxx/)里面,有这样一个例子 ReadUnknownTypeXMLFile。它介绍了如何读入一个不明类型的vtu/vtp文件。事实上,在vtk_tools.cpp中,我们也正是这样来写read_int_CellData函数的。

from perigee.

ju-liu avatar ju-liu commented on June 14, 2024

在sv_tools中 我们是这样检查后缀的:
std::string fname( writename_whole );
std::string fend;
fend.assign( fname.end()-4 , fname.end() );

// If the last four is .vtu, remove them for TET_T::write_tet_grid
if(fend.compare(".vtu") == 0) fname.erase( fname.end()-4, fname.end() );

from perigee.

ju-liu avatar ju-liu commented on June 14, 2024

在这个例子中 https://examples.vtk.org/site/Cxx/IO/DumpXMLFile/

vtk提供了一种检查后缀的方法。

from perigee.

ju-liu avatar ju-liu commented on June 14, 2024

In Gmsh_FileIO, we need to do the following things.

  1. We need to use std::vector name {}; to initialize an empty vector. Currently, we invoke the clear function to do it
  2. We need to replace print_fatal by print_exit to allow a run without MPI.
  3. We need to replace the write_tet_grid function by code like
    "vtkPolyData * grid_w = vtkPolyData::New();

gen_triangle_grid( grid_w, numpts, numcels, pt, ien_array );

VTK_T::add_int_PointData( grid_w, node_index, "GlobalNodeID" );

VTK_T::add_int_CellData( grid_w, ele_index, "GlobalElementID");

VTK_T::write_vtkPointSet(filename, grid_w);

grid_w->Delete();
"

或者 使用std pair 来绑定数据和名称,来改写目前的write_tet_grid函数。见https://blog.csdn.net/sevenjoin/article/details/81937695

from perigee.

ju-liu avatar ju-liu commented on June 14, 2024

NS code is enabled in the pull request Sun dev #114

from perigee.

ju-liu avatar ju-liu commented on June 14, 2024

最后 fsi 的合并是在
0b2ad32

from perigee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.