Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121674384
Iterate.hpp
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, Jul 13, 01:19
Size
1 KB
Mime Type
text/x-c
Expires
Tue, Jul 15, 01:19 (2 d)
Engine
blob
Format
Raw Data
Handle
27372215
Attached To
rGOOSEFEM GooseFEM
Iterate.hpp
View Options
/**
\file
\copyright Copyright 2017. Tom de Geus. All rights reserved.
\license This project is released under the GNU Public License (GPLv3).
*/
#ifndef PYGOOSEFEM_ITERATE_H
#define PYGOOSEFEM_ITERATE_H
#include <GooseFEM/Iterate.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
namespace
py
=
pybind11
;
void
init_Iterate
(
py
::
module
&
mod
)
{
py
::
class_
<
GooseFEM
::
Iterate
::
StopList
>
cls
(
mod
,
"Iterate"
);
cls
.
def
(
py
::
init
<
size_t
>
(),
"Class to perform a residual check based on the last 'n' iterations."
"See :cpp:class:`GooseFEM::Iterate::StopList`."
,
py
::
arg
(
"n"
)
=
1
);
cls
.
def
(
"reset"
,
py
::
overload_cast
<>
(
&
GooseFEM
::
Iterate
::
StopList
::
reset
),
"Reset."
"See :cpp:func:`GooseFEM::Iterate::StopList::reset`."
);
cls
.
def
(
"stop_simple"
,
&
GooseFEM
::
Iterate
::
StopList
::
stop_simple
,
"Update list of residuals, return `true` if all residuals are below the tolerance."
"See :cpp:func:`GooseFEM::Iterate::StopList::stop_simple`."
,
py
::
arg
(
"res"
),
py
::
arg
(
"tol"
));
cls
.
def
(
"stop"
,
&
GooseFEM
::
Iterate
::
StopList
::
stop
,
"Update list of residuals, return `true` if all residuals are sorted and below the tolerance."
"See :cpp:func:`GooseFEM::Iterate::StopList::stop`."
,
py
::
arg
(
"res"
),
py
::
arg
(
"tol"
));
cls
.
def
(
"get"
,
&
GooseFEM
::
Iterate
::
StopList
::
get
,
"Get the list of residuals."
"See :cpp:func:`GooseFEM::Iterate::StopList::get`."
);
cls
.
def
(
"__repr__"
,
[](
const
GooseFEM
::
Iterate
::
StopList
&
)
{
return
"<GooseFEM.Iterate.StopList>"
;
});
}
#endif
Event Timeline
Log In to Comment