mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Initial state after latest Foundation merge
This commit is contained in:
@ -94,36 +94,36 @@ void ReadAndMapFields
|
||||
)
|
||||
);
|
||||
|
||||
Field<Type>& fld = tetFields[i].internalField();
|
||||
Field<Type>& fld = tetFields[i].primitiveFieldRef();
|
||||
|
||||
// Map from read field. Set unmapped entries to nullValue.
|
||||
fld.setSize(map.size(), nullValue);
|
||||
forAll(map, pointI)
|
||||
forAll(map, pointi)
|
||||
{
|
||||
label index = map[pointI];
|
||||
label index = map[pointi];
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
label cellI = index-1;
|
||||
fld[pointI] = readField[cellI];
|
||||
label celli = index-1;
|
||||
fld[pointi] = readField[celli];
|
||||
}
|
||||
else if (index < 0)
|
||||
{
|
||||
label faceI = -index-1;
|
||||
label bFaceI = faceI - mesh.nInternalFaces();
|
||||
if (bFaceI >= 0)
|
||||
label facei = -index-1;
|
||||
label bFacei = facei - mesh.nInternalFaces();
|
||||
if (bFacei >= 0)
|
||||
{
|
||||
label patchI = mesh.boundaryMesh().patchID()[bFaceI];
|
||||
label localFaceI = mesh.boundaryMesh()[patchI].whichFace
|
||||
label patchi = mesh.boundaryMesh().patchID()[bFacei];
|
||||
label localFacei = mesh.boundaryMesh()[patchi].whichFace
|
||||
(
|
||||
faceI
|
||||
facei
|
||||
);
|
||||
fld[pointI] = readField.boundaryField()[patchI][localFaceI];
|
||||
fld[pointi] = readField.boundaryField()[patchi][localFacei];
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// FatalErrorInFunction
|
||||
// << "Face " << faceI << " from index " << index
|
||||
// << "Face " << facei << " from index " << index
|
||||
// << " is not a boundary face." << abort(FatalError);
|
||||
//}
|
||||
|
||||
@ -131,8 +131,8 @@ void ReadAndMapFields
|
||||
//else
|
||||
//{
|
||||
// WarningInFunction
|
||||
// << "Point " << pointI << " at "
|
||||
// << tetDualMesh.points()[pointI]
|
||||
// << "Point " << pointi << " at "
|
||||
// << tetDualMesh.points()[pointi]
|
||||
// << " has no dual correspondence." << endl;
|
||||
//}
|
||||
}
|
||||
@ -203,9 +203,9 @@ int main(int argc, char *argv[])
|
||||
label nCells = 0;
|
||||
label nPatchFaces = 0;
|
||||
label nUnmapped = 0;
|
||||
forAll(pointDualAddressing, pointI)
|
||||
forAll(pointDualAddressing, pointi)
|
||||
{
|
||||
label index = pointDualAddressing[pointI];
|
||||
label index = pointDualAddressing[pointi];
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
@ -217,11 +217,11 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
label faceI = -index-1;
|
||||
if (faceI < mesh.nInternalFaces())
|
||||
label facei = -index-1;
|
||||
if (facei < mesh.nInternalFaces())
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI << " from index " << index
|
||||
<< "Face " << facei << " from index " << index
|
||||
<< " is not a boundary face."
|
||||
<< " nInternalFaces:" << mesh.nInternalFaces()
|
||||
<< exit(FatalError);
|
||||
|
||||
Reference in New Issue
Block a user