Hi Konrad,
1. There's two options for this: Either the Plug-in reads a text file, or you let the user define a time series, e.g., with a specific name that you can identify via IFM. To be sure that FEFLOW calculates a result for these time stages, you have to apply the callback OnTimeStepConstraint. If the proposed time step would jump over one of the pre-defined time stages, you shorten the time step inside the callback to a value so that the next time stage in the list is exactly met.
3. Here's some simple example code to export water contents to a file (in C++ syntax):
[font=courier] ofstream outfile_stream;
outfile_stream.open(m_out_file_path);
outfile_stream << fixed << setw(12) << "x" << " ";
outfile_stream << fixed << setw(12) << "y" << " ";
outfile_stream << fixed << setw(12) << "z" << " ";
outfile_stream << scientific << setw(20) << "wc" <<endl;
double tNow = IfmGetAbsoluteSimulationTime(m_pDoc);
outfile_stream << "time = " << fixed << setw(12) << tNow << " [d]" << endl;
for (int i=0;i<m_nn;i++){
double x = IfmGetX(m_pDoc, i);
double y = IfmGetY(m_pDoc, i);
double z = IfmGetZ(m_pDoc, i);
double wc = IfmGetResultsFlowMoistureContentValue(m_pDoc, i);
outfile_stream << fixed << setw(12) << x << " ";
outfile_stream << fixed << setw(12) << y << " ";
outfile_stream << fixed << setw(12) << z << " ";
outfile_stream << scientific << setw(20) << wc <<endl;
}
outfile_stream.close();[/font]
The file is in this example selected in the OnEditDocument callback (i.e., when the user hits the Edit button in the Plug-ins Panel):
[font=courier]void exportwatercontent::OnEditDocument(void){
const char* temp_path;
temp_path = IfmGetProblemPath(m_pDoc);
m_out_file_path = IfmGetFileDirectory(m_pDoc, temp_path);
// Select output file
static IfmFileSelectionInfo info_outfile = {
"ExportWaterContent: Select output file",
NULL,
"*.dat",
"Text files (*.dat)|*.dat|All files (*.*)|*.*",
0,
NULL
};
info_outfile.initialDirectory = m_out_file_path;
int b = IfmFileSelection (m_pDoc, &m_out_file_path, False, &info_outfile, NULL);
}[/font]
Hope this helps a bit!
Good luck!
Peter