Merge commit 'origin/master' into olesenm

This commit is contained in:
Mark Olesen
2008-06-12 08:28:32 +02:00
33 changed files with 77 additions and 85 deletions

View File

@ -451,7 +451,7 @@ void doRefinement
const labelHashSet& refCells, const labelHashSet& refCells,
labelList& refLevel labelList& refLevel
) )
{ {
label oldCells = mesh.nCells(); label oldCells = mesh.nCells();
// Multi-iteration, multi-direction topology modifier. // Multi-iteration, multi-direction topology modifier.
@ -565,7 +565,7 @@ void subsetMesh
// Update cutCells for removed cells. // Update cutCells for removed cells.
cutCells.updateMesh(morphMap()); cutCells.updateMesh(morphMap());
} }
// Divide the cells according to status compared to surface. Constructs sets: // Divide the cells according to status compared to surface. Constructs sets:
// - cutCells : all cells cut by surface // - cutCells : all cells cut by surface
@ -877,7 +877,7 @@ int main(int argc, char *argv[])
// Added cells from 2:1 refinement level restriction. // Added cells from 2:1 refinement level restriction.
while while
( (
limitRefinementLevel limitRefinementLevel
( (
@ -887,7 +887,8 @@ int main(int argc, char *argv[])
refLevel, refLevel,
cutCells cutCells
) )
); )
{}
Info<< " Current cells : " << mesh.nCells() << nl Info<< " Current cells : " << mesh.nCells() << nl
@ -988,7 +989,8 @@ int main(int argc, char *argv[])
refLevel, refLevel,
hanging hanging
) )
); )
{}
doRefinement(mesh, refineDict, hanging, refLevel); doRefinement(mesh, refineDict, hanging, refLevel);

View File

@ -26,12 +26,12 @@ Description
Tries to figure out what the refinement level is on refined cartesian Tries to figure out what the refinement level is on refined cartesian
meshes. Run BEFORE snapping. meshes. Run BEFORE snapping.
Writes Writes
- volScalarField 'refinementLevel' with current refinement level. - volScalarField 'refinementLevel' with current refinement level.
- cellSet 'refCells' which are the cells that need to be refined to satisfy - cellSet 'refCells' which are the cells that need to be refined to satisfy
2:1 refinement. 2:1 refinement.
Works by dividing cells into volume bins. Works by dividing cells into volume bins.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -77,7 +77,7 @@ bool limitRefinementLevel
} }
} }
} }
if (refCells.size() > oldNCells) if (refCells.size() > oldNCells)
{ {
Info<< "Added an additional " << refCells.size() - oldNCells Info<< "Added an additional " << refCells.size() - oldNCells
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
<< lowerLimits[lowerLimits.size()-1] << " .. " << lowerLimits[lowerLimits.size()-1] << " .. "
<< upperLimits[upperLimits.size()-1] << endl; << upperLimits[upperLimits.size()-1] << endl;
// Create new bin. // Create new bin.
bins.append(DynamicList<label>()); bins.append(DynamicList<label>());
lowerLimits.append(sortedVols[i]); lowerLimits.append(sortedVols[i]);
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]); upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
@ -243,7 +243,7 @@ int main(int argc, char *argv[])
return 1; return 1;
} }
labelIOList refLevel labelIOList refLevel
( (
IOobject IOobject
@ -308,7 +308,7 @@ int main(int argc, char *argv[])
bField[faceI] = postRefLevel[own]; bField[faceI] = postRefLevel[own];
} }
} }
Info<< "Determined current refinement level and writing to " Info<< "Determined current refinement level and writing to "
<< postRefLevel.name() << " (as volScalarField; for post processing)" << postRefLevel.name() << " (as volScalarField; for post processing)"
<< nl << nl
@ -325,7 +325,7 @@ int main(int argc, char *argv[])
// Cells to refine // Cells to refine
cellSet refCells(mesh, "refCells", 100); cellSet refCells(mesh, "refCells", 100);
while while
( (
limitRefinementLevel limitRefinementLevel
( (
@ -333,7 +333,8 @@ int main(int argc, char *argv[])
refLevel, // current refinement level refLevel, // current refinement level
refCells // cells to refine refCells // cells to refine
) )
); )
{}
if (refCells.size() > 0) if (refCells.size() > 0)
{ {

View File

@ -265,7 +265,8 @@ int main(int argc, char *argv[])
} }
yyFlexLexer lexer(&ansysStream); yyFlexLexer lexer(&ansysStream);
while(lexer.yylex() != 0); while(lexer.yylex() != 0)
{}
Info << "Creating points" << endl; Info << "Creating points" << endl;

