Commit 068b6b1d authored by henry's avatar henry
Browse files

Resolved unexpected merge problem.

parents 361b1533 619d3e24
......@@ -104,6 +104,14 @@ type 'processorCyclic'.
- processor patches use overlapping communication using a different message
tag. This maps straight through into the MPI message tag.
See processorCyclicPolyPatch::tag(). This needs to be calculated the
same on both sides so is calculated as
Pstream::nProcs()*max(myProcNo, neighbProcNo)
+ min(myProcNo, neighbProcNo)
which is
- unique
- commutative
- does not interfere with the default tag (= 1)
- when constructing a GeometricField from a dictionary it will explicitly
......
......@@ -341,6 +341,7 @@ $(constraintPolyPatches)/empty/emptyPolyPatch.C
$(constraintPolyPatches)/symmetry/symmetryPolyPatch.C
$(constraintPolyPatches)/wedge/wedgePolyPatch.C
$(constraintPolyPatches)/cyclic/cyclicPolyPatch.C
$(constraintPolyPatches)/cyclicSlip/cyclicSlipPolyPatch.C
$(constraintPolyPatches)/processorCyclic/processorCyclicPolyPatch.C
$(constraintPolyPatches)/processor/processorPolyPatch.C
......@@ -452,6 +453,7 @@ $(constraintPointPatches)/empty/emptyPointPatch.C
$(constraintPointPatches)/symmetry/symmetryPointPatch.C
$(constraintPointPatches)/wedge/wedgePointPatch.C
$(constraintPointPatches)/cyclic/cyclicPointPatch.C
$(constraintPointPatches)/cyclicSlip/cyclicSlipPointPatch.C
$(constraintPointPatches)/processor/processorPointPatch.C
$(constraintPointPatches)/processorCyclic/processorCyclicPointPatch.C
......
......@@ -219,30 +219,6 @@ Foam::List<int> Foam::UPstream::procIDs_(1, 0);
// Standard transfer message type
int Foam::UPstream::msgType_(1);
// New message type
int Foam::UPstream::freeTag_(msgType()+1);
// Free'd message types
Foam::LIFOStack<int> Foam::UPstream::freedTags_;
int Foam::UPstream::allocateTag()
{
if (freedTags_.empty())
{
return freeTag_++;
}
else
{
return freedTags_.pop();
}
}
void Foam::UPstream::freeTag(const int tag)
{
freedTags_.push(tag);
}
// Linear communication schedule
Foam::List<Foam::UPstream::commsStruct> Foam::UPstream::linearCommunication_(0);
......
......@@ -45,7 +45,6 @@ SourceFiles
#include "HashTable.H"
#include "string.H"
#include "NamedEnum.H"
#include "LIFOStack.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -191,12 +190,6 @@ private:
static List<commsStruct> treeCommunication_;
//- Current free tag
static int freeTag_;
//- Freed tags
static LIFOStack<int> freedTags_;
// Private Member Functions
//- Set data for parallel running
......@@ -346,11 +339,6 @@ public:
{
return msgType_;
}
//- Allocate new tag
static int allocateTag();
//- Release allocated tag
static void freeTag(const int tag);
//- Get the communications type of the stream
......
......@@ -8,10 +8,10 @@
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
......@@ -19,12 +19,12 @@ License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipPointPatchField.H"
#include "pointConstraint.H"
#include "transformField.H"
#include "symmTransformField.H"
......@@ -104,17 +104,6 @@ void cyclicSlipPointPatchField<Type>::evaluate(const Pstream::commsTypes)
}
template<class Type>
void cyclicSlipPointPatchField<Type>::applyConstraint
(
const label pointi,
pointConstraint& pc
) const
{
pc.applyConstraint(this->patch().pointNormals()[pointi]);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
......
......@@ -8,10 +8,10 @@
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
......@@ -19,13 +19,14 @@ License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipPointPatchField
Description
Specialisation of cyclic that constrains to the patch
Cyclic + slip constraints
SourceFiles
cyclicSlipPointPatchField.C
......@@ -36,6 +37,7 @@ SourceFiles
#define cyclicSlipPointPatchField_H
#include "cyclicPointPatchField.H"
#include "cyclicSlipPointPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -55,7 +57,7 @@ class cyclicSlipPointPatchField
public:
//- Runtime type information
TypeName("cyclicSlip");
TypeName(cyclicSlipPointPatch::typeName_());
// Constructors
......@@ -121,18 +123,13 @@ public:
// Member functions
//- Update the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
// Evaluation functions
//- Accumulate the effect of constraint direction of this patch
virtual void applyConstraint
(
const label pointi,
pointConstraint&
) const;
//- Evaluate the patch field
virtual void evaluate
(
const Pstream::commsTypes commsType=Pstream::blocking
);
};
......
......@@ -8,10 +8,10 @@
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
......@@ -19,7 +19,8 @@ License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
......
......@@ -8,10 +8,10 @@
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
......@@ -19,7 +19,8 @@ License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipPointPatch.H"
#include "pointConstraint.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defineTypeNameAndDebug(cyclicSlipPointPatch, 0);
// Add the patch constructor functions to the hash tables
addToRunTimeSelectionTable
(
facePointPatch,
cyclicSlipPointPatch,
polyPatch
);
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const vectorField& cyclicSlipPointPatch::pointNormals() const
{
// Use underlying patch normals
return refCast<const facePointPatch>
(
*this
).facePointPatch::pointNormals();
}
void cyclicSlipPointPatch::applyConstraint
(
const label pointi,
pointConstraint& pc
) const
{
pc.applyConstraint(pointNormals()[pointi]);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipPointPatch
Description
Cyclic patch with slip constraint
SourceFiles
cyclicSlipPointPatch.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipPointPatch_H
#define cyclicSlipPointPatch_H
#include "cyclicPointPatch.H"
#include "cyclicSlipPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cyclicSlipPointPatch Declaration
\*---------------------------------------------------------------------------*/
class cyclicSlipPointPatch
:
public cyclicPointPatch
{
public:
//- Runtime type information
TypeName(cyclicSlipPolyPatch::typeName_());
// Constructors
//- Construct from components
cyclicSlipPointPatch
(
const polyPatch& patch,
const pointBoundaryMesh& bm
)
:
cyclicPointPatch(patch, bm)
{}
// Destructor
virtual ~cyclicSlipPointPatch()
{}
// Member Functions
//- Return point unit normals.
virtual const vectorField& pointNormals() const;
//- Accumulate the effect of constraint direction of this patch
virtual void applyConstraint
(
const label pointi,
pointConstraint&
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\*---------------------------------------------------------------------------*/
#include "cyclicSlipPolyPatch.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(cyclicSlipPolyPatch, 0);
addToRunTimeSelectionTable(polyPatch, cyclicSlipPolyPatch, word);
addToRunTimeSelectionTable(polyPatch, cyclicSlipPolyPatch, dictionary);
}
// ************************************************************************* //
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Class
Foam::cyclicSlipPolyPatch
Description
Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch
which is cyclicSlip with slip constraints
SourceFiles
cyclicSlipPolyPatch.C
\*---------------------------------------------------------------------------*/
#ifndef cyclicSlipPolyPatch_H
#define cyclicSlipPolyPatch_H
#include "cyclicPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class cyclicSlipPolyPatch Declaration
\*---------------------------------------------------------------------------*/
class cyclicSlipPolyPatch
:
public cyclicPolyPatch
{
public:
//- Runtime type information
TypeName("cyclicSlip");
// Constructors
//- Construct from components
cyclicSlipPolyPatch
(
const word& name,
const label size,
const label start,
const label index,
const polyBoundaryMesh& bm
)
:
cyclicPolyPatch(name, size, start, index, bm)
{}
//- Construct from dictionary
cyclicSlipPolyPatch
(
const word& name,
const dictionary& dict,
const label index,
const polyBoundaryMesh& bm
)
:
cyclicPolyPatch(name, dict, index, bm)
{}
//- Construct as copy, resetting the boundary mesh
cyclicSlipPolyPatch
(
const cyclicSlipPolyPatch& pp,
const polyBoundaryMesh& bm
)
:
cyclicPolyPatch(pp, bm)
{}
//- Construct given the original patch and resetting the
// face list and boundary mesh information
cyclicSlipPolyPatch
(
const cyclicSlipPolyPatch& pp,
const polyBoundaryMesh& bm,
const label index,
const label newSize,
const label newStart,
const word& neighbPatchName
)