mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-dev-OpenCFD into develop
This commit is contained in:
@ -160,6 +160,23 @@ int main(int argc, char *argv[])
|
|||||||
Pstream::scatterList(meshBb);
|
Pstream::scatterList(meshBb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Temporarily: override master-only checking
|
||||||
|
regIOobject::fileCheckTypes oldCheckType =
|
||||||
|
regIOobject::fileModificationChecking;
|
||||||
|
|
||||||
|
if (oldCheckType == regIOobject::timeStampMaster)
|
||||||
|
{
|
||||||
|
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||||
|
}
|
||||||
|
else if (oldCheckType == regIOobject::inotifyMaster)
|
||||||
|
{
|
||||||
|
regIOobject::fileModificationChecking = regIOobject::inotify;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IOobject io
|
IOobject io
|
||||||
(
|
(
|
||||||
surfFileName, // name
|
surfFileName, // name
|
||||||
@ -284,6 +301,10 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Writing surface." << nl << endl;
|
Info<< "Writing surface." << nl << endl;
|
||||||
surfMesh.objectRegistry::write();
|
surfMesh.objectRegistry::write();
|
||||||
|
|
||||||
|
|
||||||
|
regIOobject::fileModificationChecking = oldCheckType;
|
||||||
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -997,7 +997,7 @@ bool Foam::polyMesh::upToDatePoints(const regIOobject& io) const
|
|||||||
|
|
||||||
void Foam::polyMesh::setUpToDatePoints(regIOobject& io) const
|
void Foam::polyMesh::setUpToDatePoints(regIOobject& io) const
|
||||||
{
|
{
|
||||||
io.eventNo() = points_.eventNo();
|
io.eventNo() = points_.eventNo()+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -860,16 +860,62 @@ Foam::labelList Foam::dynamicRefineFvMesh::selectUnrefinePoints
|
|||||||
// All points that can be unrefined
|
// All points that can be unrefined
|
||||||
const labelList splitPoints(meshCutter_.getSplitPoints());
|
const labelList splitPoints(meshCutter_.getSplitPoints());
|
||||||
|
|
||||||
|
|
||||||
|
const labelListList& pointCells = this->pointCells();
|
||||||
|
|
||||||
|
// If we have any protected cells make sure they also are not being
|
||||||
|
// unrefined
|
||||||
|
|
||||||
|
PackedBoolList protectedPoint(nPoints());
|
||||||
|
|
||||||
|
if (protectedCell_.size())
|
||||||
|
{
|
||||||
|
// Get all points on a protected cell
|
||||||
|
forAll(pointCells, pointI)
|
||||||
|
{
|
||||||
|
const labelList& pCells = pointCells[pointI];
|
||||||
|
|
||||||
|
forAll(pCells, pCellI)
|
||||||
|
{
|
||||||
|
label cellI = pCells[pCellI];
|
||||||
|
|
||||||
|
if (protectedCell_[cellI])
|
||||||
|
{
|
||||||
|
protectedPoint[pointI] = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
syncTools::syncPointList
|
||||||
|
(
|
||||||
|
*this,
|
||||||
|
protectedPoint,
|
||||||
|
orEqOp<unsigned int>(),
|
||||||
|
0U
|
||||||
|
);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Info<< "From "
|
||||||
|
<< returnReduce(protectedCell_.count(), sumOp<label>())
|
||||||
|
<< " protected cells found "
|
||||||
|
<< returnReduce(protectedPoint.count(), sumOp<label>())
|
||||||
|
<< " protected points." << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DynamicList<label> newSplitPoints(splitPoints.size());
|
DynamicList<label> newSplitPoints(splitPoints.size());
|
||||||
|
|
||||||
forAll(splitPoints, i)
|
forAll(splitPoints, i)
|
||||||
{
|
{
|
||||||
label pointI = splitPoints[i];
|
label pointI = splitPoints[i];
|
||||||
|
|
||||||
if (pFld[pointI] < unrefineLevel)
|
if (!protectedPoint[pointI] && pFld[pointI] < unrefineLevel)
|
||||||
{
|
{
|
||||||
// Check that all cells are not marked
|
// Check that all cells are not marked
|
||||||
const labelList& pCells = pointCells()[pointI];
|
const labelList& pCells = pointCells[pointI];
|
||||||
|
|
||||||
bool hasMarked = false;
|
bool hasMarked = false;
|
||||||
|
|
||||||
|
|||||||
@ -546,7 +546,7 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
|
|||||||
//
|
//
|
||||||
// if (cLevel >= minLevel && cLevel < maxLevel)
|
// if (cLevel >= minLevel && cLevel < maxLevel)
|
||||||
// {
|
// {
|
||||||
// scalar cellSize = edge0Len/pow(2, cLevel);
|
// scalar cellSize = edge0Len/pow(2.0, cLevel);
|
||||||
//
|
//
|
||||||
// // Update gap size
|
// // Update gap size
|
||||||
// nearGap[i] = nGapCells*cellSize;
|
// nearGap[i] = nGapCells*cellSize;
|
||||||
@ -687,7 +687,7 @@ Foam::label Foam::meshRefinement::generateRays
|
|||||||
|
|
||||||
if (cLevel >= gapInfo[1] && cLevel < gapInfo[2])
|
if (cLevel >= gapInfo[1] && cLevel < gapInfo[2])
|
||||||
{
|
{
|
||||||
scalar cellSize = meshCutter_.level0EdgeLength()/pow(2, cLevel);
|
scalar cellSize = meshCutter_.level0EdgeLength()/pow(2.0, cLevel);
|
||||||
|
|
||||||
// Calculate gap size
|
// Calculate gap size
|
||||||
scalar nearGap = gapInfo[0]*cellSize;
|
scalar nearGap = gapInfo[0]*cellSize;
|
||||||
@ -803,7 +803,7 @@ Foam::label Foam::meshRefinement::generateRays
|
|||||||
|
|
||||||
if (cLevel >= gapInfo[1] && cLevel < gapInfo[2])
|
if (cLevel >= gapInfo[1] && cLevel < gapInfo[2])
|
||||||
{
|
{
|
||||||
scalar cellSize = meshCutter_.level0EdgeLength()/pow(2, cLevel);
|
scalar cellSize = meshCutter_.level0EdgeLength()/pow(2.0, cLevel);
|
||||||
|
|
||||||
// Calculate gap size
|
// Calculate gap size
|
||||||
scalar nearGap = gapInfo[0]*cellSize;
|
scalar nearGap = gapInfo[0]*cellSize;
|
||||||
@ -1133,7 +1133,7 @@ Foam::label Foam::meshRefinement::markInternalGapRefinement
|
|||||||
forAll(cellMap, i)
|
forAll(cellMap, i)
|
||||||
{
|
{
|
||||||
label cellI = cellMap[i];
|
label cellI = cellMap[i];
|
||||||
scalar cellSize = edge0Len/pow(2, cellLevel[cellI]);
|
scalar cellSize = edge0Len/pow(2.0, cellLevel[cellI]);
|
||||||
gapSize[i] = shellGapInfo[i][0]*cellSize;
|
gapSize[i] = shellGapInfo[i][0]*cellSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1410,7 +1410,8 @@ Foam::label Foam::meshRefinement::markInternalGapRefinement
|
|||||||
{
|
{
|
||||||
// Needed gap size
|
// Needed gap size
|
||||||
label cLevel = cellLevel[cellI];
|
label cLevel = cellLevel[cellI];
|
||||||
scalar cellSize = meshCutter_.level0EdgeLength()/pow(2, cLevel);
|
scalar cellSize =
|
||||||
|
meshCutter_.level0EdgeLength()/pow(2.0, cLevel);
|
||||||
scalar neededGapSize = numGapCells[cellI]*cellSize;
|
scalar neededGapSize = numGapCells[cellI]*cellSize;
|
||||||
|
|
||||||
if (neededGapSize > detectedGapSize[cellI])
|
if (neededGapSize > detectedGapSize[cellI])
|
||||||
|
|||||||
@ -45,9 +45,11 @@ Description
|
|||||||
UMean
|
UMean
|
||||||
UPrime2Mean
|
UPrime2Mean
|
||||||
);
|
);
|
||||||
coordinateSystem
|
origin (0.001 0 0);
|
||||||
|
|
||||||
|
coordinateRotation
|
||||||
{
|
{
|
||||||
origin (0.001 0 0);
|
type axesRotation;
|
||||||
e1 (1 0.15 0);
|
e1 (1 0.15 0);
|
||||||
e3 (0 0 -1);
|
e3 (0 0 -1);
|
||||||
}
|
}
|
||||||
@ -59,7 +61,8 @@ Description
|
|||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
type | type name: fieldCoordinateSystemTransform | yes |
|
type | type name: fieldCoordinateSystemTransform | yes |
|
||||||
fields | list of fields to be transformed |yes |
|
fields | list of fields to be transformed |yes |
|
||||||
coordinateSystem | local co-ordinate system | yes |
|
origin | origin of local co-ordinate system | yes |
|
||||||
|
coordinateRotation | orientation of local co-ordinate system | yes |
|
||||||
log | Log to standard output | no | yes
|
log | Log to standard output | no | yes
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
|
|||||||
@ -38,9 +38,11 @@ functions
|
|||||||
UPrime2Mean
|
UPrime2Mean
|
||||||
);
|
);
|
||||||
|
|
||||||
coordinateSystem
|
origin (0.001 0 0);
|
||||||
|
|
||||||
|
coordinateRotation
|
||||||
{
|
{
|
||||||
origin (0.001 0 0);
|
type axesRotation;
|
||||||
e1 (1 0.15 0);
|
e1 (1 0.15 0);
|
||||||
e3 (0 0 -1);
|
e3 (0 0 -1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user