View File

@ -583,7 +583,8 @@ endOfSection {space}")"{space}
<readCellData>{spaceNl}{lbrac} { <readCellData>{spaceNl}{lbrac} {
// Quickly scan to the end of the cell data block and discard // Quickly scan to the end of the cell data block and discard
register int c; register int c;
while ((c = yyinput()) != 0 && c != ')'); while ((c = yyinput()) != 0 && c != ')')
{}
} }
{faceTree} { {faceTree} {
@ -763,7 +764,8 @@ int main(int argc, char *argv[])
yyFlexLexer lexer(&fluentStream.stdStream()); yyFlexLexer lexer(&fluentStream.stdStream());
while(lexer.yylex() != 0); while(lexer.yylex() != 0)
{}
Info<< "\nFINISHED LEXING\n\n"; Info<< "\nFINISHED LEXING\n\n";

View File

@ -901,7 +901,8 @@ int main(int argc, char *argv[])
} }
yyFlexLexer lexer(&fluentStream); yyFlexLexer lexer(&fluentStream);
while(lexer.yylex() != 0); while(lexer.yylex() != 0)
{}
Info<< "\n\nFINISHED LEXING\n\n\n"; Info<< "\n\nFINISHED LEXING\n\n\n";
// Lookup table giving number of vertices given a fluent cell type ID // Lookup table giving number of vertices given a fluent cell type ID

View File

@ -665,7 +665,8 @@ int main(int argc, char *argv[])
} }
yyFlexLexer lexer(&gambitStream); yyFlexLexer lexer(&gambitStream);
while(lexer.yylex() != 0); while(lexer.yylex() != 0)
{}
Info << "Finished lexing" << endl; Info << "Finished lexing" << endl;

View File

