[deal.II] Vertices constraints inside the domain

2017-03-22 Thread seven
Hello all, I am trying to project a solution in FE_DGP(sol_dg) to FE_Q (sol_cg), but I only know the gradients of sol_dg and its values at some vertices, so I want to fix values of sol_cg at the same vertices after the projection. The first method I tried is quite straightforward, but the resu

Re: [deal.II] How can I resize a std::vector::ParsedFunction>?

2017-03-22 Thread Timo Heister
Your call to resize() will create 4 shared_ptrs, but they are pointing to nothing (NULL) because you are never allocating any objects and assigning them. Think of this example: std::vector v; v.resize(4); now v[0] is a pointer to an int, but it is NULL unless you do something like v[0] = new int;

Re: [deal.II] How can I resize a std::vector::ParsedFunction>?

2017-03-22 Thread Alex Zimmerman
Also for the record, I verified that the test passes if I use a std::vector> without resizing: https://github.com/alexanderzimmerman/nsb-pcm/blob/bugs/tests/bug_10_pass.cc On Wednesday, March 22, 2017 at 7:17:25 PM UTC+1, Alex Zimmerman wrote: > > Luca, > > Thanks for the idea. Conceptually I d

Re: [deal.II] How can I resize a std::vector::ParsedFunction>?

2017-03-22 Thread Alex Zimmerman
Luca, Thanks for the idea. Conceptually I don't understand how a shared_ptr solves my problem. I can resize std::vector>>; but all of the shared pointers are empty. I imagine that they are supposed to point to ParsedFunction objects that I've instantiated somewhere. That being said, I think y

Re: [deal.II] How can I resize a std::vector::ParsedFunction>?

2017-03-22 Thread luca.heltai
Hi Alex, I’d use a vector of std::vector > > v; which are light objects, and can be resized and reshaped. Whenever you do a push_back, you’d have to use v.push_back(std_cxx11::shared_pointer(new ParsedFunction(…) ); then v[i]->value(…) would work. > On 22 Mar 2017, at 16:31, Alex Zimm

[deal.II] Re: How can I resize a std::vector::ParsedFunction>?

2017-03-22 Thread Alex Zimmerman
Correction: Of course I mean a std::vector>. My question title has a in the wrong place. On Wednesday, March 22, 2017 at 4:31:24 PM UTC+1, Alex Zimmerman wrote: > > Fundamentally I am trying to allow for a variable number of ParsedFunction > objects to be specified in a parameter input file. M

[deal.II] How can I resize a std::vector::ParsedFunction>?

2017-03-22 Thread Alex Zimmerman
Fundamentally I am trying to allow for a variable number of ParsedFunction objects to be specified in a parameter input file. Maybe there is a better approach which circumvents my issue below. I can continue my work for some time with this being a constant; but as soon as I want to extend to 3D

[deal.II] Re: Timo Heister and I on a podcast, talking about deal.II

2017-03-22 Thread Bruno Turcksin
Nice interview guys. I forgot that some people don't know what finite elements are ;-) Best, Bruno On Monday, March 20, 2017 at 10:29:19 PM UTC-4, Wolfgang Bangerth wrote: > > > All, > if you're curious what two of us think about deal.II, where it comes from > and > where it is going, here

Re: [deal.II] Error using project_boundary_values_div_conforming with Raviart_Thomas FE

2017-03-22 Thread Wolfgang Bangerth
This is interesting, but independent of the issue above. Can you try to come up with as small a program that shows this bug? If so, can you open a bug report at https://github.com/dealii/dealii/issues for it? Done, this is is

Re: [deal.II] Error using project_boundary_values_div_conforming with Raviart_Thomas FE

2017-03-22 Thread tp2
Wolfgang, Thank you for your time. >I THINK (please feel free to lecture me) I > > should use the differential equation for B, namely curl(curl(B)) = > omega^2*B, > > but for B the normal components are required to be continuous, so I > should use > > Raviart_Thomas Elements instead of Nedel

[deal.II] Re: How to compute Nédélec gradient

2017-03-22 Thread Daniel Arndt
> Unfortunately, visualizing is not enough to my purposes. I need the > tangential component of the gradient at the mesh faces to perform a > post-processing phase where I compute some relevant quantities to be used > later in solving a different problem. > In general, you can create a quadrat

Re: [deal.II] Evaluate solution of face elements

2017-03-22 Thread Lars Corbijn van Willenswaard
Thank you for the answer. After some more testing I found out the code was correct, but my reasoning/math was not for cases with hanging nodes. Best, Lars On Fri, Mar 17, 2017 at 9:42 AM, Wolfgang Bangerth wrote: > On 03/14/2017 10:54 AM, l.j.corbijnvanwillenswa...@student.utwente.nl > wrote: >

Re: [deal.II] Error using project_boundary_values_div_conforming with Raviart_Thomas FE

2017-03-22 Thread Wolfgang Bangerth
Felix, I try to solve an Eigenvalue Problem (similar to the scalar-valued step-36) in Electrodynamics, namely find the Eigenmodes of a Spherical waveguide. The differential equation you try to solve there is the same as in the example in this document about Nedelec's Finite Elements (nedelec.pdf

[deal.II] Re: How to compute Nédélec gradient

2017-03-22 Thread justtry
Thanks for your answer! Unfortunately, visualizing is not enough to my purposes. I need the tangential component of the gradient at the mesh faces to perform a post-processing phase where I compute some relevant quantities to be used later in solving a different problem. Thanks again. Il g

[deal.II] Error using project_boundary_values_div_conforming with Raviart_Thomas FE

2017-03-22 Thread tp2
Dear User Group, I'm currently playing around with deal.ii to solve Maxwell's Equations and combining Tutorial pieces I try to solve an Eigenvalue Problem (similar to the scalar-valued step-36) in Electrodynamics, namely find the Eigenmodes of a Spherical waveguide. The differential equation y