Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87386063
iterator_akantu.cc
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Oct 12, 09:20
Size
3 KB
Mime Type
text/x-c++
Expires
Mon, Oct 14, 09:20 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21586450
Attached To
rLIBMULTISCALE LibMultiScale
iterator_akantu.cc
View Options
/**
* @file iterator_akantu.cc
*
* @author Guillaume Anciaux <guillaume.anciaux@epfl.ch>
* @author Srinivasa Babu Ramisetti <srinivasa.ramisetti@epfl.ch>
*
* @date Tue Jul 22 14:47:56 2014
*
* @brief This is the generic iterator over Akantu DOFs
*
* @section LICENSE
*
* Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
* LibMultiScale is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* LibMultiScale is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with LibMultiScale. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "lm_common.hh"
#include "container_akantu.hh"
/* -------------------------------------------------------------------------- */
__BEGIN_LIBMULTISCALE__
template
<
UInt
Dim
>
RefElemAkantu
<
Dim
>
&
ContainerElemsAkantu
<
Dim
>::
iterator
::
getFirst
(){
actual_nb_elem
=
this
->
my_cont
.
nbElem
();
if
(
actual_nb_elem
==
0
)
this
->
end_flag
=
true
;
else
{
ref
.
setAkantuPointers
(
static_cast
<
ContainerElemsAkantu
<
Dim
>
&>
(
this
->
my_cont
));
this
->
end_flag
=
false
;
}
return
ref
;
}
/* -------------------------------------------------------------------------- */
template
<
UInt
Dim
>
inline
ContainerElemsAkantu
<
Dim
>::
iterator
::
iterator
(
ContainerElemsAkantu
<
Dim
>
&
c
)
:
ContainerElemsAkantu
<
Dim
>::
iterator_base
(
c
){
ref
.
setHeatTransferFlag
(
c
.
getHeatTransferFlag
());
}
/* -------------------------------------------------------------------------- */
template
<
UInt
Dim
>
RefNodeAkantu
<
Dim
>
&
ContainerNodesAkantu
<
Dim
>::
iterator
::
getFirst
(){
actual_nb_elem
=
this
->
my_cont
.
nbElem
(
dt_all
);
if
(
actual_nb_elem
==
0
)
this
->
end_flag
=
true
;
else
{
ref
.
setAkantuPointers
(
static_cast
<
ContainerNodesAkantu
<
Dim
>
&>
(
this
->
my_cont
));
ref
.
index
=
0
;
this
->
end_flag
=
false
;
}
while
(
!
(
this
->
dt
&
ref
.
getDOFType
())){
this
->
getNext
();
if
(
this
->
end_flag
)
break
;
}
return
ref
;
}
/* -------------------------------------------------------------------------- */
template
<
UInt
Dim
>
ContainerNodesAkantu
<
Dim
>::
iterator
::
iterator
(
ContainerNodesAkantu
<
Dim
>
&
c
,
DOFType
dt
)
:
ContainerNodesAkantu
<
Dim
>::
iterator_base
(
c
),
dt
(
dt
){
ref
.
setHeatTransferFlag
(
c
.
getHeatTransferFlag
());
}
/* -------------------------------------------------------------------------- */
template
class
ContainerNodesAkantu
<
3
>
;
template
class
ContainerElemsAkantu
<
3
>
;
template
class
ContainerNodesAkantu
<
2
>
;
template
class
ContainerElemsAkantu
<
2
>
;
template
class
ContainerNodesAkantu
<
1
>
;
template
class
ContainerElemsAkantu
<
1
>
;
__END_LIBMULTISCALE__
Event Timeline
Log In to Comment