[deal.II] Re: Compute jacobian at point (no quadrature point)

2017-06-13 Thread Weixiong Zheng
Felix,

Would you take a look at if [1] is what you want to have?

[1]: 
https://www.dealii.org/8.4.0/doxygen/deal.II/classFEValuesBase.html#a665ab681011424cb1b0ba11c4155a121

Best,
Weixiong

在 2017年6月13日星期二 UTC-7上午9:35:09,Felix Lorenz写道:
>
>
> Hi everyone,
>
> I want to compute the transformation of a gradient at a point (no 
> quadrature point) on the reference cell to the real space. Mathematically 
> formulated I want to compute:
>
>
>
> 
>
>
> How do I get the inverse Jacobian at this point?
>
>
> Best regards,
>
> Felix
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: get_function_value error with hp class

2017-06-13 Thread Weixiong Zheng
Thanks, Daniel,

I used FESystem to wrap the scalar FiniteElement and the FE_Nothing 
together. Here are the hp-relevant variables:

FESystem fe_continuous;
FESystem fe_discontinuous;
hp::FECollection fe_c;
hp::QCollection q_c;
hp::QCollection q_face_c;

This is how I do initialization 
Equation::Equation (ParameterHandler &prm)
:
ProblemDefinition(prm),
fe_order(prm.get_integer("finite element polynomial degree")),
fe_continuous(FE_Q(fe_order),1,
  FE_Nothing(),1),
fe_discontinuous(FE_Nothing(),1,
 FE_DGQ(fe_order),1),
fe_c(hp::FECollection(fe_continuous,fe_discontinuous)),
dof_handler (triangulation)
{
  q_c.push_back(QGauss(fe_order+1));
  q_c.push_back(QGauss(fe_order+1));
  q_face_c.push_back(QGauss(fe_order+1));
  q_face_c.push_back(QGauss(fe_order+1));
}

As the problem is a scalar problem, fv.shape_value and shape_grad work as 
they are supposed to, but not the get_function_values.

在 2017年6月13日星期二 UTC-7上午2:58:09,Daniel Arndt写道:
>
> Weixiong,
>
> [...] 
>>
> Then I got confused:
>> 1. I used hp class a year ago or so, fv.get_function_values works 
>> directly. Now I have to use the above change. Did I do something wrong?
>> 2. Then why fv.shape_value still works as it did? Isn't fv still a 
>> FESystem object?
>>
> How did you initialize hp::DoFHandler? What is the hp::FECollectionyou 
> used?
> If you are solving a scalar problem using the same equation in different 
> subdomains with different finite elements, 
> I would assume that the Finite Elemnts in the hp::FECollection are also 
> scalar valued and have just one component.
> However, from what you write above it seems that you initialized the 
> hp::FECollection with vector valued FiniteElements.
> Can you confirm either?
>
> Best,
> Daniel
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: Any easy how-to: petsc and solver preconditioner selection from input?

2017-06-13 Thread Weixiong Zheng
Daniel,

Thanks for the reply. I guess I'd prefer to dig a bit into SolverSelector 
so everything can be wrapped into the input file. This could be a fun fix 
to our code.

Best,
Weixiong

在 2017年6月13日星期二 UTC-7上午3:11:02,Daniel Arndt写道:
>
> Weixiong,
>
> Am Samstag, 10. Juni 2017 12:54:50 UTC+2 schrieb Weixiong Zheng:
>>
>> Hi all,
>>
>> I am developing something based on petsc solvers and preconditioners. We 
>> actually expect to invoke user-requested solvers and preconditioners from 
>> the input file.
>>
>> I saw selector classes for deal.II based solvers and preconditioners but 
>> didn't find any for petsc wrappers.
>>
>> I am wondering if there's some easy way or I do have to mimic those 
>> selector classes.
>>
> At the moment there is no class for PETSc solvers corresponding to 
> SolverSelector, but it should be possible to mimic this class.
> If you come up with something, we happily take a patch. :-)
> As mentioned in the documentation for PETScWrappers::SolverBase[1] you can 
> also just set the desired solver and preconditioner by command line 
> arguments.
>
> Best,
> Daniel
>
> [1] 
> https://www.dealii.org/8.5.0/doxygen/deal.II/classPETScWrappers_1_1SolverBase.html
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Re: get errors when installing dealii on openSUSE Leap 42.1 by using candi

2017-06-13 Thread Rene Gassmöller


Hi Tuanny,

I am not quite sure what is happening there (I do not have much experience 
with PETSc or MUMPS). As far as I can see MUMPS is not a separate package 
for deal.II but needs to be installed with PETSc. Maybe somebody else knows 
which options need to be added to the petsc.package file of candi to make 
MUMPS work? Or if you can find the options for me, I can modify the file 
accordingly. Is it possible that this has to do with the fact I removed the 
other default packages, except for p4est, trilinos and petsc?


