Re: [deal.II] Getting RHS values at nodes with DBC

2019-09-12 Thread Giorgos Kourakos
As always there is a "deal.ii" way of doing the calculations.

The FEValues::get_function_gradients() is actually what I needed.

I got a little bit confused with the FEValues::get_normal_vectors(). This 
seems to return the normal direction of the face and doesn't give any 
further info about the flow direction.

Thank you for your help.

Giorgos



On Tuesday, September 3, 2019 at 8:37:01 AM UTC-7, Daniel Arndt wrote:
>
> Giorgos,
>
> You can find a discussion for how constraints are handled in deal.II in 
> https://www.dealii.org/developer/doxygen/deal.II/group__constraints.html.
>
> Thank you for your feedback.
>> I'll try to explain what I try to calculate with the help of a standard 
>> FEM textbook:
>>
>> [...]
>>
>> In the book the global system is partitioned so that the first row 
>> contains the known U1 dofs and the second row the unknown the dofs U2.
>> They solve the system for the U2 and then they calculate F1.
>>
>
> In short: we normally don't condense the linear system but use a diagonal 
> matrix for the constrained rows instead (and modify the right-hand side 
> accordingly).
>  
>
>> I think that the F1 vector  contains, among others, the fluxes from the 
>> imposed BCs.
>>
> In case you only have Dirichlet boundary conditions, K11 is diagonal, K12 
> is zero and F1 contains the (possibly scaled) Dirichlet boundary values.
>
> Could you clarify in mathematical terms what you mean by "fluxes"? Maybe, 
> we are just using different terms fo the same thing.
>
> In case you are interested in n\cdot In u at the boundary, you can use 
> FEValues::get_function_gradients() and FEValues::get_normal_vectors() with 
> a quadrature formel that contains
> the points you are interested in on a cell in reference coordinates. This 
> is the approach VectorTools::point_gradient() is using for returning the 
> gradient for a single point in real coordinates.
>
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/a7a0cfa9-1a31-4133-bad0-9e014d88b4d5%40googlegroups.com.


Re: [deal.II] Getting RHS values at nodes with DBC

2019-09-03 Thread Giorgos Kourakos
Thank you for your feedback.
I'll try to explain what I try to calculate with the help of a standard FEM 
textbook:

[image: CaptureFEMbook.PNG]

In the book the global system is partitioned so that the first row contains 
the known U1 dofs and the second row the unknown the dofs U2.
They solve the system for the U2 and then they calculate F1.

I think that the F1 vector  contains, among others, the fluxes from the 
imposed BCs.

Does this make sense?

Can I achieve something like that with deal.ii?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/5fda3e26-e4bc-476a-9929-728a44858a20%40googlegroups.com.


Re: [deal.II] Getting RHS values at nodes with DBC

2019-08-31 Thread Giorgos Kourakos
This is a year old post but I'm dealing with the same issue so I decided to 
continue here instead creating a new one.

In my case I solve a simple laplace problem, that represent groundwater 
flow with non zero dirichlet boundary conditions
My goal is to estimate how much water comes in and out from the dirichlet 
BC nodes.

The way I could do this, is after I solve the reduced version of the full 
linear system A*U = F 
to calculate
DBC = A*U-F

When I call 
system_rhs.reinit (locally_owned_dofs, mpi_communicator);
system_matrix.reinit (locally_owned_dofs,
  locally_owned_dofs,
  dynamic_sparsity_pattern,
  mpi_communicator);


to initialize the A and F, are these the reduced (without the dofs of DBC) 
or the full ones?
  
is
system_matrix.vmult(output, system_rhs);

equivalent to ?
A*U (where A includes the rows and columns of dirichlet BC)

Thank you

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/9d205351-23b1-4dbb-aebf-581ea3b19f63%40googlegroups.com.


Re: [deal.II] Candi installation fail

2019-03-30 Thread Giorgos Kourakos
No cmake finishes the configuration but the compilation breaks around 78%. 
It seems that the undefined references that break the process are related to 
boost iostream, which has failed the test

-- 
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] Candi installation fail

2019-03-29 Thread Giorgos Kourakos
Thank you for the reply,

I was able to pass that point. By the way, I specified in the 
candi.cfg file the following STABLE_BUILD=false to force candi to download 
the master.

