Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78537449
non_local_manager_inline_impl.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
Wed, Aug 21, 12:02
Size
2 KB
Mime Type
text/x-c
Expires
Fri, Aug 23, 12:02 (2 d)
Engine
blob
Format
Raw Data
Handle
20039525
Attached To
rAKA akantu
non_local_manager_inline_impl.cc
View Options
/**
* @file non_local_manager_inline_impl.cc
*
* @author Aurelia Isabel Cuba Ramos <aurelia.cubaramos@epfl.ch>
* @author Nicolas Richart <nicolas.richart@epfl.ch>
*
* @date creation: Fri Jun 18 2010
* @date last modification: Wed Nov 25 2015
*
* @brief inline implementation of non-local manager functions
*
* @section LICENSE
*
* Copyright (©) 2010-2012, 2014, 2015 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Akantu 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.
*
* Akantu 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 Akantu. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "neighborhood_base.hh"
/* -------------------------------------------------------------------------- */
#ifndef __AKANTU_NON_LOCAL_MANAGER_INLINE_IMPL_CC__
#define __AKANTU_NON_LOCAL_MANAGER_INLINE_IMPL_CC__
namespace
akantu
{
/* -------------------------------------------------------------------------- */
inline
void
NonLocalManager
::
registerNeighborhood
(
const
ID
&
neighborhood
,
const
ID
&
weight_func_id
)
{
/// check if neighborhood has already been created
auto
it
=
neighborhoods
.
find
(
neighborhood
);
if
(
it
==
neighborhoods
.
end
())
{
this
->
createNeighborhood
(
weight_func_id
,
neighborhood
);
}
}
/* -------------------------------------------------------------------------- */
inline
NonLocalNeighborhoodBase
&
NonLocalManager
::
getNeighborhood
(
const
ID
&
name
)
const
{
AKANTU_DEBUG_IN
();
auto
it
=
neighborhoods
.
find
(
name
);
AKANTU_DEBUG_ASSERT
(
it
!=
neighborhoods
.
end
(),
"The neighborhood "
<<
name
<<
" is not registered"
);
AKANTU_DEBUG_OUT
();
return
*
(
it
->
second
);
}
}
// namespace akantu
#endif
/* __AKANTU_NON_LOCAL_MANAGER_INLINE_IMPL_CC__ */
Event Timeline
Log In to Comment