Fixing indentation in applications/solvers/solidMechanics
[foam-extend-3.2.git] / applications / solvers / solidMechanics / viscoElasticSolidFoam / createHistory.H
blob038387383f954224b82b3aa9e626d4c62124229e
1 OFstream* forceFilePtr(NULL);
2 // OFstream* stressFilePtr(NULL);
3 word historyPatchName(mesh.solutionDict().subDict("solidMechanics").lookup("historyPatch"));
4 label historyPatchID = mesh.boundaryMesh().findPatchID(historyPatchName);
5 if(historyPatchID == -1)
7     Warning << "history patch " << historyPatchName
8         << " not found. Force-displacement will not be written"
9         << endl;
11 else if(Pstream::master())
13     fileName historyDir = "history";
14     mkDir(historyDir);
16     {
17         fileName forceFileName(historyDir/"forceDisp_"+historyPatchName+".dat");
18         Info << "\nForce-displacement for patch " << historyPatchName
19             << " will be written to " << forceFileName
20             << endl;
21         forceFilePtr = new OFstream(forceFileName);
22         OFstream& forceDispFile = *forceFilePtr;
23         forceDispFile << "#Disp(mm)\tForce(N)" << endl;
24     }
26 //    {
27 //        fileName stressFileName(historyDir/"stressStrain_"+historyPatchName+".dat");
28 //        Info << "\nStress(Engineering Small Stress)-strain(Engineering Small Strain) for patch "
29 //            << historyPatchName
30 //            << " will be written to " << stressFileName
31 //            << endl;
32 //        stressFilePtr = new OFstream(stressFileName);
33 //        OFstream& stressStrainFile = *stressFilePtr;
34 //        stressStrainFile << "#Strain(-)\tStress(Pa)" << endl;
35 //    }