-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader_file_foam_general.m
64 lines (57 loc) · 3.93 KB
/
header_file_foam_general.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function header_foam_file = header_file_foam_general(versione,formato,clase,folder,objeto)
%
% header_foam_file = header_file_foam_general(versione,formato,clase,folder,objeto)
%
% A trial to a General header for openfoam files
%
% as default we have
%
% versione = '2.3.0';
% formato = 'ascii';
% clase = 'dictionary';
% folder = 'constant/polyMesh';
% objeto = 'blockMeshDict';
%
if nargin < 1
versione = '2.3.0';
formato = 'ascii';
clase = 'dictionary';
folder = 'constant/polyMesh';
objeto = 'blockMeshDict';
elseif nargin < 5
error(' not enough arguments - (versione,formato,clase,folder,objeto) ')
end
row1= '/*--------------------------------*- C++ -*----------------------------------*\';
row2= '| ========= | |';
row3= '| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |';
row4= ['| \\ / O peration | Version: ' versione ' |'];
row5= '| \\ / A nd | Web: www.OpenFOAM.org |';
row6= '| \\/ M anipulation | |';
row7= '\*---------------------------------------------------------------------------*/';
row8= 'FoamFile ';
row9= '{ ';
row10=[' version ' versione '; '];
row11=[' format ' formato '; '];
row12=[' class ' clase '; '];
row13=[' location ' folder '; '];
row14=[' object ' objeto '; '];
row15= '} ';
row16= '// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //';
header_foam_file = strvcat(row1,row2,row3,row4,row5,row6,row7,row8,row9,row10,row11,row12,row13,row14,row15,row16);
return
header_foam_file(1,:)= '/*--------------------------------*- C++ -*----------------------------------*\';
header_foam_file(2,:)= '| ========= | |';
header_foam_file(3,:)= '| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |';
header_foam_file(4,:)= ['| \\ / O peration | Version: ' versione ' |'];
header_foam_file(5,:)= '| \\ / A nd | Web: www.OpenFOAM.org |';
header_foam_file(6,:)= '| \\/ M anipulation | |';
header_foam_file(7,:)= '\*---------------------------------------------------------------------------*/';
header_foam_file(8,:)= 'FoamFile ';
header_foam_file(9,:)= '{ ';
header_foam_file(10,:)=[' version ' versione '; '];
header_foam_file(11,:)=[' format ' formato '; '];
header_foam_file(12,:)=[' class ' clase '; '];
header_foam_file(13,:)=[' location ' folder '; '];
header_foam_file(14,:)=[' object ' objeto '; '];
header_foam_file(15,:)= '} ';
header_foam_file(16,:)= '// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //';