mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://hunt/home/hunt2/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -76,9 +76,9 @@ echo "run $args" > $HOME/gdbCommands
|
|||||||
echo "where" >> $HOME/gdbCommands
|
echo "where" >> $HOME/gdbCommands
|
||||||
echo "Constructed gdb initialization file $HOME/gdbCommands"
|
echo "Constructed gdb initialization file $HOME/gdbCommands"
|
||||||
|
|
||||||
$ECHO "Choose running method: 1)gdb+xterm 2)gdb 3)log 4)xterm+valgrind: \c"
|
$ECHO "Choose running method: 1)gdb+xterm 2)gdb 3)log 4)log+xterm 5)xterm+valgrind: \c"
|
||||||
read method
|
read method
|
||||||
if [ "$method" -ne 1 -a "$method" -ne 2 -a "$method" -ne 3 -a "$method" -ne 4 ]; then
|
if [ "$method" -ne 1 -a "$method" -ne 2 -a "$method" -ne 3 -a "$method" -ne 4 -a "$method" -ne 5 ]; then
|
||||||
printUsage
|
printUsage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -152,6 +152,9 @@ do
|
|||||||
echo "$sourceFoam; cd $PWD; $exec $args >& $procLog" >> $procCmdFile
|
echo "$sourceFoam; cd $PWD; $exec $args >& $procLog" >> $procCmdFile
|
||||||
echo "${node}$procCmdFile" >> $HOME/mpirun.schema
|
echo "${node}$procCmdFile" >> $HOME/mpirun.schema
|
||||||
elif [ "$method" -eq 4 ]; then
|
elif [ "$method" -eq 4 ]; then
|
||||||
|
echo "$sourceFoam; cd $PWD; $exec $args 2>&1 | tee $procLog; read dummy" >> $procCmdFile
|
||||||
|
echo "${node}xterm -font fixed -title 'processor'$proc $geom -e $procCmdFile" >> $HOME/mpirun.schema
|
||||||
|
elif [ "$method" -eq 5 ]; then
|
||||||
echo "$sourceFoam; cd $PWD; valgrind $exec $args; read dummy" >> $procCmdFile
|
echo "$sourceFoam; cd $PWD; valgrind $exec $args; read dummy" >> $procCmdFile
|
||||||
echo "${node}xterm -font fixed -title 'processor'$proc $geom -e $procCmdFile" >> $HOME/mpirun.schema
|
echo "${node}xterm -font fixed -title 'processor'$proc $geom -e $procCmdFile" >> $HOME/mpirun.schema
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -169,7 +169,7 @@ Foam::PackedList<1> Foam::syncTools::getMasterPoints(const polyMesh& mesh)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn("syncTools::getMasterPoints(const polyMesh&)")
|
FatalErrorIn("syncTools::getMasterPoints(const polyMesh&)")
|
||||||
<< "Cannot handle patch " << patches[patchI].name()
|
<< "Cannot handle coupled patch " << patches[patchI].name()
|
||||||
<< " of type " << patches[patchI].type()
|
<< " of type " << patches[patchI].type()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -290,7 +290,7 @@ Foam::PackedList<1> Foam::syncTools::getMasterEdges(const polyMesh& mesh)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FatalErrorIn("syncTools::getMasterEdges(const polyMesh&)")
|
FatalErrorIn("syncTools::getMasterEdges(const polyMesh&)")
|
||||||
<< "Cannot handle patch " << patches[patchI].name()
|
<< "Cannot handle coupled patch " << patches[patchI].name()
|
||||||
<< " of type " << patches[patchI].type()
|
<< " of type " << patches[patchI].type()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -314,6 +314,54 @@ Foam::PackedList<1> Foam::syncTools::getMasterEdges(const polyMesh& mesh)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Determines for every face whether it is coupled and if so sets only one.
|
||||||
|
Foam::PackedList<1> Foam::syncTools::getMasterFaces(const polyMesh& mesh)
|
||||||
|
{
|
||||||
|
PackedList<1> isMasterFace(mesh.nFaces(), 1);
|
||||||
|
|
||||||
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
|
forAll(patches, patchI)
|
||||||
|
{
|
||||||
|
if (patches[patchI].coupled())
|
||||||
|
{
|
||||||
|
if (Pstream::parRun() && isA<processorPolyPatch>(patches[patchI]))
|
||||||
|
{
|
||||||
|
const processorPolyPatch& pp =
|
||||||
|
refCast<const processorPolyPatch>(patches[patchI]);
|
||||||
|
|
||||||
|
if (!pp.owner())
|
||||||
|
{
|
||||||
|
forAll(pp, i)
|
||||||
|
{
|
||||||
|
isMasterFace.set(pp.start()+i, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (isA<cyclicPolyPatch>(patches[patchI]))
|
||||||
|
{
|
||||||
|
const cyclicPolyPatch& pp =
|
||||||
|
refCast<const cyclicPolyPatch>(patches[patchI]);
|
||||||
|
|
||||||
|
for (label i = pp.size()/2; i < pp.size(); i++)
|
||||||
|
{
|
||||||
|
isMasterFace.set(pp.start()+i, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorIn("syncTools::getMasterFaces(const polyMesh&)")
|
||||||
|
<< "Cannot handle coupled patch " << patches[patchI].name()
|
||||||
|
<< " of type " << patches[patchI].type()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return isMasterFace;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void Foam::syncTools::separateList
|
void Foam::syncTools::separateList
|
||||||
(
|
(
|
||||||
|
|||||||
@ -226,9 +226,12 @@ public:
|
|||||||
//- Get per point whether is it master (of a coupled set of points)
|
//- Get per point whether is it master (of a coupled set of points)
|
||||||
static PackedList<1> getMasterPoints(const polyMesh&);
|
static PackedList<1> getMasterPoints(const polyMesh&);
|
||||||
|
|
||||||
//- Get per edge whether is it master (of a coupled set of edge)
|
//- Get per edge whether is it master (of a coupled set of edges)
|
||||||
static PackedList<1> getMasterEdges(const polyMesh&);
|
static PackedList<1> getMasterEdges(const polyMesh&);
|
||||||
|
|
||||||
|
//- Get per face whether is it master (of a coupled set of faces)
|
||||||
|
static PackedList<1> getMasterFaces(const polyMesh&);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -47,34 +47,52 @@ namespace Foam
|
|||||||
|
|
||||||
// Assume the data associated with type T is not contiguous
|
// Assume the data associated with type T is not contiguous
|
||||||
template<class T>
|
template<class T>
|
||||||
inline bool contiguous() {return false;}
|
inline bool contiguous() {return false;}
|
||||||
|
|
||||||
|
|
||||||
// Specify data associated with primitive types is contiguous
|
// Specify data associated with primitive types is contiguous
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<bool>() {return true;}
|
inline bool contiguous<bool>() {return true;}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<char>() {return true;}
|
inline bool contiguous<char>() {return true;}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<short>() {return true;}
|
inline bool contiguous<unsigned char>() {return true;}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<int>() {return true;}
|
inline bool contiguous<short>() {return true;}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<long>() {return true;}
|
inline bool contiguous<unsigned short>() {return true;}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<float>() {return true;}
|
inline bool contiguous<int>() {return true;}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<double>() {return true;}
|
inline bool contiguous<unsigned int>() {return true;}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline bool contiguous<long double>() {return true;}
|
inline bool contiguous<long>() {return true;}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline bool contiguous<unsigned long>() {return true;}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline bool contiguous<long long>() {return true;}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline bool contiguous<unsigned long long>() {return true;}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline bool contiguous<float>() {return true;}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline bool contiguous<double>() {return true;}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline bool contiguous<long double>() {return true;}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -746,8 +746,7 @@ void Foam::polyDualMesh::calcDual
|
|||||||
allBoundary.meshEdges
|
allBoundary.meshEdges
|
||||||
(
|
(
|
||||||
mesh.edges(),
|
mesh.edges(),
|
||||||
mesh.cellEdges(),
|
mesh.pointEdges()
|
||||||
SubList<label>(mesh.faceOwner(), allBoundary.size(), nIntFaces)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user