Re: [deal.II] Installation didn't give any errors but when I tried make test, it failed all tests

2020-07-30 Thread heena patel
Hi Iqbal,
   Check this link below.
https://groups.google.com/forum/?utm_medium=email_source=footer#!searchin/dealii/step$2070$209.2$20version%7Csort:date/dealii/Y5Lgt9Gn0Zs/vNHTNDdaAwAJ


Regards,
Heena

On Thu, Jul 30, 2020 at 10:58 AM kaleem iqbal 
wrote:

> Dear Prof. Wolfgang;
> During running step-70. I found the following error
> Exception on processing:
>
> 
> An error occurred in line <1360> of file
> 
> in function
> void dealii::ParameterHandler::print_parameters(const string&,
> dealii::ParameterHandler::OutputStyle) const
> The violated condition was:
> out
> Additional information:
> An input/output error has occurred. There are a number of reasons why
> this may be happening, both for reading and writing operations.
>
> If this happens during an operation that tries to read data: First, you
> may be trying to read from a file that doesn't exist or that is not
> readable given its file permissions. Second, deal.II uses this error at
> times if it tries to read information from a file but where the information
> in the file does not correspond to the expected format. An example would be
> a truncated file, or a mesh file that contains not only sections that
> describe the vertices and cells, but also sections for additional data that
> deal.II does not understand.
>
> If this happens during an operation that tries to write data: you may be
> trying to write to a file to which file or directory permissions do not
> allow you to write. A typical example is where you specify an output file
> in a directory that does not exist.
> 
>
> Aborting!
> 
> CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' failed
> make[3]: *** [CMakeFiles/run] Error 1
> CMakeFiles/Makefile2:131: recipe for target 'CMakeFiles/run.dir/all' failed
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> CMakeFiles/Makefile2:138: recipe for target 'CMakeFiles/run.dir/rule'
> failed
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> Makefile:144: recipe for target 'run' failed
> make: *** [run] Error 2
> Please guide me
> Regards
> Kaleem iqbal
>
> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/168928f6-65e2-40e2-924a-84bfe514e2bco%40googlegroups.com
> 
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAG_OxbgHXT4P448t%3DZo24ncfAjd4XfaK5MtZ-esO6_LEJr7Hbg%40mail.gmail.com.


Re: [deal.II] step 70 9.2 version

2020-06-05 Thread heena patel
Thanks Luca it works.

Regards,
Heena

On Fri, Jun 5, 2020 at 6:19 PM luca.heltai  wrote:

> Dear Heena,
>
> unfortunately, we failed in cherry picking a default value in the
> parameter file.
>
> The generated parameter handler tries to write output files in a `results`
> directory (as indicated in the default parameter file `set Output directory
> = results`), which however is not created by the installation. You can
> either change the parameter file and set the output directory to `.` or
> create the directory `results` in the location where you are running the
> program.
>
> Wolfgang, it seems that indeed the default parameter file in 9.2 still
> contains `set Output directory = results`. :(
>
> L.
>
>
> > On 5 Jun 2020, at 7:03, heena patel  wrote:
> >
> > Dear all,
> >
> > I had downloaded latest 9.2 version and had
> run some tutorials successfully. When I try to run tutorial 70 it gives
> following error. Kindly help me.
> >
> >
> > TimerOutput objects finalize timed values printed to the
> > screen by communicating over MPI in their destructors.
> > Since an exception is currently uncaught, this
> > synchronization (and subsequent output) will be skipped
> > to avoid a possible deadlock.
> > -
> >
> >
> > 
> > Exception on processing:
> >
> > 
> > An error occurred in line <1360> of file
>  in
> function
> > void dealii::ParameterHandler::print_parameters(const string&,
> dealii::ParameterHandler::OutputStyle) const
> > The violated condition was:
> > out
> > Additional information:
> > An input/output error has occurred. There are a number of reasons
> why this may be happening, both for reading and writing operations.
> >
> > If this happens during an operation that tries to read data: First, you
> may be trying to read from a file that doesn't exist or that is not
> readable given its file permissions. Second, deal.II uses this error at
> times if it tries to read information from a file but where the information
> in the file does not correspond to the expected format. An example would be
> a truncated file, or a mesh file that contains not only sections that
> describe the vertices and cells, but also sections for additional data that
> deal.II does not understand.
> >
> > If this happens during an operation that tries to write data: you may be
> trying to write to a file to which file or directory permissions do not
> allow you to write. A typical example is where you specify an output file
> in a directory that does not exist.
> > 
> >
> >
> > Regards,
> > Heena
> >
> > --
> > 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 dealii+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/d102ed42-8257-4674-a900-1e6337af2849o%40googlegroups.com
> .
>
> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/A09065B3-5AFF-4CD5-BA40-3EC1B31D6385%40gmail.com
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAG_OxbhQGZq4_Ms9OovTxux9WaJa5jHOVGgEodFJPSLbN_t4aw%40mail.gmail.com.


[deal.II] step 70 9.2 version

2020-06-04 Thread heena patel
Dear all,
 
I had downloaded latest 9.2 version and had run 
some tutorials successfully. When I try to run tutorial 70 it gives 
following error. Kindly help me.


TimerOutput objects finalize timed values printed to the
screen by communicating over MPI in their destructors.
Since an exception is currently uncaught, this
synchronization (and subsequent output) will be skipped
to avoid a possible deadlock.
-



Exception on processing: 


An error occurred in line <1360> of file 
 in 
function
void dealii::ParameterHandler::print_parameters(const string&, 
dealii::ParameterHandler::OutputStyle) const
The violated condition was: 
out
Additional information: 
An input/output error has occurred. There are a number of reasons why 
this may be happening, both for reading and writing operations.

If this happens during an operation that tries to read data: First, you may 
be trying to read from a file that doesn't exist or that is not readable 
given its file permissions. Second, deal.II uses this error at times if it 
tries to read information from a file but where the information in the file 
does not correspond to the expected format. An example would be a truncated 
file, or a mesh file that contains not only sections that describe the 
vertices and cells, but also sections for additional data that deal.II does 
not understand.

If this happens during an operation that tries to write data: you may be 
trying to write to a file to which file or directory permissions do not 
allow you to write. A typical example is where you specify an output file 
in a directory that does not exist.



Regards,
Heena

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d102ed42-8257-4674-a900-1e6337af2849o%40googlegroups.com.


Re: [deal.II] Re: Is it possible to copy_triangulation for fullydistributed with periodic face?

2020-06-11 Thread heena patel
Dear Peter,
 Thanks for the reply. It gives the following error







*error: no matching function for call to
‘dealii::parallel::fullydistributed::Triangulation<2,
2>::Triangulation(ompi_communicator_t*&, dealii::Triangulation<2,
2>::MeshSmoothing)’is_periodic(is_periodic)
 ^In file included from
/home/heena/Project/MsFEM/advection-diffusion-equation/include/advectiondiffusion_multiscale.hpp:39:0,
   from
/home/heena/Project/MsFEM/advection-diffusion-equation/source/AdvectionDiffusionProblem.cc:13:/home/heena/lib/dealII/include/deal.II/distributed/fully_distributed_tria.h:134:16:
note: candidate: dealii::parallel::fullydistributed::Triangulation::Triangulation(MPI_Comm) [with int dim = 2; int spacedim = 2;
MPI_Comm = ompi_communicator_t*]   explicit Triangulation(MPI_Comm
mpi_communicator);*


It seems that the link you send me explains that I have to create serial
triangulation and then apply periodicity?

Regards,
Heena

On Thu, Jun 11, 2020 at 11:36 AM 'peterrum' via deal.II User Group <
dealii@googlegroups.com> wrote:

> Dear Heena,
>
> may I ask you to be more specific regarding to
> parallel::fullydistributed::Triangualation (p:f:t) error. In the case of
> p:f:t you can copy indeed refined meshes, however users need to deal with
> periodicity on their own by applying the periodicy once again. See the
> following test:
> https://github.com/dealii/dealii/blob/master/tests/fullydistributed_grids/copy_serial_tria_04.cc#L102
>
> This is kinda annoying, but I was not able to come up with a more
> transparent solution during the development of p:f:t.
>
> Hope that helps,
> Peter
>
> On Thursday, 11 June 2020 10:06:49 UTC+2, heena patel wrote:
>>
>> Dear all,
>>  I am trying to solve semilagrangian advection
>> problem?
>> I have traingulation with periodic face.
>> I wanted to copy_triangulation and trace back mesh. The thing is with 
>> *parallel
>> distributed triangulation* it refuse to copy for refine mesh, that is
>> written in documentation as well. When  I try to use fullydistributed
>> triangulation it gives me error with periodicity. Is there a way that I can
>> copy triangulation with periodicity or I am missing something? The code
>> works if I create new_triangulation with parallel distributed triangulation
>> and work on it. But it is expensive step. Kindly find code in attachment.
>>
>>
>> Regards,
>> Heena
>>
> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/864f23a7-0017-4248-8df4-ecd246df963eo%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/864f23a7-0017-4248-8df4-ecd246df963eo%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAG_Oxbg8qmmyjQ1mF%2BSnGNj75XE487mhZPxjQWVL-Ls%2BmCAwHw%40mail.gmail.com.


[deal.II] Is it possible to copy_triangulation for fullydistributed with periodic face?

2020-06-11 Thread heena patel
Dear all,
 I am trying to solve semilagrangian advection 
problem?
I have traingulation with periodic face.
I wanted to copy_triangulation and trace back mesh. The thing is with *parallel 
distributed triangulation* it refuse to copy for refine mesh, that is 
written in documentation as well. When  I try to use fullydistributed 
triangulation it gives me error with periodicity. Is there a way that I can 
copy triangulation with periodicity or I am missing something? The code 
works if I create new_triangulation with parallel distributed triangulation 
and work on it. But it is expensive step. Kindly find code in attachment.


Regards,
Heena

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/d70b7825-d3aa-43ee-b14a-65e0b371a3dfo%40googlegroups.com.
/*
 * semilagrangian.hpp
 *
 *  Created on: Jun 10, 2020
 *  Author: heena
 */

#ifndef INCLUDE_SEMILAGRANGIAN_HPP_
#define INCLUDE_SEMILAGRANGIAN_HPP_

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

// Distributed triangulation
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 

#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

// STL
#include 
#include 
#include 
#include 

// My Headers
#include "advection_field.hpp"
#include "advectiondiffusion_basis.hpp"
#include "advectiondiffusion_basis_reconstruction.hpp"
#include "config.h"
#include "dirichlet_bc.hpp"
#include "initial_value.hpp"
#include "matrix_coeff.hpp"
#include "neumann_bc.hpp"
#include "right_hand_side.hpp"

namespace Timedependent_AdvectionDiffusionProblem {
using namespace dealii;

template 
class Semilagrangian : public ParameterAcceptor {
public:
  Semilagrangian() = delete;
  Semilagrangian(unsigned int n_refine, bool is_periodic);
  ~Semilagrangian();
  void run();

private:
  void make_grid();
  void copy_grid();

  MPI_Comm mpi_communicator;

parallel::distributed::Triangulation triangulation;
parallel::distributed::Triangulation test_triangulation;


  /*!
   * Time-dependent vector coefficient (velocity).
   */
  Coefficients::AdvectionField advection_field;

  /*!
   * Index Set
   */
  IndexSet locally_owned_dofs;
  IndexSet locally_relevant_dofs;

  ConditionalOStream pcout;
  TimerOutput computing_timer;
  double time;
  double time_step;
  unsigned int timestep_number;
  /*!
   * parameter to determine the "implicitness" of the method.
   * Zero is fully implicit and one is (almost explicit).
   */
  const double theta;

  /*!
   * Final simulation time.
   */
  double T_max;

  /*!
   * Number of global refinements.
   */
  const unsigned int n_refine;

  /*!
   * If this flag is true then periodic boundary conditions
   * are used.
   */
  bool is_periodic;
};

template 
Semilagrangian::Semilagrangian(
unsigned int n_refine, bool is_periodic)
: mpi_communicator(MPI_COMM_WORLD),
  triangulation(mpi_communicator,
typename Triangulation::MeshSmoothing(
Triangulation::smoothing_on_refinement |
Triangulation::smoothing_on_coarsening)),
  test_triangulation(mpi_communicator,
 typename Triangulation::MeshSmoothing(
 Triangulation::smoothing_on_refinement |
 Triangulation::smoothing_on_coarsening)),
  fe(1),
	  dof_handler(triangulation),
  pcout(std::cout,
(Utilities::MPI::this_mpi_process(mpi_communicator) == 0)),
  computing_timer(mpi_communicator,
	  pcout, TimerOutput::summary,
  TimerOutput::wall_times),
  time(0.0),
	  time_step(1. / 100),
	  timestep_number(0),
  /*
   * theta=1 is implicit Euler,
   * theta=0 is explicit Euler,
   * theta=0.5 is Crank-Nicolson
   */
  theta(0.0),
	  T_max(1.0),
	  n_refine(n_refine),
	  is_periodic(is_periodic)
	  {}


template  void Semilagrangian::make_grid()
{
  TimerOutput::Scope t(computing_timer, "coarse mesh generation");

  GridGenerator::hyper_cube(triangulation, 0, 1,
/* colorize */ true);

  if (is_periodic) {
std::vector::cell_iterator>>
periodicity_vector;

for (unsigned int d = 0; d < dim; ++d) {
  

Re: [deal.II] Strategy to snap the boundary of a triangulation to a manifold

2020-06-09 Thread heena patel
Dear Bruno,
   I am not expert, but OpenFoam has Snappyhex mesh
feature that might help you. Check the link below.
http://www.wolfdynamics.com/wiki/meshing_OF_SHM.pdf

Regards,
Heena

On Mon, Jun 8, 2020 at 6:22 PM Bruno Blais  wrote:

> Dear all,
> I hope you are doing well.
>
> In my endless quest for robust mesh generation of hex meshes using GMSH, I
> have managed to come up with a very robust strategy to generate hex-only
> meshes
> My only issue (which is a major one) is that this implies that my
> decomposition from tet to hex adds nodes that are not "snapped" to the
> boundary, but that are only linear interpolation of the other node on the
> triangular faces.
> Consequently, my quest remains unfulfilled.
>
> Meshing through high-order and snapping the additional node to a
> high-order mesh from within GMSH is very troublesome and not very robust
> (and also very time consuming). However, an idea came to mind.
> I was wondering if there could be an easy way to "snap" my faces to the
> manifold to which they belong.
>
> My problem is thus the following:
> - Given a triangulation and a manifold
> - Some nodes are exactly on the manifolds (the original nodes of the tets)
> and some are not (the added nodes in the subdivision)
> - What would be the best way to deform mesh so that the non-conforming
> node get deformed to the position which would be implied by the manifold? I
> think I could also make the process more robust by solving an additional
> elasticity equation during the deformation to deform the entire mesh
> instead of just the nodes close to the manifold.
>
>
> Would any of you have a suggestion on how best to achieve the deformation
> of the nodes to match the manifold?
>
>
> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/8d966870-4e33-4915-ad6c-2342018d82c3o%40googlegroups.com
> 
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAG_Oxbi8HmVd26w2ChrtC6yfhCd8k6dV40Kq7apt-sxhUhJodQ%40mail.gmail.com.


Re: [deal.II] KDTree implementation error

2020-07-24 Thread heena patel
Dear Luca,
 Thank you very much. It now works in both
ways. Thanks for advice.

Regards,
Heena

On Fri, Jul 24, 2020 at 12:31 PM luca.heltai  wrote:

> KDTree needs nanoflann to be available. Did you compile deal.II with
> nanoflann exnabled? Check in the summary.log if DEAL_II_WITH_NANOFLANN is
> ON.
>
> RTree, on the other hand, does not require nanoflann, as it is included
> with boost (and it is faster than nanoflann).
>
> L.
>
> > On 24 Jul 2020, at 10:05, heena patel  wrote:
> >
> > Dear Luca,
> > I am using 9.2 version and the
> implementation I try to follow  from your presentation at SISSA 2018 but it
> gives me error. Following are the lines I added to step-1. I want to
> implement K nearest neighbor. I will work on your suggestion.
> > #include 
> > Point<2>  p;
> >KDTree<2> tree(10,triangulation.get_vertices());
> >auto w = tree.get_closest_points(p, 3);
> >
> > Regards,
> > Heena
> >
> >
> > On Fri, Jul 24, 2020 at 8:30 AM Luca Heltai 
> wrote:
> > If you are using version 9.3pre of deal.II, kdtree was removed. Use
> RTree instead, which is faster and more flexible.
> >
> > Luca
> >
> >> Il giorno 24 lug 2020, alle ore 05:41, heena patel 
> ha scritto:
> >>
> >> 
> >> Dear Bruno,
> >>I had already added kdree.h header file,
> check the question again. But it seems it does not read KDTree; something
> is not compatible between class and header file.
> >>
> >> Regards,
> >> Heena
> >>
> >> On Thu, Jul 23, 2020 at 9:03 PM Bruno Turcksin <
> bruno.turck...@gmail.com> wrote:
> >> Heena,
> >>
> >> You are missing an include. Try adding #include
> 
> >>
> >> Best,
> >>
> >> Bruno
> >>
> >> On Thursday, July 23, 2020 at 2:55:53 PM UTC-4, heena patel wrote:
> >>
> >> Dear all,
> >>   I had tried to implement KDTree in step_1
> tutoria and header file for kdtree is added to the codel. It is as follows:
> >>
> >> void first_grid()
> >> {
> >>
> >>   Triangulation<2> triangulation;
> >>
> >>   GridGenerator::hyper_cube(triangulation);
> >>   triangulation.refine_global(4);
> >>   Point<2>  p;
> >>KDTree<2> tree(10,triangulation.get_vertices());
> >>auto w = tree.get_closest_points(p, 3);
> >>   std::ofstream out("grid-1.svg");
> >>   GridOut   grid_out;
> >>   grid_out.write_svg(triangulation, out);
> >>   std::cout << "Grid written to grid-1.svg" << std::endl;
> >> }
> >>
> >>
> >>
> >> It gives me error as below
> >>
> >> /home/heena/Project/examples/step-1/step-1.cc:76:4: error: ‘KDTree’ was
> not declared in this scope
> >> KDTree<2> tree(10,triangulation.get_vertices());
> >> ^~
> >> /home/heena/Project/examples/step-1/step-1.cc:76:4: note: suggested
> alternative: ‘free’
> >> KDTree<2> tree(10,triangulation.get_vertices());
> >> ^~
> >> free
> >> /home/heena/Project/examples/step-1/step-1.cc:76:14: error: ‘tree’ was
> not declared in this scope
> >> KDTree<2> tree(10,triangulation.get_vertices());
> >>   ^~~~
> >> /home/heena/Project/examples/step-1/step-1.cc:76:14: note: suggested
> alternative: ‘free’
> >> KDTree<2> tree(10,triangulation.get_vertices());
> >>   ^~~~
> >>   free
> >>
> >>
> >>
> >> Is there something missing?
> >>
> >>
> >>
> >> Regards,
> >> Heena
> >>
> >> --
> >> 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 dealii+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/d761c989-ef92-4603-8c8e-85ec4eeb3766o%40googlegroups.com
> .
> >>
> >> --
> >> The deal.II project is located at http://www.dealii.org/
> >> For maili

Re: [deal.II] Re: KDTree implementation error

2020-07-24 Thread heena patel
Dear Luca,
I am using 9.2 version and the
implementation I try to follow  from your presentation at SISSA 2018 but it
gives me error. Following are the lines I added to step-1. I want to
implement K nearest neighbor. I will work on your suggestion.
*#include *


*Point<2>  p;   KDTree<2> tree(10,triangulation.get_vertices());   auto w =
tree.get_closest_points(p, 3);*

Regards,
Heena


On Fri, Jul 24, 2020 at 8:30 AM Luca Heltai  wrote:

> If you are using version 9.3pre of deal.II, kdtree was removed. Use RTree
> instead, which is faster and more flexible.
>
> Luca
>
> Il giorno 24 lug 2020, alle ore 05:41, heena patel 
> ha scritto:
>
> 
> Dear Bruno,
>I had already added kdree.h header file,
> check the question again. But it seems it does not read KDTree; something
> is not compatible between class and header file.
>
> Regards,
> Heena
>
> On Thu, Jul 23, 2020 at 9:03 PM Bruno Turcksin 
> wrote:
>
>> Heena,
>>
>> You are missing an include. Try adding #include <
>> deal.II/numerics/kdtree.h
>> <https://dealii.org/current/doxygen/deal.II/kdtree_8h_source.html>>
>>
>> Best,
>>
>> Bruno
>>
>> On Thursday, July 23, 2020 at 2:55:53 PM UTC-4, heena patel wrote:
>>>
>>>
>>> Dear all,
>>>   I had tried to implement KDTree in step_1
>>> tutoria and header file for kdtree is added to the codel. It is as follows:
>>>
>>> void first_grid()
>>> {
>>>
>>>   Triangulation<2> triangulation;
>>>
>>>   GridGenerator::hyper_cube(triangulation);
>>>   triangulation.refine_global(4);
>>>
>>>
>>> *  Point<2>  p;   KDTree<2> tree(10,triangulation.get_vertices());
>>> auto w = tree.get_closest_points(p, 3);*
>>>   std::ofstream out("grid-1.svg");
>>>   GridOut   grid_out;
>>>   grid_out.write_svg(triangulation, out);
>>>   std::cout << "Grid written to grid-1.svg" << std::endl;
>>> }
>>>
>>>
>>>
>>> *It gives me error as below *
>>>
>>> /home/heena/Project/examples/step-1/step-1.cc:76:4: error: ‘KDTree’ was
>>> not declared in this scope
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>> ^~
>>> /home/heena/Project/examples/step-1/step-1.cc:76:4: note: suggested
>>> alternative: ‘free’
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>> ^~
>>> free
>>> /home/heena/Project/examples/step-1/step-1.cc:76:14: error: ‘tree’ was
>>> not declared in this scope
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>>   ^~~~
>>> /home/heena/Project/examples/step-1/step-1.cc:76:14: note: suggested
>>> alternative: ‘free’
>>> KDTree<2> tree(10,triangulation.get_vertices());
>>>   ^~~~
>>>   free
>>>
>>>
>>>
>>> Is there something missing?
>>>
>>>
>>>
>>> Regards,
>>> Heena
>>>
>> --
>> 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 dealii+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/dealii/d761c989-ef92-4603-8c8e-85ec4eeb3766o%40googlegroups.com
>> <https://groups.google.com/d/msgid/dealii/d761c989-ef92-4603-8c8e-85ec4eeb3766o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/CAG_OxbgYqw02b4TnJAvBgWo7dvjRvf7zr6V%2BcBDKE_5hafCDJA%40mail.gmail.com
> <https://groups.google.com/d/msgid/dealii/CAG_OxbgYqw02b4TnJAvBgWo7dvjRvf7zr6V%2BcBDKE_5hafCDJA%40mail.gmail.com?utm_medium=

[deal.II] KDTree implementation error

2020-07-23 Thread heena patel

Dear all,
  I had tried to implement KDTree in step_1 tutoria 
and header file for kdtree is added to the codel. It is as follows:

void first_grid()
{

  Triangulation<2> triangulation;

  GridGenerator::hyper_cube(triangulation);
  triangulation.refine_global(4);


*  Point<2>  p;   KDTree<2> tree(10,triangulation.get_vertices());   auto w 
= tree.get_closest_points(p, 3);*
  std::ofstream out("grid-1.svg");
  GridOut   grid_out;
  grid_out.write_svg(triangulation, out);
  std::cout << "Grid written to grid-1.svg" << std::endl;
}



*It gives me error as below *

/home/heena/Project/examples/step-1/step-1.cc:76:4: error: ‘KDTree’ was not 
declared in this scope
KDTree<2> tree(10,triangulation.get_vertices());
^~
/home/heena/Project/examples/step-1/step-1.cc:76:4: note: suggested 
alternative: ‘free’
KDTree<2> tree(10,triangulation.get_vertices());
^~
free
/home/heena/Project/examples/step-1/step-1.cc:76:14: error: ‘tree’ was not 
declared in this scope
KDTree<2> tree(10,triangulation.get_vertices());
  ^~~~
/home/heena/Project/examples/step-1/step-1.cc:76:14: note: suggested 
alternative: ‘free’
KDTree<2> tree(10,triangulation.get_vertices());
  ^~~~
  free



Is there something missing?



Regards,
Heena

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/03a99ffc-c95e-4198-9aed-f175d703f103o%40googlegroups.com.


Re: [deal.II] Re: KDTree implementation error

2020-07-23 Thread heena patel
Dear Bruno,
   I had already added kdree.h header file,
check the question again. But it seems it does not read KDTree; something
is not compatible between class and header file.

Regards,
Heena

On Thu, Jul 23, 2020 at 9:03 PM Bruno Turcksin 
wrote:

> Heena,
>
> You are missing an include. Try adding #include  <https://dealii.org/current/doxygen/deal.II/kdtree_8h_source.html>>
>
> Best,
>
> Bruno
>
> On Thursday, July 23, 2020 at 2:55:53 PM UTC-4, heena patel wrote:
>>
>>
>> Dear all,
>>   I had tried to implement KDTree in step_1
>> tutoria and header file for kdtree is added to the codel. It is as follows:
>>
>> void first_grid()
>> {
>>
>>   Triangulation<2> triangulation;
>>
>>   GridGenerator::hyper_cube(triangulation);
>>   triangulation.refine_global(4);
>>
>>
>> *  Point<2>  p;   KDTree<2> tree(10,triangulation.get_vertices());   auto
>> w = tree.get_closest_points(p, 3);*
>>   std::ofstream out("grid-1.svg");
>>   GridOut   grid_out;
>>   grid_out.write_svg(triangulation, out);
>>   std::cout << "Grid written to grid-1.svg" << std::endl;
>> }
>>
>>
>>
>> *It gives me error as below *
>>
>> /home/heena/Project/examples/step-1/step-1.cc:76:4: error: ‘KDTree’ was
>> not declared in this scope
>> KDTree<2> tree(10,triangulation.get_vertices());
>> ^~
>> /home/heena/Project/examples/step-1/step-1.cc:76:4: note: suggested
>> alternative: ‘free’
>> KDTree<2> tree(10,triangulation.get_vertices());
>> ^~
>> free
>> /home/heena/Project/examples/step-1/step-1.cc:76:14: error: ‘tree’ was
>> not declared in this scope
>> KDTree<2> tree(10,triangulation.get_vertices());
>>   ^~~~
>> /home/heena/Project/examples/step-1/step-1.cc:76:14: note: suggested
>> alternative: ‘free’
>> KDTree<2> tree(10,triangulation.get_vertices());
>>   ^~~~
>>   free
>>
>>
>>
>> Is there something missing?
>>
>>
>>
>> Regards,
>> Heena
>>
> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/d761c989-ef92-4603-8c8e-85ec4eeb3766o%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/d761c989-ef92-4603-8c8e-85ec4eeb3766o%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAG_OxbgYqw02b4TnJAvBgWo7dvjRvf7zr6V%2BcBDKE_5hafCDJA%40mail.gmail.com.