Merge remote-tracking branch 'remotes/origin/hotfix/faMeshDecom' into HrvojeJasak

Conflicts:
	ThirdParty/AllMake.stage4
	etc/settings.csh
	etc/settings.sh
	src/dynamicMesh/topoChangerFvMesh/Make/files
	src/dynamicMesh/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C
	tutorials/incompressible/icoDyMFoam/movingConeTopo/Allrun
This commit is contained in:
Hrvoje Jasak 2011-11-07 10:41:45 +00:00
commit 21c18fbcbc
13 changed files with 118 additions and 269 deletions

View file

@ -73,14 +73,22 @@ then
if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ]
then
<<<<<<< HEAD
# ( rpm_make -p ParaView-3.10.1 -s ParaView-3.10.1.spec -u http://www.paraview.org/files/v3.10/ParaView-3.10.1.tar.gz \
( rpm_make -p ParaView-3.8.1 -s ParaView-3.8.1.spec -u http://www.paraview.org/files/v3.8/ParaView-3.8.1.tar.gz \
=======
( rpm_make -p ParaView-3.10.1 -s ParaView-3.10.1.spec -u http://www.paraview.org/files/v3.10/ParaView-3.10.1.tar.gz \
>>>>>>> remotes/origin/hotfix/faMeshDecom
-a --define='_qmakePath $QT_BIN_DIR/qmake'
)
else
echo "WARNING: "
<<<<<<< HEAD
# echo "WARNING: Skipping the installation of ParaView-3.10.1."
echo "WARNING: Skipping the installation of ParaView-3.8.1."
=======
echo "WARNING: Skipping the installation of ParaView-3.10.1."
>>>>>>> remotes/origin/hotfix/faMeshDecom
echo "WARNING: Please make sure the QT_BIN_DIR environment variable properly"
echo "WARNING: initialized in the file prefs.sh or prefs.csh"
echo "WARNING: The command \$QT_BIN_DIR/qmake needs to be valid"

View file

@ -910,8 +910,8 @@ int main(int argc, char *argv[])
IOobject faMeshBoundaryIOobj
(
"boundary",
mesh.time().findInstance(mesh.dbDir()/fvMesh::meshSubDir, "boundary"),
"faBoundary",
mesh.time().findInstance(mesh.dbDir()/faMesh::meshSubDir, "faBoundary"),
faMesh::meshSubDir,
mesh,
IOobject::MUST_READ,

View file

@ -62,7 +62,9 @@ void faMeshDecomposition::distributeFaces()
)
);
labelIOList faceProcAddressing
labelHashSet faceProcAddressingHash
(
labelIOList
(
IOobject
(
@ -73,11 +75,12 @@ void faMeshDecomposition::distributeFaces()
IOobject::MUST_READ,
IOobject::NO_WRITE
)
)
);
forAll (faceLabels(), faceI)
{
if (findIndex(faceProcAddressing, faceLabels()[faceI] + 1) > -1)
if (faceProcAddressingHash.found(faceLabels()[faceI] + 1))
{
faceToProc_[faceI] = procI;
}
@ -209,6 +212,9 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
)
);
HashTable<label, label, Hash<label> > fvFaceProcAddressingHash;
{
labelIOList fvFaceProcAddressing
(
IOobject
@ -222,6 +228,15 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
)
);
forAll(fvFaceProcAddressing, faceI)
{
fvFaceProcAddressingHash.insert
(
fvFaceProcAddressing[faceI], faceI
);
}
};
const labelList& curProcFaceAddressing = procFaceAddressing_[procI];
labelList& curFaceLabels = procFaceLabels_[procI];
@ -231,11 +246,10 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
forAll(curProcFaceAddressing, faceI)
{
curFaceLabels[faceI] =
findIndex
fvFaceProcAddressingHash.find
(
fvFaceProcAddressing,
faceLabels()[curProcFaceAddressing[faceI]] + 1
);
)();
}
// create processor finite area mesh
@ -248,8 +262,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
const indirectPrimitivePatch& patch = this->patch();
const Map<label>& map = patch.meshPointMap();
// const edgeList& edges = aMesh.edges();
edgeList edges(patch.nEdges());
HashTable<label, edge, Hash<edge> > edgesHash;
label edgeI = -1;
@ -257,8 +270,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
for (label curEdge = 0; curEdge < nIntEdges; curEdge++)
{
edges[++edgeI] =
patch.edges()[curEdge];
edgesHash.insert(patch.edges()[curEdge], ++edgeI);
}
forAll (boundary(), patchI)
@ -269,8 +281,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
for(int eI=0; eI<size; eI++)
{
edges[++edgeI] =
patch.edges()[boundary()[patchI][eI]];
edgesHash.insert(patch.edges()[boundary()[patchI][eI]], ++edgeI);
}
}
@ -298,14 +309,7 @@ void faMeshDecomposition::decomposeMesh(const bool filterEmptyPatches)
curGlobalEdge[0] = curPatchPointAddressing[curGlobalEdge[0]];
curGlobalEdge[1] = curPatchPointAddressing[curGlobalEdge[1]];
forAll(edges, gEdgeI)
{
if(edges[gEdgeI]==curGlobalEdge)
{
curPatchEdgeAddressing[edgeI] = gEdgeI;
break;
}
}
curPatchEdgeAddressing[edgeI] = edgesHash.find(curGlobalEdge)();
}
Map<label>& curMap = procMeshEdgesMap_[procI];