@ -189,7 +189,7 @@ void writeVTK
faceList setFaces(cellFaces.size()); faceList setFaces(cellFaces.size());
labelList faceValues(cellFaces.size()); labelList faceValues(cellFaces.size());
label setFaceI = 0; label setFaceI = 0;
forAllConstIter(Map<label>, cellFaces, iter) forAllConstIter(Map<label>, cellFaces, iter)
{ {
setFaces[setFaceI] = mesh.faces()[iter.key()]; setFaces[setFaceI] = mesh.faces()[iter.key()];
@ -217,7 +217,7 @@ void writeVTK
mesh, mesh,
currentSet, currentSet,
mesh.time().path()/vtkName mesh.time().path()/vtkName
); );
} }
else else
{ {
@ -331,7 +331,7 @@ bool doCommand
// Get some size estimate for set. // Get some size estimate for set.
const globalMeshData& parData = mesh.globalData(); const globalMeshData& parData = mesh.globalData();
label typSize = label typSize =
max max
( (
parData.nTotalCells(), parData.nTotalCells(),
@ -449,7 +449,7 @@ bool doCommand
} }
} }
else else
{ {
if (is >> sourceType) if (is >> sourceType)
{ {
autoPtr<topoSetSource> setSource autoPtr<topoSetSource> setSource
@ -743,7 +743,7 @@ int main(int argc, char *argv[])
else if (!read_history(historyFile)) else if (!read_history(historyFile))
{ {
Info<< "Successfully read history from " << historyFile << endl; Info<< "Successfully read history from " << historyFile << endl;
} }
#endif #endif
@ -754,7 +754,7 @@ int main(int argc, char *argv[])
FatalError.throwExceptions(); FatalError.throwExceptions();
FatalIOError.throwExceptions(); FatalIOError.throwExceptions();
while (1) do
{ {
string rawLine; string rawLine;

View File

@ -4,5 +4,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-ldynamicMesh \ -ldynamicMesh \
-lmeshTools \ -lmeshTools

View File

@ -2,5 +2,4 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume

View File

@ -4,5 +4,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-llagrangian \ -llagrangian

View File

@ -4,5 +4,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-llagrangian \ -llagrangian

View File

@ -6,5 +6,5 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-llagrangian \ -llagrangian \
-lmeshTools \ -lmeshTools

View File

@ -24,7 +24,7 @@
-lgen -lnsl -lsocket -lw -lintl -ldl -lgen -lnsl -lsocket -lw -lintl -ldl
#elif defined(sgiN32) || defined(sgiN32Gcc) #elif defined(sgiN32) || defined(sgiN32Gcc)
FV_LIBS = \ FV_LIBS = \
$(FV_HOME)/user/obj/iris/fv.o \ $(FV_HOME)/user/obj/iris/fv.o \
$(FV_HOME)/user/obj/iris/fv2.o \ $(FV_HOME)/user/obj/iris/fv2.o \
@ -94,12 +94,9 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/browser/lnInclude \ -I$(LIB_SRC)/browser/lnInclude \
-I$(FOAM_SRC)/lagrangian/basic/lnInclude \ -I$(FOAM_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \ EXE_LIBS = \
$(FV_LIBS) \ $(FV_LIBS) \
-lfiniteVolume \ -lfiniteVolume \
-lmeshTools \ -lmeshTools

View File

@ -17,4 +17,3 @@ EXE_LIBS = \
-lspecie \ -lspecie \
-lcompressibleTurbulenceModels \ -lcompressibleTurbulenceModels \
-lcompressibleLESmodels -lcompressibleLESmodels

View File

@ -4,5 +4,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lsampling \ -lsampling

View File

@ -2,5 +2,4 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume

View File

@ -2,5 +2,4 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -3,7 +3,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/triSurface/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -2,5 +2,4 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume

View File

@ -6,5 +6,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lincompressibleTurbulenceModels \ -lincompressibleTurbulenceModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels

View File

@ -7,5 +7,4 @@ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lincompressibleTurbulenceModels \ -lincompressibleTurbulenceModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lfiniteVolume \ -lfiniteVolume

View File

@ -6,4 +6,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lincompressibleTurbulenceModels \ -lincompressibleTurbulenceModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels

View File

@ -8,4 +8,3 @@ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels \
-lspecie -lspecie

View File

@ -2,5 +2,4 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume

View File

@ -6,5 +6,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lincompressibleTurbulenceModels \ -lincompressibleTurbulenceModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lfiniteVolume \ -lfiniteVolume

View File

@ -10,5 +10,4 @@ EXE_LIBS = \
-lcombustionThermophysicalModels \ -lcombustionThermophysicalModels \
-lfiniteVolume \ -lfiniteVolume \
-lspecie \ -lspecie \
-lbasicThermophysicalModels \ -lbasicThermophysicalModels

View File

@ -6,5 +6,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lincompressibleTurbulenceModels \ -lincompressibleTurbulenceModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lfiniteVolume \ -lfiniteVolume

View File

@ -7,5 +7,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lincompressibleLESmodels \ -lincompressibleLESmodels \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lfiniteVolume \ -lfiniteVolume

View File

@ -6,5 +6,4 @@ EXE_INC = \
EXE_LIBS = \ EXE_LIBS = \
-lincompressibleTurbulenceModels \ -lincompressibleTurbulenceModels \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lfiniteVolume \ -lfiniteVolume

View File

@ -7,7 +7,7 @@
* See the header file progmesh.h for a description of this module * See the header file progmesh.h for a description of this module
*/ */
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
@ -151,11 +151,11 @@ void Vertex::RemoveIfNonNeighbor(Vertex *n) {
float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) { float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
// if we collapse edge uv by moving u to v then how // if we collapse edge uv by moving u to v then how
// much different will the model change, i.e. how much "error". // much different will the model change, i.e. how much "error".
// Texture, vertex normal, and border vertex code was removed // Texture, vertex normal, and border vertex code was removed
// to keep this demo as simple as possible. // to keep this demo as simple as possible.
// The method of determining cost was designed in order // The method of determining cost was designed in order
// to exploit small and coplanar regions for // to exploit small and coplanar regions for
// effective polygon reduction. // effective polygon reduction.
// Is is possible to add some checks here to see if "folds" // Is is possible to add some checks here to see if "folds"
@ -173,7 +173,7 @@ float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
sides.Add(u->face[i]); sides.Add(u->face[i]);
} }
} }
// use the triangle facing most away from the sides // use the triangle facing most away from the sides
// to determine our curvature term // to determine our curvature term
for(i=0;i<u->face.num;i++) { for(i=0;i<u->face.num;i++) {
float mincurv=1; // curve for face i and closer side to it float mincurv=1; // curve for face i and closer side to it
@ -184,7 +184,7 @@ float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
} }
curvature = max(curvature,mincurv); curvature = max(curvature,mincurv);
} }
// the more coplanar the lower the curvature term // the more coplanar the lower the curvature term
return edgelength * curvature; return edgelength * curvature;
} }
@ -193,7 +193,7 @@ void ComputeEdgeCostAtVertex(Vertex *v) {
// from vertex v. Since we are only interested in reducing // from vertex v. Since we are only interested in reducing
// the object by selecting the min cost edge at each step, we // the object by selecting the min cost edge at each step, we
// only cache the cost of the least cost edge at this vertex // only cache the cost of the least cost edge at this vertex
// (in member variable collapse) as well as the value of the // (in member variable collapse) as well as the value of the
// cost (in member variable objdist). // cost (in member variable objdist).
if(v->neighbor.num==0) { if(v->neighbor.num==0) {
// v doesn't have neighbors so it costs nothing to collapse // v doesn't have neighbors so it costs nothing to collapse
@ -247,7 +247,7 @@ void Collapse(Vertex *u,Vertex *v){
for(i=u->face.num-1;i>=0;i--) { for(i=u->face.num-1;i>=0;i--) {
u->face[i]->ReplaceVertex(u,v); u->face[i]->ReplaceVertex(u,v);
} }
delete u; delete u;
// recompute the edge collapse costs for neighboring vertices // recompute the edge collapse costs for neighboring vertices
for(i=0;i<tmp.num;i++) { for(i=0;i<tmp.num;i++) {
ComputeEdgeCostAtVertex(tmp[i]); ComputeEdgeCostAtVertex(tmp[i]);
@ -256,15 +256,15 @@ void Collapse(Vertex *u,Vertex *v){
void AddVertex(List<Vector> &vert){ void AddVertex(List<Vector> &vert){
for(int i=0;i<vert.num;i++) { for(int i=0;i<vert.num;i++) {
Vertex *v = new Vertex(vert[i],i); new Vertex(vert[i],i);
} }
} }
void AddFaces(List<tridata> &tri){ void AddFaces(List<tridata> &tri){
for(int i=0;i<tri.num;i++) { for(int i=0;i<tri.num;i++) {
Triangle *t=new Triangle( new Triangle(
vertices[tri[i].v[0]], vertices[tri[i].v[0]],
vertices[tri[i].v[1]], vertices[tri[i].v[1]],
vertices[tri[i].v[2]] ); vertices[tri[i].v[2]] );
} }
} }
@ -284,7 +284,7 @@ Vertex *MinimumCostEdge(){
return mn; return mn;
} }
void ProgressiveMesh(List<Vector> &vert, List<tridata> &tri, void ProgressiveMesh(List<Vector> &vert, List<tridata> &tri,
List<int> &map, List<int> &permutation) List<int> &map, List<int> &permutation)
{ {
AddVertex(vert); // put input data into our data structures AddVertex(vert); // put input data into our data structures

View File

@ -131,7 +131,8 @@ s/^ //
/SourceFiles/,/^[ ]*$/{ /SourceFiles/,/^[ ]*$/{
s?SourceFiles?@par Source files\ s?SourceFiles?@par Source files\
<ul>? <ul>\
<li><a href="%filePath%">%fileName%</a></li>?
s?^[ ]*$?</ul>\ s?^[ ]*$?</ul>\
? ?
s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>? s? *\([a-zA-Z0-9]*\.[a-zA-Z]*\)? <li><a href="%dirName%/\1">\1</a></li>?

View File

@ -81,6 +81,10 @@ public:
scalar exponent; scalar exponent;
specieCoeffs() specieCoeffs()
:
index(-1),
stoichCoeff(0),
exponent(1)
{} {}
specieCoeffs(const speciesTable& species, Istream& is); specieCoeffs(const speciesTable& species, Istream& is);
@ -157,7 +161,7 @@ public:
{ {
const speciesTable& species_; const speciesTable& species_;
const HashPtrTable<ReactionThermo>& thermoDatabase_; const HashPtrTable<ReactionThermo>& thermoDatabase_;
public: public:
iNew iNew
@ -257,7 +261,7 @@ public:
const scalar T, const scalar T,
const scalar p, const scalar p,
const scalarField& c const scalarField& c
) const; ) const;
//- Reverse rate constant from the given forward rate constant //- Reverse rate constant from the given forward rate constant
virtual scalar kr virtual scalar kr