Skip to content

Commit

Permalink
set verbosity missed in places.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brig Bagley committed Jun 8, 2016
1 parent a067e76 commit dc1609b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
1 change: 1 addition & 0 deletions src/FEMSolver.cu
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ FEMSolver::FEMSolver(
this->tetMesh_ = TetMesh::read((this->filename_ + ".node").c_str(),
(this->filename_ + ".ele").c_str(), verbose);
} else {
TriMesh::verbose = verbose;
this->triMesh_ = TriMesh::read(this->filename_.c_str());
}
this->getMatrixFromMesh();
Expand Down
34 changes: 22 additions & 12 deletions src/core/aggmis/cuda/TriMesh_connectivity.cu
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ void TriMesh::need_meshquality()
fprintf(valancefile, "%d\n", val);
}
avg_valance = sum / neighbors.size();
printf("Max valance is %d\n", max_valance);
printf("average valance is %d\n", avg_valance);

if (this->verbose) {
printf("Max valance is %d\n", max_valance);
printf("average valance is %d\n", avg_valance);
}
int ne = faces.size();
for(int i =0; i<ne; i++)
{
Expand Down Expand Up @@ -68,7 +69,6 @@ void TriMesh::need_meshquality()

}


void TriMesh::need_faceedges()
{
if (faces.empty())
Expand Down Expand Up @@ -97,8 +97,9 @@ void TriMesh::need_neighbors()
{
if (!neighbors.empty())
return;

printf("Finding vertex neighbors... ");
if (this->verbose) {
printf("Finding vertex neighbors... ");
}
int nv = vertices.size(), nf = faces.size();

std::vector<int> numneighbors(nv);
Expand All @@ -124,7 +125,9 @@ void TriMesh::need_neighbors()
}
}

printf("Done.\n");
if (this->verbose) {
printf("Done.\n");
}
}

void TriMesh::rescale(int size)
Expand Down Expand Up @@ -212,7 +215,9 @@ void TriMesh::need_adjacentfaces()
return;
// need_faces();

printf("Finding vertex to triangle maps... ");
if (this->verbose) {
printf("Finding vertex to triangle maps... ");
}
int nv = vertices.size(), nf = faces.size();

std::vector<int> numadjacentfaces(nv);
Expand All @@ -231,7 +236,9 @@ void TriMesh::need_adjacentfaces()
adjacentfaces[faces[i][j]].push_back(i);
}

printf("Done.\n");
if (this->verbose) {
printf("Done.\n");
}
}

// Find the face across each edge from each other face (-1 on boundary)
Expand All @@ -242,8 +249,9 @@ void TriMesh::need_across_edge()
return;
need_adjacentfaces();

printf("Finding across-edge maps... ");

if (this->verbose) {
printf("Finding across-edge maps... ");
}
int nf = faces.size();
across_edge.resize(nf, Face(-1,-1,-1));

Expand Down Expand Up @@ -273,6 +281,8 @@ void TriMesh::need_across_edge()
}
}

printf("Done.\n");
if (this->verbose) {
printf("Done.\n");
}
}

0 comments on commit dc1609b

Please sign in to comment.