对于function1对象,如何根据一组数据拟合曲线并返回插值?
- 
							
							
							
							
function1类型的描述中有这样一句话: 
  
 (https://www.openfoam.com/documentation/guides/latest/api/classFoam_1_1Function1.html)
 恰好我需要根据一组离散数据点拟合曲线,并将其结果赋值给一个function1对象的变量。
 问题:对function1对象如何进行描述中所述函数插值功能?有无参考案例?多谢!
- 
							
							
							
							
@LuoS 你看dev版本这面的,可以这样用么 https://github.com/OpenFOAM/OpenFOAM-dev/commit/0dd2e97bd8af78dd063d158bc0c4965f37529cdb inlet { type uniformFixedValue; uniformValue coded; name pulse; codeInclude #{ #include "mathematicalConstants.H" #}; code #{ return vector ( 0.5*(1 - cos(constant::mathematical::twoPi*min(x/0.3, 1))), 0, 0 ); #}; }
 
			