Skip to content

Commit

Permalink
FEM: VTK tools, fix value assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
makkemal authored and yorikvanhavre committed Jan 7, 2017
1 parent b5bfc01 commit 3ec0a50
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Mod/Fem/App/FemVTKTools.cpp
Expand Up @@ -770,7 +770,7 @@ void FemVTKTools::exportMechanicalResult(const App::DocumentObject* obj, vtkSmar
grid->GetPointData()->AddArray(data);
}

if(!res->StressValues.getValues().empty()) {
if(!res->MaxShear.getValues().empty()) {
const std::vector<double>& vec = res->MaxShear.getValues();
vtkSmartPointer<vtkDoubleArray> data = vtkSmartPointer<vtkDoubleArray>::New();
data->SetNumberOfValues(vec.size());
Expand All @@ -782,7 +782,7 @@ void FemVTKTools::exportMechanicalResult(const App::DocumentObject* obj, vtkSmar
grid->GetPointData()->AddArray(data);
}

if(!res->StressValues.getValues().empty()) {
if(!res->PrincipalMax.getValues().empty()) {
const std::vector<double>& vec = res->PrincipalMax.getValues();
vtkSmartPointer<vtkDoubleArray> data = vtkSmartPointer<vtkDoubleArray>::New();
data->SetNumberOfValues(vec.size());
Expand All @@ -794,7 +794,7 @@ void FemVTKTools::exportMechanicalResult(const App::DocumentObject* obj, vtkSmar
grid->GetPointData()->AddArray(data);
}

if(!res->StressValues.getValues().empty()) {
if(!res->PrincipalMax.getValues().empty()) {
const std::vector<double>& vec = res->PrincipalMin.getValues();
vtkSmartPointer<vtkDoubleArray> data = vtkSmartPointer<vtkDoubleArray>::New();
data->SetNumberOfValues(vec.size());
Expand All @@ -806,7 +806,7 @@ void FemVTKTools::exportMechanicalResult(const App::DocumentObject* obj, vtkSmar
grid->GetPointData()->AddArray(data);
}

if(!res->StressValues.getValues().empty()) {
if(!res->Temperature.getValues().empty()) {
const std::vector<double>& vec = res->Temperature.getValues();
vtkSmartPointer<vtkDoubleArray> data = vtkSmartPointer<vtkDoubleArray>::New();
data->SetNumberOfValues(vec.size());
Expand All @@ -818,7 +818,7 @@ void FemVTKTools::exportMechanicalResult(const App::DocumentObject* obj, vtkSmar
grid->GetPointData()->AddArray(data);
}

if(!res->StressValues.getValues().empty()) {
if(!res->UserDefined.getValues().empty()) {
const std::vector<double>& vec = res->UserDefined.getValues();
vtkSmartPointer<vtkDoubleArray> data = vtkSmartPointer<vtkDoubleArray>::New();
data->SetNumberOfValues(vec.size());
Expand All @@ -831,7 +831,7 @@ void FemVTKTools::exportMechanicalResult(const App::DocumentObject* obj, vtkSmar
}


if(!res->StressValues.getValues().empty()) {
if(!res->DisplacementVectors.getValues().empty()) {
const std::vector<Base::Vector3d>& vec = res->DisplacementVectors.getValues();
vtkSmartPointer<vtkDoubleArray> data = vtkSmartPointer<vtkDoubleArray>::New();
data->SetNumberOfComponents(3);
Expand Down

0 comments on commit 3ec0a50

Please sign in to comment.