parameters: (analysis)
docstring: Find one and only mesh object of *analysis*.
  
      :returns:
       A tuple ``(object, message)``. If and only if the analysis contains
       exactly one mesh object the first value of the tuple is the mesh document
       object. Otherwise the first value is ``None`` and the second value is a
       error message indicating what went wrong.
docstring_summary: Find one and only mesh object of *analysis*.
docstring_tokens: Find one and only mesh object of * analysis * .
function: def get_mesh_to_solve(analysis):
      """ Find one and only mesh object of *analysis*.
  
      :returns:
       A tuple ``(object, message)``. If and only if the analysis contains
       exactly one mesh object the first value of the tuple is the mesh document
       object. Otherwise the first value is ``None`` and the second value is a
       error message indicating what went wrong.
      """
      mesh_to_solve = None
      for m in analysis.Group:
          if (
              m.isDerivedFrom("Fem::FemMeshObject")
              # the next line should not be needed as the result mesh is not a analysis member
              and not femutils.is_of_type(m, "Fem::MeshResult")
          ):
              if not mesh_to_solve:
                  mesh_to_solve = m
              else:
                  return (None, "FEM: multiple mesh in analysis not yet supported!")
      if mesh_to_solve is not None:
          return (mesh_to_solve, "")
      else:
          return (None, "FEM: no mesh object found in analysis.")
function_tokens: def get_mesh_to_solve ( analysis ) : mesh_to_solve = None for m in analysis . Group : if ( m . isDerivedFrom ( "Fem::FemMeshObject" ) # the next line should not be needed as the result mesh is not a analysis member and not femutils . is_of_type ( m , "Fem::MeshResult" ) ) : if not mesh_to_solve : mesh_to_solve = m else : return ( None , "FEM: multiple mesh in analysis not yet supported!" ) if mesh_to_solve is not None : return ( mesh_to_solve , "" ) else : return ( None , "FEM: no mesh object found in analysis." )