comparison src/MeshFunction.cc @ 264:41b76530fe5e

Do not force extension for imported MeshFunction To be consistent with Mesh
author Eugenio Gianniti <eugenio.gianniti@mail.polimi.it>
date Thu, 07 Aug 2014 20:34:50 +0200
parents a61fc34334ca
children 53039ac90368
comparison
equal deleted inserted replaced
263:a61fc34334ca 264:41b76530fe5e
23 DEFUN_DLD (MeshFunction, args, nargout, "-*- texinfo -*-\n\ 23 DEFUN_DLD (MeshFunction, args, nargout, "-*- texinfo -*-\n\
24 @deftypefn {Function File} {[@var{meshfunc}]} = \ 24 @deftypefn {Function File} {[@var{meshfunc}]} = \
25 MeshFunction (@var{Mesh}, @var{filename})\n\ 25 MeshFunction (@var{Mesh}, @var{filename})\n\
26 @deftypefnx {Function File} {[@var{meshfunc}]} = \ 26 @deftypefnx {Function File} {[@var{meshfunc}]} = \
27 MeshFunction (@var{type}, @var{Mesh}, @var{filename})\n\ 27 MeshFunction (@var{type}, @var{Mesh}, @var{filename})\n\
28 Initialize a meshfunction with the values contained in a XDMF file.\n\ 28 Initialize a meshfunction with the values contained in a file.\n\
29 The output @var{meshfunc} is an object which contains a representation of the \ 29 The output @var{meshfunc} is an object which contains a representation of the \
30 meshfunction in @var{filename} which can be used to mark subdomains or \ 30 meshfunction in @var{filename} which can be used to mark subdomains or \
31 facets where Dirichlet boundary conditions are to be applied.\n\ 31 facets where Dirichlet boundary conditions are to be applied.\n\
32 Optionally, you can set a label identifying the @var{type} of markers, \ 32 Optionally, you can set a label identifying the @var{type} of markers, \
33 in order to use @var{meshfunc} to mark subdomains in BilinearForm or \ 33 in order to use @var{meshfunc} to mark subdomains in BilinearForm or \
76 76
77 if (!error_state) 77 if (!error_state)
78 { 78 {
79 SHARED_PTR <dolfin::Mesh const> const & 79 SHARED_PTR <dolfin::Mesh const> const &
80 pmsh = msh_arg.get_pmsh (); 80 pmsh = msh_arg.get_pmsh ();
81 filename += ".xdmf";
82 81
83 try 82 try
84 { retval = new meshfunction (label, pmsh, filename); } 83 { retval = new meshfunction (label, pmsh, filename); }
85 catch (std::runtime_error &) 84 catch (std::runtime_error &)
86 { error ("error reading file"); } 85 { error ("error reading file"); }