Forward compatibility: flex
[foam-extend-3.2.git] / applications / solvers / solidMechanics / viscoElasticSolidFoam / setInterfaceTraction.H
blobd2c987f75ad55b32f164b1e506f6722c6676590e
2     volVectorField totTraction
3     (
4         IOobject
5         (
6             "totTraction",
7             fluidRunTime.timeName(),
8             fluidMesh,
9             IOobject::MUST_READ,
10             IOobject::NO_WRITE
11         ),
12         fluidMesh
13     );
16     if
17     (
18         DU.boundaryField()[interfacePatchID].type()
19      != tractionDisplacementIncrementFvPatchVectorField::typeName
20     )
21     {
22         FatalErrorIn(args.executable())
23             << "Bounary condition on " << DU.name()
24                 <<  " is "
25                 << DU.boundaryField()[interfacePatchID].type()
26                 << "for patch: "
27                 << mesh.boundaryMesh()[interfacePatchID].name()
28                 <<  ", instead "
29                 << tractionDisplacementIncrementFvPatchVectorField::typeName
30                 << abort(FatalError);
31     }
33     tractionDisplacementIncrementFvPatchVectorField& interfacePatchDU =
34         refCast<tractionDisplacementIncrementFvPatchVectorField>
35         (
36             DU.boundaryField()[interfacePatchID]
37         );
39     interfacePatchDU.traction() =
40         interpolator.faceInterpolate
41         (
42             totTraction.boundaryField()[fluidInterfacePatchID]
43         );