Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92347433
be_engine.cpp
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
Tue, Nov 19, 14:20
Size
3 KB
Mime Type
text/x-c++
Expires
Thu, Nov 21, 14:20 (2 d)
Engine
blob
Format
Raw Data
Handle
22426817
Attached To
rTAMAASPUB tamaas-public
be_engine.cpp
View Options
/**
* @file
*
* @author Lucas Frérot <lucas.frerot@epfl.ch>
*
* @section LICENSE
*
* Copyright (©) 2017 EPFL (Ecole Polytechnique Fédérale de
* Lausanne) Laboratory (LSMS - Laboratoire de Simulation en Mécanique des
* Solides)
*
* Tamaas 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.
*
* Tamaas 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 Tamaas. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* -------------------------------------------------------------------------- */
#include "be_engine.hh"
#include "model.hh"
/* -------------------------------------------------------------------------- */
namespace
tamaas
{
/* -------------------------------------------------------------------------- */
void
solve
(
IntegralOperator
::
kind
kind
,
const
std
::
map
<
IntegralOperator
::
kind
,
IntegralOperator
*>&
operators
,
GridBase
<
Real
>&
input
,
GridBase
<
Real
>&
output
)
{
operators
.
at
(
kind
)
->
apply
(
input
,
output
);
}
template
<
model_type
mtype
,
IntegralOperator
::
kind
otype
>
void
registerWestergaardOperator
(
std
::
map
<
IntegralOperator
::
kind
,
IntegralOperator
*>&
operators
,
Model
&
model
)
{
std
::
stringstream
sstr
;
sstr
<<
"Westergaard::"
<<
otype
;
if
(
operators
.
find
(
otype
)
==
operators
.
end
())
operators
[
otype
]
=
model
.
template
registerIntegralOperator
<
Westergaard
<
mtype
,
otype
>>
(
sstr
.
str
());
}
template
<
model_type
type
>
void
BEEngineTmpl
<
type
>::
solveNeumann
(
GridBase
<
Real
>&
neumann
,
GridBase
<
Real
>&
dirichlet
)
const
{
solve
(
IntegralOperator
::
neumann
,
this
->
operators
,
neumann
,
dirichlet
);
}
template
<
model_type
type
>
void
BEEngineTmpl
<
type
>::
solveDirichlet
(
GridBase
<
Real
>&
dirichlet
,
GridBase
<
Real
>&
neumann
)
const
{
solve
(
IntegralOperator
::
dirichlet
,
this
->
operators
,
dirichlet
,
neumann
);
}
template
<
model_type
type
>
void
BEEngineTmpl
<
type
>::
registerNeumann
()
{
registerWestergaardOperator
<
type
,
IntegralOperator
::
neumann
>
(
this
->
operators
,
*
this
->
model
);
}
/// Register dirichlet operator
template
<
model_type
type
>
void
BEEngineTmpl
<
type
>::
registerDirichlet
()
{
registerWestergaardOperator
<
type
,
IntegralOperator
::
dirichlet
>
(
this
->
operators
,
*
this
->
model
);
}
template
class
BEEngineTmpl
<
model_type
::
basic_1d
>
;
template
class
BEEngineTmpl
<
model_type
::
basic_2d
>
;
template
class
BEEngineTmpl
<
model_type
::
surface_1d
>
;
template
class
BEEngineTmpl
<
model_type
::
surface_2d
>
;
template
class
BEEngineTmpl
<
model_type
::
volume_1d
>
;
template
class
BEEngineTmpl
<
model_type
::
volume_2d
>
;
/* -------------------------------------------------------------------------- */
}
// namespace tamaas
Event Timeline
Log In to Comment