Kratos: VTK output folder not automatically created

Created on 17 Jan 2020  Â·  6Comments  Â·  Source: KratosMultiphysics/Kratos

If the results from postprocess_eigenvalues_process are to be saved in a folder, which does not yet exist, the process throws an error. If it is intended, that the folder has to be created before, the error message should perhaps be adjusted. Otherwise, the folder should be created, if it does not exist.

Is there already something similar in Kratos? I saw some boost::filesystem functions, which could take care of that. Any oppinions?

Bug Kratos Core Post Process

All 6 comments

You can use the newly added ghc, @philbucher

On Fri, 17 Jan 2020 at 10:13, qaumann notifications@github.com wrote:

If the results from postprocess_eigenvalues_process are to be saved in a
folder, which does not yet exist, the process throws an error. If it is
intended, that the folder has to be created before, the error message
should perhaps be adjusted. Otherwise, the folder should be created, if it
does not exist.

Is there already something similar in Kratos? I saw some boost::filesystem
functions, which could take care of that. Any oppinions?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/KratosMultiphysics/Kratos/issues/6244?email_source=notifications&email_token=AEYQZADB3ZHJZJL3FWXIH5LQ6FZCPA5CNFSM4KIFDWQ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IG4CQTQ,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEYQZABWI7FDAK3YCHEKGN3Q6FZCPANCNFSM4KIFDWQQ
.

@qaumann I think I took care of this:
https://github.com/KratosMultiphysics/Kratos/blob/b9751c0adfcc41a0a444610890d67f11fe26112c/applications/StructuralMechanicsApplication/python_scripts/postprocess_eigenvalues_process.py#L26-L29

Or are you using it directly in c++? Then yes what you describe happens

regarding boost::filesystem:

  • It is NOT header-only, hence we would need to compile boost again only for this, thats why using it is a no-go
  • it is integrated into the STL as std::filesystem, but only with C++17
  • With #6061 I recently added support for the functionalities of std::filesystem also within c++11. However there are still some problems with it in windows (#6218) thats why I have not really started using it

@qaumann could you please post your settings that you are using for the process?

@philbucher Yes, I was using the C++ process directly, basically with the default parameters:

process_settings = KratosMultiphysics.Parameters("""{
        "result_file_name"              : "plate",
        "file_format"                   : "vtk",
        "file_label"                    : "step",
        "result_file_format_use_ascii"  : false,
        "folder_name"                   : "modal_results",
        "save_output_files_in_folder"   : true,
        "animation_steps"               : 20,
        "label_type"                    : "angular_frequency",
        "list_of_result_variables"      : ["DISPLACEMENT"]
    }""")
output = KMS.PostprocessEigenvaluesProcess(mp, process_settings)

I understand, that this is perhaps not the best way to go and if there is a check in Python, I am definately happy with it.

ok then I understand.
I am planning to fix this issue globally (directly in the vtk-output) once the issue with the filesystem is resolved

just to say that this is done finally in #7316

Was this page helpful?
0 / 5 - 0 ratings