[deal.II] Segmentation fault after resetting elements of an LA::MPI::Vector

2023-04-30 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.
I am solving two equations iteratively in an MPI framework. The first 
equation is the equilibrium equation (slightly modified) solved in step-8 
while the second equation (Damage equation) is very similar to the Laplace 
equation solved in step-3.
The solution of equilibrium equation depends on the damage solution vector 
and vice versa. To begin with, the damage solution vector is created as 
follows:

(locally_relevant_solution_damage.reinit(locally_owned_dofs_damage,
locally_relevant_dofs_damage,
mpi_communicator);) 

Next, for the first iteration, we need to set the damage solution as 1 for 
certain nodes, as shown:
for (const auto  : dof_handler_damage.active_cell_iterators())
{
if (cell->is_locally_owned())

{
for (const auto vertex_number : cell->vertex_indices())
{
const auto vert = cell->vertex(vertex_number);
int a =  cell->vertex_dof_index(vertex_number, 0);
if (condition is satisfied by the vertex)
{
locally_relevant_solution_damage[a] = 1;
}
else
{
locally_relevant_solution_damage[a] = 0;
}
}
}
}

However, I am getting a segmentation fault when I try to extract any entry 
of locally_relevant_solution_damage. 

I first thought that I needed to use the compress operation, but then I 
read that compressing does not apply to vectors with ghost elements. Now, I 
am unable to figure out what could be causing this segmentation fault.
Error message:
Primary job  terminated normally, but 1 process returned
a non-zero exit code. Per user-direction, the job has been aborted.
--
--
mpirun noticed that process rank 0 with PID 0 on node wasim-OptiPlex-5080 
exited on signal 11 (Segmentation fault).

-- 
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/3b8125ee-119c-4727-a64d-236f2cecb75dn%40googlegroups.com.


Re: [deal.II] Applying boundary conditions to a point on the boundary in MP framework

2023-04-19 Thread Wasim Niyaz Munshi ce21d400
I am running the program in debug mode and this is the error message that I 
get:
Running with PETSc on 1 MPI rank(s)...
Cycle 0:


An error occurred in line <324> of file 

 
in function
static void 
dealii::internal::DoFAccessorImplementation::Implementation::process_dof_index(const
 
dealii::DoFHandler&, unsigned int, unsigned int, unsigned 
int, unsigned int, const std::integral_constant&, 
GlobalIndexType&, const DoFPProcessor&) [with int dim = 2; int spacedim = 
2; int structdim = 0; GlobalIndexType = unsigned int; DoFPProcessor = 
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2, 
2, 0>::]
The violated condition was: 
::dealii::deal_II_exceptions::internals::compare_less_than(obj_level, 
dof_handler.object_dof_indices.size())
Additional information: 
Index 0 is not in the half-open range [0,0). In the current case, this
half-open range is in fact empty, suggesting that you are accessing an
element of an empty collection such as a vector that has not been set
to the correct size.

Stacktrace:
---
#0  ./step-40: void 
dealii::internal::DoFAccessorImplementation::Implementation::process_dof_index<2,
 
2, 0, unsigned int, 
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2, 
2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int, unsigned 
int, unsigned int, std::integral_constant const&)::{lambda(auto:1 
const&, auto:2&)#1}>(dealii::DoFHandler<2, 2> const&, unsigned int, 
unsigned int, unsigned int, unsigned int, std::integral_constant 
const&, unsigned int&, 
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2, 
2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int, unsigned 
int, unsigned int, std::integral_constant const&)::{lambda(auto:1 
const&, auto:2&)#1} const&)
#1  ./step-40: unsigned int 
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2, 
2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int, unsigned 
int, unsigned int, std::integral_constant const&)
#2  ./step-40: dealii::DoFAccessor<2, 2, 2, 
false>::vertex_dof_index(unsigned int, unsigned int, unsigned int) const
#3  ./step-40: Step40::LaplaceProblem<2>::setup_boundary_values()
#4  ./step-40: Step40::LaplaceProblem<2>::run()
#5  ./step-40: main


[wasim-OptiPlex-5080:42036] *** Process received signal ***
[wasim-OptiPlex-5080:42036] Signal: Aborted (6)
[wasim-OptiPlex-5080:42036] Signal code:  (-6)
[wasim-OptiPlex-5080:42036] [ 0] 
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7fc3980c6420]
[wasim-OptiPlex-5080:42036] [ 1] 
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fc397f0100b]
[wasim-OptiPlex-5080:42036] [ 2] 
/lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7fc397ee0859]
[wasim-OptiPlex-5080:42036] [ 3] 
/home/wasim/dealii-candi/deal.II-v9.4.0/lib/libdeal_II.g.so.9.4.0(_ZN6dealii18deal_II_exceptions9internals22do_issue_error_nothrowERKNS_13ExceptionBaseE+0x0)[0x7fc3af7bb9f9]
[wasim-OptiPlex-5080:42036] [ 4] 
./step-40(_ZN6dealii18deal_II_exceptions9internals20issue_error_noreturnINS_18StandardExceptions17ExcIndexRangeTypeImvNS1_17ExceptionHandlingEPKciS8_S8_S8_T_+0x8c)[0x5602ad51a53d]
[wasim-OptiPlex-5080:42036] [ 5] 
./step-40(_ZN6dealii8internal25DoFAccessorImplementation14Implementation17process_dof_indexILi2ELi2ELi0EjZNS2_13get_dof_indexILi2ELi2ELi0EEEjRKNS_10DoFHandlerIXT_EXT0_EEERKSt17integral_constantIiXT1_EEEUlRKT_RT0_E_EEvS8_SC_RT2_RKT3_+0x31f)[0x5602ad52ce3e]
[wasim-OptiPlex-5080:42036] [ 6] 
./step-40(_ZN6dealii8internal25DoFAccessorImplementation14Implementation13get_dof_indexILi2ELi2ELi0EEEjRKNS_10DoFHandlerIXT_EXT0_EEERKSt17integral_constantIiXT1_EE+0x57)[0x5602ad528a2e]
[wasim-OptiPlex-5080:42036] [ 7] 
./step-40(_ZNK6dealii11DoFAccessorILi2ELi2ELi2ELb0EE16vertex_dof_indexEjjj+0xa6)[0x5602ad523a8e]
[wasim-OptiPlex-5080:42036] [ 8] 
./step-40(_ZN6Step4014LaplaceProblemILi2EE21setup_boundary_valuesEv+0x40c)[0x5602ad51f1f4]
[wasim-OptiPlex-5080:42036] [ 9] 
./step-40(_ZN6Step4014LaplaceProblemILi2EE3runEv+0x182)[0x5602ad51c61a]
[wasim-OptiPlex-5080:42036] [10] ./step-40(main+0x7a)[0x5602ad50a2dd]
[wasim-OptiPlex-5080:42036] [11] 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fc397ee2083]
[wasim-OptiPlex-5080:42036] [12] ./step-40(_start+0x2e)[0x5602ad50a16e]
[wasim-OptiPlex-5080:42036] *** End of error message ***
make[3]: *** [CMakeFiles/run.dir/build.make:71: CMakeFiles/run] Aborted 
(core dumped)
make[2]: *** [CMakeFiles/Makefile2:116: CMakeFiles/run.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:123: 

I hope this is what you were asking for. 
Regards
Wasim

On Wednesday, April 19, 2023 at 6:29:56 PM UTC+5:30 d.arnd...@gmail.com 
wrote:

>

[deal.II] Applying boundary conditions to a point on the boundary in MP framework

2023-04-19 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.
I am trying to apply a particular boundary condition at one single point in 
the domain for a problem very similar to step-40. 
I am using the following code to do it:

for (const auto  : dof_handler.active_cell_iterators())
  if (cell->is_locally_owned())

  {
  for (const auto  : cell->face_iterators())

  for (const auto vertex_number : cell->vertex_indices())
  {
  const auto vert = cell->vertex(vertex_number);
  const Point<2>& node = vert;
  if (std::fabs(node(0)<1e-12) )
  {
const unsigned int dof = cell->vertex_dof_index(vertex_number, 0); 
  constraints.add_line(dof);
  constraints.set_inhomogeneity(dof,1);
  } // This set a scalar at node to value 1

  }

  }

However, I am getting a segmentation fault. Kindly provide some help in 
this regard.

Thanks
Wasim

-- 
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/eea6e885-5e7a-4330-b769-4272a70af626n%40googlegroups.com.


Re: [deal.II] Evaluating the l2_norm of an MPI::Vector

2023-04-13 Thread Wasim Niyaz Munshi ce21d400
Thank You Prof. Bangerth. I actually needed the norm of the entire vector
only. I was just curious if there existed a function that did it for each
processor.

Regards
Wasim

On Thu, Apr 13, 2023 at 9:50 PM Wolfgang Bangerth 
wrote:

> On 4/13/23 06:22, Wasim Niyaz Munshi ce21d400 wrote:
> > **
> >
> > Hello everyone. I have a vector distributed over multiple processors. I
> > want to compute the modulus of the entire vector and also the modulus of
> > the portions of vector stored by each process. I would really appreciate
> > some help in this regard.
>
> Wasim:
> For the former operation, vector.l2_norm() works. There are similar
> functions for l1 and linfinity norms.
>
> The latter operation is uncommon, and so there is no function. Why would
> you want to compute the norm of only the elements stored on the current
> process?
>
> Best
>   W.
>
>
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/pxDuRdxQoEo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/d203d5f7-568e-4743-51d3-6388188e5ec0%40colostate.edu
> .
>

-- 
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/CAM8ps5Drpv8fynwsfb3Kyb8qdAXWTJ5Wy3MB3nvXYeUsOexG2Q%40mail.gmail.com.


[deal.II] Evaluating the l2_norm of an MPI::Vector

2023-04-13 Thread Wasim Niyaz Munshi ce21d400
Hello everyone. I have a vector distributed over multiple processors. I 
want to compute the modulus of the entire vector and also the modulus of 
the portions of vector stored by each process. I would really appreciate 
some help in this regard.

Regards
Wasim

-- 
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/e0ca2bee-a5e5-4dd5-89fd-59f1debf2c43n%40googlegroups.com.


Re: [deal.II] Unable to match the performance in step-40

2023-04-07 Thread Wasim Niyaz Munshi ce21d400
I ran a problem with 2000*2000 cells (around 16M DOFs) on 16, 32 and 40 
processors. It took 63 seconds on 16 processors, 74 seconds on 32 
processors and is giving the same memory error for 40 processors. For 52M 
DOfs, I get the memory error for all the 3 cases.

Regards
Wasim

On Thursday, April 6, 2023 at 9:41:21 PM UTC+5:30 Wolfgang Bangerth wrote:

> On 4/6/23 10:06, Wasim Niyaz Munshi ce21d400 wrote:
> > **
> > 
> > Yes, I also had the same feeling. But, when I look at the plot in the 
> tutorial 
> > of step-40 for 52M Dofs, I see that they have solved the problem using 
> just 32 
> > processors also. Can you kindly let me know how much memory is available 
> when 
> > you you run the problem on 32 processors? I get the memory error even 
> when I 
> > use 80 processors (250 GB memory).
>
> Wasim: Why don't you try a problem of intermediate size?
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>
>

-- 
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/e972de87-b8f8-4980-aed1-f7596978b5c1n%40googlegroups.com.


Re: [deal.II] Extracting element solution in step-40

2023-04-07 Thread Wasim Niyaz Munshi ce21d400
Thank You, Prof. Bangerth. 
I have one more doubt about the output of step-40.
For cycle 0, there are 1024 cells (32*32 mesh). So, we have 33 nodes each, 
along x and y. So, shouldn't the number of DOFs be 1089 instead of 4225?

Regards 
Wasim

On Thursday, April 6, 2023 at 11:27:32 PM UTC+5:30 Wolfgang Bangerth wrote:

> On 4/6/23 10:18, Wasim Niyaz Munshi ce21d400 wrote:
> > How do I get the no.of cells owned by the processor?
>
> Triangulation::n_locally_owned_active_cells().
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>

-- 
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/2b5174fe-2358-40b3-b404-1bcdfc332e62n%40googlegroups.com.


Re: [deal.II] Extracting element solution in step-40

2023-04-06 Thread Wasim Niyaz Munshi ce21d400
I appreciate the clarification. I thought that global indexing was no 
longer present as the solution vector is distributed.
I have one more doubt. I want to create a vector (H_vector) that stores 
some value for each Gauss point in the domain.
For a serial problem, I was doing something like this:* H_vector = 
Vector (8*(triangulation.n_active_cells()));*

*8 because the problem is in 3d, so I have 8 Gauss points per cell.*
Now, for a MPI code, this H_vector would also be  *LA::MPI::Vector*, and 
its size should be* 8*no. of cells owned by the processor.*
How do I get the no.of cells owned by the processor?

Thanks and regards
Wasim

On Thursday, April 6, 2023 at 9:24:14 PM UTC+5:30 Wolfgang Bangerth wrote:

> On 4/6/23 06:02, Wasim Niyaz Munshi ce21d400 wrote:
> > 
> > I don't have a solution_vector for a parallel code, but a 
> > locally_relevant_solution. I want to know that, given this 
> > locally_relevant_solution and the cell, how do I get the element_sol?
> > The global_dof will not be helpful here, as the solution_vector is 
> > distributed across a number of processors.
>
> Daniel's question is correct, but to this specific point: A distributed 
> vector (and it's locally relevant incarnation) is still a global vector, 
> indexed by global degree of freedom numbers, and so the code remains 
> correct.
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>

-- 
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/afbbd383-46a9-40cc-9a02-d2b4347898b3n%40googlegroups.com.


Re: [deal.II] Unable to match the performance in step-40

2023-04-06 Thread Wasim Niyaz Munshi ce21d400
Yes, I also had the same feeling. But, when I look at the plot in the
tutorial of step-40 for 52M Dofs, I see that they have solved the problem
using just 32 processors also. Can you kindly let me know how much memory
is available when you you run the problem on 32 processors? I get the
memory error even when I use 80 processors (250 GB memory).

Thanks and regards

Wasim Niyaz
Research scholar
CE Dept.
IITM

On Thu, 6 Apr, 2023, 9:21 pm Wolfgang Bangerth, 
wrote:

> On 4/6/23 01:31, Wasim Niyaz Munshi ce21d400 wrote:
> > **
> >
> > I tried to run step-40 with 52M DOFs on 32 processors. I am using
> > *GridGenerator::subdivided_hyper_rectangle *to create a mesh with
> > 5000*5000 elements. I have a single cycle in my simulation. However, I
> > am running into some memory issues.
> >   I am getting the following error: *Running with PETSc on 32 MPI
> > rank(s)...*
> > *Cycle 0:
> >
> --
> > *
> > *mpirun noticed that process rank 5 with PID 214402 on node tattva
> > exited on signal 9 (Killed)*.
> > I tried with 40 processors (125 GB RAM) but I am getting the same error.
>
> I'm pretty sure you run out of memory. You need a smaller problem, a
> larger machine, or both.
>
> Best
>   W.
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/SP2s3PajYcY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/08b5e423-617a-3df5-9075-a609c819ebba%40colostate.edu
> .
>

-- 
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/CAM8ps5A9%3DPumDHxQB6g%3D6DHbOMY7KoXay3fhrjCK51At%3DunYhw%40mail.gmail.com.


[deal.II] Extracting element solution in step-40

2023-04-06 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.
I want to extract the element solution vector from the global solution once 
the problem is solved in step-40. For a serial code, I would do something 
like this:

*int i=0;*



*for (const auto vertex : cell->vertex_indices()) { int a = 
(cell->vertex_dof_index(vertex, 0)); element_sol[i] =  solution_vector[a];*

*  i=i+1; }*

I don't have a solution_vector for a parallel code, but a 
locally_relevant_solution. I want to know that, given this 
locally_relevant_solution and the cell, how do I get the element_sol?
The global_dof will not be helpful here, as the solution_vector is 
distributed across a number of processors.

Thanks and regards
Wasim


-- 
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/b2834b5b-f4f2-4931-9c5e-3f40d91b0648n%40googlegroups.com.


Re: [deal.II] Unable to match the performance in step-40

2023-04-06 Thread Wasim Niyaz Munshi ce21d400
I tried to run step-40 with 52M DOFs on 32 processors. I am using 
*GridGenerator::subdivided_hyper_rectangle 
*to create a mesh with 5000*5000 elements. I have a single cycle in my 
simulation. However, I am running into some memory issues.
 I am getting the following error: *Running with PETSc on 32 MPI rank(s)...*


*Cycle 
0:--*
*mpirun noticed that process rank 5 with PID 214402 on node tattva exited 
on signal 9 (Killed)*.
I tried with 40 processors (125 GB RAM) but I am getting the same error.
On Wednesday, April 5, 2023 at 11:07:25 PM UTC+5:30 Wolfgang Bangerth wrote:

> On 4/5/23 11:27, Wasim Niyaz Munshi ce21d400 wrote:
> > I am running in release mode. I am attaching the results for cycle 3 for 
> > both debug and release modes. I will try to reproduce the plot of wall 
> > time vs the number of processors for 52M DOFs as given in the tutorial 
> > problem. That would be a better way to compare the performances!
>
> Yes!
>
> As for why your output function is so slow, the only thing I can imagine 
> is that whatever disk you write to is rather slow -- but I don't know 
> for sure.
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>

-- 
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/6a7e7265-9330-4300-bb4c-bc4a31ae54bfn%40googlegroups.com.


Re: [deal.II] Unable to match the performance in step-40

2023-04-05 Thread Wasim Niyaz Munshi ce21d400
I am running in release mode. I am attaching the results for cycle 3 for 
both debug and release modes. I will try to reproduce the plot of wall time 
vs the number of processors for 52M DOFs as given in the tutorial problem. 
That would be a better way to compare the performances!

On Wednesday, April 5, 2023 at 10:24:37 PM UTC+5:30 Wolfgang Bangerth wrote:

>
> Wasim,
>
> > I am trying to run step-40 on my local system and match the performance 
> > against the results given in the tutorial problem. I am running the 
> > problem on a single processor. My total time is significantly less than 
> > that given in the tutorial problem. But my output takes up around 50% of 
> > the total time, which isn't the case in the tutorial problem.
> > I cannot figure out why my total time is significantly less than that in 
> > the tutorial and why my output takes 50% of the total wall clock time.
> > I am attaching both results for reference.
>
> Are you running in debug or release mode?
>
> For reference, here is what I get in debug mode for cycle 3:
>
> Cycle 3:
> Number of active cells: 7096
> Number of degrees of freedom: 31639
> Solved in 11 iterations.
>
>
> +-+++
> | Total wallclock time elapsed since start | 5.84s | |
> | | | |
> | Section | no. calls | wall time | % of total |
> +-+---+++
> | assembly | 1 | 1.85s | 32% |
> | output | 1 | 0.532s | 9.1% |
> | refine | 1 | 2.01s | 34% |
> | setup | 1 | 0.926s | 16% |
> | solve | 1 | 0.52s | 8.9% |
> +-+---+++
>
>
>
> And here for release mode:
>
> Cycle 3:
> Number of active cells: 7096
> Number of degrees of freedom: 31639
> Solved in 11 iterations.
>
>
> +-+++
> | Total wallclock time elapsed since start | 1.07s | |
> | | | |
> | Section | no. calls | wall time | % of total |
> +-+---+++
> | assembly | 1 | 0.0412s | 3.9% |
> | output | 1 | 0.204s | 19% |
> | refine | 1 | 0.282s | 26% |
> | setup | 1 | 0.0349s | 3.3% |
> | solve | 1 | 0.506s | 47% |
> +-+---+++
>
>
> As a general rule, though, these tiny problems are not of great 
> interest. step-40 is written to be run on substantial numbers of 
> processes, on millions or billions of degrees of freedom.
>
> Best
> W.
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>

-- 
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/0a27e90f-1cfd-4f3e-90ef-ba1538863f26n%40googlegroups.com.


[deal.II] Using affine constraints object to apply boundary condition at a vertex

2023-03-12 Thread Wasim Niyaz Munshi ce21d400
I am solving an elasticity problem wherein I have a pin support at one 
vertex. Earlier, I was using std::map object to apply BCs. Now, I am trying 
to solve the same problem using an affine constraint object to apply BCs. 
But, I am facing issues filling my affine constraint object with the 
information corresponding to the vertex with pin support.

I was doing the following for my std::map boundary_values object:

for (const auto  : dof_handler.active_cell_iterators())
{
for (const auto  : cell->face_iterators())

for (const auto vertex_number : cell->vertex_indices())
{
const auto vert = cell->vertex(vertex_number);
if (vertices satisfy the condition)
{

   types::global_dof_index x=
cell->vertex_dof_index(vertex_number, 0);
boundary_values[x] = 0;
types::global_dof_index 
y=
cell->vertex_dof_index(vertex_number, 1);
boundary_values[y] = 0; 
}
}

}

What changes should I do to fill my constraint object with the same 
information?
Thanks and regards
Wasim Niyaz

-- 
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/932c962f-e382-4c73-9ab3-a1486b2624b4n%40googlegroups.com.


[deal.II] Use of std::map boundary_values object instead of constraint object in step-40 tutorail

2023-02-14 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.
I am working on a problem very similar to the Laplace equation solved in 
step-3. I have made some changes to step-3 as I need to. Now, I want to 
solve this problem in parallel. I looked at step-40, which solves the 
Laplace equation in parallel. However, it uses a constraints object to 
apply BCs. Right now, I don't have any hanging nodes to handle, so I used a 
std::map object to apply BCs. I first copy all the local contributions to 
the global matrix and then apply the BCs.
 While going through the documentation of step-40,  I read that *"Copying 
local contributions into the global matrix must include distributing 
constraints and boundary values. In other words, we cannot (as we did in 
step-6 ) first 
copy every local contribution into the global matrix and only in a later 
step take care of hanging node constraints and boundary values."*

If my understanding is correct, then I think the following line of code 
does this job in step-40:
*constraints.distribute_local_to_global(cell_matrix,cell_rhs,local_dof_indices,*
* system_matrix,system_rhs);*
My doubt is whether it is possible to do this(*Copying local contributions 
into the global matrix and distributing boundary values.*) with the 
std::map object or do I need to use a constraint object even though I don't 
have any hanging nodes to handle.

Thanks and regards
Wasim

-- 
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/76972977-2325-4cc3-9822-560e520ba99bn%40googlegroups.com.


Re: [deal.II] Re: Creating a plot in dealii

2023-02-14 Thread Wasim Niyaz Munshi ce21d400
Thank you very much. It was indeed the easiest way to do it.

Regards

Wasim Niyaz
Research scholar
CE Dept.
IITM

On Mon, 13 Feb, 2023, 7:22 pm Bruno Turcksin, 
wrote:

> Hello,
>
> DataOut is made to add data to a mesh. It cannot be used to do what you
> want. The easiest way to do what you want is to write the vectors to a file
> using print() and then do the plot using matlab or python.
>
> Best,
>
> Bruno
>
> On Saturday, February 11, 2023 at 9:27:06 AM UTC-5
> ce21...@smail.iitm.ac.in wrote:
>
>> Hello everyone. I have 2 Vector vectors A and B of the same
>> size,n. I want to plot A vs B (A along x and B along y). I was trying
>> something like this:
>>  DataOut<1,Vector > data_out;
>>   data_out.add_data_vector (A, "A");
>>   data_out.add_data_vector (B, "B");
>>
>>   // Write the Gnuplot file
>>   data_out.build_patches ();
>>   data_out.write_gnuplot (deallog.get_file_stream());
>>  but it gives these errors:
>> error: type/value mismatch at argument 2 in template parameter list for
>> ‘template class dealii::DataOut’
>>  expected a constant of type ‘int’, got ‘dealii::Vector’
>>
>>
>> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/CJH-Z37kLco/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/3a96404f-f7fc-4aa2-83e9-0f35cf8889f6n%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/CAM8ps5C6hPW60_zsmaTCk2M%2B8dstZQDJjrM%3DtgUZY8NmvgWuPg%40mail.gmail.com.


[deal.II] Creating a plot in dealii

2023-02-11 Thread Wasim Niyaz Munshi ce21d400
Hello everyone. I have 2 Vector vectors A and B of the same size,n. 
I want to plot A vs B (A along x and B along y). I was trying something 
like this:
 DataOut<1,Vector > data_out;
  data_out.add_data_vector (A, "A");
  data_out.add_data_vector (B, "B");

  // Write the Gnuplot file
  data_out.build_patches ();
  data_out.write_gnuplot (deallog.get_file_stream());
 but it gives these errors:
error: type/value mismatch at argument 2 in template parameter list for 
‘template class dealii::DataOut’
 expected a constant of type ‘int’, got ‘dealii::Vector’


-- 
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/4adda2b6-751e-43be-8fe3-bd6770e855d7n%40googlegroups.com.


[deal.II] Extracting all the nodes on a particular boundary

2023-01-19 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.
I am trying to extract all the nodes present on a boundary with a 
particular id.
Would anyone be able to help me with this?
Also, for a  vector problem how do I extract a particular dof ( eg. I want 
the global dofs corresponding to the x-displacement of all the nodes on the 
top face)?
I know one way is to use something like : 
cell->vertex_dof_index(vertex_number)
Is there a way to skip the loop over elements and get the required info 
directly using the boundary id?

Thanks and regards
Wasim

-- 
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/df4c585c-180f-49ec-b23b-df8a37eb1633n%40googlegroups.com.


[deal.II] Extracting elements of a SparseMatrix

2023-01-17 Thread Wasim Niyaz Munshi ce21d400
Hello everyone. I am trying to plot load displacement curves for an 
elasticity problem.
For this I need to extract the non-zero elements of my sparse stiffness 
matrix. I tried something like system_matrix[I][j] to extract the ij-th 
entry but it seems this doesn't work for the SparseMatrix.
 Can anyone help me with this?

Thanks and regards
Wasim

-- 
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/ad9d51e9-85e3-4b67-a87b-e82965e41328n%40googlegroups.com.


Re: [deal.II] Assemble system slowing down the program

2023-01-09 Thread Wasim Niyaz Munshi ce21d400
Thank you for pointing that out.

After passing my solution vector as reference the assembly time has reduced
from 2 seconds to 0.2 seconds.

Thanks and regards
Wasim Niyaz
Research scholar
CE Dept.
IITM

On Sun, 8 Jan, 2023, 7:31 pm Jean-Paul Pelteret, 
wrote:

> Hi Wasim,
>
> It looks like you're passing your solution vector by copy for each cell
> that you're assembling on. You probably want to pass it by reference.
>
> Best,
> Jean-Paul
>
> Sent from my mobile device. Please excuse my brevity and any typos.
>
> On Sun, 08 Jan 2023, 14:38 Wasim Niyaz Munshi ce21d400, <
> ce21d...@smail.iitm.ac.in> wrote:
>
>> Thank you Prof. Munch.
>>
>> I am now passing FEValues object as a parameter to the H_plus function.
>> My assemble time has decreased from (4-5 seconds) to around 2 seconds, but
>> it is still nowhere close to the time required if there is no call to
>> h_plus function(say eg. step-3 tutorial problem).
>> I don't expect to match that time but is there still anything that I can
>> do to reduce the assembly time further?
>>
>> Thanks and regards
>> Wasim
>>
>> On Sunday, January 8, 2023 at 4:11:27 PM UTC+5:30 Wasim Niyaz Munshi
>> ce21d400 wrote:
>>
>>> Do I need to make this change in both declaration and definition?
>>> Also, do I need a* const *because then* fe_values.reinit(cell) *will be
>>> discarded?
>>>
>>> Thanks
>>> Wasim
>>>
>>> On Sun, Jan 8, 2023 at 3:44 PM Peter Munch  wrote:
>>>
>>>> Change:
>>>>
>>>> > float H_plus(Vector solution_elastic, const auto cell,const
>>>> unsigned int q_point,
>>>>* FEValues<2> fe_values_damage*);
>>>>
>>>> to:
>>>>
>>>> > float H_plus(Vector solution_elastic, const auto cell,const
>>>> unsigned int q_point,
>>>>* const FEValues<2> & fe_values_damage*);
>>>>
>>>> Peter
>>>> On Sunday, 8 January 2023 at 11:11:34 UTC+1 ce21...@smail.iitm.ac.in
>>>> wrote:
>>>>
>>>>> Thank you, Prof. Munch.
>>>>>
>>>>> I tried to pass the FEValues object as a parameter to the H_plus
>>>>> function as follows:
>>>>>
>>>>> I changed the function declaration from:
>>>>> float H_plus(Vector solution_elastic, const auto cell,const
>>>>> unsigned int q_point);
>>>>> to this:
>>>>> float H_plus(Vector solution_elastic, const auto cell,const
>>>>> unsigned int q_point,
>>>>>* FEValues<2> fe_values_damage*);
>>>>>
>>>>> I made the same change in the function definition also.
>>>>>
>>>>> I also changed the call to my function from:
>>>>> H_plus(solution_elastic,cell,q_index)
>>>>> to this: H_plus(solution_elastic,cell,q_index,*fe_values_damage*)
>>>>>
>>>>> But I am getting the following error:
>>>>> error: use of deleted function ‘dealii::FEValues<2>::FEValues(const
>>>>> dealii::FEValues<2>&)’
>>>>>   761 |{ float H_call =
>>>>> H_plus(solution_elastic,cell,q_index,fe_values_damage);
>>>>>
>>>>>
>>>>> On Sunday, January 8, 2023 at 2:32:24 PM UTC+5:30 peterr...@gmail.com
>>>>> wrote:
>>>>>
>>>>>> You are creating a new instance of FEValues at each quadrature point.
>>>>>> This is a very expensive operation, since there all the shape functions 
>>>>>> are
>>>>>> evaluated. Try to reuse that by passing it to the function as a 
>>>>>> parameter.
>>>>>>
>>>>>> Hope that helps!
>>>>>> Peter
>>>>>>
>>>>>> On Sunday, 8 January 2023 at 09:58:41 UTC+1 ce21...@smail.iitm.ac.in
>>>>>> wrote:
>>>>>>
>>>>>>> Following is my H_plus function:
>>>>>>>
>>>>>>> float PhaseField::H_plus(Vector solution_elastic
>>>>>>> , const auto cell,const unsigned int q_point)
>>>>>>> {
>>>>>>> QGauss<2> quadrature_formula_damage(fe_damage.degree + 1);
>>>>>>>
>>>>>>> FEValues<2> fe_values_damage(fe_damage,
>>>>>>> quadrature_formula_damage,
>>>>>>>

Re: [deal.II] Assemble system slowing down the program

2023-01-08 Thread Wasim Niyaz Munshi ce21d400
Thank you Prof. Munch.

I am now passing FEValues object as a parameter to the H_plus function. My 
assemble time has decreased from (4-5 seconds) to around 2 seconds, but it 
is still nowhere close to the time required if there is no call to h_plus 
function(say eg. step-3 tutorial problem).
I don't expect to match that time but is there still anything that I can do 
to reduce the assembly time further?

Thanks and regards
Wasim

On Sunday, January 8, 2023 at 4:11:27 PM UTC+5:30 Wasim Niyaz Munshi 
ce21d400 wrote:

> Do I need to make this change in both declaration and definition?
> Also, do I need a* const *because then* fe_values.reinit(cell) *will be 
> discarded?
>
> Thanks
> Wasim
>
> On Sun, Jan 8, 2023 at 3:44 PM Peter Munch  wrote:
>
>> Change:
>>
>> > float H_plus(Vector solution_elastic, const auto cell,const 
>> unsigned int q_point,
>>* FEValues<2> fe_values_damage*);
>>
>> to:
>>
>> > float H_plus(Vector solution_elastic, const auto cell,const 
>> unsigned int q_point,
>>* const FEValues<2> & fe_values_damage*);
>>
>> Peter
>> On Sunday, 8 January 2023 at 11:11:34 UTC+1 ce21...@smail.iitm.ac.in 
>> wrote:
>>
>>> Thank you, Prof. Munch.
>>>
>>> I tried to pass the FEValues object as a parameter to the H_plus 
>>> function as follows:
>>>
>>> I changed the function declaration from: 
>>> float H_plus(Vector solution_elastic, const auto cell,const 
>>> unsigned int q_point);
>>> to this:
>>> float H_plus(Vector solution_elastic, const auto cell,const 
>>> unsigned int q_point,
>>>* FEValues<2> fe_values_damage*);
>>>
>>> I made the same change in the function definition also.
>>>
>>> I also changed the call to my function from:
>>> H_plus(solution_elastic,cell,q_index) 
>>> to this: H_plus(solution_elastic,cell,q_index,*fe_values_damage*)
>>>
>>> But I am getting the following error:
>>> error: use of deleted function ‘dealii::FEValues<2>::FEValues(const 
>>> dealii::FEValues<2>&)’
>>>   761 |{ float H_call = 
>>> H_plus(solution_elastic,cell,q_index,fe_values_damage);
>>>
>>>
>>> On Sunday, January 8, 2023 at 2:32:24 PM UTC+5:30 peterr...@gmail.com 
>>> wrote:
>>>
>>>> You are creating a new instance of FEValues at each quadrature point. 
>>>> This is a very expensive operation, since there all the shape functions 
>>>> are 
>>>> evaluated. Try to reuse that by passing it to the function as a parameter.
>>>>
>>>> Hope that helps!
>>>> Peter
>>>>
>>>> On Sunday, 8 January 2023 at 09:58:41 UTC+1 ce21...@smail.iitm.ac.in 
>>>> wrote:
>>>>
>>>>> Following is my H_plus function:
>>>>>
>>>>> float PhaseField::H_plus(Vector solution_elastic
>>>>> , const auto cell,const unsigned int q_point)
>>>>> {
>>>>> QGauss<2> quadrature_formula_damage(fe_damage.degree + 1);
>>>>>
>>>>> FEValues<2> fe_values_damage(fe_damage,
>>>>> quadrature_formula_damage,
>>>>> update_gradients |
>>>>> update_quadrature_points );
>>>>>
>>>>> fe_values_damage.reinit(cell);
>>>>>
>>>>> int node = 0;
>>>>>
>>>>> /* Initialising all strains as zero */
>>>>> float e_xx = 0.000;
>>>>> float e_yy = 0.000;
>>>>> float e_xy = 0.000;
>>>>>
>>>>> /*calculating strains*/
>>>>> for (const auto vertex : cell->vertex_indices())
>>>>> {
>>>>> int a = (cell->vertex_dof_index(vertex, 0));
>>>>> e_xx = e_xx + 
>>>>> solution_elastic[a*2]*fe_values_damage.shape_grad(node, q_point)[0];
>>>>> e_yy = e_yy + 
>>>>> solution_elastic[a*2+1]*fe_values_damage.shape_grad(node, q_point)[1];
>>>>> e_xy = e_xy 
>>>>> +0.5*(solution_elastic[a*2]*fe_values_damage.shape_grad(node, q_point)[1]
>>>>>   
>>>>> 
>>>>>  +solution_elastic[a*2+1]*fe_values_damage.shape_grad(node, q_point)[0]);
>>>>> node = n

Re: [deal.II] Assemble system slowing down the program

2023-01-08 Thread Wasim Niyaz Munshi ce21d400
age= 0;
>>>>
>>>>
>>>> float gc = 0.27; //energy release rate
>>>> float l = 0.015;
>>>> float H;
>>>>
>>>> for (const unsigned int q_index :
>>>> fe_values_damage.quadrature_point_indices())
>>>> {float H_call = H_plus(solution_elastic,cell,q_index);
>>>>
>>>>
>>>> if (H_call > H_vector[4*cell_number + q_index])
>>>> {
>>>> H = H_call;
>>>> }
>>>> else
>>>> {
>>>> H = H_vector[4*cell_number + q_index];
>>>> }
>>>> H_vector_new[4*cell_number + q_index] = H;
>>>> for (const unsigned int i : fe_values_damage.dof_indices())
>>>> {
>>>>
>>>>
>>>> for (const unsigned int j : fe_values_damage.dof_indices())
>>>> {
>>>>
>>>> const auto _q =
>>>> fe_values_damage.quadrature_point(q_index);
>>>>
>>>>
>>>> cell_matrix_damage(i, j) +=
>>>> // contribution to stiffness from -laplace u term
>>>>
>>>> Conductivity_damage(x_q)*fe_values_damage.shape_grad(i, q_index) * //
>>>> kappa*grad phi_i(x_q)
>>>> fe_values_damage.shape_grad(j, q_index) * // grad
>>>> phi_j(x_q)
>>>> fe_values_damage.JxW(q_index)// dx
>>>> +
>>>> // Contribution to stiffness from u term
>>>>
>>>>
>>>> ((1+(2*l*H)/gc)*(1/pow(l,2))*fe_values_damage.shape_value(i, q_index) *
>>>>  // phi_i(x_q)
>>>> fe_values_damage.shape_value(j, q_index) *
>>>> // phi_j(x_q)
>>>> fe_values_damage.JxW(q_index));
>>>> // dx
>>>> }
>>>>
>>>> cell_rhs_damage(i) += (fe_values_damage.shape_value(i, q_index)
>>>> * // phi_i(x_q)
>>>> (2/(l*gc))* H*
>>>> fe_values_damage.JxW(q_index));// dx
>>>> }
>>>> }
>>>>
>>>> /*Adding the local k and local f to global k and global f*/
>>>> cell->get_dof_indices(local_dof_indices);
>>>> for (const unsigned int i : fe_values_damage.dof_indices())
>>>> {
>>>> for (const unsigned int j : fe_values_damage.dof_indices())
>>>> system_matrix_damage.add(local_dof_indices[i],
>>>> local_dof_indices[j],
>>>> cell_matrix_damage(i, j));
>>>>
>>>> system_rhs_damage(local_dof_indices[i]) += cell_rhs_damage(i);
>>>> }
>>>> cell_number = cell_number + 1;
>>>>
>>>> }
>>>>
>>>> Thanks and regards
>>>> Wasim
>>>>
>>>> On Saturday, January 7, 2023 at 11:59:49 PM UTC+5:30 blais...@gmail.com
>>>> wrote:
>>>>
>>>>> There might be many things that can be done to improve the speed of
>>>>> this function. You can ask yourselve the following question as guidance:
>>>>> - Does the function allocate memory?
>>>>> - Could it be inlined?
>>>>> - Are you calling the function inside the DOF loops or inside the
>>>>> quadrature loop?
>>>>>
>>>>> Then I would time the function to measure if this is actually the real
>>>>> culprit or if it could be something else.
>>>>> If you copy/paste the content of your assembly code and the function,
>>>>> I would be glad to give it a look (and I am sure others here will help you
>>>>> too).
>>>>>
>>>>>
>>>>> On Saturday, January 7, 2023 at 12:02:13 a.m. UTC-5
>>>>> ce21...@smail.iitm.ac.in wrote:
>>>>>
>>>>>> Sorry for the confusion. I think I made a mistake while writing the
>>>>>> first email.
>>>>>>
>>>>>> H_plus is being called in Assemble_damage and not assemble_elastic.
>>>>>> It uses elastic solution, cell and gauss point to evaluate strain at a
>>>>>> gauss point. Then some quantity is evaluated based on the strain.
>>>>>>
>>>>>> Similarly I have another function 

Re: [deal.II] Assemble system slowing down the program

2023-01-08 Thread Wasim Niyaz Munshi ce21d400
+
>> // Contribution to stiffness from u term
>>
>> 
>> ((1+(2*l*H)/gc)*(1/pow(l,2))*fe_values_damage.shape_value(i, q_index) *   
>>  // phi_i(x_q)
>> fe_values_damage.shape_value(j, q_index) * // 
>> phi_j(x_q)
>> fe_values_damage.JxW(q_index)); 
>> // dx
>> }
>>
>> cell_rhs_damage(i) += (fe_values_damage.shape_value(i, q_index) * 
>> // phi_i(x_q)
>> (2/(l*gc))* H*
>> fe_values_damage.JxW(q_index));// dx
>> }
>> }
>>
>> /*Adding the local k and local f to global k and global f*/
>> cell->get_dof_indices(local_dof_indices);
>> for (const unsigned int i : fe_values_damage.dof_indices())
>> {
>> for (const unsigned int j : fe_values_damage.dof_indices())
>> system_matrix_damage.add(local_dof_indices[i],
>> local_dof_indices[j],
>> cell_matrix_damage(i, j));
>>
>> system_rhs_damage(local_dof_indices[i]) += cell_rhs_damage(i);
>> }
>> cell_number = cell_number + 1;
>>
>> }
>>
>> Thanks and regards
>> Wasim
>>
>> On Saturday, January 7, 2023 at 11:59:49 PM UTC+5:30 blais...@gmail.com 
>> wrote:
>>
>>> There might be many things that can be done to improve the speed of this 
>>> function. You can ask yourselve the following question as guidance:
>>> - Does the function allocate memory?
>>> - Could it be inlined?
>>> - Are you calling the function inside the DOF loops or inside the 
>>> quadrature loop?
>>>
>>> Then I would time the function to measure if this is actually the real 
>>> culprit or if it could be something else.
>>> If you copy/paste the content of your assembly code and the function, I 
>>> would be glad to give it a look (and I am sure others here will help you 
>>> too).
>>>
>>>
>>> On Saturday, January 7, 2023 at 12:02:13 a.m. UTC-5 
>>> ce21...@smail.iitm.ac.in wrote:
>>>
>>>> Sorry for the confusion. I think I made a mistake while writing the 
>>>> first email.
>>>>
>>>> H_plus is being called in Assemble_damage and not assemble_elastic. It 
>>>> uses elastic solution, cell and gauss point to evaluate strain at a gauss 
>>>> point. Then some quantity is evaluated based on the strain.
>>>>
>>>> Similarly I have another function damage_gauss which is being called in 
>>>> assemble_elastic that evaluates damage at a gauss point using the damage 
>>>> solution, cell and gauss point.
>>>>
>>>> Wasim Niyaz
>>>> Research scholar
>>>> CE Dept.
>>>> IITM
>>>>
>>>> On Sat, 7 Jan, 2023, 10:15 am Wasim Niyaz Munshi ce21d400, <
>>>> ce21...@smail.iitm.ac.in> wrote:
>>>>
>>>>> I use it to evaluate strain at Gauss points. Then, i evaluate some 
>>>>> quantity which is a function of this strain.
>>>>>
>>>>> Wasim Niyaz
>>>>> Research scholar
>>>>> CE Dept.
>>>>> IITM
>>>>>
>>>>> On Sat, 7 Jan, 2023, 3:09 am Wolfgang Bangerth,  
>>>>> wrote:
>>>>>
>>>>>> On 1/6/23 13:53, Wasim Niyaz Munshi ce21d400 wrote:
>>>>>> > I am using 65536 elements. For step-8 the assembly takes very less 
>>>>>> time 
>>>>>> > (around 0.15second) while for my assemble_elastic, it takes around 
>>>>>> 5 seconds. 
>>>>>> > The only difference between my assemble_elastic function and the 
>>>>>> assemble 
>>>>>> > function of step-8 is that for each Gauss point, I additionally  
>>>>>> call a 
>>>>>> > function(H_plus) that takes the laplace solution, the current cell 
>>>>>> and Gauss 
>>>>>> > point as input and evaluates some quantity using this information.
>>>>>> > The H_plus function is called 4*65536 times but the function is 
>>>>>> very simple.
>>>>>> > My doubt is whether such a huge increase in cost (from 0.15 sec to 
>>>>>> 5 sec) is 
>>>>>> > expected for this problem or is there something that I am doing 
>>>>>> that is 
>>>>>> > increasing the cost so much.
>>>>>>
>>>>>> Wasim, the question is what you do with "the laplace solution, the 
>>>>>> current 
>>>>>> cell and Gauss point". If you show us what H_plus does, we may be 
>>>>>> able to advise.
>>>>>>
>>>>>> Best
>>>>>>   W.
>>>>>>
>>>>>> -- 
>>>>>>
>>>>>> 
>>>>>> Wolfgang Bangerth  email: 
>>>>>> bang...@colostate.edu
>>>>>> www: 
>>>>>> http://www.math.colostate.edu/~bangerth/
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> 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 a topic in 
>>>>>> the Google Groups "deal.II User Group" group.
>>>>>> To unsubscribe from this topic, visit 
>>>>>> https://groups.google.com/d/topic/dealii/-6ndTW_k5fQ/unsubscribe.
>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>> dealii+un...@googlegroups.com.
>>>>>> To view this discussion on the web visit 
>>>>>> https://groups.google.com/d/msgid/dealii/895a079c-2b85-b14f-94ee-b4b78336884d%40colostate.edu
>>>>>> .
>>>>>>
>>>>>

-- 
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/27a354d7-6a18-4d6b-a7ef-356f4289b2a6n%40googlegroups.com.


Re: [deal.II] Assemble system slowing down the program

2023-01-08 Thread Wasim Niyaz Munshi ce21d400
 gauss point to evaluate strain at a gauss 
>> point. Then some quantity is evaluated based on the strain.
>>
>> Similarly I have another function damage_gauss which is being called in 
>> assemble_elastic that evaluates damage at a gauss point using the damage 
>> solution, cell and gauss point.
>>
>> Wasim Niyaz
>> Research scholar
>> CE Dept.
>> IITM
>>
>> On Sat, 7 Jan, 2023, 10:15 am Wasim Niyaz Munshi ce21d400, <
>> ce21...@smail.iitm.ac.in> wrote:
>>
>>> I use it to evaluate strain at Gauss points. Then, i evaluate some 
>>> quantity which is a function of this strain.
>>>
>>> Wasim Niyaz
>>> Research scholar
>>> CE Dept.
>>> IITM
>>>
>>> On Sat, 7 Jan, 2023, 3:09 am Wolfgang Bangerth,  
>>> wrote:
>>>
>>>> On 1/6/23 13:53, Wasim Niyaz Munshi ce21d400 wrote:
>>>> > I am using 65536 elements. For step-8 the assembly takes very less 
>>>> time 
>>>> > (around 0.15second) while for my assemble_elastic, it takes around 5 
>>>> seconds. 
>>>> > The only difference between my assemble_elastic function and the 
>>>> assemble 
>>>> > function of step-8 is that for each Gauss point, I additionally  call 
>>>> a 
>>>> > function(H_plus) that takes the laplace solution, the current cell 
>>>> and Gauss 
>>>> > point as input and evaluates some quantity using this information.
>>>> > The H_plus function is called 4*65536 times but the function is very 
>>>> simple.
>>>> > My doubt is whether such a huge increase in cost (from 0.15 sec to 5 
>>>> sec) is 
>>>> > expected for this problem or is there something that I am doing that 
>>>> is 
>>>> > increasing the cost so much.
>>>>
>>>> Wasim, the question is what you do with "the laplace solution, the 
>>>> current 
>>>> cell and Gauss point". If you show us what H_plus does, we may be able 
>>>> to advise.
>>>>
>>>> Best
>>>>   W.
>>>>
>>>> -- 
>>>> 
>>>> Wolfgang Bangerth  email: bang...@colostate.edu
>>>> www: 
>>>> http://www.math.colostate.edu/~bangerth/
>>>>
>>>>
>>>> -- 
>>>> 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 a topic in the 
>>>> Google Groups "deal.II User Group" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/dealii/-6ndTW_k5fQ/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> dealii+un...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/dealii/895a079c-2b85-b14f-94ee-b4b78336884d%40colostate.edu
>>>> .
>>>>
>>>

-- 
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/903b72cb-fb3e-4cf3-b189-9231d434f9can%40googlegroups.com.


Re: [deal.II] Assemble system slowing down the program

2023-01-06 Thread Wasim Niyaz Munshi ce21d400
Sorry for the confusion. I think I made a mistake while writing the first
email.

H_plus is being called in Assemble_damage and not assemble_elastic. It uses
elastic solution, cell and gauss point to evaluate strain at a gauss point.
Then some quantity is evaluated based on the strain.

Similarly I have another function damage_gauss which is being called in
assemble_elastic that evaluates damage at a gauss point using the damage
solution, cell and gauss point.

Wasim Niyaz
Research scholar
CE Dept.
IITM

On Sat, 7 Jan, 2023, 10:15 am Wasim Niyaz Munshi ce21d400, <
ce21d...@smail.iitm.ac.in> wrote:

> I use it to evaluate strain at Gauss points. Then, i evaluate some
> quantity which is a function of this strain.
>
> Wasim Niyaz
> Research scholar
> CE Dept.
> IITM
>
> On Sat, 7 Jan, 2023, 3:09 am Wolfgang Bangerth, 
> wrote:
>
>> On 1/6/23 13:53, Wasim Niyaz Munshi ce21d400 wrote:
>> > I am using 65536 elements. For step-8 the assembly takes very less time
>> > (around 0.15second) while for my assemble_elastic, it takes around 5
>> seconds.
>> > The only difference between my assemble_elastic function and the
>> assemble
>> > function of step-8 is that for each Gauss point, I additionally  call a
>> > function(H_plus) that takes the laplace solution, the current cell and
>> Gauss
>> > point as input and evaluates some quantity using this information.
>> > The H_plus function is called 4*65536 times but the function is very
>> simple.
>> > My doubt is whether such a huge increase in cost (from 0.15 sec to 5
>> sec) is
>> > expected for this problem or is there something that I am doing that is
>> > increasing the cost so much.
>>
>> Wasim, the question is what you do with "the laplace solution, the
>> current
>> cell and Gauss point". If you show us what H_plus does, we may be able to
>> advise.
>>
>> Best
>>   W.
>>
>> --
>> 
>> Wolfgang Bangerth  email: bange...@colostate.edu
>> www: http://www.math.colostate.edu/~bangerth/
>>
>>
>> --
>> 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 a topic in the
>> Google Groups "deal.II User Group" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/dealii/-6ndTW_k5fQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> dealii+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/dealii/895a079c-2b85-b14f-94ee-b4b78336884d%40colostate.edu
>> .
>>
>

-- 
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/CAM8ps5C3ic5EYoSr%3DfQNC2BiGZY3nZYtDCh6%2BX1GSPWN_UG0%2BQ%40mail.gmail.com.


Re: [deal.II] Assemble system slowing down the program

2023-01-06 Thread Wasim Niyaz Munshi ce21d400
I use it to evaluate strain at Gauss points. Then, i evaluate some quantity
which is a function of this strain.

Wasim Niyaz
Research scholar
CE Dept.
IITM

On Sat, 7 Jan, 2023, 3:09 am Wolfgang Bangerth, 
wrote:

> On 1/6/23 13:53, Wasim Niyaz Munshi ce21d400 wrote:
> > I am using 65536 elements. For step-8 the assembly takes very less time
> > (around 0.15second) while for my assemble_elastic, it takes around 5
> seconds.
> > The only difference between my assemble_elastic function and the
> assemble
> > function of step-8 is that for each Gauss point, I additionally  call a
> > function(H_plus) that takes the laplace solution, the current cell and
> Gauss
> > point as input and evaluates some quantity using this information.
> > The H_plus function is called 4*65536 times but the function is very
> simple.
> > My doubt is whether such a huge increase in cost (from 0.15 sec to 5
> sec) is
> > expected for this problem or is there something that I am doing that is
> > increasing the cost so much.
>
> Wasim, the question is what you do with "the laplace solution, the current
> cell and Gauss point". If you show us what H_plus does, we may be able to
> advise.
>
> Best
>   W.
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/-6ndTW_k5fQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/895a079c-2b85-b14f-94ee-b4b78336884d%40colostate.edu
> .
>

-- 
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/CAM8ps5CMp2DGXuhUg9oQyL1hux3ki62j8%3DExQDdR1TMKtiLPOA%40mail.gmail.com.


[deal.II] Assemble system slowing down the program

2023-01-06 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.
I am trying to solve elasticity and laplace equations one after the other. 
The elasticity solution feeds as input to the laplace equation (stiffness 
matrix of laplace equation depends on elasticity solution) and vice versa.
I am using 65536 elements. For step-8 the assembly takes very less time 
(around 0.15second) while for my assemble_elastic, it takes around 5 
seconds. The only difference between my assemble_elastic function and the 
assemble function of step-8 is that for each Gauss point, I additionally  
call a function(H_plus) that takes the laplace solution, the current cell 
and Gauss point as input and evaluates some quantity using this information.
The H_plus function is called 4*65536 times but the function is very simple.
My doubt is whether such a huge increase in cost (from 0.15 sec to 5 sec) 
is expected for this problem or is there something that I am doing that is 
increasing the cost so much.

I am running the code in release mode.

Thanks and regards 
Wasim

-- 
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/7ff1d083-ef44-43f0-b74f-99634a9ab851n%40googlegroups.com.


Re: [deal.II] Re: Solving elasticity and laplace(damage) equation, one after the other.

2022-11-22 Thread Wasim Niyaz Munshi ce21d400
I want to solve the vector problem (elasticity equation) followed by the
scalar problem (Laplace equation) on the *entire *domain. I was creating 2
triangulations because I wanted 2 dofhandler (one for the scalar problem
and one for the vector problem. I wasn't sure if I can associate 2
dofhandlers to the same traingulation). Also, I want to specify different
BC's for elasticity and damage on different parts of the boundary(eg. for
damage all boundaries might have same bcs but for elasticity different bcs
exist at different faces of the square domain).

On Tue, Nov 22, 2022 at 2:25 AM Bruno Turcksin 
wrote:

> Wasim,
>
> Why do you have two different triangulations? Can you have single
> Triangulation and use FE_Nothing ? For example Step-70 solves two different
> equations on different parts of the domain using a single Triangulation.
>
> Best,
>
> Bruno
>
> Le lun. 21 nov. 2022 à 15:27, Wasim Niyaz Munshi ce21d400 <
> ce21d...@smail.iitm.ac.in> a écrit :
>
>> Thank you, Prof. Bruno.
>>
>> I used the above line of code and realized where I was going wrong. When
>> solving the damage equation, I also call a function (let's call it H). This
>> function is needed to find the element stiffness matrix of the damage
>> equation.
>> This function returns some value for a  given quadrature point, cell in
>> the damage mesh and the elasticity solution vector. But, this function H
>> computes that quantity by using the fe_elasticity object.
>> *The error, according to me, comes in this line in H function :
>> fe_values_elastic.reinit(cell);*
>> I need to *reinit *the fe_values_elasticity for each cell, but the
>> problem is that the *cell *I am passing as an argument lives on the
>> traingulation_damage while fe_values_elasticity lives on
>> triangulation_elasticity.
>>
>>
>>
>> On Mon, Nov 21, 2022 at 9:43 PM Bruno Turcksin 
>> wrote:
>>
>>> Wasim,
>>>
>>> Before the line that errors out can you do
>>>
>>> std::cout<get_fe().get_name()<>>
>>> and check that it matches what you have set in FEValues.
>>>
>>> Best,
>>>
>>> Bruno
>>>
>>> Le lun. 21 nov. 2022 à 11:08, Wasim Niyaz Munshi ce21d400 <
>>> ce21d...@smail.iitm.ac.in> a écrit :
>>>
>>>> I am working with 2 DoFHandlers. I checked my code. I am using the
>>>> correct DoFHandlers for the 2 equations.
>>>>
>>>> On Mon, Nov 21, 2022 at 6:58 PM Bruno Turcksin <
>>>> bruno.turck...@gmail.com> wrote:
>>>>
>>>>> Wasim,
>>>>>
>>>>> It's hard to say without seeing any code. Are you working with one or
>>>>> two DoFHandler? If you are working with two DoFHandler, are you sure that
>>>>> you are using the correct one?
>>>>>
>>>>> Best,
>>>>>
>>>>> Bruno
>>>>>
>>>>> On Monday, November 21, 2022 at 5:54:22 AM UTC-5
>>>>> ce21...@smail.iitm.ac.in wrote:
>>>>>
>>>>>> Hello everyone.
>>>>>>
>>>>>> I am trying to solve elasticity and *laplace (damage)* equations in
>>>>>> the same program. The rhs of laplace equation depends on the elasticity
>>>>>> solution vector. Both equations have already been solved in step3 and 8. 
>>>>>> I
>>>>>> am following the same approach. I am creating my objects (like
>>>>>> triangulation_elasticity, fe_elasticity,dof_handler_elasticity) for
>>>>>> elasticity as in step8 and solving the elasticity equation. Everything
>>>>>> works fine till this point.
>>>>>>
>>>>>>
>>>>>> Then I tried to solve the laplace equation using the elasticity
>>>>>> solution. I followed step 3 approach and created the corresponding
>>>>>> objects(triangulation_damage, fe_damage,dof_handler_damage).
>>>>>>
>>>>>> However, I am getting the following error:
>>>>>>
>>>>>> An error occurred in line <4310> of file
>>>>>> 
>>>>>> in function
>>>>>> void dealii::FEValues::reinit(const
>>>>>> dealii::TriaIterator >&) 
>>>>>> [with
>>>>>> bool level_dof_access = false; int dim = 2; int spacedim = 2]
>>>>>> The violated condition was:
>>>>>> static_cast &>(*this->fe) ==
>>>>

Re: [deal.II] Re: Solving elasticity and laplace(damage) equation, one after the other.

2022-11-21 Thread Wasim Niyaz Munshi ce21d400
Thank you, Prof. Bruno.

I used the above line of code and realized where I was going wrong. When
solving the damage equation, I also call a function (let's call it H). This
function is needed to find the element stiffness matrix of the damage
equation.
This function returns some value for a  given quadrature point, cell in the
damage mesh and the elasticity solution vector. But, this function H
computes that quantity by using the fe_elasticity object.
*The error, according to me, comes in this line in H function :
fe_values_elastic.reinit(cell);*
I need to *reinit *the fe_values_elasticity for each cell, but the problem
is that the *cell *I am passing as an argument lives on the
traingulation_damage while fe_values_elasticity lives on
triangulation_elasticity.



On Mon, Nov 21, 2022 at 9:43 PM Bruno Turcksin 
wrote:

> Wasim,
>
> Before the line that errors out can you do
>
> std::cout<get_fe().get_name()<
> and check that it matches what you have set in FEValues.
>
> Best,
>
> Bruno
>
> Le lun. 21 nov. 2022 à 11:08, Wasim Niyaz Munshi ce21d400 <
> ce21d...@smail.iitm.ac.in> a écrit :
>
>> I am working with 2 DoFHandlers. I checked my code. I am using the
>> correct DoFHandlers for the 2 equations.
>>
>> On Mon, Nov 21, 2022 at 6:58 PM Bruno Turcksin 
>> wrote:
>>
>>> Wasim,
>>>
>>> It's hard to say without seeing any code. Are you working with one or
>>> two DoFHandler? If you are working with two DoFHandler, are you sure that
>>> you are using the correct one?
>>>
>>> Best,
>>>
>>> Bruno
>>>
>>> On Monday, November 21, 2022 at 5:54:22 AM UTC-5
>>> ce21...@smail.iitm.ac.in wrote:
>>>
>>>> Hello everyone.
>>>>
>>>> I am trying to solve elasticity and *laplace (damage)* equations in
>>>> the same program. The rhs of laplace equation depends on the elasticity
>>>> solution vector. Both equations have already been solved in step3 and 8. I
>>>> am following the same approach. I am creating my objects (like
>>>> triangulation_elasticity, fe_elasticity,dof_handler_elasticity) for
>>>> elasticity as in step8 and solving the elasticity equation. Everything
>>>> works fine till this point.
>>>>
>>>>
>>>> Then I tried to solve the laplace equation using the elasticity
>>>> solution. I followed step 3 approach and created the corresponding
>>>> objects(triangulation_damage, fe_damage,dof_handler_damage).
>>>>
>>>> However, I am getting the following error:
>>>>
>>>> An error occurred in line <4310> of file
>>>> 
>>>> in function
>>>> void dealii::FEValues::reinit(const
>>>> dealii::TriaIterator >&) [with
>>>> bool level_dof_access = false; int dim = 2; int spacedim = 2]
>>>> The violated condition was:
>>>> static_cast &>(*this->fe) ==
>>>> static_cast &>(cell->get_fe())
>>>> Additional information:
>>>>
>>>>
>>>> * The FiniteElement you provided to FEValues and the FiniteElement
>>>> thatbelongs to the DoFHandler that provided the cell iterator do not
>>>> match*.
>>>>
>>>> Stacktrace:
>>>> ---
>>>> #0  /home/wasim/dealii-candi/deal.II-v9.4.0/lib/libdeal_II.g.so.9.4.0:
>>>> void dealii::FEValues<2,
>>>> 2>::reinit(dealii::TriaIterator
>>>> > const&)
>>>> #1  ./step-200: float
>>>> step200::PhaseField::H_plus>>> 2, false> > >(dealii::Vector,
>>>> dealii::TriaActiveIterator >, unsigned
>>>> int)
>>>> #2  ./step-200: step200::PhaseField::assemble_system_damage()
>>>> #3  ./step-200: step200::PhaseField::damage_mesh()
>>>> #4  ./step-200: main
>>>> -
>>>>
>>>> It says that in assemble_damage, the finite element provided to
>>>> fevalues and that of dof_handler are different.
>>>> I don't know what this exactly means as I am only creating a single
>>>> object,* FE_Q<2>  fe_damage* for solving my damage equation.
>>>>
>>>> Thanks and regards
>>>> Wasim
>>>>
>>> --
>>> 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 a to

Re: [deal.II] Re: Solving elasticity and laplace(damage) equation, one after the other.

2022-11-21 Thread Wasim Niyaz Munshi ce21d400
I am working with 2 DoFHandlers. I checked my code. I am using the correct
DoFHandlers for the 2 equations.

On Mon, Nov 21, 2022 at 6:58 PM Bruno Turcksin 
wrote:

> Wasim,
>
> It's hard to say without seeing any code. Are you working with one or two
> DoFHandler? If you are working with two DoFHandler, are you sure that you
> are using the correct one?
>
> Best,
>
> Bruno
>
> On Monday, November 21, 2022 at 5:54:22 AM UTC-5 ce21...@smail.iitm.ac.in
> wrote:
>
>> Hello everyone.
>>
>> I am trying to solve elasticity and *laplace (damage)* equations in the
>> same program. The rhs of laplace equation depends on the elasticity
>> solution vector. Both equations have already been solved in step3 and 8. I
>> am following the same approach. I am creating my objects (like
>> triangulation_elasticity, fe_elasticity,dof_handler_elasticity) for
>> elasticity as in step8 and solving the elasticity equation. Everything
>> works fine till this point.
>>
>>
>> Then I tried to solve the laplace equation using the elasticity solution.
>> I followed step 3 approach and created the corresponding
>> objects(triangulation_damage, fe_damage,dof_handler_damage).
>>
>> However, I am getting the following error:
>>
>> An error occurred in line <4310> of file
>> 
>> in function
>> void dealii::FEValues::reinit(const
>> dealii::TriaIterator >&) [with
>> bool level_dof_access = false; int dim = 2; int spacedim = 2]
>> The violated condition was:
>> static_cast &>(*this->fe) ==
>> static_cast &>(cell->get_fe())
>> Additional information:
>>
>>
>> * The FiniteElement you provided to FEValues and the FiniteElement that
>>   belongs to the DoFHandler that provided the cell iterator do notmatch*
>> .
>>
>> Stacktrace:
>> ---
>> #0  /home/wasim/dealii-candi/deal.II-v9.4.0/lib/libdeal_II.g.so.9.4.0:
>> void dealii::FEValues<2,
>> 2>::reinit(dealii::TriaIterator
>> > const&)
>> #1  ./step-200: float
>> step200::PhaseField::H_plus> 2, false> > >(dealii::Vector,
>> dealii::TriaActiveIterator >, unsigned
>> int)
>> #2  ./step-200: step200::PhaseField::assemble_system_damage()
>> #3  ./step-200: step200::PhaseField::damage_mesh()
>> #4  ./step-200: main
>> -
>>
>> It says that in assemble_damage, the finite element provided to fevalues
>> and that of dof_handler are different.
>> I don't know what this exactly means as I am only creating a single
>> object,* FE_Q<2>  fe_damage* for solving my damage equation.
>>
>> Thanks and regards
>> Wasim
>>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/cV63qxefdTM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/5f30d3ae-264a-4ff0-ba85-27e6959ecc92n%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/CAM8ps5C1GHxcm18SM8Zyr9hMQvExX-j9tj50NYvg7hN%3D9JZ4tw%40mail.gmail.com.


[deal.II] Solving elasticity and laplace(damage) equation, one after the other.

2022-11-21 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.

I am trying to solve elasticity and *laplace (damage)* equations in the 
same program. The rhs of laplace equation depends on the elasticity 
solution vector. Both equations have already been solved in step3 and 8. I 
am following the same approach. I am creating my objects (like 
triangulation_elasticity, fe_elasticity,dof_handler_elasticity) for 
elasticity as in step8 and solving the elasticity equation. Everything 
works fine till this point. 


Then I tried to solve the laplace equation using the elasticity solution. I 
followed step 3 approach and created the corresponding 
objects(triangulation_damage, fe_damage,dof_handler_damage). 

However, I am getting the following error:

An error occurred in line <4310> of file 
 
in function
void dealii::FEValues::reinit(const 
dealii::TriaIterator >&) [with 
bool level_dof_access = false; int dim = 2; int spacedim = 2]
The violated condition was: 
static_cast &>(*this->fe) == 
static_cast &>(cell->get_fe())
Additional information: 
   

* The FiniteElement you provided to FEValues and the FiniteElement that
belongs to the DoFHandler that provided the cell iterator do notmatch*.

Stacktrace:
---
#0  /home/wasim/dealii-candi/deal.II-v9.4.0/lib/libdeal_II.g.so.9.4.0: void 
dealii::FEValues<2, 
2>::reinit(dealii::TriaIterator 
> const&)
#1  ./step-200: float 
step200::PhaseField::H_plus > >(dealii::Vector, 
dealii::TriaActiveIterator >, unsigned 
int)
#2  ./step-200: step200::PhaseField::assemble_system_damage()
#3  ./step-200: step200::PhaseField::damage_mesh()
#4  ./step-200: main
-

It says that in assemble_damage, the finite element provided to fevalues 
and that of dof_handler are different.
I don't know what this exactly means as I am only creating a single object,* 
FE_Q<2>  fe_damage* for solving my damage equation.

Thanks and regards
Wasim

-- 
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/37f6cbf7-8f15-4bdd-9b5e-a2c8b9668534n%40googlegroups.com.


Re: [deal.II] Setting boundary id's for points instead of faces

2022-10-17 Thread Wasim Niyaz Munshi ce21d400
I printed out my map object after calling set_up_boundary_values and then
after calling assemble_system.
I was making some mistakes in filling the boundary_values in
asseble_system. I was fixing my 2 nodes on the top face in x.
I fixed that now.
But the bottom right node was still getting fixed in x.
Also, the top left node is fixed in x after calling set_up_system, although
it is then given overwritten with the prescribed value of y-displacement
after calling assemble_system.
I am writing the std::map boundary_values object at different instances
1. boundary values after set up bv
0 0
1 0
2 0
3 0
5 0
2.boundary values after assemble system
0 0
1 0
2 0
3 0
5 1.2 //this is prescribed value of y displacement on top face
7 1.2

Then, I commented out the following highlighted lines in
set_up_boundary_values:

const auto vert = cell->vertex(vertex_number);
 if (std::fabs(vert(0) - (0)) < 1e-12 &&
 std::fabs(vert(1) - (0)) < 1e-12)
 {

 types::global_dof_index x_displacement =
 cell->vertex_dof_index(vertex_number, 0);
 types::global_dof_index y_displacement =
 cell->vertex_dof_index(vertex_number, 1);
 types::global_dof_index x_displacement_multiplier =
 cell->vertex_dof_index(vertex_number, 2);
 types::global_dof_index y_displacement_multiplier =
 cell->vertex_dof_index(vertex_number, 3);
 boundary_values[x_displacement] = 0;
 boundary_values[y_displacement] = 0;

*/*boundary_values[x_displacement_multiplier] = 0;
 boundary_values[y_displacement_multiplier] = 0;*/*
 }
 else if (std::fabs(vert(0) - 1) < 1e-12 &&
 std::fabs(vert(1) - (0)) < 1e-12)
 {
 std::cout<<"vert_0 = "<mailto:bang...@colostate.edu>> wrote:
> >      >
> >  > On 10/10/22 07:42, Wasim Niyaz Munshi ce21d400 wrote:
> >  >  > I am trying to solve the elasticity equation on a
> square domain
> >  > (similar to
> >  >  > step 8).
> >  >  > For the patch test I am using just one element.
> >  >  > I am having problems with the application of boundary
> > conditions.
> >  >  > I want to fix the lower left node in both x and y, and
> also
> > fix the lower
> >  >  > right node in y.
> >  >  > The lower right node is free to move in x.
> >  >  > The problem I am facing is that both these nodes are
> on the
> > same face,
> >  > and I
> >  >  > do not know how to specify different values of x
> > displacement for the 2
> >  > nodes
> >  >  > of the same face.
> >  >  >
> >  >  > Is there a way to set boundary id to a node rather
> than to a
> > face?
> >  >
> >  > No -- principally because from a mathematical
> perspective, you
> > can only set
> >  > boundary indicators on parts of the boundary that have
> (d-1)
> > dimensional
> >  > measure larger than zero. Vertices do not satisfy this.
> >  >
> >  > But it is a common thing to do anyway. You might want to
> look
> > at the step-79
> >  > that does something similar.
> >  >
> >  > Best
> >  >W>
> >  >
> >  >
> >  > --
> >  >
> >
>  
> >  > Wolfgang Bangerth  email: bang...@colostate.edu
> >  > <mailto:bang...@colostate.edu>
> >  >  www:
> > http://www.math.colostate.edu/~bangerth/
> > <http://www.math.colostate.edu/~bangerth/>
> >  > <http://www.math.colostate.edu/~bangerth/
> > <http://www.math.colostate.edu/~bangerth/>>
> >  >
> >  > --
> >  > The deal.II project is located at http://www.dealii.org/
> > <
> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.dealii.org%2F=05%7C01%7CWolfgang.Bangerth%40colostate.edu%7C88f4621afd9f400f143408daae99a1fc%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638014272187609218%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=ZmDT8sCi2OoVcip0MYZMha4C1hHOtfNyXM7DfslEON4%3D=0
> >
> >  >
> >   <
> https://nam10.saf

Re: [deal.II] Setting boundary id's for points instead of faces

2022-10-15 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.

I was able to apply the boundary conditions I mentioned earlier:
Fix the lower left node in both x and y, and also fix the lower right node 
in y.
The lower right node is free to move in x.
I am also applying a displacement in y on the top face.

For this problem, both x and y displacement fields are expected to be 
linear.
y displacement filed is as expected.
 I expect my x displacement field to be a linear function of x, zero for 
the left face.
But, somehow, my nodes on the right edge are also being fixed in x. So, x 
displacement is zero everywhere.

I am unable to figure out why this is happening.

I am creating std::map boundary_values object to apply my boundary 
conditions.
First, in setup_boundary_values(), I fill it with the boundary information 
related to bottom 2 nodes.(Similar to step 79)
Next, I use the same boundary_values object to apply  y displacement on the 
top face as shown below:

 VectorTools::interpolate_boundary_values(dof_handler,
 1,

Functions::ConstantFunction<2>(u_x_values,2),

 boundary_values,u_x_mask);
 //imposing u_x=0 on 
top face
  VectorTools::interpolate_boundary_values(dof_handler,
 1,

Functions::ConstantFunction<2>(u_y_values,2),

 boundary_values,u_y_mask
 );//imposing 
u_y=0.05 on top face


Thank You

On Wednesday, October 12, 2022 at 9:59:35 PM UTC+5:30 Wasim Niyaz Munshi 
ce21d400 wrote:

> Thank you Prof. Bangerth.
>
> I was indeed calling the setup_boundary_values() function before call 
> dof_handler.distribute_dofs().
> I made the necessary adjustments.
> It is working fine now
>
> Thanks 
>
> Wasim Niyaz
> Research scholar
> CE Dept.
> IITM
>
> On Tue, 11 Oct, 2022, 7:03 pm Wolfgang Bangerth,  
> wrote:
>
>>
>> Wasim,
>> I imagine you are calling your setup_boundary_values() function before 
>> you 
>> call dof_handler.distribute_dofs()?
>> Best
>>   W.
>>
>> On 10/11/22 05:16, Wasim Niyaz Munshi ce21d400 wrote:
>> > *** Caution: EXTERNAL Sender ***
>> > 
>> > I was using a constraint object to apply the boundary conditions and 
>> component 
>> > mask to deal with hanging nodes and apply x and y displacements 
>> separately.
>> > Now, I want to solve an elasticity problem on a unit square wherein I 
>> want to 
>> > apply a displacement in y direction on top face and have a pin and 
>> roller 
>> > support at lower left and right node respectively.
>> > I tried to do this as follows:
>> > 1. I used the constraint object to apply displacement in y direction on 
>> top face.
>> > 2. I created a std::map boundary_values object to enforce a pin and 
>> roller 
>> > support bc at lower left and right node respectively.
>> > I took a look at step79. They seem to have similar dirichlet bc at the 
>> bottom 
>> > but apply a neumann bc at the top. I followed a similar procedure to 
>> have a 
>> > pin and roller bc at lower left and right node respectively(using the 
>> > setup_boundary_values class as they have done).
>> > 
>> > 
>> > My code throws the following error:
>> > An error occurred in line <324> of file 
>> > 
>> 
>>  
>>
>> > in function
>> >  static void 
>> > 
>> dealii::internal::DoFAccessorImplementation::Implementation::process_dof_index(const
>>  
>>
>> > dealii::DoFHandler&, unsigned int, unsigned int, 
>> unsigned int, 
>> > unsigned int, const std::integral_constant&, 
>> GlobalIndexType&, 
>> > const DoFPProcessor&) [with int dim = 2; int spacedim = 2; int 
>> structdim = 0; 
>> > GlobalIndexType = unsigned int; DoFPProcessor = 
>> > 
>> dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
>>  
>>
>> > 2, 0>::]
>> > The violated condition was:
>> >  
>> ::dealii::deal_II_exceptions::internals::compare_less_than(obj_level, 
>> > dof_handler.object_dof_indices.size())
>> > Additional information:
>> >  Index 0 is not in the half-open range [0,0). In the current case, 
>> this
>> >  half-open range is in fact empty, suggesting that you are 
>> accessing an
>> >  

Re: [deal.II] Re: Trying to increase precision of floating point values in step3 of tutorial

2022-10-15 Thread Wasim Niyaz Munshi ce21d400
Thanks.
It is working

Wasim


On Tuesday, October 11, 2022 at 7:02:05 PM UTC+5:30 bruno.t...@gmail.com 
wrote:

> Sorry, it should be output.precision(12)
>
> Bruno
>
>
> Le mar. 11 oct. 2022 à 09:03, Wasim Niyaz Munshi ce21d400 <
> ce21...@smail.iitm.ac.in> a écrit :
>
>> Did you mean 
>> output.set_precision(12);
>>
>> It gives the following error
>> error: ‘std::ofstream’ {aka ‘class std::basic_ofstream’} has no 
>> member named ‘set_precision’; did you mean ‘std::streamsize 
>> std::ios_base::_M_precision’? (not accessible from this context)
>>
>> I also tried 
>> output.setprecision(12);
>>
>> It also gave the same error
>> error: ‘std::ofstream’ {aka ‘class std::basic_ofstream’} has no 
>> member named ‘setprecision’; did you mean ‘std::streamsize 
>> std::ios_base::_M_precision’? (not accessible from this context)
>>
>> Thanks
>>
>> On Tuesday, October 11, 2022 at 6:00:55 PM UTC+5:30 bruno.t...@gmail.com 
>> wrote:
>>
>>> You want to do something like this:
>>>
>>>   DataOut<2> data_out;
>>>   data_out.attach_dof_handler(dof_handler);
>>>   data_out.add_data_vector(solution, "solution");
>>>
>>>   data_out.build_patches();
>>>
>>>   std::ofstream output("solution.vtk");
>>>   output.set_precisition(12);
>>>   data_out.write_vtk(output);
>>>
>>> Best,
>>>
>>> Bruno
>>>
>>> Le mar. 11 oct. 2022 à 00:48, Wasim Niyaz Munshi ce21d400 <
>>> ce21...@smail.iitm.ac.in> a écrit :
>>>
>>>> I used this to set precision of 12 for my solution vector
>>>> *std::cout << "Solution" << std::setprecision(12) <>>>
>>>> I had to add the following line of code also:
>>>> *#include *
>>>>
>>>> I tried the following to write data to vtk file with a higher 
>>>> precision(12):
>>>> DataOut<2> data_out;
>>>>   data_out.attach_dof_handler(dof_handler);
>>>>   data_out.add_data_vector(*std::setprecision(12)* <>>> "solution");
>>>>   data_out.build_patches();
>>>>
>>>>   std::ofstream output("solution.vtk");
>>>>   data_out.write_vtk(output);
>>>>
>>>> But it gives the following error:
>>>> error: no match for ‘operator<<’ (operand types are 
>>>> ‘std::_Setprecision’ and ‘const dealii::Vector’)
>>>>
>>>> Thanks
>>>>
>>>> On Tuesday, October 11, 2022 at 1:27:54 AM UTC+5:30 Wolfgang Bangerth 
>>>> wrote:
>>>>
>>>>> On 10/10/22 11:45, Wasim Niyaz Munshi ce21d400 wrote: 
>>>>> > So I used set precision function when using the cout to print the 
>>>>> > solution vector. 
>>>>> > With setprecision, the values are printed accurately to machine 
>>>>> precision. 
>>>>> > However, I was still unable to write the values accurately upto 
>>>>> machine 
>>>>> > precision, to a vtk file. 
>>>>>
>>>>> Did you use .setprecision(...) also on the stream that you give to 
>>>>> data_out.write_vtk()? You need to set the precision separately for 
>>>>> each 
>>>>> stream on which you want to output. 
>>>>>
>>>>> Best 
>>>>> W. 
>>>>>
>>>>> -- 
>>>>>  
>>>>>
>>>>> Wolfgang Bangerth email: bang...@colostate.edu 
>>>>> www: http://www.math.colostate.edu/~bangerth/ 
>>>>>
>>>> -- 
>>>>
>>> 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 a topic in the 
>>>> Google Groups "deal.II User Group" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/dealii/8Ud1gkzUbNQ/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> dealii+un...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/dealii/7bad0073-391e-4b5a-8613-0749a664f21fn%40google

Re: [deal.II] Setting boundary id's for points instead of faces

2022-10-12 Thread Wasim Niyaz Munshi ce21d400
Thank you Prof. Bangerth.

I was indeed calling the setup_boundary_values() function before call
dof_handler.distribute_dofs().
I made the necessary adjustments.
It is working fine now

Thanks

Wasim Niyaz
Research scholar
CE Dept.
IITM

On Tue, 11 Oct, 2022, 7:03 pm Wolfgang Bangerth, 
wrote:

>
> Wasim,
> I imagine you are calling your setup_boundary_values() function before you
> call dof_handler.distribute_dofs()?
> Best
>   W.
>
> On 10/11/22 05:16, Wasim Niyaz Munshi ce21d400 wrote:
> > *** Caution: EXTERNAL Sender ***
> >
> > I was using a constraint object to apply the boundary conditions and
> component
> > mask to deal with hanging nodes and apply x and y displacements
> separately.
> > Now, I want to solve an elasticity problem on a unit square wherein I
> want to
> > apply a displacement in y direction on top face and have a pin and
> roller
> > support at lower left and right node respectively.
> > I tried to do this as follows:
> > 1. I used the constraint object to apply displacement in y direction on
> top face.
> > 2. I created a std::map boundary_values object to enforce a pin and
> roller
> > support bc at lower left and right node respectively.
> > I took a look at step79. They seem to have similar dirichlet bc at the
> bottom
> > but apply a neumann bc at the top. I followed a similar procedure to
> have a
> > pin and roller bc at lower left and right node respectively(using the
> > setup_boundary_values class as they have done).
> >
> >
> > My code throws the following error:
> > An error occurred in line <324> of file
> >
> 
>
> > in function
> >  static void
> >
> dealii::internal::DoFAccessorImplementation::Implementation::process_dof_index(const
>
> > dealii::DoFHandler&, unsigned int, unsigned int, unsigned
> int,
> > unsigned int, const std::integral_constant&,
> GlobalIndexType&,
> > const DoFPProcessor&) [with int dim = 2; int spacedim = 2; int structdim
> = 0;
> > GlobalIndexType = unsigned int; DoFPProcessor =
> >
> dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
>
> > 2, 0>::]
> > The violated condition was:
> >
> ::dealii::deal_II_exceptions::internals::compare_less_than(obj_level,
> > dof_handler.object_dof_indices.size())
> > Additional information:
> >  Index 0 is not in the half-open range [0,0). In the current case,
> this
> >  half-open range is in fact empty, suggesting that you are accessing
> an
> >  element of an empty collection such as a vector that has not been
> set
> >  to the correct size.
> >
> > Stacktrace:
> > ---
> > #0  ./step-103: void
> >
> dealii::internal::DoFAccessorImplementation::Implementation::process_dof_index<2,
>
> > 2, 0, unsigned int,
> >
> dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
>
> > 2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int,
> unsigned
> > int, unsigned int, std::integral_constant
> const&)::{lambda(auto:1
> > const&, auto:2&)#1}>(dealii::DoFHandler<2, 2> const&, unsigned int,
> unsigned
> > int, unsigned int, unsigned int, std::integral_constant const&,
> > unsigned int&,
> >
> dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
>
> > 2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int,
> unsigned
> > int, unsigned int, std::integral_constant
> const&)::{lambda(auto:1
> > const&, auto:2&)#1} const&)
> > #1  ./step-103: unsigned int
> >
> dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
>
> > 2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int,
> unsigned
> > int, unsigned int, std::integral_constant const&)
> > #2  ./step-103: dealii::DoFAccessor<2, 2, 2,
> false>::vertex_dof_index(unsigned
> > int, unsigned int, unsigned int) const
> > #3  ./step-103: step103::ElasticProblem::setup_boundary_values()
> > #4  ./step-103: step103::ElasticProblem::run()
> > #5  ./step-103: main
> > --------
> >
> > make[3]: *** [CMakeFiles/run.dir/build.make:71: CMakeFiles/run] Aborted
> (core
> > dumped)
> > make[2]: *** [CMakeFiles/Makefile2:116: CMakeFiles/run.dir/all] Error 2
> > make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/run.dir/rule] Error 2
> > make: *** [Makefile:137: run] Error 2
> >   Is it because I am appl

Re: [deal.II] Re: Trying to increase precision of floating point values in step3 of tutorial

2022-10-11 Thread Wasim Niyaz Munshi ce21d400
Did you mean 
output.set_precision(12);

It gives the following error
error: ‘std::ofstream’ {aka ‘class std::basic_ofstream’} has no 
member named ‘set_precision’; did you mean ‘std::streamsize 
std::ios_base::_M_precision’? (not accessible from this context)

I also tried 
output.setprecision(12);

It also gave the same error
error: ‘std::ofstream’ {aka ‘class std::basic_ofstream’} has no 
member named ‘setprecision’; did you mean ‘std::streamsize 
std::ios_base::_M_precision’? (not accessible from this context)

Thanks

On Tuesday, October 11, 2022 at 6:00:55 PM UTC+5:30 bruno.t...@gmail.com 
wrote:

> You want to do something like this:
>
>   DataOut<2> data_out;
>   data_out.attach_dof_handler(dof_handler);
>   data_out.add_data_vector(solution, "solution");
>
>   data_out.build_patches();
>
>   std::ofstream output("solution.vtk");
>   output.set_precisition(12);
>   data_out.write_vtk(output);
>
> Best,
>
> Bruno
>
> Le mar. 11 oct. 2022 à 00:48, Wasim Niyaz Munshi ce21d400 <
> ce21...@smail.iitm.ac.in> a écrit :
>
>> I used this to set precision of 12 for my solution vector
>> *std::cout << "Solution" << std::setprecision(12) <>
>> I had to add the following line of code also:
>> *#include *
>>
>> I tried the following to write data to vtk file with a higher 
>> precision(12):
>> DataOut<2> data_out;
>>   data_out.attach_dof_handler(dof_handler);
>>   data_out.add_data_vector(*std::setprecision(12)* <> "solution");
>>   data_out.build_patches();
>>
>>   std::ofstream output("solution.vtk");
>>   data_out.write_vtk(output);
>>
>> But it gives the following error:
>> error: no match for ‘operator<<’ (operand types are ‘std::_Setprecision’ 
>> and ‘const dealii::Vector’)
>>
>> Thanks
>>
>> On Tuesday, October 11, 2022 at 1:27:54 AM UTC+5:30 Wolfgang Bangerth 
>> wrote:
>>
>>> On 10/10/22 11:45, Wasim Niyaz Munshi ce21d400 wrote: 
>>> > So I used set precision function when using the cout to print the 
>>> > solution vector. 
>>> > With setprecision, the values are printed accurately to machine 
>>> precision. 
>>> > However, I was still unable to write the values accurately upto 
>>> machine 
>>> > precision, to a vtk file. 
>>>
>>> Did you use .setprecision(...) also on the stream that you give to 
>>> data_out.write_vtk()? You need to set the precision separately for each 
>>> stream on which you want to output. 
>>>
>>> Best 
>>> W. 
>>>
>>> -- 
>>>  
>>> Wolfgang Bangerth email: bang...@colostate.edu 
>>> www: http://www.math.colostate.edu/~bangerth/ 
>>>
>> -- 
>>
> 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 a topic in the 
>> Google Groups "deal.II User Group" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/dealii/8Ud1gkzUbNQ/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> dealii+un...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/7bad0073-391e-4b5a-8613-0749a664f21fn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/dealii/7bad0073-391e-4b5a-8613-0749a664f21fn%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/af85f162-31e4-480a-830e-7a102b81fc95n%40googlegroups.com.


Re: [deal.II] Setting boundary id's for points instead of faces

2022-10-11 Thread Wasim Niyaz Munshi ce21d400
I was using a constraint object to apply the boundary conditions and
component mask to deal with hanging nodes and apply x and y displacements
separately.
Now, I want to solve an elasticity problem on a unit square wherein I want
to apply a displacement in y direction on top face and have a pin and
roller support at lower left and right node respectively.
I tried to do this as follows:
1. I used the constraint object to apply displacement in y direction on top
face.
2. I created a std::map boundary_values object to enforce a pin and roller
support bc at lower left and right node respectively.
I took a look at step79. They seem to have similar dirichlet bc at the
bottom but apply a neumann bc at the top. I followed a similar procedure to
have a pin and roller bc at lower left and right node respectively(using
the setup_boundary_values class as they have done).


My code throws the following error:
An error occurred in line <324> of file

in function
static void
dealii::internal::DoFAccessorImplementation::Implementation::process_dof_index(const
dealii::DoFHandler&, unsigned int, unsigned int, unsigned
int, unsigned int, const std::integral_constant&,
GlobalIndexType&, const DoFPProcessor&) [with int dim = 2; int spacedim =
2; int structdim = 0; GlobalIndexType = unsigned int; DoFPProcessor =
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
2, 0>::]
The violated condition was:
::dealii::deal_II_exceptions::internals::compare_less_than(obj_level,
dof_handler.object_dof_indices.size())
Additional information:
Index 0 is not in the half-open range [0,0). In the current case, this
half-open range is in fact empty, suggesting that you are accessing an
element of an empty collection such as a vector that has not been set
to the correct size.

Stacktrace:
---
#0  ./step-103: void
dealii::internal::DoFAccessorImplementation::Implementation::process_dof_index<2,
2, 0, unsigned int,
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int, unsigned
int, unsigned int, std::integral_constant const&)::{lambda(auto:1
const&, auto:2&)#1}>(dealii::DoFHandler<2, 2> const&, unsigned int,
unsigned int, unsigned int, unsigned int, std::integral_constant
const&, unsigned int&,
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int, unsigned
int, unsigned int, std::integral_constant const&)::{lambda(auto:1
const&, auto:2&)#1} const&)
#1  ./step-103: unsigned int
dealii::internal::DoFAccessorImplementation::Implementation::get_dof_index<2,
2, 0>(dealii::DoFHandler<2, 2> const&, unsigned int, unsigned int, unsigned
int, unsigned int, std::integral_constant const&)
#2  ./step-103: dealii::DoFAccessor<2, 2, 2,
false>::vertex_dof_index(unsigned int, unsigned int, unsigned int) const
#3  ./step-103: step103::ElasticProblem::setup_boundary_values()
#4  ./step-103: step103::ElasticProblem::run()
#5  ./step-103: main


make[3]: *** [CMakeFiles/run.dir/build.make:71: CMakeFiles/run] Aborted
(core dumped)
make[2]: *** [CMakeFiles/Makefile2:116: CMakeFiles/run.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/run.dir/rule] Error 2
make: *** [Makefile:137: run] Error 2
 Is it because I am applying Dirichlet bc using two objects, constraints
and boundary_values?


Thank you



On Mon, Oct 10, 2022 at 7:28 PM Wolfgang Bangerth 
wrote:

> On 10/10/22 07:42, Wasim Niyaz Munshi ce21d400 wrote:
> > I am trying to solve the elasticity equation on a square domain (similar
> to
> > step 8).
> > For the patch test I am using just one element.
> > I am having problems with the application of boundary conditions.
> > I want to fix the lower left node in both x and y, and also fix the
> lower
> > right node in y.
> > The lower right node is free to move in x.
> > The problem I am facing is that both these nodes are on the same face,
> and I
> > do not know how to specify different values of x displacement for the 2
> nodes
> > of the same face.
> >
> > Is there a way to set boundary id to a node rather than to a face?
>
> No -- principally because from a mathematical perspective, you can only
> set
> boundary indicators on parts of the boundary that have (d-1) dimensional
> measure larger than zero. Vertices do not satisfy this.
>
> But it is a common thing to do anyway. You might want to look at the
> step-79
> that does something similar.
>
> Best
>   W>
>
>
> --
> 
> Wolfgang Bangerth  email: 

Re: [deal.II] Re: Trying to increase precision of floating point values in step3 of tutorial

2022-10-10 Thread Wasim Niyaz Munshi ce21d400
I used this to set precision of 12 for my solution vector
*std::cout << "Solution" << std::setprecision(12) <*

I tried the following to write data to vtk file with a higher precision(12):
DataOut<2> data_out;
  data_out.attach_dof_handler(dof_handler);
  data_out.add_data_vector(*std::setprecision(12)* <’)

Thanks

On Tuesday, October 11, 2022 at 1:27:54 AM UTC+5:30 Wolfgang Bangerth wrote:

> On 10/10/22 11:45, Wasim Niyaz Munshi ce21d400 wrote:
> > So I used set precision function when using the cout to print the 
> > solution vector.
> > With setprecision, the values are printed accurately to machine 
> precision.
> > However, I was still unable to write the values accurately upto machine 
> > precision, to a vtk file.
>
> Did you use .setprecision(...) also on the stream that you give to 
> data_out.write_vtk()? You need to set the precision separately for each 
> stream on which you want to output.
>
> Best
> W.
>
> -- 
> 
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>

-- 
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/7bad0073-391e-4b5a-8613-0749a664f21fn%40googlegroups.com.


Re: [deal.II] Re: Trying to increase precision of floating point values in step3 of tutorial

2022-10-10 Thread Wasim Niyaz Munshi ce21d400
What I meant was that when I was using cout to print my solution vector, it
was printed to 6 or 7 decimal only.
I had a feeling that deal.ii was evaluating the results accurately to
machine precision but it was truncating it to 6 or 7 decimals, when writing
it to the vtk file or outputting it on the terminal.
So I used set precision function when using the cout to print the solution
vector.
With setprecision, the values are printed accurately to machine precision.
However, I was still unable to write the values accurately upto machine
precision, to a vtk file.
I will have a look at vtu format.
Hope it will work.

Thanks

Wasim Niyaz

On Mon, 10 Oct, 2022, 7:22 pm Wolfgang Bangerth, 
wrote:

> On 10/10/22 07:48, Wasim Niyaz Munshi ce21d400 wrote:
> >
> > I used the setprecision function to output the result to desired
> accuracy.
>
> Can you show how you actually do that? I don't think that deal.II
> overrides
> what you do, though I may be wrong.
>
>
> > However, I noticed that deal.ii writes the output to vtk file only upto
> > certain precision(6).
> > Is there a way to write output to the vtk file according to required
> precision?
>
> The easiest way may be to just use the VTU file format instead of the VTK
> format. It is binary and so outputs as many digits as there are in a
> 32-bit
> floating point number.
>
> Best
>   W.
>
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/8Ud1gkzUbNQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/9cddced1-732c-a340-2b8e-ea40b4747363%40colostate.edu
> .
>

-- 
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/CAM8ps5CmC%3DDWDhC%3DiAha1Pgk1HFPSCSmtkiNEE5Yd22LmzSK8g%40mail.gmail.com.


[deal.II] Re: Trying to increase precision of floating point values in step3 of tutorial

2022-10-10 Thread Wasim Niyaz Munshi ce21d400
Thank you.

I used the setprecision function to output the result to desired accuracy.
However, I noticed that deal.ii writes the output to vtk file only upto 
certain precision(6).
Is there a way to write output to the vtk file according to required 
precision?

Thank you

On Thursday, September 29, 2022 at 6:13:28 PM UTC+5:30 bruno.t...@gmail.com 
wrote:

> Hello,
>
> What do you mean exactly by "deal.ii outputs the solution vector values 
> upto 7 decimal"? Which function are you using? If you are using a function 
> like std::cout to inspect the values in the vector, the default precision 
> is 6 (I think) but it can be changed using std::setprecision (see 
> https://en.cppreference.com/w/cpp/io/manip/setprecision)
>
> Best,
>
> Bruno
>
> On Thursday, September 29, 2022 at 4:24:49 AM UTC-4 
> ce21...@smail.iitm.ac.in wrote:
>
>> Hello everyone.
>> Is there a way to increase precision of floating point values in deal.ii? 
>> I am modifying step3 and checking my solution against a linear exact 
>> solution. I am getting machine precision (around 10^-16 ) for 4,16...4096 
>> elements. However, when I refine further, I am getting an error of 10^-6 
>> and 10^-5 for 16384 and 65536 elements. What I realized is that deal.ii 
>> outputs the solution vector values upto 7 decimal places only and hence the 
>> error begins to show up for very fine meshes.
>> Is there a way to increase my precision to say upto 14 decimal places?
>> I tried using long double instead of double for my various variables but 
>> it gives the following error:
>> error: no matching function for call to 
>> ‘interpolate_boundary_values(dealii::DoFHandler<2, 2>&, int, 
>> dealii::Functions::ConstantFunction<2>, std::map> double>&)’
>>   296 |boundary_values);
>>
>> Thank You!
>>
>

-- 
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/6b3efbaa-c3b9-4da6-a907-11db4d979been%40googlegroups.com.


[deal.II] Setting boundary id's for points instead of faces

2022-10-10 Thread Wasim Niyaz Munshi ce21d400
Hi everyone.
I am trying to solve the elasticity equation on a square domain (similar to 
step 8).
For the patch test I am using just one element.
I am having problems with the application of boundary conditions.
I want to fix the lower left node in both x and y, and also fix the lower 
right node in y.
The lower right node is free to move in x.
The problem I am facing is that both these nodes are on the same face, and 
I do not know how to specify different values of x displacement for the 2 
nodes of the same face. 

Is there a way to set boundary id to a node rather than to a face?

Thank you

-- 
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/df869e93-3455-4848-a31c-44d2a3115894n%40googlegroups.com.


[deal.II] Trying to increase precision of floating point values in step3 of tutorial

2022-09-29 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.
Is there a way to increase precision of floating point values in deal.ii? I
am modifying step3 and checking my solution against a linear exact
solution. I am getting machine precision (around 10^-16 ) for 4,16...4096
elements. However, when I refine further, I am getting an error of 10^-6
and 10^-5 for 16384 and 65536 elements. What I realized is that deal.ii
outputs the solution vector values upto 7 decimal places only and hence the
error begins to show up for very fine meshes.
Is there a way to increase my precision to say upto 14 decimal places?
I tried using long double instead of double for my various variables but it
gives the following error:
error: no matching function for call to
‘interpolate_boundary_values(dealii::DoFHandler<2, 2>&, int,
dealii::Functions::ConstantFunction<2>, std::map&)’
  296 |boundary_values);

Thank You!

-- 
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/CAM8ps5AYPvhGZvQr3zT9cNezgQZYS3BQ5vzATuBz5bkeWOHY%2BA%40mail.gmail.com.


Re: [deal.II] Using component mask to apply displacement boundary conditions

2022-09-19 Thread Wasim Niyaz Munshi ce21d400
Thank You.
I went through the documentations and realized that in step 8 Dirichlet
boundary conditions are being applied using the constraint object. Hence,
we only need to pass the constraint object to
VectorTools::interpolate_boundary_values. No need to pass the
'boundary_values' std::map object.
I made that change as follows:
FEValuesExtractors::Scalar u_x(0);
FEValuesExtractors::Scalar u_y(1);

ComponentMask u_x_mask = fe.component_mask(u_x);
ComponentMask u_y_mask = fe.component_mask(u_y);

double u_x_values = 1.2;
double u_y_values = 0.0;

VectorTools::interpolate_boundary_values(dof_handler,
 0,

 Functions::ZeroFunction(dim),
 constraints); //imposing both
u_x and u_y to be zero on boudaries with id=0
VectorTools::interpolate_boundary_values(dof_handler,
 1,
Functions::ConstantFunction(dim)(u_x_values,2),constraints,u_x_mask);
 //imposing u_x=1.2 on
boudaries with id=1
VectorTools::interpolate_boundary_values(dof_handler,
 1,

 Functions::ConstantFunction(dim)(u_y_values,2),constraints,u_y_mask
 );//imposing u_y=0 on
boudaries with id=1

Now, it gives the following error:
error: no match for call to ‘(dealii::Functions::ConstantFunction<2,
double>) (double&, int)’
 Functions::ConstantFunction(dim)(u_x_values,dim),constraints,u_x_mask);
It gives the same error for u_y also.

On Mon, Sep 19, 2022 at 3:09 AM Wolfgang Bangerth 
wrote:

> On 9/18/22 06:51, Wasim Niyaz Munshi ce21d400 wrote:
> > VectorTools::interpolate_boundary_values(dof_handler,
> >   1,
> >
>  Functions::ConstantFunction(dim)(u_y_values,2),boundary_values,u_y_mask,
> >   constraints);
>
> You are providing both the 'boundary_values' std::map object, and the
> 'constraints' AffineConstraints object. There are two versions of this
> function, one for each kind, but you can only provide one of these objects
> to
> each.
>
> Best
>   W.
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
> --
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/jEO3kQ-d9Cg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/408279cc-c18c-9526-8931-705ddd7c6b12%40colostate.edu
> .
>

-- 
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/CAM8ps5AHaNgLDun5optaTf_JhFqQ6-_R9Jx-rCiUQuhVTfLh-g%40mail.gmail.com.


[deal.II] Using component mask to apply displacement boundary conditions

2022-09-18 Thread Wasim Niyaz Munshi ce21d400
Hello everyone.

I am trying to specify x and y displacements separately in step 8 of the 
tutorial programs.
I am doing it as follows:

FEValuesExtractors::Scalar u_x(0);
FEValuesExtractors::Scalar u_y(1);

ComponentMask u_x_mask = fe.component_mask(u_x);
ComponentMask u_y_mask = fe.component_mask(u_y);

std::map boundary_values;
double u_x_values = 1.2; //x_displacment to be prescribed
double u_y_values = 0.0; //y_displacment to be prescribed

VectorTools::interpolate_boundary_values(dof_handler,
 0,

 Functions::ZeroFunction(dim),
 constraints); //imposing both 
u_x and u_y to be zero on boudaries with id=0
VectorTools::interpolate_boundary_values(dof_handler,
 1,
 
Functions::ConstantFunction(dim)(u_x_values,2),boundary_values,u_x_mask,
 constraints);//imposing 
u_x=1 on boudaries with id=1
VectorTools::interpolate_boundary_values(dof_handler,
 1,

 Functions::ConstantFunction(dim)(u_y_values,2),boundary_values,u_y_mask,

 constraints);//imposing u_y=0 on boudaries with id=1

It gives the following error:
error: no matching function for call to ‘interpolate_boundary_values.
I think I am doing mistake in the arguments but I am unable to figure it 
out.
Can someone please help me with this? I am just getting started with deal.ii

Thank You!

-- 
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/bf7b808e-5970-40d6-a27a-28ec26576acfn%40googlegroups.com.