FreeFOAM The Cross-Platform CFD Toolkit
getPatchFieldTensor.H
Go to the documentation of this file.
1 label patchi = which_part - 2;
2 
4 {
5  return Z_UNDEF;
6 }
7 
8 IOobject fieldObjectPtr
9 (
11  runTime.timeName(),
12  mesh,
13  IOobject::NO_READ
14 );
15 
16 if (!fieldObjectPtr.headerOk())
17 {
18  return Z_UNDEF;
19 }
20 
21 IOobject fieldObject
22 (
23  fieldNames[var2field[nVar]],
24  runTime.timeName(),
25  mesh,
26  IOobject::MUST_READ,
27  IOobject::NO_WRITE
28 );
29 
31 (
33  mesh
34 );
35 
36 const tensorField& tf = sf.boundaryField()[patchi];
37 const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
38 
39 if (which_type == Z_TRI03)
40 {
41  label counter = 1;
42  for (label n=0; n<tf.size(); n++)
43  {
44  label nPoints = bMesh[patchi][n].size();
45  if (nPoints == 3)
46  {
47 # include "tensorConversion.H"
48  }
49  }
50 }
51 
52 if (which_type == Z_QUA04)
53 {
54  label counter = 1;
55  for (label n=0; n<tf.size(); n++)
56  {
57  label nPoints = bMesh[patchi][n].size();
58  if (nPoints == 4)
59  {
60 # include "tensorConversion.H"
61  }
62  }
63 }
64 
65 if (which_type == Z_NSIDED)
66 {
67  label counter = 1;
68  for (label n=0; n<tf.size(); n++)
69  {
70  label nPoints = bMesh[patchi][n].size();
71  if ((nPoints != 3) && (nPoints != 4))
72  {
73 # include "tensorConversion.H"
74  }
75  }
76 }
77 
78 // ************************ vim: set sw=4 sts=4 et: ************************ //