Bug fixes, Henrik Rusche
This commit is contained in:
parent
9879c2e621
commit
da5726b262
4 changed files with 50 additions and 5 deletions
|
@ -238,7 +238,7 @@ void Foam::attachDetach::checkDefinition()
|
|||
{
|
||||
FatalErrorIn("void attachDetach::checkDefinition()")
|
||||
<< "Master and slave patch share " << nSharedPoints
|
||||
<< " point. This is not allowed." << nl
|
||||
<< " point. This is not allowed." << nl
|
||||
<< "Please check mesh for topological errors."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
|
|
@ -381,6 +381,33 @@ void Foam::attachDetach::detachInterface
|
|||
// If the face has changed, create a modification entry
|
||||
if (changed)
|
||||
{
|
||||
// Get zone ID and flipMap for the face
|
||||
// Bug fix. Henrik Rusche, 20/Jan/2011
|
||||
const label oldZoneID = zoneMesh.whichZone(curFaceID);
|
||||
bool oldFlip = false;
|
||||
|
||||
if (oldZoneID > -1)
|
||||
{
|
||||
const label oldFaceInZoneID =
|
||||
zoneMesh[oldZoneID].whichFace(curFaceID);
|
||||
|
||||
if (oldFaceInZoneID > -1)
|
||||
{
|
||||
oldFlip = zoneMesh[oldZoneID].flipMap()[oldFaceInZoneID];
|
||||
}
|
||||
else
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"attachDetach::detachInterface\n"
|
||||
"(\n"
|
||||
" polyTopoChange& ref\n"
|
||||
") const\n"
|
||||
) << "Error in zone access."
|
||||
<< abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
if (mesh.isInternalFace(curFaceID))
|
||||
{
|
||||
// No need to check for nei index: internal face.
|
||||
|
@ -396,8 +423,8 @@ void Foam::attachDetach::detachInterface
|
|||
false, // flip flux
|
||||
-1, // patch for face
|
||||
false, // remove from zone
|
||||
zoneMesh.whichZone(curFaceID), // zone for face
|
||||
false // face zone flip
|
||||
oldZoneID, // zone for face
|
||||
oldFlip // face zone flip
|
||||
)
|
||||
);
|
||||
// Pout << "modifying stick-out face. Internal Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " nei: " << nei[curFaceID] << endl;
|
||||
|
@ -415,8 +442,8 @@ void Foam::attachDetach::detachInterface
|
|||
false, // flip flux
|
||||
mesh.boundaryMesh().whichPatch(curFaceID), // patch
|
||||
false, // remove from zone
|
||||
zoneMesh.whichZone(curFaceID), // zone for face
|
||||
false // face zone flip
|
||||
oldZoneID, // zone for face
|
||||
oldFlip // face zone flip
|
||||
)
|
||||
);
|
||||
// Pout << "modifying stick-out face. Boundary Old face: " << oldFace << " new face: " << newFace << " own: " << own[curFaceID] << " patch: " << mesh.boundaryMesh().whichPatch(curFaceID) << endl;
|
||||
|
|
|
@ -217,6 +217,18 @@ Foam::layerAdditionRemoval::~layerAdditionRemoval()
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::layerAdditionRemoval::setRemoval()
|
||||
{
|
||||
triggerRemoval_ = topoChanger().morphIndex();
|
||||
}
|
||||
|
||||
|
||||
void Foam::layerAdditionRemoval::setAddition()
|
||||
{
|
||||
triggerAddition_ = topoChanger().morphIndex();
|
||||
}
|
||||
|
||||
|
||||
bool Foam::layerAdditionRemoval::changeTopology() const
|
||||
{
|
||||
// Protect from multiple calculation in the same time-step
|
||||
|
|
|
@ -170,6 +170,12 @@ public:
|
|||
|
||||
// Member Functions
|
||||
|
||||
//- Set layer removal
|
||||
void setRemoval();
|
||||
|
||||
//- Set addition
|
||||
void setAddition();
|
||||
|
||||
//- Check for topology change
|
||||
virtual bool changeTopology() const;
|
||||
|
||||
|
|
Reference in a new issue