diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C index 97cb2b321b0d5f3a5246de0ed7bc07477244f687..676d579bb8f06b94baa6186f485530c483facb2c 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.C @@ -83,6 +83,19 @@ HashTable<T, Key, Hash>::HashTable(const HashTable<T, Key, Hash>& ht) } } +template<class T, class Key, class Hash> +HashTable<T, Key, Hash>::HashTable(const xfer<HashTable<T, Key, Hash> >& ht) +: + HashTableName(), + tableSize_(0), + table_(NULL), + nElmts_(0), + endIter_(*this, NULL, 0), + endConstIter_(*this, NULL, 0) +{ + transfer(*ht); +} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H index 2f3913d2e2cd8f8bc8162738c47f8ccfaff04827..701d8456156572dd54f878b5dc7748636505a7be 100644 --- a/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H +++ b/src/OpenFOAM/containers/HashTables/HashTable/HashTable.H @@ -41,6 +41,7 @@ SourceFiles #include "label.H" #include "word.H" #include "className.H" +#include "xfer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -155,6 +156,9 @@ public: //- Construct as copy HashTable(const HashTable<T, Key, Hash>&); + //- Construct by transferring the parameter contents + HashTable(const xfer<HashTable<T, Key, Hash> >&); + // Destructor diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C index e5e47778140d8896237c2b43f36b7d9a39ba1268..688abd467dc2fb532691e7a7351e9f55d5577219 100644 --- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C +++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.C @@ -76,6 +76,24 @@ StaticHashTable<T, Key, Hash>::StaticHashTable {} + +template<class T, class Key, class Hash> +StaticHashTable<T, Key, Hash>::StaticHashTable +( + const xfer<StaticHashTable<T, Key, Hash> >& ht +) +: + StaticHashTableName(), + keys_(0), + objects_(0), + nElmts_(0), + endIter_(*this, 0, 0), + endConstIter_(*this, 0, 0) +{ + transfer(*ht); +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class T, class Key, class Hash> diff --git a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H index 9eadf37b5e21a8ac791ffda2dbb129e90a8b2329..558519d81388968d7de9cf459c2027916067e3a3 100644 --- a/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H +++ b/src/OpenFOAM/containers/HashTables/StaticHashTable/StaticHashTable.H @@ -46,6 +46,7 @@ SourceFiles #include "label.H" #include "word.H" #include "className.H" +#include "xfer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -146,6 +147,8 @@ public: //- Construct as copy StaticHashTable(const StaticHashTable<T, Key, Hash>&); + //- Construct as copy + StaticHashTable(const xfer<StaticHashTable<T, Key, Hash> >&); // Destructor diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C index d85cc939360ad265a6c01bec472822db7ad93533..ab3639362b693a4f9f7c697a3372bf810d39c1fb 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.C @@ -114,6 +114,22 @@ Foam::cellZone::cellZone {} +Foam::cellZone::cellZone +( + const word& name, + const xfer<labelList>& addr, + const label index, + const cellZoneMesh& zm +) +: + labelList(addr), + name_(name), + index_(index), + zoneMesh_(zm), + cellLookupMapPtr_(NULL) +{} + + // Construct from dictionary Foam::cellZone::cellZone ( @@ -148,6 +164,21 @@ Foam::cellZone::cellZone cellLookupMapPtr_(NULL) {} +Foam::cellZone::cellZone +( + const cellZone& cz, + const xfer<labelList>& addr, + const label index, + const cellZoneMesh& zm +) +: + labelList(addr), + name_(cz.name()), + index_(index), + zoneMesh_(zm), + cellLookupMapPtr_(NULL) +{} + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H index 799e810e2a3454520721e3f26da7c14acd8e1091..a239992cde0ffbbfa45cb73fb2deb1d25e275960 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H @@ -128,26 +128,45 @@ public: const word& name, const labelList& addr, const label index, - const cellZoneMesh& zm + const cellZoneMesh& + ); + + //- Construct from components, transferring contents + cellZone + ( + const word& name, + const xfer<labelList>& addr, + const label index, + const cellZoneMesh& ); //- Construct from dictionary cellZone ( const word& name, - const dictionary& dict, + const dictionary&, const label index, - const cellZoneMesh& zm + const cellZoneMesh& ); //- Construct given the original zone and resetting the // cell list and zone mesh information cellZone ( - const cellZone& cz, + const cellZone&, const labelList& addr, const label index, - const cellZoneMesh& zm + const cellZoneMesh& + ); + + //- Construct given the original zone, resetting the + // cell list and zone mesh information + cellZone + ( + const cellZone&, + const xfer<labelList>& addr, + const label index, + const cellZoneMesh& ); //- Construct and return a clone, resetting the zone mesh @@ -182,7 +201,7 @@ public: static autoPtr<cellZone> New ( const word& name, - const dictionary& dict, + const dictionary&, const label index, const cellZoneMesh& ); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index acc3b0dcf99574b49b3ab987bdaace28972a2208..0a478f8c88ec116c1936e4c681c76766b4ab7f96 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -242,6 +242,30 @@ Foam::faceZone::faceZone } +Foam::faceZone::faceZone +( + const word& name, + const xfer<labelList>& addr, + const xfer<boolList>& fm, + const label index, + const faceZoneMesh& zm +) +: + labelList(addr), + name_(name), + flipMap_(fm), + index_(index), + zoneMesh_(zm), + patchPtr_(NULL), + masterCellsPtr_(NULL), + slaveCellsPtr_(NULL), + mePtr_(NULL), + faceLookupMapPtr_(NULL) +{ + checkAddressing(); +} + + // Construct from dictionary Foam::faceZone::faceZone ( @@ -292,6 +316,30 @@ Foam::faceZone::faceZone } +Foam::faceZone::faceZone +( + const faceZone& fz, + const xfer<labelList>& addr, + const xfer<boolList>& fm, + const label index, + const faceZoneMesh& zm +) +: + labelList(addr), + name_(fz.name()), + flipMap_(fm), + index_(index), + zoneMesh_(zm), + patchPtr_(NULL), + masterCellsPtr_(NULL), + slaveCellsPtr_(NULL), + mePtr_(NULL), + faceLookupMapPtr_(NULL) +{ + checkAddressing(); +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::faceZone::~faceZone() diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H index c299361cf69b9827aacdb6629f370d1be2b12fe9..7d489da273cc5436369b997f6e0bf9e1be3aca75 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H @@ -163,24 +163,45 @@ public: const faceZoneMesh& zm ); + //- Construct from components, transferring contents + faceZone + ( + const word& name, + const xfer<labelList>& addr, + const xfer<boolList>& fm, + const label index, + const faceZoneMesh& + ); + //- Construct from dictionary faceZone ( const word& name, - const dictionary& dict, + const dictionary&, const label index, - const faceZoneMesh& zm + const faceZoneMesh& ); //- Construct given the original zone and resetting the // face list and zone mesh information faceZone ( - const faceZone& fz, + const faceZone&, const labelList& addr, const boolList& fm, const label index, - const faceZoneMesh& zm + const faceZoneMesh& + ); + + //- Construct given the original zone, resetting the + // face list and zone mesh information + faceZone + ( + const faceZone&, + const xfer<labelList>& addr, + const xfer<boolList>& fm, + const label index, + const faceZoneMesh& ); //- Construct and return a clone, resetting the zone mesh @@ -216,9 +237,9 @@ public: static autoPtr<faceZone> New ( const word& name, - const dictionary& dict, + const dictionary&, const label index, - const faceZoneMesh& zm + const faceZoneMesh& ); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C index 972588686d608bfb462003ff73730615c5b0618e..e93bb69ae6b8c168b832d263c9b7bef294c7d358 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.C @@ -112,6 +112,22 @@ Foam::pointZone::pointZone {} +Foam::pointZone::pointZone +( + const word& name, + const xfer<labelList>& addr, + const label index, + const pointZoneMesh& zm +) +: + labelList(addr), + name_(name), + index_(index), + zoneMesh_(zm), + pointLookupMapPtr_(NULL) +{} + + // Construct from dictionary Foam::pointZone::pointZone ( @@ -147,6 +163,22 @@ Foam::pointZone::pointZone {} +Foam::pointZone::pointZone +( + const pointZone& pz, + const xfer<labelList>& addr, + const label index, + const pointZoneMesh& zm +) +: + labelList(addr), + name_(pz.name()), + index_(index), + zoneMesh_(zm), + pointLookupMapPtr_(NULL) +{} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::pointZone::~pointZone() diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H index 18370e2672bf37b77b2e060855e948489447aec2..afc48da717d83ae0a26b61c754ffdf6fd2fc5b92 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H @@ -130,26 +130,45 @@ public: const word& name, const labelList& addr, const label index, - const pointZoneMesh& zm + const pointZoneMesh& + ); + + //- Construct from components, transferring contents + pointZone + ( + const word& name, + const xfer<labelList>& addr, + const label index, + const pointZoneMesh& ); //- Construct from dictionary pointZone ( const word& name, - const dictionary& dict, + const dictionary&, const label index, - const pointZoneMesh& zm + const pointZoneMesh& ); //- Construct given the original zone and resetting the // point list and zone mesh information pointZone ( - const pointZone& pz, + const pointZone&, const labelList& addr, const label index, - const pointZoneMesh& zm + const pointZoneMesh& + ); + + //- Construct given the original zone, resetting the + // face list and zone mesh information + pointZone + ( + const pointZone&, + const xfer<labelList>& addr, + const label index, + const pointZoneMesh& ); //- Construct and return a clone, resetting the zone mesh @@ -184,7 +203,7 @@ public: static autoPtr<pointZone> New ( const word& name, - const dictionary& dict, + const dictionary&, const label index, const pointZoneMesh& );