Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
Original articles by Mark Leair, PGI Compiler Engineer
This is Part 1 of a series of articles:
for ($i=0; $i -lt 21; $i++) | |
{ | |
$stra = $i*5000 | |
$filename = 'CFILE_' + $stra.ToString() + '.dat' | |
preplot $filename | |
} |
IMG = imread('xxx.jpg'); % image data | |
L = im2bw(IMG); % image data to logical data | |
I = int8(L); % convert to 8 bit integer | |
dlmwrite('data.dat', I, ' ') % write ascii file, using space(' ') as delimeter | |
% open data.dat to view it |
// blog : https://zhulianhua.wordpress.com/2018/04/18/c11-variadic-template/ | |
#include <iostream> | |
using namespace std; | |
//递归终止函数 | |
void print() | |
{ | |
cout << "empty" << endl; | |
} | |
//展开函数 |
void data2D(int mm_, double* T_, double* qx_,double* qy_,double* xcoord_, double* ycoord_, double* dx_, double* dy_, int NumMeshx_, int NumMeshy_ ) | |
{ | |
FILE *fp; | |
char fname[1000]; | |
int m1,i,j; | |
int nodes,elements; | |
int index[M][N]; | |
nodes=0; | |
elements=0; |
#Generated by `cat $LHOME/OpenFOAM/OpenFOAM-4.1/etc/bashrc` | |
#LHZHU: Changed based on http://www.archer.ac.uk/documentation/software/openfoam/#4.1 compute | |
#DESC: Let user program compile on /work filesystem | |
#----------------------------------*-sh-*-------------------------------------- | |
# ========= | | |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | |
# \\ / O peration | | |
# \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation | |
# \\/ M anipulation | | |
#------------------------------------------------------------------------------ |
```bash | |
### OpenMPI | |
module load compilers/intel/2018_0 | |
./configure --prefix=/home/appLEIWU/MPI/intel/openmpi/2.1.0 CC=/home/appLEIWU/compiler/intel/compilers_and_libraries_2018.0.128/linux/bin/intel64/icc CXX=/home/appLEIWU/compiler/intel/compilers_and_libraries_2018.0.128/linux/bin/intel64/icpc F77=/home/appLEIWU/compiler/intel/compilers_and_libraries_2018.0.128/linux/bin/intel64/ifort FC=/home/appLEIWU/compiler/intel/compilers_and_libraries_2018.0.128/linux/bin/intel64/ifort | |
make -j 28 | |
sudo make install | |
### HDF5 | |
CC=/home/appLEIWU/MPI/intel/openmpi/2.1.0/bin/mpicc ./configure --enable-parallel --prefix=/home/appLEIWU/tool/HDF5/intel/openmpi/1.8.5-patch1 | |
make -j 28 |
#!/bin/bash --login | |
#PBS -N test | |
#PBS -A e283 | |
#PBS -l select=1 | |
#PBS -l walltime=0:20:00 | |
##PBS -m abe | |
#PBS -M [email protected] | |
# Switch to current working directory | |
export PBS_O_WORKDIR=$(readlink -f $PBS_O_WORKDIR) |
# coding: utf-8 | |
# Generate non-uniform discrete velocity using a power law distribution | |
import numpy as np | |
def nu_dv(lmx, MX, xiMax): | |
""" | |
Generate a non-uniform points with a power law distribution | |
Parameter | |
--------- |