MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / setMapper

Function setMapper

src/fvOptions/interRegionOption/interRegionOption.C:41–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39// * * * * * * * * * * * * Protected member functions * * * * * * * * * * * //
40
41void 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 * * * * * * * * * * * * * * //

Callers 1

Calls 8

meshToMeshClass · 0.85
timeMethod · 0.80
lookupMethod · 0.80
exitFunction · 0.50
nameMethod · 0.45
overlapsMethod · 0.45
resetMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected