So it seems part of my problem relate to the topology I was trying to adapt OR to the staring complex mesh I was using. I have managed to make it work starting with a trivial mesh and using a more simple IGES CAD. I will work on complexifying it from there. I will try to keep the information here as it seems that feature has not been used extensively :)!. What I have working now is this simple gif.
[image: myimage.gif] On Tuesday, March 31, 2020 at 9:19:23 AM UTC-4, Bruno Blais wrote: > > Dear all, > I hope you are well in these uncertain times. > > I have been trying to use the OpenCASCADE library to set-up my manifolds. > The goal of this is to be able to do CFD simulations in complex geometry, > but use an initial very coarse mesh made with GMSH and use the dynamics > mesh adaptation to adapt the mesh while having the adaptation be CAD-aware. > The geometry is complex, so fixing the manifold analytically appears to be > a bad idea. > I started from step-54, which compiles and works well on my machines. > However, I am unable to "make it work" with my own generated Salome STEP > and gmsh MSH files. > My CAD is in metric, so I adjusted the scaling to use a scaling of 1. My > mesh also contains numerous wires, so I disabled that aspect and only > focused on refining with the faces which I label by looping over them. > However, no matter what occurs I get an error thrown: > > > -------------------------------------------------------- > An error occurred in line <114> of file > </home/blab/soft/dealii/dealii/dealii/source/opencascade/manifold_lib.cc> > in function > dealii::Point<spacedim> > dealii::OpenCASCADE::NormalProjectionManifold<dim, > spacedim>::project_to_manifold(const dealii::ArrayView<const > dealii::Point<spacedim> >&, const dealii::Point<spacedim>&) const [with int > dim = 2; int spacedim = 3] > The violated condition was: > closest_point(sh, surrounding_points[i], tolerance) > .distance(surrounding_points[i]) < std::max(tolerance * > surrounding_points[i].norm(), tolerance) > Additional information: > The point [ 0.1 0 0 ] is not on the manifold. > > Stacktrace: > ----------- > #0 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::OpenCASCADE::NormalProjectionManifold<2, > 3>::project_to_manifold(dealii::ArrayView<dealii::Point<3, double> const, > dealii::MemorySpace::Host> const&, dealii::Point<3, double> const&) const > #1 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::FlatManifold<2, > 3>::get_new_point(dealii::ArrayView<dealii::Point<3, double> const, > dealii::MemorySpace::Host> const&, dealii::ArrayView<double const, > dealii::MemorySpace::Host> const&) const > #2 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::Manifold<2, > 3>::get_new_point_on_line(dealii::TriaIterator<dealii::TriaAccessor<1, 2, > 3> > const&) const > #3 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > #4 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > #5 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::TriaAccessor<1, 2, 3>::center(bool, bool) const > #6 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::Triangulation<2, 3>::DistortedCellList > dealii::internal::TriangulationImplementation::Implementation::execute_refinement<3>(dealii::Triangulation<2, > > 3>&, bool) > #7 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::Triangulation<2, 3>::execute_refinement() > #8 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::Triangulation<2, 3>::execute_coarsening_and_refinement() > #9 /home/blab/soft/dealii/dealii/build/lib/libdeal_II.g.so.9.2.0-pre: > dealii::Triangulation<2, 3>::refine_global(unsigned int) > #10 ./step-54: Step54::TriangulationOnCAD::refine_mesh() > #11 ./step-54: Step54::TriangulationOnCAD::run() > #12 ./step-54: main > -------------------------------------------------------- > > I have tried some elements : > - Playing with the tolerance of the CAD > - Writing my CAD from the OpenCASCADE STEP object and then opening it > again in Salome to see that it is interpreted correctly + > > However, I always seem to face an issue where my CAD does not appear to > generate a valid manifold. I have joined my code as well as the salome HDF > file and gmsh GEO file used to generate the CAD and meshes respectively. > I must admit I am quite at lost here as to why both don't coincide. Any > advices on where to proceed from there? > Best :)! > Bruno > > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/a239784b-954a-4860-ab3a-acac05e4c709%40googlegroups.com.
