[dune-fem] How to get DoFs for Dirichlet nodes with vector-valued unknowns
Sacconi, Andrea
a.sacconi11 at imperial.ac.uk
Thu Apr 11 22:31:43 CEST 2013
Hi Tobias,
it works perfectly!
Thank you very much!
Andrea
__________________________________________________________
Andrea Sacconi
PhD student, Applied Mathematics
AMMP Section, Department of Mathematics, Imperial College London,
London SW7 2AZ, UK
a.sacconi11 at imperial.ac.uk
________________________________
From: Tobias Malkmus [tomalk at mathematik.uni-freiburg.de]
Sent: 11 April 2013 19:25
To: Sacconi, Andrea
Cc: dune-fem at dune-project.org
Subject: Re: [dune-fem] How to get DoFs for Dirichlet nodes with vector-valued unknowns
Hi Andrea
try this :
const SubEntityIteratorType endFaceIt = pointSet.template endSubEntity<1>( localFaceNumber );
for( SubEntityIteratorType faceDofIt = pointSet.template beginSubEntity<1>( localFaceNumber );
faceDofIt != endFaceIt; ++faceDofIt )
{
for( int i = 0; i < RangeType::dimension; ++i )
{
const int index = (*faceDofIt ) * RangeType::dimension + i;
local[ index ] = ...
}
}
where local is a local Lagrange discrete function.
In the same way you can modify the local stiffness matrix in the index-th row/column.
Best Tobias
On 04/11/2013 07:12 PM, Sacconi, Andrea wrote:
Hi all,
I have a quick question for you.
Suppose you need to find the global DoFs associated to the Dirichlet nodes. The purpose is, of course, to modify the rows of the stiffness matrix in the standard way, as well as the corresponding components on the rhs.
When the unknown is a scalar variable, I don't have problems: I loop over the entities, extract the LagrangePointSetType set for each entity, use FaceDofIteratorType, ...
But when the unknown is a vector-valued function, how do I proceed? I have tried to do exactly the same, and I noticed that the same node can refer to two different DoFs.
The problem is, how do I prescribe the value for the function? Since it's a vector-valued function, where do I prescribe the first component and where the second?
In other words, how is the DoFs set created?
Thanks in advance for your help!
Cheers,
Andrea
__________________________________________________________
Andrea Sacconi
PhD student, Applied Mathematics
AMMP Section, Department of Mathematics, Imperial College London,
London SW7 2AZ, UK
a.sacconi11 at imperial.ac.uk<mailto:a.sacconi11 at imperial.ac.uk>
_______________________________________________
dune-fem mailing list
dune-fem at dune-project.org<mailto:dune-fem at dune-project.org>
http://lists.dune-project.org/mailman/listinfo/dune-fem
--
Tobias Malkmus <tomalk at mathematik.uni-freiburg.de>
Mathematisches Institut Tel: +49 (0) 761 203 5651
Abt. für Angewandte Mathematik Universität Freiburg
Hermann-Herder-Str. 10
79104 Freiburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-fem/attachments/20130411/b10cd165/attachment.htm>
More information about the dune-fem
mailing list