Skip to content

Commit 1404b3d

Browse files
committed
Style: Changed formatting
1 parent 8d8af78 commit 1404b3d

8 files changed

Lines changed: 565 additions & 567 deletions

File tree

applications/solvers/solidFoam/createFields.H

Lines changed: 202 additions & 204 deletions
Large diffs are not rendered by default.

applications/solvers/solidFoam/gEqns.H

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
rhsLm = fvc::surfaceIntegrate(tC*magSf);
44

55
if (angularMomentumConservation == "yes")
6-
{
7-
rhsAm = fvc::surfaceIntegrate((xF^tC)*magSf);
8-
AM.AMconservation( rhsLm, rhsLm1, rhsAm, RKstage);
6+
{
7+
rhsAm = fvc::surfaceIntegrate((xF^tC)*magSf);
8+
AM.AMconservation( rhsLm, rhsLm1, rhsAm, RKstage);
99
}
1010

1111

1212
// Update coordinates
1313
x += deltaT * (lm/rho);
14-
xF += deltaT * (lmC/rho);
14+
xF += deltaT * (lmC/rho);
1515
xN += deltaT * (lmN/rho);
1616

1717

1818
// Update linear momentum
19-
lm += deltaT * rhsLm;
19+
lm += deltaT * rhsLm;
2020

2121

2222
// Update deformation gradient tensor
23-
F += deltaT * fvc::surfaceIntegrate( (lmC/rho) * Sf );
23+
F += deltaT * fvc::surfaceIntegrate( (lmC/rho) * Sf );
2424

2525

applications/solvers/solidFoam/meshData.H

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2,139 +2,139 @@
22
// PRELIMINARIES
33
//----------------------------------------------------------------------
44

5-
// Point Mesh (pMesh)
6-
pointMesh pMesh(mesh);
5+
// Point Mesh (pMesh)
6+
pointMesh pMesh(mesh);
77

88

9-
// Material face area
10-
const surfaceScalarField& magSf (mesh.magSf());
9+
// Material face area
10+
const surfaceScalarField& magSf (mesh.magSf());
1111

1212

13-
// Material face area normal vector
14-
const surfaceVectorField& Sf (mesh.Sf());
13+
// Material face area normal vector
14+
const surfaceVectorField& Sf (mesh.Sf());
1515

16-
16+
1717
//----------------------------------------------------------------------
1818
// MESH COORDINATES
1919
//----------------------------------------------------------------------
2020

21-
// Material cell center coordinates
22-
const volVectorField& C = mesh.C();
21+
// Material cell center coordinates
22+
const volVectorField& C = mesh.C();
2323

2424

25-
// Spatial cell center coordinates
26-
volVectorField x
27-
(
28-
IOobject ("x", mesh),
29-
C
30-
);
25+
// Spatial cell center coordinates
26+
volVectorField x
27+
(
28+
IOobject ("x", mesh),
29+
C
30+
);
3131

3232

33-
// Spatial nodal coordinates
34-
pointVectorField xN
35-
(
36-
IOobject ("xN", mesh),
37-
pMesh,
38-
dimensionedVector ("xN", dimensionSet(0,1,0,0,0,0,0), vector::zero)
39-
);
40-
xN.primitiveFieldRef() = mesh.points();
33+
// Spatial nodal coordinates
34+
pointVectorField xN
35+
(
36+
IOobject ("xN", mesh),
37+
pMesh,
38+
dimensionedVector ("xN", dimensionSet(0,1,0,0,0,0,0), vector::zero)
39+
);
40+
xN.primitiveFieldRef() = mesh.points();
4141

4242

4343

44-
// Material nodal coordinates
45-
pointVectorField xN_0
46-
(
47-
IOobject ("xN_0", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE),
48-
xN
49-
);
44+
// Material nodal coordinates
45+
pointVectorField xN_0
46+
(
47+
IOobject ("xN_0", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE),
48+
xN
49+
);
5050

5151

52-
// Material face center coordinates
53-
const surfaceVectorField& Cf = mesh.Cf();
52+
// Material face center coordinates
53+
const surfaceVectorField& Cf = mesh.Cf();
5454

5555

56-
// Spatial face center coordinates
57-
surfaceVectorField xF = mesh.Cf();
56+
// Spatial face center coordinates
57+
surfaceVectorField xF = mesh.Cf();
5858

5959

6060

6161
//----------------------------------------------------------------------
6262
// NORMALS
6363
//----------------------------------------------------------------------
6464

65-
// Material normals
66-
surfaceVectorField N
67-
(
68-
IOobject ("N", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE),
69-
Sf/mesh.magSf()
70-
);
65+
// Material normals
66+
surfaceVectorField N
67+
(
68+
IOobject ("N", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE),
69+
Sf/mesh.magSf()
70+
);
7171

7272

7373

7474

7575
// EDGE TO POINT CONNECTIVITY (edges)
7676
//-----------------------------------
77-
const edgeList& edges = mesh.edges();
78-
77+
const edgeList& edges = mesh.edges();
78+
7979

8080

8181
// MINIMUM EDGE LENGTH FOR CFL NUMBER (h)
8282
//---------------------------------------
83-
dimensionedScalar h ("h", dimensionSet(0,1,0,0,0,0,0), GREAT);
83+
dimensionedScalar h ("h", dimensionSet(0,1,0,0,0,0,0), GREAT);
8484

85-
forAll (edges,edgeID)
86-
{
87-
forAll (edges[edgeID],point)
88-
{
89-
const label& pointID = edges[edgeID][point];
90-
const label& pointID1 = edges[edgeID][point+1];
91-
const scalar& edgeLength = mag(mesh.points()[pointID]-mesh.points()[pointID1]);
92-
93-
if (edgeLength < h.value())
94-
{
95-
h.value() = edgeLength;
96-
}
97-
98-
break;
99-
}
100-
}
85+
forAll (edges,edgeID)
86+
{
87+
forAll (edges[edgeID],point)
88+
{
89+
const label& pointID = edges[edgeID][point];
90+
const label& pointID1 = edges[edgeID][point+1];
91+
const scalar& edgeLength = mag(mesh.points()[pointID]-mesh.points()[pointID1]);
92+
93+
if (edgeLength < h.value())
94+
{
95+
h.value() = edgeLength;
96+
}
97+
98+
break;
99+
}
100+
}
101101

102-
if( Pstream::parRun() )
103-
{
104-
reduce(h.value(), minOp<scalar>());
105-
}
102+
if( Pstream::parRun() )
103+
{
104+
reduce(h.value(), minOp<scalar>());
105+
}
106106

107107

108108

109109

110110
// BOUNDARY PATCHES
111111
//-----------------
112112

113-
const polyBoundaryMesh& bm = mesh.boundaryMesh();
114-
const label& symmetricPatchID = bm.findPatchID("symmetric");
115-
const label& symmetricXpatchID = bm.findPatchID("symmetricX");
116-
const label& symmetricYpatchID = bm.findPatchID("symmetricY");
117-
const label& symmetricZpatchID = bm.findPatchID("symmetricZ");
113+
const polyBoundaryMesh& bm = mesh.boundaryMesh();
114+
const label& symmetricPatchID = bm.findPatchID("symmetric");
115+
const label& symmetricXpatchID = bm.findPatchID("symmetricX");
116+
const label& symmetricYpatchID = bm.findPatchID("symmetricY");
117+
const label& symmetricZpatchID = bm.findPatchID("symmetricZ");
118118

119119

120120

121121
// A INVERSE FOR CALCULATION OF GRADIENT (Ainv)
122122
//---------------------------------------------
123123

124-
volTensorField Ainv
125-
(
126-
IOobject("Ainv", mesh),
127-
mesh,
128-
dimensionedTensor("Ainv",dimensionSet(0,2,0,0,0,0,0),tensor::zero)
129-
);
124+
volTensorField Ainv
125+
(
126+
IOobject("Ainv", mesh),
127+
mesh,
128+
dimensionedTensor("Ainv",dimensionSet(0,2,0,0,0,0,0),tensor::zero)
129+
);
130130

131131

132-
132+
133133

134134
// Ainv FOR CALCULATION OF GRADIENT FROM CONTACT VALUES (AvCinv)
135135
//--------------------------------------------------------------
136136

137-
// Initialise AvCinv
138-
volTensorField AvCinv(Ainv);
137+
// Initialise AvCinv
138+
volTensorField AvCinv(Ainv);
139139

140140

0 commit comments

Comments
 (0)