Operation_Debug.cpp (getdp-3.4.0-source.tgz) | : | Operation_Debug.cpp (getdp-3.5.0-source.tgz) | ||
---|---|---|---|---|
// GetDP - Copyright (C) 1997-2021 P. Dular and C. Geuzaine, University of Liege | // GetDP - Copyright (C) 1997-2022 P. Dular and C. Geuzaine, University of Liege | |||
// | // | |||
// See the LICENSE.txt file for license information. Please report all | // See the LICENSE.txt file for license information. Please report all | |||
// issues on https://gitlab.onelab.info/getdp/getdp/issues. | // issues on https://gitlab.onelab.info/getdp/getdp/issues. | |||
#include <stdio.h> | #include <stdio.h> | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include "GetDPConfig.h" | #include "GetDPConfig.h" | |||
#include "ProData.h" | #include "ProData.h" | |||
#include "DofData.h" | #include "DofData.h" | |||
#include "Cal_Quantity.h" | #include "Cal_Quantity.h" | |||
#include "Cal_Value.h" | #include "Cal_Value.h" | |||
#include "SolvingOperations.h" | #include "SolvingOperations.h" | |||
#include "Message.h" | #include "Message.h" | |||
extern struct CurrentData Current ; | extern struct CurrentData Current; | |||
void Operation_Debug(struct Operation *Operation_P, | void Operation_Debug(struct Operation *Operation_P, struct DofData *DofData_P) | |||
struct DofData *DofData_P) | ||||
{ | { | |||
Message::Info(0, "Current step %g, time %g", Current.TimeStep, Current.Time); | Message::Info(0, "Current step %g, time %g", Current.TimeStep, Current.Time); | |||
// print summary of all solutions currently in DofData | // print summary of all solutions currently in DofData | |||
Message::Info(0, "DofData %d", DofData_P->Num); | Message::Info(0, "DofData %d", DofData_P->Num); | |||
Message::Info(0, " %d harmonics", DofData_P->NbrHar); | Message::Info(0, " %d harmonics", DofData_P->NbrHar); | |||
Message::Info(0, " %d Dofs (all %d)", DofData_P->NbrDof, DofData_P->NbrAnyDo | Message::Info(0, " %d Dofs (all %d)", DofData_P->NbrDof, | |||
f); | DofData_P->NbrAnyDof); | |||
Message::Info(0, " Init: %d %d %d %d %d %d %d", DofData_P->Flag_Init[0], | Message::Info(0, " Init: %d %d %d %d %d %d %d", DofData_P->Flag_Init[0], | |||
DofData_P->Flag_Init[1], DofData_P->Flag_Init[2], DofData_P->Fla | DofData_P->Flag_Init[1], DofData_P->Flag_Init[2], | |||
g_Init[3], | DofData_P->Flag_Init[3], DofData_P->Flag_Init[4], | |||
DofData_P->Flag_Init[4], DofData_P->Flag_Init[5], DofData_P->Fla | DofData_P->Flag_Init[5], DofData_P->Flag_Init[6]); | |||
g_Init[6]); | ||||
Message::Info(0, " %d solutions", List_Nbr(DofData_P->Solutions)); | Message::Info(0, " %d solutions", List_Nbr(DofData_P->Solutions)); | |||
for(int i = 0; i < List_Nbr(DofData_P->Solutions); i++){ | for(int i = 0; i < List_Nbr(DofData_P->Solutions); i++) { | |||
struct Solution *s = (struct Solution*)List_Pointer(DofData_P->Solutions, i) | struct Solution *s = | |||
; | (struct Solution *)List_Pointer(DofData_P->Solutions, i); | |||
Message::Info(0, " %d: step %d time %g", i, s->TimeStep, s->Time); | Message::Info(0, " %d: step %d time %g", i, s->TimeStep, s->Time); | |||
} | } | |||
if(DofData_P->CurrentSolution){ | if(DofData_P->CurrentSolution) { | |||
struct Solution *s = DofData_P->CurrentSolution; | struct Solution *s = DofData_P->CurrentSolution; | |||
Message::Info(0, "Current solution: step %d time %g", s->TimeStep, s->Time); | Message::Info(0, "Current solution: step %d time %g", s->TimeStep, s->Time); | |||
} | } | |||
// print current run-time variables | // print current run-time variables | |||
std::map<std::string, Value> &var = Get_AllValueSaved(); | std::map<std::string, Value> &var = Get_AllValueSaved(); | |||
Message::Info(0, "%d runtime variables", (int)var.size()); | Message::Info(0, "%d runtime variables", (int)var.size()); | |||
for(std::map<std::string, Value>::iterator it = var.begin(); it != var.end(); | for(std::map<std::string, Value>::iterator it = var.begin(); it != var.end(); | |||
it++){ | it++) { | |||
std::string v = Print_Value_ToString(&it->second); | std::string v = Print_Value_ToString(&it->second); | |||
Message::Info(0, " $%s = %s", it->first.c_str(), v.c_str()); | Message::Info(0, " $%s = %s", it->first.c_str(), v.c_str()); | |||
} | } | |||
} | } | |||
End of changes. 9 change blocks. | ||||
17 lines changed or deleted | 14 lines changed or added |