[deal.II] How to get the derivative of a vector?

2018-11-19 Thread FU
How to get the derivative of a vector?


Jacobian matrix of vectors
T^4 is a vector.
How do we get the Jacobi matrix of this 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.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] TableHandler no matching function

2018-11-19 Thread Wolfgang Bangerth
On 11/19/18 12:38 PM, masthayty...@gmail.com wrote:
> 
> class MyClass{
> public:
>    MyClass() {};
>    void myFunction();
>    TableHandler myTableHandler;
> }
> 
> void MyClass::myFunction(){
>    const int x = 1;
>    myTableHandler.add_value("myCol", x);
> }
> 
> I get the error message "no matching function for call to 
> 'dealii::TableHandler::add_value(const char [3], const int&) const.' And it 
> says

If I add a semicolon after your class declaration, then this compiles 
successfully for me. The missing semicolon makes me think that the code you 
show is not the code you actually have. Can you provide a small testcase that 
presents exactly the issue you have?

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


Re: [deal.II] Calling vector_value from FEFieldFunction<> results in segfault in release mode

2018-11-19 Thread Wolfgang Bangerth
On 11/19/18 5:36 AM, 'Maxi Miller' via deal.II User Group wrote:
> Short update: I was not able to narrow it down yet, but it looks like as if 
> it 
> only happens in a rather specific combination with other functions (which 
> might or might not be related to deal.II). As of now, the function works fine 
> if either compiled in either mode on the development computer, compiled in 
> debug mode on the production machine or compiled in release mode on the 
> production machine, while additional try/catch mechanisms are enabled. Else I 
> get a segfault.

That is certainly strange. Can you choose the compiler on that machine? It 
almost sounds like a compiler error.

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


Re: [deal.II] Re: Installation of deal.II with CUDA

2018-11-19 Thread Chih-Che Chueh
Hi Bruno,


> If I could get involved in this development, I would be helpful to
> optimize the memory transfer between GPU and CPU by testing different CUDA
> C programming schemes like this:
> https://devblogs.nvidia.com/how-overlap-data-transfers-cuda-cc/
> That would be nice. Playing with streams is not something that we have
> time to do in the foreseeable future. So if you are interested in
> doing it, that would be a great!.
>


I am interested in testing the overlapping and different schemes developed
you and others in deal.II.

I have one question: if I want to install the latest "develop" version, I
just simply type this: git clone https://github.com/dealii/dealii, right?
If not, which command I need to type?

Thanks!

Sincerely,

Chih-Che

-- 
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: Installation of deal.II with CUDA

2018-11-19 Thread Bruno Turcksin
Chih-Che,

Le dim. 18 nov. 2018 à 07:33, Chih-Che Chueh  a écrit :
> If I could get involved in this development, I would be helpful to optimize 
> the memory transfer between GPU and CPU by testing different CUDA C 
> programming schemes like this: 
> https://devblogs.nvidia.com/how-overlap-data-transfers-cuda-cc/
That would be nice. Playing with streams is not something that we have
time to do in the foreseeable future. So if you are interested in
doing it, that would be a great!.

Best,

Bruno

-- 
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] TableHandler no matching function

2018-11-19 Thread masthaytyler
I have the following code

class MyClass{
public:
  MyClass() {};
  void myFunction();
  TableHandler myTableHandler;
}

void MyClass::myFunction(){
  const int x = 1;
  myTableHandler.add_value("myCol", x);
}

I get the error message "no matching function for call to 
'dealii::TableHandler::add_value(const char [3], const int&) const.' And it 
says 

'candidate is void dealii::TableHandler::add_value(const string&, T) [with 
T = int; std::string = std::basic_string] '

I can't think of what could cause this...I even deleted all my includes and 
copied and pasted the includes from Step-7.cc into my file and I still get 
the message.

-- 
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] Design question about multiscale FEM with deal.ii

2018-11-19 Thread Ronghong Fan
Dear Konrad,

Thanks for your reply. Now I just want to solve two separate scales, which
is just a start.
I read the book "Multiscale Finite Element Methods. Theory and Applications
by Thomas Hou" written by Yalchin Efendiev and Thomas Y. Hou.
Maybe you have read it.
I know this multiscale finite element method is different with variational
multiscale finite element method.
So if there is no problem, could you please send me a demo about multiscale
FEM?

Thank you in advance.

Cheers,
Ronghong

On Sat, Nov 17, 2018 at 5:21 AM Konrad  wrote:

