Re: [deal.II] visualization tool alternatives?

2020-04-05 Thread Felipe Orellana
Hi Greg,

 I am a Paraview user. As far as I know.. almost everything you can do
in Paraview can be done in Visit and the reciprocal viceversa
statement is also true.

 There may be some features or processes for which one software is
better than the other. But I am unaware.

  Sometimes, the versions of a software, coupled with your OS and its
version, may cause issues, or favors.. (e.g. I have tried three of
these combinations, and my most favorable has been Paraview 4.4.0 over
Ubuntu 14.04).

let us know how you progress.

cheers,
Felipe

On Mon, 6 Apr 2020 at 09:43, rpresley716  wrote:
>
> Hi,
>
> I was wondering if there is alternative visualization tool other than VisIt 
> introduced and recommended in the tutorials? I didn't successfully build the 
> visit despite of opting for the minimal build. I also tried the VTK option of 
> GLVis (which is based on the MFEM library) and it doesn't seem to be working 
> (according to its official VTK documentation it seems to be exclusively 
> dealing with mesh files)
>
> Thanks for your time in advance,
>
> Best regards,
> Greg
>
> --
> 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/c9e4e122-26e1-47bf-8d1c-0af5c6c32d2a%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/CABP9zGWq6uRzOOyA1rrUd%3D%2BhBRfN00Laqtc1hzGBxjC1P9UQ_g%40mail.gmail.com.


Re: [deal.II] visualization tool alternatives?

2020-04-05 Thread Wolfgang Bangerth

On 4/5/20 7:43 PM, rpresley716 wrote:


I was wondering if there is alternative visualization tool other than VisIt 
introduced and recommended in the tutorials? I didn't successfully build 
 
the visit despite of opting for the minimal build. I also tried the VTK option 
of GLVis (which is based on the MFEM library) and it doesn't seem to be 
working (according to its official VTK documentation it seems to be 
exclusively dealing with mesh files)


On the Visit website, there is a "Download" section where you can get binaries 
for common platforms. That's what everyone uses, given that building is such a 
pain.


Paraview is the other big alternative (see Felipe's answe), and there's also a 
video lecture that explains its user interface.


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 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/afc64bff-1844-4b6b-c90a-f1e21942b68d%40colostate.edu.


Re: [deal.II] visualization tool alternatives?

2020-04-05 Thread Felipe Orellana
 Hi Greg,

 Have you heard of Paraview?

it's good.

Felipe

On Mon, 6 Apr 2020 at 09:43, rpresley716  wrote:
>
> Hi,
>
> I was wondering if there is alternative visualization tool other than VisIt 
> introduced and recommended in the tutorials? I didn't successfully build the 
> visit despite of opting for the minimal build. I also tried the VTK option of 
> GLVis (which is based on the MFEM library) and it doesn't seem to be working 
> (according to its official VTK documentation it seems to be exclusively 
> dealing with mesh files)
>
> Thanks for your time in advance,
>
> Best regards,
> Greg
>
> --
> 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/c9e4e122-26e1-47bf-8d1c-0af5c6c32d2a%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/CABP9zGUK6s_qahUe_S7%2BeH0uduLMV6XtaXWfRw8h6HV5wsg7CQ%40mail.gmail.com.


[deal.II] visualization tool alternatives?

2020-04-05 Thread rpresley716
Hi,

I was wondering if there is alternative visualization tool other than VisIt 
introduced and recommended in the tutorials? I didn't successfully build 
 the visit despite of 
opting for the minimal build. I also tried the VTK option of GLVis (which 
is based on the MFEM library) and it doesn't seem to be working (according 
to its official VTK documentation it seems to be exclusively dealing with 
mesh files)

Thanks for your time in advance,

Best regards,
Greg

-- 
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/c9e4e122-26e1-47bf-8d1c-0af5c6c32d2a%40googlegroups.com.


[deal.II] Debug to identify pairs of DoFs that are co-lated and correspond to the components.

2020-04-05 Thread Lex Lee
 

Hello all,


I designed a coupled Laplace problem to play with ConstraintMatrix for 
coupled components.  On face \Gamma_4 and \Gamma_2, I let u=0.5v-0.5, 
v=2u+1, respectively .

 


[image: Screen Shot 2020-04-05 at 4.14.41 PM.png]

Both u and v use the same finite element: FE_Q<*dim*>(1), 1, and 
'block_component (2, 0)' is used to store the relevant scalar values. 


Below is the pieces of incompleted codes for my trying to identify pairs of 
DoFs that are coupled and correspond to u and v components. 


However, this part doesn't work. 


Could you kindly help me check some lines? Thanks!






