more consistent formatting of for/while loops and if statements
This commit is contained in:
@ -1188,7 +1188,7 @@ void DumpVTK::write_domain_vtk()
|
||||
|
||||
vtkSmartPointer<vtkRectilinearGridWriter> gwriter = vtkSmartPointer<vtkRectilinearGridWriter>::New();
|
||||
|
||||
if(label) gwriter->SetHeader(label);
|
||||
if (label) gwriter->SetHeader(label);
|
||||
else gwriter->SetHeader("Generated by LAMMPS");
|
||||
|
||||
if (binary) gwriter->SetFileTypeToBinary();
|
||||
@ -1212,7 +1212,7 @@ void DumpVTK::write_domain_vtk_triclinic()
|
||||
|
||||
vtkSmartPointer<vtkUnstructuredGridWriter> gwriter = vtkSmartPointer<vtkUnstructuredGridWriter>::New();
|
||||
|
||||
if(label) gwriter->SetHeader(label);
|
||||
if (label) gwriter->SetHeader(label);
|
||||
else gwriter->SetHeader("Generated by LAMMPS");
|
||||
|
||||
if (binary) gwriter->SetFileTypeToBinary();
|
||||
@ -1305,7 +1305,7 @@ void DumpVTK::write_vtk(int n, double *mybuf)
|
||||
vtkSmartPointer<vtkPolyDataWriter> writer = vtkSmartPointer<vtkPolyDataWriter>::New();
|
||||
#endif
|
||||
|
||||
if(label) writer->SetHeader(label);
|
||||
if (label) writer->SetHeader(label);
|
||||
else writer->SetHeader("Generated by LAMMPS");
|
||||
|
||||
if (binary) writer->SetFileTypeToBinary();
|
||||
@ -1890,7 +1890,7 @@ void DumpVTK::identify_vectors()
|
||||
int num_vector3_starts = sizeof(vector3_starts) / sizeof(int);
|
||||
|
||||
for (int v3s = 0; v3s < num_vector3_starts; v3s++) {
|
||||
if(name.count(vector3_starts[v3s] ) &&
|
||||
if (name.count(vector3_starts[v3s] ) &&
|
||||
name.count(vector3_starts[v3s]+1) &&
|
||||
name.count(vector3_starts[v3s]+2) )
|
||||
{
|
||||
@ -1906,12 +1906,12 @@ void DumpVTK::identify_vectors()
|
||||
if (it->first < ATTRIBUTES) // neither fix nor compute
|
||||
continue;
|
||||
|
||||
if(argindex[it->first] == 0) // single value
|
||||
if (argindex[it->first] == 0) // single value
|
||||
continue;
|
||||
|
||||
// assume components are grouped together and in correct order
|
||||
if(name.count(it->first + 1) && name.count(it->first + 2) ) { // more attributes?
|
||||
if(it->second.compare(0,it->second.length()-3,name[it->first + 1],0,it->second.length()-3) == 0 && // same attributes?
|
||||
if (name.count(it->first + 1) && name.count(it->first + 2) ) { // more attributes?
|
||||
if (it->second.compare(0,it->second.length()-3,name[it->first + 1],0,it->second.length()-3) == 0 && // same attributes?
|
||||
it->second.compare(0,it->second.length()-3,name[it->first + 2],0,it->second.length()-3) == 0 )
|
||||
{
|
||||
it->second.erase(it->second.length()-1);
|
||||
|
||||
Reference in New Issue
Block a user