Skip to content

Commit

Permalink
fix for various configs
Browse files Browse the repository at this point in the history
  • Loading branch information
benkirk committed Jan 25, 2013
1 parent 52f192d commit 03e3121
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions examples/fem_system/fem_system_ex2/fem_system_ex2.C
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions examples/fem_system/fem_system_ex2/solid_system.C
Expand Up @@ -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;
Expand Down

0 comments on commit 03e3121

Please sign in to comment.