> Dear Ronghong Fan,
>
> Yes, I implemented several versions. The question I asked above got
> resolved as explained above. If you have a specific question feel free to
> ask, I will help if I can. Keep in mind that Multiscale FEMs are not
> generic, only work in certain (scaling) scenarios and do not work so well
> if you do not have scale separation (at least not in their standard
> version).
>
> Let me know about questions.
>
> Cheers,
> Konrad
>
> On Wednesday, November 14, 2018 at 3:50:27 AM UTC+1, Ronghong Fan wrote:
>>
>> Dear Konrad,
>> Do you have some progress about Multiscale Finite Element Method with
>> dealii?
>> I am very interested in mfem too and want to use dealii to implement.
>>
>>
>> On Thursday, August 30, 2018 at 7:27:21 PM UTC+8, Konrad wrote:
>>>
>>> On Wednesday, August 29, 2018 at 5:25:29 PM UTC+2, Wolfgang Bangerth
>>> wrote:


 I think that's actually an important point you are making here, maybe
 inadvertently: You have as many *meshes* as there are coarse cells.

 Now, just refining the global mesh a number of more times gives you
 another global mesh, but it does not give you a mesh for each coarse
 cell.

 In my deal.II classes, I've had students solve problems like yours and
 they typically just build one new triangulation for each coarse mesh
 cell, then attach a DoFHandler to it, and solve problems on them. That
 is likely not very efficient if you want to solve real problems, but
 it's good enough for small testcases and it allows for easy
 parallelization using threads.

 On the other hand, if you were to build a global DoFHandler on the
 refined mesh, you'd have to define what to do with those DoFs that lie
 outside the patch (that results from a single coarse mesh) you are
 currently considering. You'd likely want to set these to zero, but
 they're still there, and the resulting patch problem will be large.
 It's
 also much more difficult to do things in parallel because now you have
 one global (fine) mesh that you want to use for multiple things at the
 same time.

>>>
>>>  This is exactly the way I decided to do it. As you say, it is probably
>>> not the most efficient way but easy to thread (and maybe even easy to bring
>>> on different nodes on a cluster). Thanks again for your comments.
>>>
>>> Cheers,
>>> Konrad
>>>
>> --
> 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.
>

-- 
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] Calling vector_value from FEFieldFunction<> results in segfault in release mode

2018-11-19 Thread 'Maxi Miller' via deal.II User Group
Short update: I was not able to narrow it down yet, but it looks like as if 
it only happens in a rather specific combination with other functions 
(which might or might not be related to deal.II). As of now, the function 
works fine if either compiled in either mode on the development computer, 
compiled in debug mode on the production machine or compiled in release 
mode on the production machine, while additional try/catch mechanisms are 
enabled. Else I get a segfault. 

Am Donnerstag, 1. November 2018 12:56:45 UTC+1 schrieb Maxi Miller:
>
> I can try, but will first conduct additional tests for getting more 
> information about that bug (it occurs on the production computer, but not 
> on the testing computer...). Thus it may take some time.
>
> Am Mittwoch, 31. Oktober 2018 16:29:24 UTC+1 schrieb Wolfgang Bangerth:
>>
>> On 10/31/2018 07:57 AM, 'Maxi Miller' via deal.II User Group wrote: 
>> > 
>> > If I compile the program in release mode, it segfaults at 
>> > */solution_function.vector_value(eval_point, result)/*. If I compile it 
>> > in debug mode, it runs slower, but without problems. When removing the 
>> > line with */solution_function.vector_value(eval_point, result)/*, it 
>> > works in release mode, too. Why does that happen, and how can I fix 
>> that? 
>>
>> Maxi -- do you think you could come up with a simple and self-contained 
>> example that others could take a look at? 
>>
>> I am somewhat surprised of the failure mode. But then I've seen weirder 
>> bugs. 
>>
>> 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.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Implementation of Broyden's method

2018-11-19 Thread 'Maxi Miller' via deal.II User Group
I would like to implement Broyden's method, to speed up the assembly of the 
jacobian when solving a nonlinear system, which results in an equation 
containing the difference of the residual, the difference of the solution 
and the current jacobian matrix, i.e. 
J_{n+1}=J_n+\frac{\Delta f_n-J_n\Delta x_n}{\vert\vert \Delta 
x_n\vert\vert^2}\Delta x_n^T
Now I am not entirely sure how to implement that into the code, especially 
the matrix creation due to the multiplication of a row- and a 
column-vector, such that I get the same structure as the original jacobian 
matrix. If I understand it correctly I can use the same approach as shown 
in the matrix-free methods, f.ex. step-37, where I create the elements 
cell-wise, and distribute them afterwards. Is that correct, or are there 
better ways to implement Broyden's method?

-- 
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.