View file

@ -2,7 +2,7 @@ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(PARAVIEW_INCLUDE_DIR)/paraview-3.8 \
-I$(PARAVIEW_INCLUDE_DIR)/paraview-3.10 \
-I../PV3FoamReader
LIB_LIBS = \

View file

@ -443,10 +443,15 @@ endif
# PARAVIEW
# ~~~~~
<<<<<<< HEAD
#if ( $?PARAVIEW_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-3.10.1/platforms/$WM_OPTIONS ) then
# _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS/etc/ParaView-3.10.1.csh
if ( $?PARAVIEW_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-3.8.1/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.csh
=======
if ( $?PARAVIEW_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/ParaView-3.10.1/platforms/$WM_OPTIONS ) then
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS/etc/ParaView-3.10.1.csh
>>>>>>> remotes/origin/hotfix/faMeshDecom
endif
if ( $WM_ARCH == "darwinIntel" || $WM_ARCH == "darwinIntel64" ) then

View file

@ -480,8 +480,13 @@ export MPI_BUFFER_SIZE
# Load cmake
# ~~~~~~~~~~
<<<<<<< HEAD
[ -z "$CMAKE_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-2.8.5/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.5/platforms/$WM_OPTIONS/etc/cmake-2.8.5.sh
=======
[ -z "$CMAKE_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.3/platforms/$WM_OPTIONS/etc/cmake-2.8.3.sh
>>>>>>> remotes/origin/hotfix/faMeshDecom
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " CMAKE_DIR is initialized to: $CMAKE_DIR"
@ -533,10 +538,15 @@ export MPI_BUFFER_SIZE
# Load ParaView
# ~~~~~~~~~~~~~
<<<<<<< HEAD
#[ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS ] && {
# _foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS/etc/ParaView-3.10.1.sh
[ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.8.1/platforms/$WM_OPTIONS/etc/ParaView-3.8.1.sh
=======
[ -z "$PARAVIEW_SYSTEM" ] && [ -e $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS ] && {
_foamSource $WM_THIRD_PARTY_DIR/packages/ParaView-3.10.1/platforms/$WM_OPTIONS/etc/ParaView-3.10.1.sh
>>>>>>> remotes/origin/hotfix/faMeshDecom
}
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo " PARAVIEW_DIR is initialized to: $PARAVIEW_DIR"

View file

@ -99,8 +99,8 @@ void Foam::mixerFvMesh::addZonesAndModifiers()
}
const polyPatch& movingSlider = boundaryMesh()[movingSliderIndex];
const polyPatch& staticSlider = boundaryMesh()[staticSliderIndex];
const polyPatch& staticSlider = boundaryMesh()[staticSliderIndex];
List<pointZone*> pz;
List<faceZone*> fz;
@ -310,10 +310,17 @@ void Foam::mixerFvMesh::calcMovingMask() const
(
word(dict_.subDict("slider").lookup("moving")) + "Zone"
);
<<<<<<< HEAD
const labelList& movingSliderAddr =
faceZones()[faceZones().findZoneID(movingSliderZoneName)];
=======
const labelList& movingSliderAddr =
faceZones()[faceZones().findZoneID(movingSliderZoneName)];
>>>>>>> remotes/origin/hotfix/faMeshDecom
forAll (movingSliderAddr, faceI)
{
const face& curFace = f[movingSliderAddr[faceI]];
@ -479,6 +486,7 @@ bool Foam::mixerFvMesh::update()
mappedOldPointsNew.map(oldPointsNew, topoChangeMap->pointMap());
movePoints(mappedOldPointsNew);
<<<<<<< HEAD
resetMotion();
setV0();
@ -497,6 +505,27 @@ bool Foam::mixerFvMesh::update()
// Move the sliding interface points to correct position
movePoints(newPoints);
}
=======
resetMotion();
setV0();
// Move the sliding interface points to correct position
movePoints(topoChangeMap->preMotionPoints());
}
else
{
pointField newPoints = allPoints();
movePoints(oldPointsNew);
resetMotion();
setV0();
// Move the sliding interface points to correct position
movePoints(newPoints);
}
>>>>>>> remotes/origin/hotfix/faMeshDecom
}
return topoChangeMap->morphing();

View file

@ -1,6 +1,6 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
| \\ / F ield | OpenFOAM Extend Project: Open source CFD |
| \\ / O peration | Version: 1.6-ext |
| \\ / A nd | Web: www.extend-project.de |
| \\/ M anipulation | |

View file

@ -15,253 +15,43 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
6
(
maxY
{
type wall;
nFaces 1200;
startFace 41630;
nFaces 300;
startFace 8300;
}
minX
{
type patch;
nFaces 250;
startFace 42830;
nFaces 100;
startFace 8600;
}
maxX
{
type patch;
nFaces 250;
startFace 43080;
nFaces 100;
startFace 8700;
}
minY
{
type wall;
nFaces 1200;
startFace 43330;
nFaces 300;
startFace 8800;
}
minZ
{
type wall;
nFaces 750;
startFace 44530;
nFaces 300;
startFace 9100;
}
maxZ
{
type wall;
nFaces 750;
startFace 45280;
}
bottomAir_minX
{
type wall;
nFaces 0;
startFace 46030;
}
bottomAir_maxX
{
type wall;
nFaces 0;
startFace 46030;
}
bottomAir_minY
{
type wall;
nFaces 0;
startFace 46030;
}
bottomAir_minZ
{
type wall;
nFaces 0;
startFace 46030;
}
bottomAir_maxZ
{
type wall;
nFaces 0;
startFace 46030;
}
bottomAir_bottomAir_to_rightSolid
{
type wall;
nFaces 0;
startFace 46030;
}
bottomAir_bottomAir_to_leftSolid
{
type wall;
nFaces 0;
startFace 46030;
}
bottomAir_bottomAir_to_heater
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_maxY
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_minX
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_maxX
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_minZ
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_maxZ
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_topAir_to_rightSolid
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_topAir_to_heater
{
type wall;
nFaces 0;
startFace 46030;
}
topAir_topAir_to_leftSolid
{
type wall;
nFaces 0;
startFace 46030;
}
leftSolid_minX
{
type wall;
nFaces 0;
startFace 46030;
}
leftSolid_minZ
{
type wall;
nFaces 0;
startFace 46030;
}
leftSolid_maxZ
{
type wall;
nFaces 0;
startFace 46030;
}
leftSolid_leftSolid_to_bottomAir
{
type wall;
nFaces 0;
startFace 46030;
}
leftSolid_leftSolid_to_heater
{
type wall;
nFaces 0;
startFace 46030;
}
leftSolid_leftSolid_to_topAir
{
type wall;
nFaces 0;
startFace 46030;
}
rightSolid_maxX
{
type wall;
nFaces 0;
startFace 46030;
}
rightSolid_minZ
{
type wall;
nFaces 0;
startFace 46030;
}
rightSolid_maxZ
{
type wall;
nFaces 0;
startFace 46030;
}
rightSolid_rightSolid_to_bottomAir
{
type wall;
nFaces 0;
startFace 46030;
}
rightSolid_rightSolid_to_topAir
{
type wall;
nFaces 0;
startFace 46030;
}
rightSolid_rightSolid_to_heater
{
type wall;
nFaces 0;
startFace 46030;
}
heater_minY
{
type wall;
nFaces 0;
startFace 46030;
}
heater_minZ
{
type wall;
nFaces 0;
startFace 46030;
}
heater_maxZ
{
type wall;
nFaces 0;
startFace 46030;
}
heater_heater_to_topAir
{
type wall;
nFaces 0;
startFace 46030;
}
heater_heater_to_rightSolid
{
type wall;
nFaces 0;
startFace 46030;
}
heater_heater_to_leftSolid
{
type wall;
nFaces 0;
startFace 46030;
}
heater_heater_to_bottomAir
{
type wall;
nFaces 0;
startFace 46030;
nFaces 300;
startFace 9400;
}
)

View file

@ -15,7 +15,11 @@ cd constant/polyMesh/sets/
cd ../../..
runApplication setsToZones
<<<<<<< HEAD
runApplication decomposePar
=======
#runApplication decomposePar
>>>>>>> remotes/origin/hotfix/faMeshDecom
runApplication $application
#runParallel $application 4
#runApplication reconstructParMesh -cellDist

View file

@ -18,5 +18,4 @@ cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -lpthread
LINKLIBSO = $(CC) $(c++FLAGS) -lpthread -dynamiclib -undefined dynamic_lookup
# LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_LIBBIN) -lOpenFOAM -L$(FOAM_MPI_LIBBIN) -lPstream
LINKEXE = $(CC) $(c++FLAGS) -lpthread -L$(FOAM_MPI_LIBBIN) -lPstream

View file

@ -10,7 +10,7 @@ cFLAGS = $(GFLAGS) $(cWARN) $(cOPT) $(cDBUG) $(LIB_HEADER_DIRS) -fPIC
ctoo = $(WM_SCHEDULER) $(cc) $(cFLAGS) -c $$SOURCE -o $@
LINK_LIBS = $(cDBUG) -L$(IA32ROOT)/lib
LINK_LIBS = $(cDBUG)
LINKLIBSO = $(cc) $(cFLAGS) -shared
LINKEXE = $(cc) $(cFLAGS)

View file

@ -15,7 +15,7 @@ cxxtoo = $(Ctoo)
cctoo = $(Ctoo)
cpptoo = $(Ctoo)
LINK_LIBS = $(c++DBUG) -L$(IA64ROOT)/lib
LINK_LIBS = $(c++DBUG)
LINKLIBSO = $(CC) $(c++FLAGS) -shared
LINKEXE = $(CC) $(c++FLAGS)