| 39 | // * * * * * * * * * * * * Protected member functions * * * * * * * * * * * // |
| 40 | |
| 41 | void Foam::fv::interRegionOption::setMapper() |
| 42 | { |
| 43 | if (master_) |
| 44 | { |
| 45 | Info<< indent << "- selecting inter region mapping" << endl; |
| 46 | |
| 47 | const fvMesh& nbrMesh = |
| 48 | mesh_.time().lookupObject<fvMesh>(nbrRegionName_); |
| 49 | |
| 50 | if (mesh_.name() == nbrMesh.name()) |
| 51 | { |
| 52 | FatalErrorInFunction |
| 53 | << "Inter-region model selected, but local and " |
| 54 | << "neighbour regions are the same: " << nl |
| 55 | << " local region: " << mesh_.name() << nl |
| 56 | << " secondary region: " << nbrMesh.name() << nl |
| 57 | << exit(FatalError); |
| 58 | } |
| 59 | |
| 60 | if (mesh_.bounds().overlaps(nbrMesh.bounds())) |
| 61 | { |
| 62 | meshInterpPtr_.reset |
| 63 | ( |
| 64 | new meshToMesh |
| 65 | ( |
| 66 | mesh_, |
| 67 | nbrMesh, |
| 68 | meshToMesh::interpolationMethodNames_.read |
| 69 | ( |
| 70 | coeffs_.lookup("interpolationMethod") |
| 71 | ), |
| 72 | false // not interpolating patches |
| 73 | ) |
| 74 | ); |
| 75 | } |
| 76 | else |
| 77 | { |
| 78 | FatalErrorInFunction |
| 79 | << "regions " << mesh_.name() << " and " |
| 80 | << nbrMesh.name() << " do not intersect" |
| 81 | << exit(FatalError); |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | |
| 87 | // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // |
no test coverage detected