[deal.II] Doubt regarding constraints

2016-09-05 Thread RAJAT ARORA
Hello all, I have a question regarding use of constraints when using parallel programming. Suppose I want to constraint dof1 owned by processor 1 to be equal to dof2 owned by processor 2. I can do that by calling ConstraintMatrix constraints; constraints.reinit(locally_relevant_dofs); cons

Re: [deal.II] merging geometries(geo files) in gmsh for computational geometry definition

2016-09-05 Thread Wolfgang Bangerth
Marek, I have prepared slightly better mesh - without "doubling" in the intersection, see attachment. However I got error on reading in the mesh file. n error occurred in line <1447> of file in function void dealii::GridIn::read_msh(std::istream&) [with int dim = 3; int spacedim = 3; std:

Re: [deal.II] Re: Creating my own constraints matrix for applying dirichlet bc

2016-09-05 Thread Wolfgang Bangerth
On 09/05/2016 09:32 AM, Praveen C wrote: So if I loop over all non-artificial cells instead of locally owned cells to build the dirichlet map, then it seems to work correctly. Yes, that is the correct solution -- you need all locally owned or ghost cells. Best W. -- -

Re: [deal.II] merging geometries(geo files) in gmsh for computational geometry definition

2016-09-05 Thread Wolfgang Bangerth
On 09/05/2016 12:59 PM, Marek Čapek wrote: I have developed flow simulation, initially in 2D, then in 3D. My code runs perfectly with 3D-cube from GridGenerator, however when I use "perfusion chamber" geometry the solver crashes. I am not a proficient user of GMSH, I defined two concentric cyli

[deal.II] Creating my own constraints matrix for applying dirichlet bc

2016-09-05 Thread Praveen C
Dear all I have to create a constraint matrix to apply dirichlet bc by taking the values from an existing solution (in vector “x" below) on the same mesh. for(typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), endc = dof_handler.end();

[deal.II] Re: Creating my own constraints matrix for applying dirichlet bc

2016-09-05 Thread Praveen C
So if I loop over all non-artificial cells instead of locally owned cells to build the dirichlet map, then it seems to work correctly. Best praveen On Mon, Sep 5, 2016 at 7:37 PM, Praveen C wrote: > Dear all > I have to create a constraint matrix to apply dirichlet bc by taking the > values fro

[deal.II] Re: singularity error due to 1/0

2016-09-05 Thread Jean-Paul Pelteret
Hmm... I vaguely recall having issues with the use of std::atan in evaluating the azimuthal coordinate. Try using std::atan2 . I think that this returns more robust results when you evaluat

Re: [deal.II] singularity error due to 1/0

2016-09-05 Thread Wolfgang Bangerth
On 09/05/2016 06:04 AM, hanks0...@gmail.com wrote: K_Inv[0][0]=2*r/(cos(theta)*cos(theta)), K_Inv[1][1]=2*r/(sin(theta)*sin(theta)), K_Inv[2][2]=r r is calculated by "r=sqrt(x^2+y^2) ", and theta is calculated by "theta=x/y" But, as you can expect that ,on the points where |x|<0.001 or |y|

Re: [deal.II] Re: singularity error due to 1/0

2016-09-05 Thread Wolfgang Bangerth
On 09/05/2016 06:29 AM, hanks0...@gmail.com wrote: Not theta=x/y in my code but theta=atan(x/y) You will at least want to use the atan2 function to prevent the division by zero here. Best W. -- Wolfgang Bangerth

[deal.II] Re: singularity error due to 1/0

2016-09-05 Thread hanks0227
Oh, sorry my mistake Not theta=x/y in my code but theta=atan(x/y) 2016년 9월 5일 월요일 오후 9시 22분 49초 UTC+9, Jean-Paul Pelteret 님의 말: > > Hi Kyusik, > > r is calculated by "r=sqrt(x^2+y^2) ", and theta is calculated by >> "theta=x/y" > > > At the very least, your definition of theta in the (radial)

[deal.II] Re: singularity error due to 1/0

2016-09-05 Thread Jean-Paul Pelteret
Hi Kyusik, r is calculated by "r=sqrt(x^2+y^2) ", and theta is calculated by > "theta=x/y" At the very least, your definition of theta in the (radial) coordinate system is incorrect. See the wikipedia page f

Re: [deal.II] Re: applying 3D mesh in step-20

2016-09-05 Thread hanks0227
Thank you very much!! 2016년 9월 5일 월요일 오전 4시 38분 52초 UTC+9, Wolfgang Bangerth 님의 말: > > On 09/04/2016 05:38 AM, hank...@gmail.com wrote: > > > > I have to show my result to my boss(variable p). And, To show the inside > of > > torus, It seems that I have to use contour plot using Visit.(In the