32 if (!Pstream::parRun())
35 word command1(
"ln -s $(readlink -f constant/) " + folder +
"/" +
37 word command2(
"ln -s $(readlink -f system/) " + folder +
"/" +
39 word command3(
"ln -s $(readlink -f 0/) " + folder +
"/" +
" >/dev/null 2>&1");
40 std::cout.setstate(std::ios_base::failbit);
50 word command1s(
"ln -s $(readlink -f constant/) " + folder +
"/" +
52 word command2s(
"ln -s $(readlink -f system/) " + folder +
"/" +
54 word command3s(
"ln -s $(readlink -f 0/) " + folder +
"/" +
" >/dev/null 2>&1");
55 std::cout.setstate(std::ios_base::failbit);
61 mkDir(folder +
"/processor" + name(Pstream::myProcNo()));
62 word command1(
"ln -s $(readlink -f processor" + name(Pstream::myProcNo()) +
63 "/constant/) " + folder +
"/processor" +
64 name(Pstream::myProcNo()) +
"/ >/dev/null 2>&1");
65 word command2(
"ln -s $(readlink -f system/) " + folder +
"/processor" +
66 name(Pstream::myProcNo()) +
"/ >/dev/null 2>&1");
67 word command3(
"ln -s $(readlink -f processor" + name(Pstream::myProcNo()) +
68 "/0/) " + folder +
"/processor" +
69 name(Pstream::myProcNo()) +
"/ >/dev/null 2>&1");
70 std::cout.setstate(std::ios_base::failbit);
85 system(
"ln -s $(readlink -f " + linkFolder +
") " + destFolder +
94 if (stat(folder.c_str(), &sb) == 0 && S_ISDIR(sb.st_mode))
111 if (Pstream::master())
116 Info <<
"Offline data already exist, reading existing data" << endl;
121 Info <<
"Offline don't exist, performing the Offline Solve" << endl;
122 mkDir(
"./ITHACAoutput/Offline");
126 reduce(off_exist, sumOp<label>());
138 std::ifstream infile(fileName);
139 return infile.good();
147 if (Pstream::master())
152 Info <<
"POD data already exist, reading existing modes" << endl;
154 else if (!Pstream::parRun())
157 Info <<
"POD don't exist, performing a POD decomposition" << endl;
158 mkDir(
"./ITHACAoutput/POD");
162 reduce(pod_exist, sumOp<label>());
177 if (Pstream::master())
182 Info <<
"Supremizer data already exist, reading existing data" << endl;
187 Info <<
"Supremizers don't exist, performing a POD decomposition" << endl;
188 mkDir(
"./ITHACAoutput/supremizer");
192 reduce(sup_exist, sumOp<label>());
Header file of the ITHACAsystem file.
Namespace to implement some useful assign operation of OF fields.
bool check_pod()
Check if the POD data folder "./ITHACAoutput/POD" exists.
bool check_off()
Check if the offline data folder "./ITHACAoutput/Offline" exists.
bool check_folder(word folder)
Checks if a folder exists.
bool check_file(std::string fileName)
Function that returns true if a file exists.
bool check_sup()
Check if the supremizer folder exists.
void createSymLink(word folder)
Creates symbolic links to 0, system and constant.