diff --git a/SRC/material/nD/J2PlateFibre.cpp b/SRC/material/nD/J2PlateFibre.cpp index 82dc47a07a..2ec822a968 100644 --- a/SRC/material/nD/J2PlateFibre.cpp +++ b/SRC/material/nD/J2PlateFibre.cpp @@ -887,16 +887,27 @@ J2PlateFibre::recvSelf (int commitTag, Channel &theChannel, } void -J2PlateFibre::Print (OPS_Stream &s, int flag) +J2PlateFibre::Print(OPS_Stream &s, int flag) { - s << "J2 Plate Fibre Material Model" << endln; - s << "\tE: " << E << endln; - s << "\tnu: " << nu << endln; - s << "\tsigmaY: " << sigmaY << endln; - s << "\tHiso: " << Hiso << endln; - s << "\tHkin: " << Hkin << endln; - - return; + if (flag == OPS_PRINT_PRINTMODEL_MATERIAL) { + s << "J2 Plate Fibre Material Model" << endln; + s << "\tE: " << E << endln; + s << "\tnu: " << nu << endln; + s << "\tsigmaY: " << sigmaY << endln; + s << "\tHiso: " << Hiso << endln; + s << "\tHkin: " << Hkin << endln; + } + + if (flag == OPS_PRINT_PRINTMODEL_JSON) { + s << "\t\t\t{"; + s << "\"name\": \"" << this->getTag() << "\", "; + s << "\"type\": \"J2PlateFibre\", "; + s << "\"E\": " << E << ", "; + s << "\"nu\": " << nu << ", "; + s << "\"fy\": " << sigmaY << ", "; + s << "\"Hiso\": " << Hiso << ", "; + s << "\"Hkin\": " << Hkin << "}"; + } } int diff --git a/SRC/material/section/MembranePlateFiberSection.cpp b/SRC/material/section/MembranePlateFiberSection.cpp index c00eceb7c3..a2d5e388e0 100644 --- a/SRC/material/section/MembranePlateFiberSection.cpp +++ b/SRC/material/section/MembranePlateFiberSection.cpp @@ -512,14 +512,32 @@ const Matrix& MembranePlateFiberSection::getSectionTangent( ) //print out data void MembranePlateFiberSection::Print( OPS_Stream &s, int flag ) { - s << "MembranePlateFiberSection: \n " ; - s << " Thickness h = " << h << endln ; + if (flag == OPS_PRINT_PRINTMODEL_JSON) { + s << "\t\t\t{"; + s << "\"name\": \"" << this->getTag() << "\", "; + s << "\"type\": \"PlateFiber\", "; + s << "\"thickness\": \"" << h << "\", "; + s << "\"fibers\": [\n"; + for (int i = 0; i < numFibers; i++) { + s << "\t\t\t\t{\"centroid\": " << (i+0.5) * h / numFibers << ", "; + s << "\"material\": \"" << theFibers[i]->getTag() << "\""; + if (i < numFibers - 1) + s << "},\n"; + else + s << "}\n"; + } + s << "\t\t\t]}"; + } + else { + s << "MembranePlateFiberSection: \n "; + s << " Thickness h = " << h << endln; - for (int i = 0; i < numFibers; i++) { - theFibers[i]->Print( s, flag ) ; - } + for (int i = 0; i < numFibers; i++) { + theFibers[i]->Print(s, flag); + } - return ; + return; + } } int diff --git a/SRC/recorder/PVDRecorder.cpp b/SRC/recorder/PVDRecorder.cpp index b6cee4212d..d7e35202a6 100644 --- a/SRC/recorder/PVDRecorder.cpp +++ b/SRC/recorder/PVDRecorder.cpp @@ -111,10 +111,9 @@ void* OPS_PVDRecorder() } PVDRecorder::EleData edata; numdata = OPS_GetNumRemainingInputArgs(); - edata.resize(numdata); - for(int i=0; i