Skip to content

Commit e5d45cb

Browse files
authored
Merge pull request #1016 from su2code/feature_fix_adt_tet
Fixed a bug for the interpolation weights of a tet
2 parents d0e10f8 + 4d67323 commit e5d45cb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Common/src/adt_structure.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,10 +1304,10 @@ bool CADTElemClass::CoorInTetrahedron(const unsigned long elemID,
13041304
((parCoor[0]+parCoor[1]+parCoor[2]) <= paramLowerBound)) {
13051305
coorIsInside = true;
13061306

1307-
parCoor[0] = -0.5*(parCoor[0] + parCoor[1] + parCoor[2] + 1.0);
1308-
parCoor[1] = 0.5*(parCoor[0] + 1.0);
1309-
parCoor[2] = 0.5*(parCoor[1] + 1.0);
1310-
parCoor[3] = 0.5*(parCoor[2] + 1.0);
1307+
weightsInterpol[0] = -0.5*(parCoor[0] + parCoor[1] + parCoor[2] + 1.0);
1308+
weightsInterpol[1] = 0.5*(parCoor[0] + 1.0);
1309+
weightsInterpol[2] = 0.5*(parCoor[1] + 1.0);
1310+
weightsInterpol[3] = 0.5*(parCoor[2] + 1.0);
13111311
}
13121312

13131313
/* Return the value of coorIsInside. */

SU2_CFD/src/output/filewriter/CParaviewXMLFileWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ void CParaviewXMLFileWriter::WriteDataArray(void* data, VTKDatatype type, unsign
343343
unsigned long totalByteSize;
344344
totalByteSize = globalSize*typeSize;
345345

346-
/*--- Only the master node writes the total size in bytes as int32 in front of the array data ---*/
346+
/*--- Only the master node writes the total size in bytes as unsigned long in front of the array data ---*/
347347

348348
if (!WriteMPIBinaryData(&totalByteSize, sizeof(unsigned long), MASTER_NODE)){
349349
SU2_MPI::Error("Writing array size failed", CURRENT_FUNCTION);

0 commit comments

Comments
 (0)