Skip to content

Instantly share code, notes, and snippets.

View zhulianhua's full-sized avatar
🎯
Focusing

Lianhua Zhu zhulianhua

🎯
Focusing
  • Somewhere
  • Shanghai
View GitHub Profile
  • 从Gambit里面画好网格后,周期边界设为wall类型,导出网格,然后运行 FluentMeshToFoam,转换成OpenFOAM 里面内部使用的格式。

  • 更改constant/polyMesh/boundary文件中对应的周期patch,即从wall类型改为cyclic, 如下:

          right
          {
             type            cyclic;
             inGroups        1(cyclic);
             nFaces          20;
             startFace       5572;
    

// matchTolerance 1;

@zhulianhua
zhulianhua / pwlInterp2.cpp
Last active September 21, 2015 08:36
2D piece-wise linear interpolation
#include <vector>
class pwlInterp2
{
//priviate
private:
std::vector<double> xd, yd, zd;
int find_posizition(std::vector<double> xxd, double xi )
{
@zhulianhua
zhulianhua / build_gcc_5.2.0.sh
Last active May 29, 2016 14:49
Build gcc-5.2.0 on cluster
##Make build dir
mkdir ~/build/gcc
cd ~/build/gcc
##Download packages
wget -c ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-4.3.2.tar.bz2
wget -c ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2
wget -c ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz
wget -c ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.14.tar.bz2

###Matlab 绘图教程

如何查看帮助

  • 简单帮助用 help命令, 如 查看 contourf 的用法可以用help contourf
  • 详细帮助用doc命令, 如查看plot的用法可以用doc contourf

####一个比较完全的示例