Best,
Rene

Am Freitag, 9. Juni 2017 08:39:23 UTC-6 schrieb Tuanny Cajuhi:
>
> Hi Rene,
>
> is it possible to include MUMPS to the platform file? 
>
> An error occurred in line <846> of file 
>  .cc> in function 
>void dealii::PETScWrappers::SparseDirectMUMPS::solve(const 
> dealii::PETScWrappers::MatrixBase&, dealii::PETScWrappers:
> :VectorBase&, const dealii::PETScWrappers::VectorBase&) 
> The violated condition was:  
>false 
> Additional information:  
>Your PETSc installation does not include a copy of the MUMPS package 
> necessary for this solver. You will need to conf
> igure PETSc so that it includes MUMPS, recompile it, and then re-configure 
> and recompile deal.II as well.
>
>
>
> Thank you,
> Tuanny 
>
> PS: Unloading the module atp helped to solve the problem I mentioned in 
> the previous message. 
>
>
>
> On Sunday, June 4, 2017 at 6:41:15 PM UTC+2, Tuanny Cajuhi wrote:
>>
>> Hi Rene,
>>
>> I asked them and as soon as I get an update I will post it here. My 
>> colleague also mentioned that it could be something related to the linker. 
>> In any case, I am really happy that the installation got this far and I 
>> am hoping to use deal.II asap in the cluster. Thank you again, will keep 
>> you posted :)) 
>>
>> Best,
>> Tuanny
>>
>>
>>
>> On 04.06.2017 14:57, Rene Gassmoeller wrote:
>>
>> Hi Tuanny, 
>> That is good to hear. Unfortunately I have not seen the error message 
>> before. AtpSigHandler seems to be some cray specific library, and it is a 
>> bit surprising that your linker does not seem to find it. Maybe you can try 
>> finding out in which module it is packaged or ask your cluster support for 
>> help. To me this does not look like a deal.II specific problem.
>> Another idea would be to check if /usr/bin/ld.gold is the linker you 
>> should use, or if the build system picks up he wrong linker.
>> Best
>>  Rene
>>  Original message 
>> From: Tuanny Cajuhi   
>> Date: 6/3/2017 21:13 (GMT-05:00) 
>> To: dea...@googlegroups.com  
>> Subject: Re: [deal.II] Re: get errors when installing dealii on openSUSE 
>> Leap 42.1 by using candi 
>>
>> Hi Rene,
>>
>> your explanation helped me a lot!! :)) I was able to run up to this point:
>>
>> [100%] Building CXX object 
>> source/numerics/CMakeFiles/obj_numerics_release.dir/vector_tools_rhs.cc.o
>> Linking CXX shared library ../lib/libdeal_II.g.so
>> /usr/bin/ld.gold: error: cannot find -lAtpSigHandler
>> /usr/bin/ld.gold: error: cannot find -lAtpSigHCommData
>> collect2: error: ld returned 1 exit status
>> make[2]: *** [lib/libdeal_II.g.so.8.5.0] Error 1
>> make[1]: *** [source/CMakeFiles/deal_II.g.dir/all] Error 2
>> make[1]: *** Waiting for unfinished jobs
>> [100%] Built target obj_numerics_release
>> make: *** [all] Error 2
>> Failure with exit status: 2
>> Exit message: There was a problem building dealii v8.5.0.
>>
>> Have you ever had this error? One colleague of mine got the same error 
>> when installing everything manually. Could it be something related to the 
>> cray, e.g. additional module?
>>
>> Thank you!
>>
>> Best,
>> Tuanny
>>
>>
>> On 03.06.2017 20:14, Rene Gassmöller wrote:
>>
>> I updated the github branch. The file is not longer at the old position, 
>> instead take a look at: https://github.com/dealii/candi/pull/31
>>
>> Best
>> Rene
>>
>> Am Freitag, 2. Juni 2017 14:55:45 UTC-4 schrieb Rene Gassmöller: 
>>>
>>> Hi Tuanny,
>>>
>>> I happened to install deal.II on a Cray over the last days, and both 
>>> compiled everything by hand and (afterwards) decided to write a candi 
>>> script for it. Keep in mind that my instructions are for my specific 
>>> setting and application, i.e. I compile deal.II with the packages p4est, 
>>> trilinos, and petsc only, and do not know about other packages. The cluster 
>>> is also a very specific system (Lonestar 5, of the Texas Advanced Computing 
>>> Center), but yours is likely at least similar. Anyway, I hope this is of 
>>> help to you.
>>>
>>> The candi platform file with instructions on how to set up the 
>>> environment is here: 
>>>
>>> https://github.com/gassmoeller/candi/blob/lonestar_config/deal.II-toolchain/platforms/lonestar5.platform
>>>
>>> You can download it and use it with candi by adding the option 
>>> --platform=FILENAME where FILENAME contains the full path to this file. On 
>>> my cluster I had two problems with candi that I needed to change. You can 
>>> find the modifications I did here: 
>>> https://github

