Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F62839630
Bashforth.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
Thu, May 16, 00:31
Size
1 KB
Mime Type
text/x-c
Expires
Sat, May 18, 00:31 (2 d)
Engine
blob
Format
Raw Data
Handle
17696593
Attached To
rODVPROJECT Group15_PCSC_Project
Bashforth.cpp
View Options
#include "Bashforth.h"
/**
* Constructor inherited from the VectorialODE class
* @param input : Input object containing all variables needed to solve the ODE.
* @param solution : Output object where we will store the solution.
*/
Bashforth
::
Bashforth
(
Input
&
input
,
Solution
&
solution
)
:
VectorialODE
(
input
,
solution
)
{
assert
(
input
->
GetInitialConditionMatrix
()[
0
].
size
()
==
input
->
GetOrder
());
assert
(
GetColumnsOfMatrix
(
input
->
GetInitialConditonsMatrix
,
0
).
size
()
==
input
->
GetDimension
());
assert
(
GetColumnsOfMatrix
(
input
->
GetPastStepMatrix
(),
0
).
size
()
==
input
->
GetDimension
());
assert
(
input
->
GetChangingMatrix
()[
0
].
size
()
==
GetColumnsOfMatrix
(
input
->
GetInitialConditonsMatrix
,
0
).
size
());
assert
(
input
->
GetPastStepMatrix
()[
0
].
size
()
==
input
->
GetNumberSteps
());
}
/**
* \brief
* @param
* @param
*/
vector
<
double
>
Bashforth
::
GetColumnsOfMatrix
(
vector
<
vecto
<
double
>>
matrix
,
int
position
)
{
vector
<
double
>
column
=
matrix
.
size
();
for
(
int
i
=
0
;
i
<
matrix
.
size
();
++
i
)
{
column
[
i
]
=
matrix
[
i
][
position
];
}
return
column
;
}
Event Timeline
Log In to Comment