Loading [MathJax]/extensions/TeX/AMSsymbols.js
 Reference documentation for deal.II version 8.5.1
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
step-38.h
1 
1076  triangulation.set_boundary (0); /* ** */
1077  GridTools::transform (&warp<spacedim>, triangulation); /* ** */
1078  std::ofstream x("x"), y("y");
1079  GridOut().write_gnuplot (volume_mesh, x);
1080  GridOut().write_gnuplot (triangulation, y);
1081  }
1082 
1083  std::cout << "Surface mesh has " << triangulation.n_active_cells()
1084  << " cells."
1085  << std::endl;
1086 
1087  ...
1088 @endcode
1089 
1090 Note that the only essential addition has been the three lines marked with
1091 asterisks. It is worth pointing out one other thing here, though: because we
1092 detach the manifold description from the surface mesh, whenever we use a
1093 mapping object in the rest of the program, it has no curves boundary
1094 description to go on any more. Rather, it will have to use the implicit,
1095 StraightBoundary class that is used on all parts of the boundary not
1096 explicitly assigned a different manifold object. Consequently, whether we use
1097 MappingQ(2), MappingQ(15) or MappingQ1, each cell of our mesh will be mapped
1098 using a bilinear approximation.
1099 
1100 All these drawbacks aside, the resulting pictures are still pretty. The only
1101 other differences to what's in @ref step_38 "step-38" is that we changed the right hand side
1102 to @f$f(\mathbf x)=\sin x_3@f$ and the boundary values (through the
1103 <code>Solution</code> class) to @f$u(\mathbf x)|_{\partial\Omega}=\cos x_3@f$. Of
1104 course, we now non longer know the exact solution, so the computation of the
1105 error at the end of <code>LaplaceBeltrami::run</code> will yield a meaningless
1106 number.
1107 <a name="PlainProg"></a>
1108 <h1> The plain program</h1>
1109 @include "step-38.cc"
1110  */
void write_gnuplot(const Triangulation< dim, spacedim > &tria, std::ostream &out, const Mapping< dim, spacedim > *mapping=0) const
Definition: grid_out.cc:3489
VectorizedArray< Number > sin(const ::VectorizedArray< Number > &x)
void transform(const Transformation &transformation, Triangulation< dim, spacedim > &triangulation)
VectorizedArray< Number > cos(const ::VectorizedArray< Number > &x)