[deal.II] Compute jacobian at point (no quadrature point)

2017-06-13 Thread Felix Lorenz


Hi everyone,

I want to compute the transformation of a gradient at a point (no 
quadrature point) on the reference cell to the real space. Mathematically 
formulated I want to compute:





How do I get the inverse Jacobian at this point?


Best regards,

Felix

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Compute jacobian at a point (no quadrature point)

2017-06-13 Thread Felix Lorenz


Hi everyone,

I want to compute the transformation of the gradient of the shape function 
at a point  (no quadrature point) on the reference cell to the real space. 
Mathematically written I want to compute:





   

: point in the reference cell

: jacobian

: gradient of the i-th shape function 


How can I get this  ?


Best regards,

Felix

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: Any easy how-to: petsc and solver preconditioner selection from input?

2017-06-13 Thread Daniel Arndt
Weixiong,

Am Samstag, 10. Juni 2017 12:54:50 UTC+2 schrieb Weixiong Zheng:
>
> Hi all,
>
> I am developing something based on petsc solvers and preconditioners. We 
> actually expect to invoke user-requested solvers and preconditioners from 
> the input file.
>
> I saw selector classes for deal.II based solvers and preconditioners but 
> didn't find any for petsc wrappers.
>
> I am wondering if there's some easy way or I do have to mimic those 
> selector classes.
>
At the moment there is no class for PETSc solvers corresponding to 
SolverSelector, but it should be possible to mimic this class.
If you come up with something, we happily take a patch. :-)
As mentioned in the documentation for PETScWrappers::SolverBase[1] you can 
also just set the desired solver and preconditioner by command line 
arguments.

Best,
Daniel

[1] 
https://www.dealii.org/8.5.0/doxygen/deal.II/classPETScWrappers_1_1SolverBase.html

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: get_function_value error with hp class

2017-06-13 Thread Daniel Arndt
Weixiong,

[...] 
>
Then I got confused:
> 1. I used hp class a year ago or so, fv.get_function_values works 
> directly. Now I have to use the above change. Did I do something wrong?
> 2. Then why fv.shape_value still works as it did? Isn't fv still a 
> FESystem object?
>
How did you initialize hp::DoFHandler? What is the hp::FECollectionyou used?
If you are solving a scalar problem using the same equation in different 
subdomains with different finite elements, 
I would assume that the Finite Elemnts in the hp::FECollection are also 
scalar valued and have just one component.
However, from what you write above it seems that you initialized the 
hp::FECollection with vector valued FiniteElements.
Can you confirm either?

Best,
Daniel

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: About applying periodic boundary condition on the same mesh by different methods

2017-06-13 Thread Chuyi Duan
Hello Daniel,

I think i've found where the problem was. It's because I used 
set_boundary_id with active_cell_iterator after global_refinement. But I 
found in source codes of collect_periodic_faces function it's just 
cell_iterator that has been used. I've instead called set_boundary_id at 
first then global_refinement and it goes well.

Thank you anyway.

Chuyi

在 2017年6月1日星期四 UTC+2下午2:31:58,Daniel Arndt写道:
>
> Chuyi,
>
>
>> i was trying to use Dealii to solve a 3-dimensional elastic-plastic 
>> question on a cubic by applying periodic boundary condition like in step-45 
>> (v. 8.5.0). 
>> std::vector::
>> cell_iterator> > periodicity_vector;
>> GridTools::collect_periodic_faces(dof_handler, 1, 2, 2, 
>> periodicity_vector);//1,2,2: the first two numbers refer to the cell 
>> faces at the boundary, the third number to the direction 
>> DoFTools::make_periodicity_constraints >(
>> periodicity_vector,constraint_matrix);
>>
>> But i got different results as i have created the mesh using 
>> GridGenerator::subdivided_hyper_rectangle (triangulation, rep, p1, p2);//rep 
>> is the repetition
>> method 1 to get the mesh:
>> p1 (0, 0, 0) 
>> p2(1, 1, 1) 
>> rep=(8, 8, 8)
>> no global refinement
>>
>> method 2 to get the mesh:
>> p1 (0, 0, 0) 
>> p2(1, 1, 1) 
>> rep=(1, 1, 1)
>> global refinement = 3
>>
>> I just wonder why there come two different results when these two meshes 
>> are actually the same.
>>
> How do the two solutions actually differ? How many constraints a created 
> in either of these cases?
> Can you provide us with a minimal example just setting up the periodic 
> constraints in case they are different?
>
> Best,
> Daniel
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.