std::ifstream input_sm(SOURCE_DIR "/input_grids/tripod.off");
input_sm >> sm;
cgal_surface_mesh_to_dealii_triangulation(sm, tria);
- go.write_msh(tria, "temp.msh");
+ {
+ std::ofstream out("temp.msh");
+ go.write_msh(tria, out);
+ }
remove("temp.msh");
// If we got here, everything is fine.
deallog << "OK" << std::endl;
std::ifstream input_p(SOURCE_DIR "/input_grids/tripod.off");
input_p >> P;
cgal_surface_mesh_to_dealii_triangulation(P, tria);
- go.write_msh(tria, "temp.msh");
+ {
+ std::ofstream out("temp.msh");
+ go.write_msh(tria, out);
+ }
remove("temp.msh");
// If we got here, everything is fine.
deallog << "OK" << std::endl;
#include <deal.II/base/config.h>
-#include <deal.II/base/function_parser.h>
+#include <deal.II/base/function.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_out.h>
using namespace CGAL::parameters;
+class ImplicitFunction : public Function<3>
+{
+public:
+ virtual double
+ value(const Point<3> &p, const unsigned int component = 0) const override
+ {
+ return std::pow(1 - std::sqrt(p[0] * p[0] + p[1] * p[1]), 2) + p[2] * p[2] -
+ .25;
+ }
+};
+
int
main()
{
initlog();
// Build a deal.II triangulation
- Triangulation<3> tria;
- FunctionParser<3> implicit_function("(1-sqrt(x^2+y^2))^2+z^2-.25");
+ Triangulation<3> tria;
+ ImplicitFunction implicit_function;
CGALWrappers::AdditionalData<3> data;
data.cell_size = 0.4;
GridGenerator::implicit_function(
#include <deal.II/base/config.h>
-#include <deal.II/base/function_parser.h>
+#include <deal.II/base/function.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_out.h>
using namespace CGAL::parameters;
+class ImplicitFunction : public Function<3>
+{
+public:
+ virtual double
+ value(const Point<3> &p, const unsigned int component = 0) const override
+ {
+ return std::pow(1 - std::sqrt(p[0] * p[0] + p[1] * p[1]), 2) + p[2] * p[2] -
+ .25;
+ }
+};
+
int
main()
{
initlog();
// Build a deal.II triangulation
- Triangulation<2, 3> tria;
- FunctionParser<3> implicit_function("(1-sqrt(x^2+y^2))^2+z^2-.25");
+ Triangulation<2, 3> tria;
+ ImplicitFunction implicit_function;
CGALWrappers::AdditionalData<2> data;
data.angular_bound = 30.;
data.radius_bound = .1;