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

Function main

applications/test/wallDist/Test-wallDist.C:39–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37// Main program:
38
39int main(int argc, char *argv[])
40{
41 #include "setRootCase.H"
42 #include "createTime.H"
43 #include "createMesh.H"
44
45 Info<< "Mesh read in = "
46 << runTime.cpuTimeIncrement()
47 << " s\n" << endl << endl;
48
49 Info<< "Time now = " << runTime.timeName() << endl;
50
51 // Wall-reflection vectors
52 const volVectorField& n = wallDist::New(mesh).n();
53 n.write();
54
55 // Wall distance
56 const volScalarField& y = wallDist::New(mesh).y();
57 y.write();
58
59 runTime++;
60
61 Info<< "Time now = " << runTime.timeName() << endl;
62
63 // Move points
64
65 boundBox meshBb(mesh.points());
66
67 pointField newPoints(mesh.points());
68
69 const point half(0.5*(meshBb.min() + meshBb.max()));
70
71 forAll(newPoints, pointi)
72 {
73 point& pt = newPoints[pointi];
74
75 // expand around half
76 pt.y() += pt.y() - half.y();
77 }
78
79 mesh.movePoints(newPoints);
80 mesh.write();
81 n.write();
82 y.write();
83
84 Info<< "End\n" << endl;
85
86 return 0;
87}
88
89
90// ************************************************************************* //

Callers

nothing calls this directly

Calls 7

maxMethod · 0.80
NewFunction · 0.50
forAllFunction · 0.50
nMethod · 0.45
writeMethod · 0.45
yMethod · 0.45
movePointsMethod · 0.45

Tested by

no test coverage detected