Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[All] Unification of MainKratos.py #858

Merged
merged 16 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Kratos execution folder
kratos.gid/exec/Kratos*
# !kratos.gid/exec/README.md
!kratos.gid/exec/MainKratos.py
*.orig
.vscode/

Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/Buoyancy/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"properties_location": "json",
"model_part_name": "ThermalModelPart"
},
"main_launch_file": "python/MainKratos.py",
"main_launch_file": "../../exec/MainKratos.py",
"examples": "examples/examples.xml"
}
34 changes: 0 additions & 34 deletions kratos.gid/apps/Buoyancy/python/KratosFluid.py

This file was deleted.

36 changes: 0 additions & 36 deletions kratos.gid/apps/Buoyancy/python/MainKratos.py

This file was deleted.

6 changes: 3 additions & 3 deletions kratos.gid/apps/Buoyancy/write/write.tcl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace eval ::Buoyancy::write {
namespace path ::Buoyancy::write
Kratos::AddNamespace [namespace current]

variable writeAttributes
}

Expand Down Expand Up @@ -54,7 +54,7 @@ proc ::Buoyancy::write::writeModelPartEvent { } {
proc ::Buoyancy::write::writeCustomFilesEvent { } {
# Materials
Buoyancy::write::WriteMaterialsFile True
write::SetConfigurationAttribute main_launch_file [GetAttribute main_launch_file]
write::SetConfigurationAttribute main_launch_file [ConvectionDiffusion::write::GetAttribute main_launch_file]
}

proc ::Buoyancy::write::Validate {} {
Expand All @@ -65,7 +65,7 @@ proc ::Buoyancy::write::Validate {} {
proc ::Buoyancy::write::WriteMaterialsFile {{write_const_law True} {include_modelpart_name True} } {
# Note: This will generate 2 quasi identical files for materials. The difference is the model_part_name

# Write fluid material file
# Write fluid material file
Fluid::write::WriteMaterialsFile $write_const_law $include_modelpart_name

# Write Buoyancy materials file
Expand Down
3 changes: 3 additions & 0 deletions kratos.gid/apps/Buoyancy/write/writeProjectParameters.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
proc ::Buoyancy::write::getParametersDict { } {
set projectParametersDict [dict create]

# Analysis stage field
dict set projectParametersDict analysis_stage "KratosMultiphysics.ConvectionDiffusionApplication.convection_diffusion_analysis"

# problem data
dict set projectParametersDict problem_data [::Buoyancy::write::GetProblemData_Dict]

Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/ConjugateHeatTransfer/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"properties_location": "json",
"model_part_name": "ThermalModelPart"
},
"main_launch_file": "python/MainKratos.py",
"main_launch_file": "../../exec/MainKratos.py",
"examples": "examples/examples.xml"
}
37 changes: 0 additions & 37 deletions kratos.gid/apps/ConjugateHeatTransfer/python/MainKratos.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ proc ::ConjugateHeatTransfer::write::getParametersDict { } {

set projectParametersDict [dict create]

# Analysis stage field
dict set projectParametersDict analysis_stage "KratosMultiphysics.ConvectionDiffusionApplication.convection_diffusion_analysis"

# Set the problem data section
dict set projectParametersDict problem_data [write::GetDefaultProblemDataDict]

Expand Down Expand Up @@ -105,7 +108,7 @@ proc write::GetDefaultOutputProcessDict { {appid ""} } {

proc ::ConjugateHeatTransfer::write::GetOutputProcessesList { } {
set output_process [dict create]

set need_gid [write::getValue EnableGiDOutput]
if {[write::isBooleanTrue $need_gid]} {
# Set a different output_name for the fluid and solid domains
Expand All @@ -128,7 +131,7 @@ proc ::ConjugateHeatTransfer::write::GetOutputProcessesList { } {
lappend gid_output_processes_list $solid_output
dict set output_process gid_output_processes $gid_output_processes_list
}

set need_vtk [write::getValue EnableVtkOutput]
if {[write::isBooleanTrue $need_vtk]} {
# Set a different output_name for the fluid and solid domains
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/ConvectionDiffusion/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"model_part_name": "ThermalModelPart",
"output_model_part_name": ""
},
"main_launch_file": "python/MainKratos.py",
"main_launch_file": "../../exec/MainKratos.py",
"examples": "examples/examples.xml"
}
36 changes: 0 additions & 36 deletions kratos.gid/apps/ConvectionDiffusion/python/MainKratos.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Project Parameters
proc ::ConvectionDiffusion::write::getParametersDict { } {

set projectParametersDict [dict create]

# Analysis stage field
dict set projectParametersDict analysis_stage "KratosMultiphysics.ConvectionDiffusionApplication.convection_diffusion_analysis"

# Set the problem data section
dict set projectParametersDict problem_data [ConvectionDiffusion::write::GetProblemDataDict]

Expand All @@ -15,7 +18,7 @@ proc ::ConvectionDiffusion::write::getParametersDict { } {
dict set processes constraints_process_list [write::getConditionsParametersDict [GetAttribute conditions_un]]
# dict set processes fluxes_process_list [write::getConditionsParametersDict [GetAttribute conditions_un]]
dict set processes list_other_processes [ConvectionDiffusion::write::getBodyForceProcessDictList]

dict set projectParametersDict processes $processes
# Output configuration
dict set projectParametersDict output_processes [write::GetDefaultOutputProcessDict]
Expand Down Expand Up @@ -78,7 +81,7 @@ proc ::ConvectionDiffusion::write::getBodyForceProcessDictList {} {
set ret [list ]

set model_part_name [GetAttribute model_part_name]

foreach partgroup [write::getPartsSubModelPartId] {
set value [write::getValue CNVDFFBodyForce BodyForceValue]
set pdict [dict create]
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/EmbeddedFluid/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"materials_file": "FluidMaterials.json",
"properties_location": "json"
},
"main_launch_file": "python/MainKratos.py",
"main_launch_file": "../../exec/MainKratos.py",
"examples": "examples/examples.xml"
}
35 changes: 0 additions & 35 deletions kratos.gid/apps/EmbeddedFluid/python/MainKratos.py

This file was deleted.

2 changes: 1 addition & 1 deletion kratos.gid/apps/FSI/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
"properties_location": "json",
"model_part_name": "Structure"
},
"main_launch_file": "python/MainKratos.py",
"main_launch_file": "../../exec/MainKratos.py",
"examples": "examples/examples.xml"
}
35 changes: 0 additions & 35 deletions kratos.gid/apps/FSI/python/MainKratos.py

This file was deleted.

Loading