Permalink
Browse files

fix for various configs

  • Loading branch information...
1 parent 52f192d commit 03e3121330d0a4913c921b01e1750d5aaa47742b @benkirk benkirk committed Jan 25, 2013
@@ -136,6 +136,12 @@ void run_timestepping(EquationSystems& systems, GetPot& args) {
int main(int argc, char** argv) {
+ // Skip this example if we do not meet certain requirements
+#ifndef LIBMESH_HAVE_VTK
+ std::cout << "This example requires VTK support - skipping.\n";
+ return 77;
+#endif
+
// Initialize libMesh and any dependent libraries
LibMeshInit init(argc, argv);
@@ -343,15 +343,15 @@ bool SolidSystem::side_time_derivative(bool request_jacobian,
// Assemble
for (unsigned int i = 0; i < n_x_dofs; ++i) {
for (unsigned int d1 = 0; d1 < c.dim; ++d1) {
- if (isnan(diff(d1)))
+ if (libmesh_isnan(diff(d1)))
continue;
Real val = JxW[qp] * phi[i][qp] * diff(d1) * penalty_number;
c.elem_subresiduals[var[d1]]->operator ()(i) += val;
}
if (request_jacobian) {
for (unsigned int j = 0; j < n_x_dofs; ++j) {
for (unsigned int d1 = 0; d1 < c.dim; ++d1) {
- if (isnan(diff(d1)))
+ if (libmesh_isnan(diff(d1)))
continue;
Real val = JxW[qp] * phi[i][qp] * phi[j][qp] * penalty_number;
c.elem_subjacobians[var[d1]][var[d1]]->operator ()(i, j) += val;

0 comments on commit 03e3121

Please sign in to comment.