Skip to content
Snippets Groups Projects
Commit 49b6c94f authored by Mark Olesen's avatar Mark Olesen Committed by Andrew Heather
Browse files

Merge commit 'origin/master' into olesenm

parents c6dedaff 9f5351af
Branches
Tags
No related merge requests found
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(ParaView_DIR) \
-I$(ParaView_DIR)/VTK \
-I$(ParaView_INST_DIR)/VTK \
-I$(ParaView_INST_DIR)/VTK/Common \
-I$(ParaView_INST_DIR)/VTK/Filtering \
-I$(ParaView_INST_DIR)/VTK/Rendering \
-I../PV3FoamReader
LIB_LIBS = \
-lfiniteVolume \
-llagrangian \
-lmeshTools \
$(GLIBS)
...@@ -230,8 +230,8 @@ void write ...@@ -230,8 +230,8 @@ void write
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::validArgs.append("surface"); argList::validArgs.append("input file");
argList::validArgs.append("output name"); argList::validArgs.append("output file");
# include "setRootCase.H" # include "setRootCase.H"
# include "createTime.H" # include "createTime.H"
......
...@@ -130,6 +130,8 @@ endif ...@@ -130,6 +130,8 @@ endif
# Communications library # Communications library
# ~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~
unset MPI_ARCH_PATH
switch ("$WM_MPLIB") switch ("$WM_MPLIB")
case OPENMPI: case OPENMPI:
set mpi_version=openmpi-1.2.6 set mpi_version=openmpi-1.2.6
......
...@@ -103,11 +103,7 @@ bool Foam::setEnv ...@@ -103,11 +103,7 @@ bool Foam::setEnv
const bool overwrite const bool overwrite
) )
{ {
# ifdef linux
return setenv(envName.c_str(), value.c_str(), overwrite) == 0; return setenv(envName.c_str(), value.c_str(), overwrite) == 0;
# else
return putenv((char*)(envName + '=' + value.c_str()).c_str()) == 0;
# endif
} }
......
...@@ -231,14 +231,22 @@ bool Foam::probes::checkFieldTypes() ...@@ -231,14 +231,22 @@ bool Foam::probes::checkFieldTypes()
probeFilePtrs_.insert(fldName, sPtr); probeFilePtrs_.insert(fldName, sPtr);
*sPtr<< '#' << setw(IOstream::defaultPrecision() + 6) unsigned int w = IOstream::defaultPrecision() + 7;
<< "Time";
forAll(probeLocations_, probeI) for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
{ {
*sPtr << token::SPACE << probeLocations_[probeI]; *sPtr<< '#' << setw(IOstream::defaultPrecision() + 6)
<< vector::componentNames[cmpt];
forAll(probeLocations_, probeI)
{
*sPtr<< setw(w) << probeLocations_[probeI][cmpt];
}
*sPtr << endl;
} }
*sPtr << endl;
*sPtr<< '#' << setw(IOstream::defaultPrecision() + 6)
<< "Time" << endl;
} }
} }
......
...@@ -438,6 +438,7 @@ bool triSurface::readSTLASCII(const fileName& STLfileName) ...@@ -438,6 +438,7 @@ bool triSurface::readSTLASCII(const fileName& STLfileName)
STLlabels.clear(); STLlabels.clear();
// Stitch all points within SMALL meters.
stitchTriangles(rawPoints); stitchTriangles(rawPoints);
// Convert solidNames into regionNames // Convert solidNames into regionNames
......
...@@ -42,17 +42,16 @@ bool triSurface::stitchTriangles ...@@ -42,17 +42,16 @@ bool triSurface::stitchTriangles
) )
{ {
// Merge points // Merge points
labelList pointMap(rawPoints.size()); labelList pointMap;
pointField newPoints;
pointField newPoints(rawPoints.size());
bool hasMerged = mergePoints(rawPoints, tol, verbose, pointMap, newPoints); bool hasMerged = mergePoints(rawPoints, tol, verbose, pointMap, newPoints);
if (hasMerged) if (hasMerged)
{ {
if (verbose) if (verbose)
{ {
Pout<< "stitchTriangles : Renumbering all triangles" << endl; Pout<< "stitchTriangles : Merged from " << rawPoints.size()
<< " points down to " << newPoints.size() << endl;
} }
pointField& ps = const_cast<pointField&>(points()); pointField& ps = const_cast<pointField&>(points());
...@@ -73,6 +72,7 @@ bool triSurface::stitchTriangles ...@@ -73,6 +72,7 @@ bool triSurface::stitchTriangles
operator[](newTriangleI)[0] = newA; operator[](newTriangleI)[0] = newA;
operator[](newTriangleI)[1] = newB; operator[](newTriangleI)[1] = newB;
operator[](newTriangleI)[2] = newC; operator[](newTriangleI)[2] = newC;
operator[](newTriangleI).region() = operator[](i).region();
newTriangleI++; newTriangleI++;
} }
else if (verbose) else if (verbose)
......
...@@ -651,7 +651,7 @@ surfacePatchList triSurface::calcPatches(labelList& faceMap) const ...@@ -651,7 +651,7 @@ surfacePatchList triSurface::calcPatches(labelList& faceMap) const
{ {
sortedRegion[faceI] = operator[](faceI).region(); sortedRegion[faceI] = operator[](faceI).region();
} }
sortedRegion.sort(); sortedRegion.stableSort();
faceMap = sortedRegion.indices(); faceMap = sortedRegion.indices();
...@@ -1214,7 +1214,11 @@ void triSurface::writeStats(Ostream& os) const ...@@ -1214,7 +1214,11 @@ void triSurface::writeStats(Ostream& os) const
{ {
// Calculate bounding box without any additional addressing // Calculate bounding box without any additional addressing
// Copy of treeBoundBox code. Cannot use meshTools from triSurface... // Copy of treeBoundBox code. Cannot use meshTools from triSurface...
boundBox bb; boundBox bb
(
point(VGREAT, VGREAT, VGREAT),
point(-VGREAT, -VGREAT, -VGREAT)
);
forAll(*this, triI) forAll(*this, triI)
{ {
const labelledTri& f = operator[](triI); const labelledTri& f = operator[](triI);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment