OpenFOAM中的基本变量快速认知【转载】

转载自:http://blog.sina.com.cn/s/blog_a0b4201d0102vsf9.html

label 实际上就是整型数据的变体,intOF对它进行了包装,以适应3264位系统并保证它的范围足够大2^64

http://openfoam.github.io/Documentation-dev/html/a08421_source.html

 

zero 将一些无关紧要的另定义为"0"概念,与其进行加减运算均不改变值,与其进行乘除法运算则变为zero,不能当除数

https://github.com/OpenFOAM/OpenFOAM-dev/blob/master/src/OpenFOAM/primitives/zero/zero.H

 

pTraits 实际上就是class Type,只是对其进行了包装

http://openfoam.github.io/Documentation-dev/html/a08449_source.html

 

point 实际上就是 vector class的重命名。而vector class又分为标量版本的vector和矢量版本的Vector,矢量版本的Vector可以进行各种矢量运算,如点积,叉乘等

http://foam.sourceforge.net/docs/cpp/a08671_source.html

 

scalar 实际上就是将float类型和doubleFloat类型整合到了一起,分别定义了精度边界,并重载运算符。并且预设了很多标量运算符号,如pow4pow025

http://foam.sourceforge.net/docs/cpp/a08571_source.html

 

direction 是一个整形变量,用来表示笛卡尔坐标系的方向,为unsigned char 的重命名

http://foam.sourceforge.net/docs/cpp/a08463_source.html

 

word 定义为不含标点空格符号的字符串

http://foam.sourceforge.net/docs/cpp/a08614_source.html

dictionary是一个容器类

https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.H

 

continuous定义为一个bool类型数据,来判断数据是否是连续的

https://github.com/OpenFOAM/OpenFOAM-2.3.x/blob/master/src/OpenFOAM/primitives/contiguous/contiguous.H

 

其他的常用基础变量的定义,比如tensorcomplex等,重点都重载了运算符并定义相关的运算符或者算子符号,可以在以下网页的源码中寻找

https://github.com/OpenFOAM/OpenFOAM-2.4.x/tree/version-2.4.0/src/OpenFOAM/primitives

posted @ 2016-07-06 14:01  硫酸亚铜  阅读(865)  评论(0编辑  收藏  举报