Skip to content

Commit

Permalink
Merge pull request libMesh#231 from libMesh/dirichlet_nan
Browse files Browse the repository at this point in the history
Dirichlet nan
  • Loading branch information
roystgnr committed Apr 26, 2014
2 parents a4e1ab2 + 9399005 commit ccbc337
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions include/base/dirichlet_boundaries.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,25 @@
namespace libMesh
{

// ------------------------------------------------------------
// DirichletBoundary class definition

/**
* This class allows one to associate dirichlet boundary values with
* a given set of mesh boundary ids and system variable ids.
*
* Dirichlet values must be supplied as the input function "f"; when
* using some specialized elements, gradient values must be supplied
* via the input function "g".
*
* Dirichlet functions are allowed to return NaN; if this is
* encountered, then the degree of freedom values in a patch around
* the location of the returned NaN will be left unconstrained. E.g.
* a NaN on a boundary edge in 3D would leave that edge and the two
* adjoining face interiors unconstrained, but would still permit the
* other edge and node DoFs around those faces to be constrained.
*/

class DirichletBoundary
{
public:
Expand Down
2 changes: 1 addition & 1 deletion src/base/dof_map_constraints.C
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ private:
for (unsigned int i = 0; i < n_dofs; i++)
{
DofConstraintRow empty_row;
if (dof_is_fixed[i])
if (dof_is_fixed[i] && !std::isnan(Ue(i)))
add_fn (dof_indices[i], empty_row, Ue(i));
}
}
Expand Down

0 comments on commit ccbc337

Please sign in to comment.