Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90625089
igfem_enrichment.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
Sun, Nov 3, 08:59
Size
2 KB
Mime Type
text/x-c
Expires
Tue, Nov 5, 08:59 (2 d)
Engine
blob
Format
Raw Data
Handle
22089338
Attached To
rAKA akantu
igfem_enrichment.cc
View Options
/**
* @file igfem_enrichment.hh
*
* @author Aurelia Isabel Cuba Ramos <aurelia.cubaramos@epfl.ch>
*
*
* @brief Implementation of IGFEM enrichment
*
* @section LICENSE
*
* Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne)
* Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides)
*
*/
/* -------------------------------------------------------------------------- */
#include "igfem_enrichment.hh"
__BEGIN_AKANTU__
/* -------------------------------------------------------------------------- */
IGFEMEnrichment
::
IGFEMEnrichment
(
Mesh
&
mesh
)
:
intersector_sphere
(
mesh
)
{
}
/* -------------------------------------------------------------------------- */
void
IGFEMEnrichment
::
initialize
(){
intersector_sphere
.
constructData
();
}
/* -------------------------------------------------------------------------- */
void
IGFEMEnrichment
::
update
(
ID
&
domain
)
{
if
(
domain
==
""
)
domain
=
default_geometry
;
Geometry
&
geometry
=
getGeometry
(
domain
);
intersector_sphere
.
buildIgfemMesh
(
geometry
);
}
/* -------------------------------------------------------------------------- */
void
IGFEMEnrichment
::
unRegisterGeometryObject
(
const
ID
&
domain
){
GeometryMap
::
iterator
it
=
geometries
.
find
(
domain
);
AKANTU_DEBUG_ASSERT
(
it
!=
geometries
.
end
(),
"Geometry object with domain "
<<
domain
<<
" was not found"
);
geometries
.
erase
(
it
);
if
(
!
geometries
.
empty
())
default_geometry
=
(
*
geometries
.
begin
()).
first
;
}
/* -------------------------------------------------------------------------- */
void
IGFEMEnrichment
::
registerGeometryObject
(
Geometry
&
geometry
,
const
ID
&
domain
){
if
(
geometries
.
size
()
==
0
)
default_geometry
=
domain
;
#ifndef AKANTU_NDEBUG
GeometryMap
::
iterator
it
=
geometries
.
find
(
domain
);
AKANTU_DEBUG_ASSERT
(
it
==
geometries
.
end
(),
"Geometry object with domain "
<<
domain
<<
" was already created"
);
#endif
std
::
stringstream
sstr
;
sstr
<<
"geometry:"
<<
domain
;
geometries
[
domain
]
=
&
geometry
;
}
/* -------------------------------------------------------------------------- */
IGFEMEnrichment
::
Geometry
&
IGFEMEnrichment
::
getGeometry
(
ID
&
domain
)
const
{
AKANTU_DEBUG_IN
();
if
(
domain
==
""
)
domain
=
default_geometry
;
GeometryMap
::
const_iterator
it
=
geometries
.
find
(
domain
);
AKANTU_DEBUG_ASSERT
(
it
!=
geometries
.
end
(),
"The geometry "
<<
domain
<<
" is not registered"
);
AKANTU_DEBUG_OUT
();
return
*
(
it
->
second
);
}
__END_AKANTU__
Event Timeline
Log In to Comment