However, the building stuck at a later step (~78%)
I'm getting many similar errors as 
undefined reference to 'boost::iostreams:: .multiple things in this 
namespace

When I checked the configuration output I see that it has found 
iostreams libraries
but the test has failed

-- Boost version: 1.69.0
-- Found the following Boost libraries:
--   iostreams
--   serialization
--   system
--   thread
--   regex
--   chrono
--   date_time
--   atomic
--   BOOST_VERSION: 1.69.0
--   BOOST_LIBRARIES: 
/usr/local/lib/libboost_iostreams.so;/usr/local/lib/libboost_serialization.so;/usr/local/lib/libboost_system.so;/usr/local/lib/libboost_thread.so;/usr/local/lib/libboost_regex.so;/usr/local/lib/libboost_chrono.so;/usr/local/lib/libboost_date_time.so;/usr/local/lib/libboost_atomic.so
--   BOOST_INCLUDE_DIRS: /usr/local/include
--   BOOST_USER_INCLUDE_DIRS: /usr/local/include
-- Found BOOST
-- Performing Test BOOST_IOSTREAMS_USABLE
-- Performing Test BOOST_IOSTREAMS_USABLE - Failed
-- Performing Test BOOST_SERIALIZATION_USABLE
-- Performing Test BOOST_SERIALIZATION_USABLE - Success

Any further help?

Thank you

Giorgos


On Thursday, March 28, 2019 at 8:41:07 PM UTC-7, Wolfgang Bangerth wrote:
>
> On 3/28/19 7:12 PM, Giorgos Kourakos wrote: 
> > 
> ~/Documents/CODES/candi_Install/tmp/unpack/deal.II-v9.0.1/source/base/mpi.cc: 
>
> > In function ‘dealii::Utilities::MPI::MinMaxAvg 
> > dealii::Utilities::MPI::min_max_avg(double, ompi_communicator_t* 
> const&)’: 
> > 
> ~/Documents/CODES/candi_Install/tmp/unpack/deal.II-v9.0.1/source/base/mpi.cc:318:69:
>  
>
> > error: ‘MPI_Type_struct’ was not declared in this scope 
> > ierr = MPI_Type_struct(2, lengths, displacements, types, ); 
> > 
> > I don't see any errors during the deal.ii configuration. It seems it has 
> found 
> > MPI_VERSION: 3.1 
> > 
> > I have found though 
> > (https://www.open-mpi.org/doc/v4.0/man3/MPI_Type_struct.3.php) the 
> following: 
> > *MPI_Type_struct* - Creates a /struct/ data type -- use of this routine 
> is 
> > deprecated. 
> > I should switch to a previous mpi version 
>
> Or, better, to a new deal.II version. We fixed this a while ago. Can you 
> try 
> to use the current deal.II dev version that already works around this 
> problem? 
>
> deal.II dev versions are generally very stable, so there is little need to 
> worry about the fact that it's not a release. But if you do worry, you can 
> always try to find the patch that fixed it and apply it to your 9.0.1 
> version. 
>
> 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] Candi installation fail

2019-03-28 Thread Giorgos Kourakos
Hi all,

I tried to compile dealii using candi distribution.

Because I was getting several errors in the process from various packages, 
I ended up updating the versions of the following packages
hdf5 -> 1.10.5
petsc -> 3.10.4
slepc -> 3.10.2
boost -> 1_69_0

However, during deal.ii compilation I'm getting the following error:
 
~/Documents/CODES/candi_Install/tmp/unpack/deal.II-v9.0.1/source/base/mpi.cc: 
In function ‘dealii::Utilities::MPI::MinMaxAvg 
dealii::Utilities::MPI::min_max_avg(double, ompi_communicator_t* const&)’:
~/Documents/CODES/candi_Install/tmp/unpack/deal.II-v9.0.1/source/base/mpi.cc:318:69:
 
error: ‘MPI_Type_struct’ was not declared in this scope
   ierr = MPI_Type_struct(2, lengths, displacements, types, );

I don't see any errors during the deal.ii configuration. It seems it has 
found MPI_VERSION: 3.1