*for* (*const* *auto*  : dof_handler.active_cell_iterators())

  {

  *for* (*unsigned* *int* face_number = 0; face_number < GeometryInfo<
*dim*>::faces_per_cell; ++face_number)

  {

  *if* (cell->face(face_number)->at_boundary() &&

  ( cell->face(face_number)->boundary_id() == 4 ) )

  {


  std::vector<*unsigned* *int*> local_face_dof_indices (fe.dofs_per_face
);

  //unsigned int n_nodes=fe.dofs_per_face/2.0;//n_node=1 dofs=u,v

  {

  cell->face(face_number)->get_dof_indices (local_face_dof_indices);

  std::vector<*unsigned* *int*> u_i(fe.dofs_per_face),v_i(fe.
dofs_per_face);

  *unsigned* *int* component;

  {

  *for* (*unsigned* *int* i=0; ihttp://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/1d7faba0-ae5b-428a-8b40-4701551732cc%40googlegroups.com.


Re: [deal.II] Difficulty setting manifold with Opencascade using gmsh mesh + salome STEP (or IGES) - Step-54

2020-04-05 Thread Bruno Blais
Dear Jean-Paul, what you wrote in the FAQ is very clear. If I find 
additional elements as I play with the functionnality I will add it to the 
FAQ. Thanks for adding this section.
Best
Bruno


On Friday, 3 April 2020 16:11:05 UTC-4, Jean-Paul Pelteret wrote:
>
> Dear Bruno,
>
> I guess that it would be best to mention this in the tutorial itself, but 
> in the mean time I wrote a segment about it in the FAQ:
>
> https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#how-do-i-ensure-that-my-refined-grid-is-correct-when-using-cad-geometry
> Please feel free to edit it as you see fit. Never having used this 
> functionality in the library before, I hope that I have correctly 
> interpreted and massages what Luca had detailed.
>
> Best,
> Jean-Paul
>
> On 03 Apr 2020, at 15:55, Bruno Blais > 
> wrote:
>
> Dear Jean-Paul,
> Do you think it should be added to the wiki page or as additional 
> information to step-54? I have a bit on my hands, but i'd be glad to work 
> to make the information readily available. Clearly I would not have found 
> that out without Luca's help. 
> Best
> Bruno
>
>
> On Friday, 3 April 2020 09:43:33 UTC-4, Jean-Paul Pelteret wrote:
>>
>> Dear Bruno,
>>
>> I’m glad that you managed to solve this issue with Luca’s aid. I think 
>> that the information and workflow that Luca gave was really valuable. Would 
>> you care to add this to the Wiki page?
>>
>> Best,
>> Jean-Paul
>>
>> On 03 Apr 2020, at 06:03, Bruno Blais  wrote:
>>
>> Ciao Luca,
>> It works perfectly now even with regular GMSH triangulation (see movie). 
>> Now I understand the difference and how to set it correctly.
>> Thank you very much for the help :)!
>>
>>
>> On Thursday, 2 April 2020 11:31:42 UTC-4, luca.heltai wrote:
>>>
>>> Bruno, it seems like you are attaching your faces to the *boundary* 
>>> manifold. Let me try to explain what is happening. 
>>>
>>> In the code for step-54, there is a wire that is used to describe the 
>>> manifold of the *boundary* of the surface (a curve of dimension one 
>>> embedded in dimension three). This is generated by the wire that identifies 
>>> the boundary of the TopoDS shape of the face. The manifold attached to it 
>>> is an ArcLengthProjectionManifold, where mid points on the curve are added 
>>> by computing the distance in arc length, and taking the point in the middle 
>>> w.r.t. this length. 
>>>
>>> In your code with more than one cell, you are not assigning *just the 
>>> boundary faces* to the wire, but *all* faces (including the one in the 
>>> middle of your surface, delimitating the two cells). Intermediate points on 
>>> those lines will be projected (correctly) on the boundary wire (that’s what 
>>> your movie shows). 
>>>
>>> Of course any point that is in the middle of the surface does *not* 
>>> belong to the *boundary wire*, and you’ll get an exception when trying to 
>>> construct the midpoint of an *edge* that belongs to the interior of the 
>>> domain, with manifold id 2 (which corresponds to a manifold that describes 
>>> *the boundary* of your topology, not its surface). 
>>>
>>> With two cells, the internal edge (the only edge that does not belong to 
>>> the boundary) should *not* have id 2. If you set its id to 2, the result is 
>>> that a point which is in the middle of the edge, is actually in the midlle 
>>> of the two points *when running along the curve that describes the 
>>> boundary*, hence you get the distortion you show in the movie. 
>>>
>>> Try adding a check to the faces in which you set the manifold id to 2 
>>> only if the face is at the boundary. 
>>>
>>> The principle is: 
>>> 1. start from the lowest codimension objects, identify how to deform 
>>> them. In your case, cells of a Tria<2,3> are quads, that should deform as a 
>>> TopoDS_FACE. 
>>> 2. Attach your favorite manifold to the TopoDS_Face (I’d personally only 
>>> use NormalToMeshProjectionManifold) using 
>>> cell->set_all_manifold_ids(manifold_id) (Notice the use of 
>>> set_all_manifold_ids, and **not** set_manifold_id: you want all children of 
>>> these objects to belong to the same manifold, in particular you want all 
>>> faces that are internal, i.e., that are shared between two obects with the 
>>> same manifold id, to inherit the same manifold id). 
>>> 3. Go one codimension lower: in your case, curves (for 3d meshes, 
>>> surfaces). Follow the same rule as above, setting all_manifold_ids on faces 
>>> that you know should follow a known codimension one geometry (a known 
>>> TopoDS_EDGE, or TopoDS_WIRE). In this case I’d only use 
>>> ArcLengthProjectionManifold objects, attached to the wires that identify 
>>> your geometry. 
>>>
>>> Doing things in this order guarantees that internal edges get the 
>>> correct manifold id, which, in your case, is not happening. 
>>>
>>> Best, 
>>> Luca. 
>>>
>>>
>>>
>>> > On 1 Apr 2020, at 17:32, Bruno Blais  wrote: 
>>> > 
>>> > So my investigation on this issue continues... 
>>> > It seems the core of my issues stem 

[deal.II] Re: ABOUT ASSEMBLING RIGHT HAND SIDE

2020-04-05 Thread Xiang Sun
For correction, the right code for the second method is 
for (; cell != endc; ++cell) {
  local_rhs = 0;
  fe_values.reinit(cell);
  fe_values.get_function_values(old_solution, old_sol_values);
  for (unsigned int q = 0; q < n_q_points; ++q ){
for (unsigned int i = 0; i < dofs_per_cell; ++i) {
  const double phi_i = fe_values.shape_value(i, q);
  local_rhs(i) += old_sol_values[q] * phi_i * fe_values.JxW(q);
}

  }
  cell->get_dof_indices(local_dof_indices);
  for (unsigned int i = 0; i < dofs_per_cell; ++i) {
system_rhs(local_dof_indices[i]) += local_rhs(i);
  }
}




On Saturday, April 4, 2020 at 11:18:12 PM UTC-7, Xiang Sun wrote:
>
> Hi, I am implementing the backward Euler method to solve a time-dependent 
> problem like u(n+1)= h*f(n+1)+u(n). n is the nth time step. h is the time 
> step length. f is a function of time. I tried two ways to assemble the 
> system right-hand side(rhs). 
>
> One is to form a mass matrix first, then time the old value of u at the 
> node. This way is similar to Step-26. The code is like
> mass_matrix.vmult(system_rhs, old_solution);
>
> The other way is to get the value of u at quadrature points by 
> interpolation, then do the integral in cells to get the local rhs, finally 
> assemble the system rhs by the local rhs. This method is from Step-31 and 
> shown in the following code. 
>
> for (; cell != endc; ++cell) {
>   local_rhs = 0;
>   fe_values.reinit(cell);
>   fe_values.get_function_values(old_solution, old_sol_values);
>   for (unsigned int q = 0; q < n_q_points; ++q ){
> for (unsigned int i = 0; i < dofs_per_cell; ++i) {
>   const double phi_i = fe_values.shape_value(i, q);
>   local_rhs(i) += old_sol_values[q] * phi_i * fe_values.JxW(q);
> }
> 
>   }
>   cell->get_dof_indices(local_dof_indices);
>   for (unsigned int i = 0; i < dofs_per_cell; ++i) {
> system_rhs(local_dof_indices[i]) += local_rhs(i)*0;
>   }
> }
>
> I thought these two methods should give the same answer, but they can't. I 
> don't know where I made a mistake. Thank you very much. 
>
>

-- 
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/25bcc8e2-effb-40c6-9410-a91a0a088c3f%40googlegroups.com.


[deal.II] ABOUT ASSEMBLING RIGHT HAND SIDE

2020-04-05 Thread Xiang Sun
Hi, I am implementing the backward Euler method to solve a time-dependent 
problem like u(n+1)= h*f(n+1)+u(n). n is the nth time step. h is the time 
step length. f is a function of time. I tried two ways to assemble the 
system right-hand side(rhs). 

One is to form a mass matrix first, then time the old value of u at the 
node. This way is similar to Step-26. The code is like
mass_matrix.vmult(system_rhs, old_solution);

The other way is to get the value of u at quadrature points by 
interpolation, then do the integral in cells to get the local rhs, finally 
assemble the system rhs by the local rhs. This method is from Step-31 and 
shown in the following code. 

for (; cell != endc; ++cell) {
  local_rhs = 0;
  fe_values.reinit(cell);
  fe_values.get_function_values(old_solution, old_sol_values);
  for (unsigned int q = 0; q < n_q_points; ++q ){
for (unsigned int i = 0; i < dofs_per_cell; ++i) {
  const double phi_i = fe_values.shape_value(i, q);
  local_rhs(i) += old_sol_values[q] * phi_i * fe_values.JxW(q);
}

  }
  cell->get_dof_indices(local_dof_indices);
  for (unsigned int i = 0; i < dofs_per_cell; ++i) {
system_rhs(local_dof_indices[i]) += local_rhs(i)*0;
  }
}

I thought these two methods should give the same answer, but they can't. I 
don't know where I made a mistake. Thank you very much. 

-- 
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/6887c68e-64c3-4e74-a53f-64775f467a3b%40googlegroups.com.