cig_load_input_data.cc
We will load the CIG input data from here into a C++
code. The input data was created with the Concepts Input Generator (CIG). See Concepts tutorials for more tutorials.
Introduction
In a previous tutorial we generated a cig-file, which contains several paramters and five dat-files, which contain information about the mesh. Now we are going to show, how to access this information from C++
.
Commented Program
First, we initialize input
and make it contain all the parameters from the CIG input data.
Now we can access all the parameters by appropriate getter-methods and by the respective names, which we specified in the Python code used for generating the input data.
Concepts provides methods to create meshes from given dat-files.
Finally, we create a space with certain refinement strategies, which are contained in input
.
Supposing that your compiled program is named cig_load_input_data
, the code is executed with the command
If nothing went wrong, you should get the following output in the terminal:
and there should be two eps-files showing the defined mesh in the from the input data and the hp-refined mesh.
Plot of the initial mesh:
Plot of the refined mesh: