Continuum mechanics in manifolds: Kinematics

Motion ft is diffeomorphic mapping, which preserve the topology of the initial and final state, from manifold B to S=f(B)
                                                 (1)
The tangent bundle homeomorphism

                                                          (2)
where two point tensor F, which involving points in two distinct configurations, is called the deformation gradient, tangent map or the differential of f. Or push forward
From (2)
The metric tensor G can be written as $dS^2=G_{AB}(X)dX^A⊗dX^B$  . We may also write this tensor g, at the point x as $ds^2=g_{ab}(x)dx^a⊗dx^b$ . For the pull-back under f we have

which is right Cauchy-Green tensor C
One measure of the deformation taking place is given by the Green-Lagrange deformation tensor
The small strain tensor defines as the Lie derivative of metric tensor with repsect to the displacement vector field u
$\varepsilon:=L_ug$






Cross-platform compiling sparse direct solver MUMPS by using cmake

MUMPS is a MUltifrontal Massively Parallel sparse direct Solver (http://graal.ens-lyon.fr/MUMPS/) , which can be compiled easily under UNIX-alike platform. But it is hard to compiler it in native Windows environment.
The goal of this article is to introduce a compiler independent method to compile MUMPS by using Cross-platform compiling tools CMake (https://cmake.org/).  
1. Download CMakeLists.txt and copy it onto the MUMPS home directory. The CMakeLists.txt file considered the specific demand of Visual studio, where the Fortran and C programs should be compiled separately. 
2. Using cmake to generate files compiler needed.
3. Pay attention to the fact that <inttypes.h> file include in  mumps_c_types.h is part of C-99, which maybe not supported by visual c++. depends upon the version of VC adopted.  In this case
    1) Modify it to <stdint.h> or 2) Download the file from here.
The method provided here should be applied under any platform, theoretically,  for those CMake supports. I tested it in Visual studio 2012 and intel Fortran for MUMPS 5.0.1 and MUMPS 5.0.2

linux环境下github的基本操作

1.  复制  git clone 克隆地址
2.  程序文件修正后 
      git add 文件名 通知该文件已经更新
      git commit -m ‘修正信息’
      git push 更新完了
3.   如果在git push时要求用户密码信息, 则表明ssh键设定有问题,需要重新设定repository位置
   1)   git config remote.origin.url 确认现有设定,一般为
            https://github.com/用户ID/repository名
  2)git remote set-url origin git@github.com:用户ID/repository名.git
          重新设定

3.   git status 状态确认
4.   git log更新履历确认

   

Build NASA NSTRAIN-95 in Windows by MSYS2

Although there is no technical support available for NASA NSTRAIN-95,  there is a fork here which runs reasonably well on Linux https://github.com/ldallolio/NASTRAN-95/. It confirms work well in windows 7 also as follows:

1. Install MSYS2
2. Install following software in MSYS2
   pacman -S autoconf automake libtoll
   pacman -S gcc gcc-fortran
   pacman -S git
3. Download NASTRAIN -95 by git clone https://github.com/Idallolio/NASTRAN-95.git
4. Modify file /mds/nastrn.f
   COMMON / ZZZZZZ / IZ(400000000)   => IZ(4000000)
   LENOPC = 400000000                        =>  LENOPC = 4000000
which depends upon your memory size
5. In directory where NASTRAIN-95 downloaded, run
   sh bootstrap and make
the exe file nastran.exe will be generated in subdirectory /mds

2015年全球幸福指数

WIN(Worldwide Independent Network of Market Research)公布了2015年度全球希望,经济期待和幸福指数。其结果如下




幸福指数的前十是;1 哥伦比亚(85) 2 菲济/沙特(82) 4 阿塞拜疆(81) 5 越南(80) 6 阿根廷/巴拿马(79) 8 墨西哥(76) 9 厄瓜多尔(75) 10 中国/爱尔兰(74)

G7国家没有上榜。其中最好的是加拿大,23名幸福指数60。 可见金钱不是万能的!但是在同一国家中的统计结果中(世界平均),幸福指数如下; 高收入者70, 中高收入者68, 中收入者57, 中低收入者40, 低收入者32。可见没有钱是万万不能的。

2015年最悲惨的国家是伊拉克(-12), 其次是突尼斯(7)和希腊(9)。



Compile METIS-5.1.0/ParMETIS-4.0.3 in mingw64 gcc 5.2.0

Following three modifications are needed to compile METIS-5.1.0:

1.  Modify line 4 of CMakelists.txt from
set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib")
    to
set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/GKlib" CACHE PATH "path to GKlib")

2. Delete POSIX include file #include <sys/resource.h> in gk_arch.h. Seems allright.

3.  Exclude
--------------
extern int gk_getopt(int __argc, char **__argv, char *__shortopts);
extern int gk_getopt_long(int __argc, char **__argv, char *__shortopts,
              struct gk_option *__longopts, int *__longind);
extern int gk_getopt_long_only (int __argc, char **__argv,
              char *__shortopts, struct gk_option *__longopts, int *__longind);
--------------
in file gk_getopt.h by, e.g.

#if !defined _MINGW64
extern int gk_getopt(int __argc, char **__argv, char *__shortopts);
extern int gk_getopt_long(int __argc, char **__argv, char *__shortopts,
              struct gk_option *__longopts, int *__longind);
extern int gk_getopt_long_only (int __argc, char **__argv,
              char *__shortopts, struct gk_option *__longopts, int *__longind);
#endif


To compile ParMETIS-4.0.3
1. Set GKLIB_PATH like
set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/metis/GKlib" CACHE PATH "path to GKlib")

2.  Add a line "include( findMPI )" in front of  "include_directories(${MPI_INCLUDE_PATH})" inside CMAKElistx.txt
     For those who use MSMPI, you should be include <_mingw.h> in mpi.h of MSMPI. Otherwise there should be undefined data type errors.

3. Do above modification 2,3 for metis compile.

Code::Blocks + GLUT + FLTK

Code::Blocks provides project templates for both GLUT and FLTK, but no for GLUT + FLTK. Here is a procedure to build a simple GLUT + FLTK program in Code::Blocks.


1.  Build up a new project for GLUT by using the Code::Blocks' template.
2.  Add search directories setting to the include and library directories of FLTK.
3.  Modify #include <GL/glut.h> in main.cpp to #include<FL/glut.H>
4.  Modify the Linker settings as follows
   1)  Add other linker options:  -mwindows
   2)  Link libraries as: fltk_images, fltk_gl, fltk, fltk_png, fltk_z, fltk_jpeg, glu32, opengl32, ole32, uuid, comctl32. Pay attention to that the sequential order of those libraries is important.


The project would be rebuilt successfully. You can then add FLTK functions as you like.

VS Code下cmake, c++编译,调试环境的构成步骤

1   下载必须extension      按[Ctrl+Shift+X]打开extension窗口,选择安装"C/C++", "CMake", "CMake Tools" 2   在VSCode下打开作业目录 ...