]> Pileus Git - ~andy/sunrise/blob - sci-libs/openfoam-utilities/files/openfoam-utilities-1.4.1_p20080328.patch
sci-libs/openfoam-src: Move big patch to external source
[~andy/sunrise] / sci-libs / openfoam-utilities / files / openfoam-utilities-1.4.1_p20080328.patch
1 Index: postProcessing/dataConversion/foamToVTK/writeFuns.C
2 ===================================================================
3 --- applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C  (Revision 30)
4 +++ applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C  (Revision 569)
5 @@ -229,14 +229,36 @@
6  void Foam::writeFuns::insert(const vector& pt, DynamicList<floatScalar>& dest)
7  {
8      for (direction cmpt = 0; cmpt < vector::nComponents; cmpt++)
9      {
10          dest.append(float(pt[cmpt]));
11      }
12  }
13 +void Foam::writeFuns::insert
14 +(
15 +    const symmTensor& pt,
16 +    DynamicList<floatScalar>& dest
17 +) 
18 +{ 
19 +    for (direction cmpt = 0; cmpt < symmTensor::nComponents; cmpt++) 
20 +    { 
21 +        dest.append(float(pt[cmpt])); 
22 +    } 
23 +} 
24 +void Foam::writeFuns::insert
25 +(
26 +    const sphericalTensor& pt,
27 +    DynamicList<floatScalar>& dest
28 +) 
29 +{ 
30 +    for (direction cmpt = 0; cmpt < sphericalTensor::nComponents; cmpt++) 
31 +    { 
32 +        dest.append(float(pt[cmpt])); 
33 +    }
34 +}
35  void Foam::writeFuns::insert(const tensor& pt, DynamicList<floatScalar>& dest)
36  {
37      for (direction cmpt = 0; cmpt < tensor::nComponents; cmpt++)
38      {
39          dest.append(float(pt[cmpt]));
40      }
41  }
42 Index: postProcessing/dataConversion/foamToVTK/writeFuns.H
43 ===================================================================
44 --- applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H  (Revision 30)
45 +++ applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H  (Revision 569)
46 @@ -167,14 +167,16 @@
47          const label,
48          const label
49      );
50  
51      //- convert to VTK and store
52      static void insert(const scalar&, DynamicList<floatScalar>& dest);
53      static void insert(const point&, DynamicList<floatScalar>& dest);
54 +    static void insert(const symmTensor&, DynamicList<floatScalar>& dest);
55 +    static void insert(const sphericalTensor&, DynamicList<floatScalar>& dest);
56      static void insert(const tensor&, DynamicList<floatScalar>& dest);
57  
58      //- Append elements to DynamicList
59      static void insert(const labelList&, DynamicList<label>&);
60      template<class Type>
61      static void insert(const List<Type>&, DynamicList<floatScalar>&);
62  
63
64 Index: mesh/manipulation/Optional/Allwmake
65 ===================================================================
66 --- applications/utilities/mesh/manipulation/Optional/Allwmake  (Revision 30)
67 +++ applications/utilities/mesh/manipulation/Optional/Allwmake  (Revision 569)
68 @@ -1,11 +1,11 @@
69  #!/bin/sh
70  
71  READLINE=0
72  if [ -f /usr/include/readline/readline.h ]; then
73      echo "Found readline/readline.h include file. Enabling readline support."
74      READLINE=1
75 -    export READLINELINK="-lreadline"
76 +    export READLINELINK="-lreadline -lcurses"
77      break
78  fi
79  export READLINE
80  wmake setSet
81
82 Index: mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
83 ===================================================================
84 --- applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C      (Revision 30)
85 +++ applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C      (Revision 569)
86 @@ -276,26 +276,26 @@
87              is.getLine(line);
88          }
89          else if (feID == 171)
90          {
91              // Rod. Skip.
92              is.getLine(line);
93          }
94 -        else if (feID == 41)
95 +        else if (feID == 41 || feID == 91)
96          {
97              // Triangle. Save - used for patching later on.
98              is.getLine(line);
99  
100              face cVerts(3);
101              IStringStream lineStr(line);
102              lineStr >> cVerts[0] >> cVerts[1] >> cVerts[2];
103              boundaryFaces.append(cVerts);
104              boundaryFaceIndices.append(cellI);
105          }
106 -        else if (feID == 94)
107 +        else if (feID == 44 || feID == 94)
108          {
109              // Quad. Save - used for patching later on.
110              is.getLine(line);
111  
112              face cVerts(4);
113              IStringStream lineStr(line);
114              lineStr >> cVerts[0] >> cVerts[1] >> cVerts[2] >> cVerts[3];
115 @@ -389,29 +389,38 @@
116          faceIndices.setSize(nFaces);
117          label faceI = 0;
118  
119          while (faceI < faceIndices.size())
120          {
121              is.getLine(line);
122              IStringStream lineStr(line);
123 -            label typeCode1, tag1, nodeLeaf1, component1,
124 -                typeCode2, tag2, nodeLeaf2, component2;
125 -            lineStr
126 -                >> typeCode1 >> tag1 >> nodeLeaf1 >> component1
127 -                >> typeCode2 >> tag2 >> nodeLeaf2 >> component2;
128  
129 -            if (typeCode1 != 8 || typeCode2 != 8)
130 +            // Read one (for last face) or two entries from line.
131 +            label nRead = 2;
132 +            if (faceI == faceIndices.size()-1)
133              {
134 -                FatalErrorIn("readPatches")
135 -                    << "When reading patches expect Entity Type Code 8" << nl
136 -                    << "At line " << is.lineNumber() << exit(FatalError);
137 +                nRead = 1;
138              }
139  
140 -            faceIndices[faceI++] = tag1;
141 -            faceIndices[faceI++] = tag2;
142 +            for (label i = 0; i < nRead; i++)
143 +            {
144 +                label typeCode, tag, nodeLeaf, component;
145 +
146 +                lineStr >> typeCode >> tag >> nodeLeaf >> component;
147 +
148 +                if (typeCode != 8)
149 +                {
150 +                    FatalErrorIn("readPatches")
151 +                        << "When reading patches expect Entity Type Code 8"
152 +                        << nl << "At line " << is.lineNumber()
153 +                        << exit(FatalError);
154 +                }
155 +
156 +                faceIndices[faceI++] = tag;
157 +            }
158          }
159      }
160  
161      patchNames.shrink();
162      patchFaceIndices.shrink();
163  }
164  
165 @@ -688,15 +697,15 @@
166      // sets (dofVertIndices).
167  
168      List<faceList> patchFaceVerts;
169  
170  
171      if (dofVertIndices.size() > 0)
172      {
173 -        // Use the vertex constraints to patch. Is of course bit dodge since
174 +        // Use the vertex constraints to patch. Is of course bit dodgy since
175          // face goes on patch if all its vertices are on a constraint.
176          // Note: very inefficient since goes through all faces (including
177          // internal ones) twice. Should do a construct without patches
178          // and then repatchify.
179  
180          Info<< "Using " << dofVertIndices.size()
181              << " DOF sets to detect boundary faces."<< endl;
182