49int main(
int argc,
char *argv[])
53 "Reads in a datToFoam mesh file and outputs a points file.\n"
54 "Used in conjunction with blockMesh."
57 argList::noParallel();
58 argList::addArgument(
"dat file");
72 std::getline(plot3dFile,
line);
73 std::getline(plot3dFile,
line);
79 label iPoints, jPoints;
84 Istring >> punctuation;
90 Info<<
"Number of vertices in i direction = " << iPoints <<
nl
91 <<
"Number of vertices in j direction = " << jPoints <<
endl;
94 const label nPointsij = (iPoints - 1)*(jPoints - 1);
98 for (
direction comp = 0; comp < 2; ++comp)
102 for (label j = 0; j < jPoints; ++j)
104 for (label i = 0; i < iPoints; ++i)
134 0.0, -::sin(a), ::cos(a)
139 pointsWedge[i] = (rotateZ &
points[i]);
140 pointsWedge[i + nPointsij] =
154 polyMesh::meshSubDir,
158 if (!
exists(iopoints.path()))
160 mkDir(iopoints.path());
165 Info<<
"Writing points to: " <<
nl
166 <<
" " <<
os.name() <<
endl;
168 iopoints.writeHeader(
os, vectorIOField::typeName);
170 IOobject::writeEndDivider(
os);
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Input from string buffer, using a ISstream. Always UNCOMPRESSED.
Output to file stream, using an OSstream.
Extract command arguments and options from the supplied argc and argv parameters.
T get(const label index) const
Get a value from the argument at index.
bool check(bool checkArgs=argList::argsMandatory(), bool checkOpts=true) const
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
void exit(const int errNo=1)
Exit : can be called for any error to exit program.
A class for handling file names.
Tensor of scalars, i.e. Tensor<scalar>.
A token holds an item read from Istream.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
bool exists(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist (as DIRECTORY or FILE) in the file system?
messageStream Info
Information stream (stdout output on master, null elsewhere)
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.