Skip to content

Commit

Permalink
feat: capability to give a prefix path to save the printvtk of the geoel
Browse files Browse the repository at this point in the history
As suggested by Fran.
  • Loading branch information
nathanshauer committed Oct 2, 2023
1 parent ce45489 commit a073db5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Mesh/pzgeoel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2654,8 +2654,8 @@ TPZGeoEl::ComputeDetjac(TPZFMatrix<Fad<REAL> > &gradx, Fad<REAL> &detjac)
}


void TPZGeoEl::PrintVTK() {
std::string filename = "geoel_index_" + to_string(this->Index()) + ".vtk";
void TPZGeoEl::PrintVTK(const std::string prefix) {
std::string filename = prefix + "geoel_index_" + to_string(this->Index()) + ".vtk";
std::ofstream out(filename);
out << "# vtk DataFile Version 3.0" << std::endl;
out << "GeoEl VTK Visualization" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion Mesh/pzgeoel.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ class TPZGeoEl : public virtual TPZSavable {
virtual void Print(std::ostream & out = std::cout);

/** @brief Prints the geoel to vtk format with the name geoel_index_#.vtk */
void PrintVTK();
void PrintVTK(const std::string prefix="");

/**
* @brief Prints the coordinates of all nodes (geometric)
Expand Down

0 comments on commit a073db5

Please sign in to comment.