Skip to content
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.*

- [ ] I am submitting my contribution to the develop branch.
- [ ] My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags).
- [ ] My contribution generates no new compiler warnings (try with the '-Wall -Wextra -Wno-unused-parameter -Wno-empty-body' compiler flags, or simply --warnlevel=2 when using meson).
- [ ] My contribution is commented and consistent with SU2 style.
- [ ] I have added a test case that demonstrates my contribution, if necessary.
- [ ] I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp) , if necessary.
4 changes: 2 additions & 2 deletions SU2_CFD/include/numerics/CNumerics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ class CNumerics {
su2double StrainMag_i, StrainMag_j; /*!< \brief Strain rate magnitude. */
su2double Dissipation_i, Dissipation_j; /*!< \brief Dissipation. */
su2double Dissipation_ij;
su2double roughness_i, /*!< \brief Roughness of the wall nearest to point i. */
roughness_j; /*!< \brief Roughness of the wall nearest to point j. */
su2double roughness_i = 0.0, /*!< \brief Roughness of the wall nearest to point i. */
roughness_j = 0.0; /*!< \brief Roughness of the wall nearest to point j. */

su2double *l, *m;

Expand Down
26 changes: 12 additions & 14 deletions SU2_CFD/src/output/filewriter/CParaviewXMLFileWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void CParaviewXMLFileWriter::Write_Data(){
char str_buf[255];

OpenMPIFile();

dataOffset = 0;

/*--- Communicate the number of total points that will be
Expand Down Expand Up @@ -295,7 +295,7 @@ void CParaviewXMLFileWriter::Write_Data(){
}
}

WriteDataArray(dataBufferFloat.data(), VTKDatatype::FLOAT32, myPoint*NCOORDS, GlobalPoint*NCOORDS,
WriteDataArray(dataBufferFloat.data(), VTKDatatype::FLOAT32, myPoint*NCOORDS, GlobalPoint*NCOORDS,
dataSorter->GetnPointCumulative(rank)*NCOORDS);

VarCounter++;
Expand Down Expand Up @@ -336,23 +336,21 @@ void CParaviewXMLFileWriter::WriteDataArray(void* data, VTKDatatype type, unsign

/*--- Compute the size of the data to write in bytes ---*/

int byteSize;
byteSize = arraySize*typeSize;
size_t byteSize = arraySize*typeSize;

/*--- The total data size ---*/
unsigned long totalByteSize;
totalByteSize = globalSize*typeSize;
size_t totalByteSize = globalSize*typeSize;

/*--- Only the master node writes the total size in bytes as unsigned long in front of the array data ---*/
if (!WriteMPIBinaryData(&totalByteSize, sizeof(unsigned long), MASTER_NODE)){

if (!WriteMPIBinaryData(&totalByteSize, sizeof(size_t), MASTER_NODE)){
SU2_MPI::Error("Writing array size failed", CURRENT_FUNCTION);
}

/*--- Collectively write all the data ---*/

if (!WriteMPIBinaryDataAll(data, byteSize, totalByteSize, offset*typeSize)){
SU2_MPI::Error("Writing data array failed", CURRENT_FUNCTION);
SU2_MPI::Error("Writing data array failed", CURRENT_FUNCTION);
}
}

Expand All @@ -373,13 +371,13 @@ void CParaviewXMLFileWriter::AddDataArray(VTKDatatype type, string name,
string offsetStr = ss.str();

std::string typeStr;
unsigned long typeSize = 0, totalByteSize;
unsigned long typeSize = 0;

GetTypeInfo(type, typeStr, typeSize);

/*--- Total data size ---*/

totalByteSize = globalSize*typeSize;
size_t totalByteSize = globalSize*typeSize;

/*--- Write the ASCII XML header information for this array ---*/

Expand All @@ -389,6 +387,6 @@ void CParaviewXMLFileWriter::AddDataArray(VTKDatatype type, string name,
string(" offset=") + offsetStr +
string(" format=\"appended\"/>\n"), MASTER_NODE);

dataOffset += totalByteSize + sizeof(unsigned long);
dataOffset += totalByteSize + sizeof(size_t);

}