Re: [deal.II] make hanging node constraint for locally refined mesh

2020-05-26 Thread Phạm Ngọc Kiên
Dear Prof. Wolfgang Bangerth, Thank you very much. I will change the codes as your guidance. Yours sincerely, Kien Vào Th 4, 27 thg 5, 2020 vào lúc 12:58 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 5/26/20 7:30 PM, Phạm Ngọc Kiên wrote: > > > > Thus, the

Re: [deal.II] make hanging node constraint for locally refined mesh

2020-05-26 Thread Phạm Ngọc Kiên
5, 2020 vào lúc 05:42 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 5/26/20 1:34 AM, Phạm Ngọc Kiên wrote: > > /* const dealii::FullMatrix& dealii::FiniteElement<, > > >::constraints(const dealii::internal::SubfaceCase&) > const &

[deal.II] make hanging node constraint for locally refined mesh

2020-05-26 Thread Phạm Ngọc Kiên
Dear all, When I try to create a locally refined mesh by the following codes: * GridGenerator::hyper_cube(triangulation, 0, 1);Point center (0.5, 0.5, 0.5);triangulation.refine_global(5); for (auto cell : triangulation.active_cell_iterators()) {

Re: [deal.II] Loading a .msh mesh of big size into parallel::distributed::triangulation using p4est

2019-10-19 Thread Phạm Ngọc Kiên
** > *** Switched to Release mode. Now recompile with: $ make > *** > [100%] Built target release > $ make > *Scanning dependencies of target step-40* > [ 50%] Building CXX object CMakeFiles/step-40.dir/step-40.cc.o > [100%] *Linking CXX executable step-40* > [100%] Built targe

Re: [deal.II] How to get the coordinates of dof with FE_Raviart_Thomas?

2019-09-23 Thread Phạm Ngọc Kiên
Dear Prof. Wolfgang Bangerth, The function fe.has_support_points() returns false. This means that the FE_Raviart_Thomas does not have support points. I think generalized_support_points are used for this type of finite element. For FE_RaviartThomas

[deal.II] How to get the coordinates of dof with FE_Raviart_Thomas?

2019-09-23 Thread Phạm Ngọc Kiên
Hi colleagues, With FE_Raviart_Thomas in 3D, the dofs are defined normal to the faces of each cell. For example, if we use FE_RaviartThomas (0), then in a cell we have 6 dofs defined

Re: [deal.II] How to set material id with MPI

2019-08-29 Thread Phạm Ngọc Kiên
01:29 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 8/22/19 11:58 PM, Phạm Ngọc Kiên wrote: > > > > I have a question for parallel::distributed::Triangulation > > When 2 cells share 1 edge, but they are living in 2 different MPI > processes, > > how

Re: [deal.II] How to set material id with MPI

2019-08-22 Thread Phạm Ngọc Kiên
> On 7/17/19 7:46 PM, Phạm Ngọc Kiên wrote: > > I am trying to write codes to find a subset of cells that I want to set > their > > material id. > > The codes run well with 1 processor. > > However, when testing with more than 1 processor, the codes did wrong > thi

Re: [deal.II] How to sum up several LinearAlgebraPETSc::MPI::Vector completely_distributed_solution ?

2019-08-02 Thread Phạm Ngọc Kiên
ã viết: > On 8/1/19 9:24 PM, Phạm Ngọc Kiên wrote: > > > > However, I do not know if I can sum up all the > completely_distributed_solution > > from the different right-hand-sides in order to get a vector of solution. > > Could you please tell me how to do

[deal.II] How to sum up several LinearAlgebraPETSc::MPI::Vector completely_distributed_solution ?

2019-08-01 Thread Phạm Ngọc Kiên
Dear colleagues, I am trying to solve my problem with different right_hand_sides. For each right hand side, we can solve by the codes: LinearAlgebraPETSc::MPI::Vector completely_distributed_solution(locally_owned_dofs, mpi_communicator); SolverControl solver_control;

[deal.II] How to set material id with MPI

2019-07-17 Thread Phạm Ngọc Kiên
Hi colleagues, I am trying to write codes to find a subset of cells that I want to set their material id. The codes run well with 1 processor. However, when testing with more than 1 processor, the codes did wrong things. This is because each processor only owns a subset of cells with distributed

Re: [deal.II] Re: How can we get the factorized system matrix when using SparseDirectMUMPS?

2019-06-28 Thread Phạm Ngọc Kiên
Dear Sebastian, Thank you very much. I will try the way you mentioned. Best regards, Kien Vào Th 6, 28 thg 6, 2019 vào lúc 16:31 'Sebastian Stark' via deal.II User Group đã viết: > Kien, > > >> I looked through the documentation in Deal.II before. >> I think it could be done, too. It would be

Re: [deal.II] Re: How can we get the factorized system matrix when using SparseDirectMUMPS?

2019-06-27 Thread Phạm Ngọc Kiên
ã viết: > Kien, > > On Wednesday, June 26, 2019 at 10:20:38 PM UTC-4, Phạm Ngọc Kiên wrote: >> >> Hi colleagues, >> I am trying to build codes using PETScWrappers::SparseDirectMUMPS >> solver. >> Step-62 shows a very good example for using it. >&g

[deal.II] How can we get the factorized system matrix when using SparseDirectMUMPS?

2019-06-26 Thread Phạm Ngọc Kiên
Hi colleagues, I am trying to build codes using PETScWrappers::SparseDirectMUMPS solver. Step-62 shows a very good example for using it. However, I really want to know if we can choose the factorization method in MUMPS by deal.II codes. The second question is: do we have a way to get the

Re: [deal.II] The shape function on physical cell in hexahedral is not parallel with the edge (FeNedelecSZ and FENedelec)

2019-05-07 Thread Phạm Ngọc Kiên
want to carry out finite element method with unstructured grid. Best, Pham Ngoc Kien Vào Th 3, 16 thg 4, 2019 vào lúc 14:43 Phạm Ngọc Kiên < ngockien.lea...@gmail.com> đã viết: > Hi, > I have written this code for testing purpose. > In case of a rotated cube, the shape functions se

Re: [deal.II] Re: Process finished with exit code 9 ?

2019-05-03 Thread Phạm Ngọc Kiên
t returns the exit code? If not it could be that you are > running out of memory see here > <https://stackoverflow.com/questions/40888164/c-program-crashes-with-exit-code-9-sigkill> > . > > Best, > > Bruno > > On Thursday, May 2, 2019 at 2:59:31 AM UTC-4, Phạm Ngọc Kiê

[deal.II] Process finished with exit code 9 ?

2019-05-02 Thread Phạm Ngọc Kiên
Hi all, When I am trying to solve my problem using the direct solver UMFPACK, my computer can not finish it and return a line: *Process finished with exit code 9* However, the codes did run on my computer before. Could you please tell me the reason? Thank you very much. Pham Ngoc Kien -- The

Re: [deal.II] The shape function on physical cell in hexahedral is not parallel with the edge (FeNedelecSZ and FENedelec)

2019-04-15 Thread Phạm Ngọc Kiên
it would be easier for you to help me with the attachment below. Thank you very much. Best regards. Pham Ngoc Kien Vào Th 2, 15 thg 4, 2019 vào lúc 21:48 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 4/11/19 9:17 PM, Phạm Ngọc Kiên wrote: > > Testing for an edge whose

[deal.II] The shape function on physical cell in hexahedral is not parallel with the edge (FeNedelecSZ and FENedelec)

2019-04-11 Thread Phạm Ngọc Kiên
Hi colleagues, When using FE_NedelecSZ in my code. Testing for an edge whose global vertices located from (0,0,0) to (0,0,1) in real coordinates. With a cube I get the shape function vectors at the dof related to the edge, for examples, (0,0,0), (0,0,-0.25), (0,0,-0.5), (0,0,-1), which are

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-04-10 Thread Phạm Ngọc Kiên
nge...@colostate.edu> đã viết: > On 4/10/19 7:59 PM, Phạm Ngọc Kiên wrote: > > > > In finite element method, we transform the integral from the physical to > the > > reference coordinate system. > > Thus to compute \int \varphi_i(x) \varphi_j(x) dx in a physical cell,

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-04-10 Thread Phạm Ngọc Kiên
Bangerth < bange...@colostate.edu> đã viết: > On 4/9/19 8:51 PM, Phạm Ngọc Kiên wrote: > > I am a little bit confusing with the integral over all cell : > > *\int \varphi_i(x) *\varphi_j(x) * dx *on physical cell is approximated > > by computing *\sum { \varphi_hat_i(x_hat) *

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-04-09 Thread Phạm Ngọc Kiên
much for your quick answers. Best regards. Vào Th 4, 10 thg 4, 2019 vào lúc 00:15 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 4/9/19 1:27 AM, Phạm Ngọc Kiên wrote: > > I looked through the codes for Fe_Nedelec_SZ in the library and found > that the > > fe_val

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-04-09 Thread Phạm Ngọc Kiên
er way to compute the integral in this case? I would like to thank you very much in advance. Best regards, Pham Ngoc Kien Vào Th 5, 28 thg 3, 2019 vào lúc 16:30 Phạm Ngọc Kiên < ngockien.lea...@gmail.com> đã viết: > Thank you very much > I will dig deeper from your suggestion. > Best

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-03-28 Thread Phạm Ngọc Kiên
Thank you very much I will dig deeper from your suggestion. Best regards, Pham Ngoc Kien Vào Th 5, 28 thg 3, 2019 vào lúc 12:25 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 3/27/19 6:56 PM, Phạm Ngọc Kiên wrote: > > Yes, I know that the source should be integra

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-03-27 Thread Phạm Ngọc Kiên
regards, Vào Th 4, 27 thg 3, 2019 vào lúc 22:25 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 3/27/19 2:52 AM, Phạm Ngọc Kiên wrote: > > > > My question for assembling the system is > > when I set the cell right hand side is none zero at a given dofs (source &

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-03-27 Thread Phạm Ngọc Kiên
gt; đã viết: > On 3/22/19 5:39 PM, Phạm Ngọc Kiên wrote: > > I mean the solution here is the solution vector I get after solving the > > system. > > > > I think that there should be a way to scale the entries to get the > solution. > > > > Could you please g

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-03-22 Thread Phạm Ngọc Kiên
Dear Daniel, I wrote this function to get the solution. It is the function that I showed you in other email about using get_function_values and VectorTools::point_value. The inputs mapping, dof_handler, solution are taken from the main class solving the system. I mean the solution here is the

Re: [deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-03-21 Thread Phạm Ngọc Kiên
Dear Prof.Wolfgang, I checked again my codes and looked at the shape functions on the edge. When I looked at one edge of a cell with its degree of freedom, for example, with the edge length is 1, I saw the shape functions at quadrature points on the edge is (0,0,1). Thus, if I calculate the

[deal.II] Why the FENedelec and FENedelecSZ 's shape functions change versus edge length?

2019-03-19 Thread Phạm Ngọc Kiên
Hi colleagues, When testing my codes with FENedelec and FENedelecSZ elements, I saw that the shape functions change versus the mesh size. I think that for each edge of a cell, the shape functions for the degree of freedom related to that edge are scaled with the inverse edge length. For

Re: [deal.II] what is the different between VectorTools::point_value and fe_values.get_function_values()?

2019-03-18 Thread Phạm Ngọc Kiên
Thank you very much for your guidance. I think that with the H curl conforming element like FeNedelec or FeNedelecSZ, my solution vector has continuous tangential component, isn't it? Thus, Is there some where I can see my vector solution is discontinuous? Can I check it by visualization? I think

Re: [deal.II] what is the different between VectorTools::point_value and fe_values.get_function_values()?

2019-03-14 Thread Phạm Ngọc Kiên
9 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 3/14/19 1:28 AM, Phạm Ngọc Kiên wrote: > > > > So for the first function > > VectorTools::point_value(dof_handler,solution,point,values); > > I can specify the observed point in real coordiante, solution vector

Re: [deal.II] what is the different between VectorTools::point_value and fe_values.get_function_values()?

2019-03-14 Thread Phạm Ngọc Kiên
I print them out by: std::cout<<"result with get_function_values real: \t"<< temp_solution_re[0] << ", "< > On 3/13/19 8:21 PM, Phạm Ngọc Kiên wrote: > > I am testing my codes for output the solution at a point in my numerical > model. > &g

Re: [deal.II] what is the different between VectorTools::point_value and fe_values.get_function_values()?

2019-03-14 Thread Phạm Ngọc Kiên
].get_function_values(solution, temp_solution_re); I really want to know which one is the solution for my vector in x,y,z direction? Best regards, Pham Ngoc Kien Vào Th 5, 14 thg 3, 2019 vào lúc 14:08 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 3/13/19 8:21 PM, Phạm Ngọc K

[deal.II] what is the different between VectorTools::point_value and fe_values.get_function_values()?

2019-03-13 Thread Phạm Ngọc Kiên
Hi colleagues, I am testing my codes for output the solution at a point in my numerical model. I saw in the library 2 ways to do this task. The first one is to use VectorTools::point_value() function and the second one is fe_values.get_function_values(). For the latter function, I am using the

Re: [deal.II] How to get the coordinates of a given degree of freedom on an edge?

2019-02-22 Thread Phạm Ngọc Kiên
ollowing output for two different orders.: > order: 2 fe.dofs_per_cell: 288 > order: 3 fe.dofs_per_cell: 600 > > A better fix might be to pass the order into the constructor, or to use a > parameter handler to choose the order at run-time. > > I hope that this helps you unders

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-21 Thread Phạm Ngọc Kiên
very much. Best, Kien Vào Th 5, 21 thg 2, 2019 vào lúc 23:38 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 2/20/19 7:01 PM, Phạm Ngọc Kiên wrote: > > I tested in my codes using > > > > template > > CSEM::CSEM() > > ://mapping(1)

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-20 Thread Phạm Ngọc Kiên
Dear Daniel, I think that I can address my problem with the source now after looking through the way we create dofs in FE_NedelecSZ. I tested in my codes using template CSEM::CSEM() ://mapping(1), dof_handler(triangulation), fe(FE_NedelecSZ(order), 1, //(order),

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-19 Thread Phạm Ngọc Kiên
to get the higher order dofs for calculation? Thank you very much. Best, Kien Vào Th 4, 20 thg 2, 2019 vào lúc 07:44 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 2/19/19 12:03 AM, Phạm Ngọc Kiên wrote: > > I currently try to solve the electromagnetics pr

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
that I need to check if the source point is on an edge when assembling the right hand side vector. Could you please tell me help me about this? Best regards, Pham Ngoc Kien Vào Th 3, 19 thg 2, 2019 vào lúc 15:45 Wolfgang Bangerth < bange...@colostate.edu> đã viết: > On 2/18/19 10:47 PM,

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
ike to thank you very much! Best, Pham Ngoc Kien Vào Th 3, 19 thg 2, 2019 vào lúc 14:47 Phạm Ngọc Kiên < ngockien.lea...@gmail.com> đã viết: > Hi, > I have tried with the methods described in the FAQ and figured out that: > 1. As I used edge-based element (FE_NedelecSZ), I que

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
eal position of a given degree of freedom. Could you please tell me how to get the position of a degree of freedom in the reference cell? Thank you very much for your help. Best, Pham Ngoc Kien Vào Th 3, 19 thg 2, 2019 vào lúc 11:47 Phạm Ngọc Kiên < ngockien.lea...@gmail.com> đã viết: >

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
Yes, thank you very much. I will dig deeper into this. Best, Pham Ngoc Kien Vào Th 3, 19 thg 2, 2019 vào lúc 11:23 Bruno Turcksin < bruno.turck...@gmail.com> đã viết: > Pham Ngoc Kien, > > Le lun. 18 févr. 2019 à 19:33, Phạm Ngọc Kiên > a écrit : >

Re: [deal.II] Re: How to get the coordinates of a given degree of freedom on an edge?

2019-02-18 Thread Phạm Ngọc Kiên
ently-Asked-Questions#how-to-get-the-mapped-position-of-support-points-of-my-element> > in the FAQ. > > Best, > > Bruno > > On Monday, February 18, 2019 at 12:20:48 AM UTC-5, Phạm Ngọc Kiên wrote: >> >> Dear colleagues, >> I am working with FE_Nedelec_SZ e

[deal.II] How to get the coordinates of a given degree of freedom on an edge?

2019-02-17 Thread Phạm Ngọc Kiên
Dear colleagues, I am working with FE_Nedelec_SZ element (edge-based finite element) in Deal.II (version 9.0.0). For my current problem, I need to get the global coordinates of a given degree of freedom on and edge. Do we have any code for this task? I have also thought of using material_id

Re: [deal.II] output vector solution to vtk file

2019-01-25 Thread Phạm Ngọc Kiên
dges and interior of each > cell. > > I hope that this helped! > > Best, > Jean-Paul > > On 25 Jan 2019, at 07:35, Phạm Ngọc Kiên > wrote: > > Dear Prof. Wolfgang Bangerth, > I am a newbie with deal.II library, and I have a question in this topic. > Thus, I p

Re: [deal.II] output vector solution to vtk file

2019-01-24 Thread Phạm Ngọc Kiên
Dear Prof. Wolfgang Bangerth, I am a newbie with deal.II library, and I have a question in this topic. Thus, I put my question here. I can now output my vector values results using DataPostprocessor class into vtk file. However, when I opened the output file, I see some data points in the file