I have found though 
(https://www.open-mpi.org/doc/v4.0/man3/MPI_Type_struct.3.php) the 
following:
*MPI_Type_struct* - Creates a *struct* data type -- use of this routine is 
deprecated. 
I should switch to a previous mpi version  

Any other idea?

Thank you

 Giorgos

-- 
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: clarification on hanging nodes

2018-10-13 Thread Giorgos Kourakos
That's very good to know

Thank you

On Saturday, October 13, 2018 at 6:06:25 AM UTC-7, Giorgos Kourakos wrote:
>
> Hi, I need a clarification about the hanging nodes.
>
>
> At some point in my code I use 
>
> mesh_constraints.resolve_indices(ids); which adds the constraints
>
>
> For the example below I expect that the method would return the following:
>
> mesh_constraints.resolve_indices(24) ->[24 5 6] and not 13 or 16.
>
> mesh_constraints.resolve_indices(23) -> [23 9 10]
>
> mesh_constraints.resolve_indices(13) ->[13 24 23 22 18]
>
> mesh_constraints.resolve_indices(16) ->[16 24 21 27 29]
>
>
> In other words I want to make sure the mesh indices can form as a directed 
> acyclic graph
>
> Is that a correct assumption?
>
>
>
> Thank you
>
>
> Giorgos
>

-- 
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] Non smooth solution when the BC coincide with the processors boundaries?

2018-02-16 Thread Giorgos Kourakos
Thank you for you reply,

The issue with the boundaries was indeed solved when I assigned the 
boundary ids on the ghost cells as well.

As for the other problem with the refinement around the processor borders, 
I was using a relatively complex way to move the triangulation vertices 
each iteration using a solution transfer to interpolate the vertices to the 
refined mesh. 

After a lot of digging I found the method 
communicate_locally_moved_vertices with a note that I should convert the 
triangulation back to its original shape, then apply refinement, and then 
move the vertices to the desired position.

This simple trick works great so far. 
Kudos to whoever came up with that !!

Giorgos

On Thursday, February 15, 2018 at 3:54:03 PM UTC-8, Wolfgang Bangerth wrote:
>
> On 02/15/2018 04:48 PM, Giorgos Kourakos wrote: 
> > 
> > I haven't forgotten the ConstraintMatrix::distribute. The code works 
> > with 1 processor 
> > I do set manually boundary ids but I reset them after every refinement. 
> > Isn't this enough to get the correct boundaries? 
> > I haven't cross out the other two cases yet, although it doesnt seem as 
> > an artifact. I would say that it looks like that the one processor 
> > doesnt know that there is a boundary in this ghost cell. 
> > At the moment I set boundary ids only for the locally owned cells. 
>
> Not good enough. Both the IndexSet you pass to ConstrainedMatrix and 
> VectorTools::interpolate_boundary_values() needs to have correct 
> information about ghost cells. So the index set needs to contain all 
> locally relevant DoFs, and you need to set boundary_ids for all ghost 
> cells as well. 
>
>
> > I'd like to know if this is somehow expected when more than one 
> > processor is used. 
>
> No -- the solution you compute needs to be exactly the same (up to 
> round-off and solver tolerance, of course) whether you compute with one 
> or multiple processors. 
>
> 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] Non smooth solution when the BC coincide with the processors boundaries?

2018-02-15 Thread Giorgos Kourakos


Hi deal.ii experts,

I have the following issue and I'd like if you could give me directions 
what to look for.

I'm attaching a figure from two consecutive iterations:
The black line shows how the triangulation is split to different processors.
The red line indicates a Dirichlet boundary condition that happens to start 
exactly at the edge of the cell and spans almost half cell (of the 1st 
iteration).

ITERATION 1




ITERATION 2




You can see that there is an artifact in the solution right where the 
border between the processors and the edge of the boundary conditions is.
If I change slightly the boundary conditions e.g. expand it to the left 
then the solution is getting smooth.

Any advice?

Thank you

Giorgos
  


-- 
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] tests fail

2016-08-11 Thread Giorgos Kourakos
Hi,

I'm trying to compile a recent version of deal and I'm getting the 
following error during the tests as well as when I compile the step-1 

../../lib/libdeal_II.g.so.8.4.1: error: undefined reference to 
'PCHYPRESetType'


Any ideas what is wrong?

thank you

Giorgos

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