Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace eval ::ConjugateHeatTransfer::xml {
proc ConjugateHeatTransfer::xml::Init { } {
# Namespace variables initialization
variable dir
Model::InitVariables dir $ConjugateHeatTransfer::dir
Model::InitVariables dir $::ConjugateHeatTransfer::dir

Model::getConditions Conditions.xml
Model::getMaterials "../../ConvectionDiffusion/xml/Materials.xml"
Expand Down
26 changes: 13 additions & 13 deletions kratos.gid/apps/FSI/write/writeProjectParameters.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ proc ::FSI::write::writeParametersEvent { } {

proc ::FSI::write::GetProblemDataDict { } {
# Copy the section from the Fluid, who owns the time parameters of the model
set problem_data_dict [dict get $FSI::write::fluid_project_parameters problem_data]
set problem_data_dict [dict get $::FSI::write::fluid_project_parameters problem_data]
return $problem_data_dict
}

Expand All @@ -55,8 +55,8 @@ proc ::FSI::write::GetSolverSettingsDict { } {
# TODO: place an echo level in coupling
dict set solver_settings_dict echo_level 1

dict set solver_settings_dict structure_solver_settings [dict get $FSI::write::structure_project_parameters solver_settings]
dict set solver_settings_dict fluid_solver_settings [dict get $FSI::write::fluid_project_parameters solver_settings]
dict set solver_settings_dict structure_solver_settings [dict get $::FSI::write::structure_project_parameters solver_settings]
dict set solver_settings_dict fluid_solver_settings [dict get $::FSI::write::fluid_project_parameters solver_settings]

# TODO: place an echo level in meshing
set mesh_settings_dict [dict create ]
Expand Down Expand Up @@ -114,14 +114,14 @@ proc ::FSI::write::GetProcessesDict { } {
set processes_dict [dict create]

# Fluid
dict set processes_dict fluid_initial_conditions_process_list [dict get $FSI::write::fluid_project_parameters processes initial_conditions_process_list]
dict set processes_dict fluid_boundary_conditions_process_list [GetNonDeprecatedProcessList [dict get $FSI::write::fluid_project_parameters processes boundary_conditions_process_list]]
dict set processes_dict fluid_gravity [dict get $FSI::write::fluid_project_parameters processes gravity]
dict set processes_dict fluid_auxiliar_process_list [dict get $FSI::write::fluid_project_parameters processes auxiliar_process_list]
dict set processes_dict fluid_initial_conditions_process_list [dict get $::FSI::write::fluid_project_parameters processes initial_conditions_process_list]
dict set processes_dict fluid_boundary_conditions_process_list [GetNonDeprecatedProcessList [dict get $::FSI::write::fluid_project_parameters processes boundary_conditions_process_list]]
dict set processes_dict fluid_gravity [dict get $::FSI::write::fluid_project_parameters processes gravity]
dict set processes_dict fluid_auxiliar_process_list [dict get $::FSI::write::fluid_project_parameters processes auxiliar_process_list]

# Structure
dict set processes_dict structure_constraints_process_list [dict get $FSI::write::structure_project_parameters processes constraints_process_list]
dict set processes_dict structure_loads_process_list [GetNonDeprecatedProcessList [dict get $FSI::write::structure_project_parameters processes loads_process_list]]
dict set processes_dict structure_constraints_process_list [dict get $::FSI::write::structure_project_parameters processes constraints_process_list]
dict set processes_dict structure_loads_process_list [GetNonDeprecatedProcessList [dict get $::FSI::write::structure_project_parameters processes loads_process_list]]

return $processes_dict
}
Expand All @@ -139,9 +139,9 @@ proc ::FSI::write::GetOutputProcessesDict { } {
set gid_output_list [list ]

# Set a different output_name for the fluid and structure domains
set structure_output [lindex [dict get $FSI::write::structure_project_parameters output_processes gid_output] 0]
set structure_output [lindex [dict get $::FSI::write::structure_project_parameters output_processes gid_output] 0]
dict set structure_output Parameters output_name "[dict get $structure_output Parameters output_name]_structure"
set fluid_output [lindex [dict get $FSI::write::fluid_project_parameters output_processes gid_output] 0]
set fluid_output [lindex [dict get $::FSI::write::fluid_project_parameters output_processes gid_output] 0]
dict set fluid_output Parameters output_name "[dict get $fluid_output Parameters output_name]_fluid"

# Append the fluid and structure output processes to the output processes dictionary
Expand Down Expand Up @@ -183,15 +183,15 @@ proc ::FSI::write::InitExternalProjectParameters { } {
UpdateUniqueNames Fluid
apps::setActiveAppSoft Fluid
write::initWriteConfiguration [Fluid::write::GetAttributes]
set FSI::write::fluid_project_parameters [Fluid::write::getParametersDict]
set ::FSI::write::fluid_project_parameters [Fluid::write::getParametersDict]

# Structure section
UpdateUniqueNames Structure
apps::setActiveAppSoft Structure
Structural::write::SetAttribute time_parameters_un FLTimeParameters
write::initWriteConfiguration [Structural::write::GetAttributes]
Structural::SetWriteProperty enable_dynamic_substepping [::FSI::GetWriteProperty "enable_dynamic_substepping"]
set FSI::write::structure_project_parameters [Structural::write::getParametersDict]
set ::FSI::write::structure_project_parameters [Structural::write::getParametersDict]

apps::setActiveAppSoft FSI
}
Expand Down
2 changes: 1 addition & 1 deletion kratos.gid/apps/PfemFluid/xml/XmlController.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ proc PfemFluid::xml::getBodyNodalConditionById { id } {
}
proc PfemFluid::xml::getBodyNodalConditions { filename } {
variable bodyNodalCondition
dom parse [tDOM::xmlReadFile [file join $PfemFluid::dir xml $filename]] doc
dom parse [tDOM::xmlReadFile [file join $::PfemFluid::dir xml $filename]] doc

set NCList [$doc getElementsByTagName NodalConditionItem]
foreach Node $NCList {
Expand Down
4 changes: 2 additions & 2 deletions kratos.gid/apps/PfemMelting/examples/cube.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ proc PfemMelting::examples::Cube::TreeAssignation {args} {

# Laser file into model
set laser_filename "LaserSettings.json"
set laser_filename_origin [file join $PfemMelting::dir examples $laser_filename]
set laser_filename_origin [file join $::PfemMelting::dir examples $laser_filename]
set laser_filename [::FileSelector::_ProcessFile $laser_filename_origin]
::spdAux::SaveModelFile $laser_filename

Expand All @@ -89,7 +89,7 @@ proc PfemMelting::examples::Cube::TreeAssignation {args} {

# Temperature file into model
set temp_filename "temperature_dynamicviscosity.csv"
set temp_filename_origin [file join $PfemMelting::dir examples $temp_filename]
set temp_filename_origin [file join $::PfemMelting::dir examples $temp_filename]
set temp_filename [::FileSelector::_ProcessFile $temp_filename_origin]
::spdAux::SaveModelFile $temp_filename

Expand Down
21 changes: 21 additions & 0 deletions kratos.gid/kratos.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,32 @@ proc Kratos::Event_MeshProgress { total_percent partial_percents_0 partial_perce
apps::ExecuteOnCurrentApp MeshProgress $total_percent $partial_percents_0 $partial_percents_1 $partial_percents_2 $partial_percents_3 $n_nodes n_elems
}

proc Kratos::CheckFailMeshAndVolumesNotAssignedToParts {} {
set volume_ids [GiD_Geometry list volume]
if { [objarray length $volume_ids] } {
set all_volumes_set_no_mesh 1
objarray foreach volume_id [GiD_Geometry list volume] {
if { [GidUtils::GetMeshData volumes $volume_id Meshing] != "No" } {
set all_volumes_set_no_mesh 0
break
}
}
if { $all_volumes_set_no_mesh } {
set document [$::gid_groups_conds::doc documentElement]
set num_groups_assigned [llength [$document selectNodes {/Kratos_data//condition[@n='Parts']/group}]]
if { $num_groups_assigned ==0 } {
W [= "The volumes to be meshed must be assigned to Kratos 'Parts'"]
}
}
}
}

proc Kratos::Event_AfterMeshGeneration {fail} {
variable tmp_init_mesh_time

if {$fail} {
Kratos::Log "Mesh generation failed"
Kratos::CheckFailMeshAndVolumesNotAssignedToParts
return
}

Expand Down
3 changes: 1 addition & 2 deletions kratos.gid/scripts/Controllers/TreeInjections.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,7 @@ proc spdAux::injectConstitutiveLawOutputs { tempnode args} {
proc spdAux::injectProcs { basenode args} {
set appId [apps::getActiveAppId]
if {$appId ne ""} {
set f "::$appId"
append f "::dir"
set f "::${appId}::dir"
set nf [file join [subst $$f] xml Procs.spd]
set xml [tDOM::xmlReadFile $nf]
set newnode [dom parse [string trim $xml]]
Expand Down