Remove trailing whitespace systematically
[foam-extend-3.2.git] / applications / solvers / solidMechanics / viscoElasticSolidFoam / updateLoadingPatchDisplacementIncrement.H
blobabd64329d8c038ce8d7b860e2dfde5927a253af5
1 // Loading patch
3     label patchID = mesh.boundaryMesh().findPatchID("loading");
5     if(patchID == -1)
6     {
7         FatalErrorIn(args.executable())
8             << "Can't find patch with name loading" << abort(FatalError);
9     }
11     if
12     (
13         DU.boundaryField()[patchID].type()
14      == fixedValueFvPatchVectorField::typeName
15     )
16     {
17         if (runTime.timeIndex() == 1)
18         {
19             DU.boundaryField()[patchID] == vector(0, -0.00025, 0);
20         }
21         else
22         {
23             DU.boundaryField()[patchID] == vector(0, 0, 0);
24         }
25     }
26     else if
27     (
28         DU.boundaryField()[patchID].type()
29      == directionMixedFvPatchVectorField::typeName
30     )
31     {
32         directionMixedFvPatchVectorField& topPatchU =
33             refCast<directionMixedFvPatchVectorField>
34             (
35                 DU.boundaryField()[patchID]
36             );
38         vectorField n = mesh.boundary()[patchID].nf();
40         topPatchU.valueFraction() = sqr(n);
42         if (runTime.timeIndex() == 1)
43         {
44             topPatchU.refValue() = vector(0, -0.00025, 0);
45         }
46         else
47         {
48             topPatchU.refValue() = vector(0, 0, 0);
49         }
50     }
51     else
52     {
53         FatalErrorIn(args.executable())
54             << "Bounary condition on " << DU.name()
55                 <<  " is "
56                 << DU.boundaryField()[patchID].type()
57                 << "for patch: " << mesh.boundaryMesh()[patchID].name()
58                 <<  ", instead "
59                 << fixedValueFvPatchVectorField::typeName
60                 << abort(FatalError);
61     }
65 // Bottom patch
67     label patchID = mesh.boundaryMesh().findPatchID("bottom");
69     if(patchID == -1)
70     {
71         FatalErrorIn(args.executable())
72             << "Can't find patch with name bottom" << abort(FatalError);
73     }
75     if
76     (
77         DU.boundaryField()[patchID].type()
78      == directionMixedFvPatchVectorField::typeName
79     )
80     {
81         directionMixedFvPatchVectorField& bottomPatchU =
82             refCast<directionMixedFvPatchVectorField>
83             (
84                 DU.boundaryField()[patchID]
85             );
87         vectorField n = mesh.boundary()[patchID].nf();
89         bottomPatchU.valueFraction() = sqr(n);
91         bottomPatchU.refValue() = vector(0, 0, 0);
92     }