#include <bvp.hpp>
Public Member Functions | |
BVP (shared_ptr< const domain > O, shared_ptr< const diff_op > L_in, shared_ptr< const bdry_diff_op > B_in, const map< point, double > &f_in, const map< point, double > &g_in) | |
Create a boundary value problem. | |
BVP (shared_ptr< const domain > O, shared_ptr< const diff_op > L_in, shared_ptr< const bdry_diff_op > B_in, const realfunc &f_in, const realfunc &g_in) | |
Create a boundary value problem. | |
virtual | ~BVP () |
shared_ptr< const domain > | get_domain () const |
Get the domain of this BVP. | |
shared_ptr< const diff_op > | get_diff_op () const |
Get the interior operator of this BVP. | |
shared_ptr< const bdry_diff_op > | get_bdry_diff_op () const |
Get the boundary operator of this BVP. | |
const map< point, double > & | get_f () const |
Get the interior values of this BVP. | |
const map< point, double > & | get_g () const |
Get the boundary values of this BVP. | |
void | set_f (const realfunc &f_in) |
Change the interior values of this BVP. | |
void | set_g (const realfunc &g_in) |
Change the boundary values of this BVP. | |
void | set_f (const map< point, double > &f_in) |
Change or set interior values of this BVP. | |
void | set_g (const map< point, double > &g_in) |
Change or set interior values of this BVP. | |
Private Member Functions | |
BVP (const BVP &) | |
No copying allowed! | |
Private Attributes | |
shared_ptr< const domain > | Omega |
shared_ptr< const diff_op > | L |
shared_ptr< const bdry_diff_op > | B |
map< point, double > | f |
map< point, double > | g |
A boundary value problem is a domain , a differential operator
on
, a boundary differential operator
on
, and the right hand side values of the equations. Think
bvp::BVP::BVP | ( | shared_ptr< const domain > | O, | |
shared_ptr< const diff_op > | L_in, | |||
shared_ptr< const bdry_diff_op > | B_in, | |||
const map< point, double > & | f_in, | |||
const map< point, double > & | g_in | |||
) |
Create a boundary value problem.
Given a domain, boundary and interior operators, and values that those operators must take on domain and interior, create a BVP.
O | - A shared_ptr to the domain. | |
L_in | - A shared_ptr to the interior operator. | |
B_in | - A shared_ptr to the boundary operator. | |
f_in | - An std::map giving the values that the interior operator must take. | |
g_in | - An std::map giving the values that the boundary operator must take. |
00234 { 00235 Omega = O; 00236 L = L_in; 00237 B = B_in; 00238 set_f(f_in); 00239 set_g(g_in); 00240 }
bvp::BVP::BVP | ( | shared_ptr< const domain > | O, | |
shared_ptr< const diff_op > | L_in, | |||
shared_ptr< const bdry_diff_op > | B_in, | |||
const realfunc & | f_in, | |||
const realfunc & | g_in | |||
) |
Create a boundary value problem.
Given a domain, boundary and interior operators, and values that those operators must take on domain and interior, create a BVP.
O | - A shared_ptr to the domain. | |
L_in | - A shared_ptr to the interior operator. | |
B_in | - A shared_ptr to the boundary operator. | |
f_in | - A realfunc giving the values tha the interior operator must take. | |
g_in | - A realfunc giving the values that the boundary operator must take. |
00246 { 00247 Omega = O; 00248 L = L_in; 00249 B = B_in; 00250 set_f(f_in); 00251 set_g(g_in); 00252 }
bvp::BVP::BVP | ( | const BVP & | ) | [inline, private] |
shared_ptr< const domain > bvp::BVP::get_domain | ( | ) | const |
shared_ptr< const diff_op > bvp::BVP::get_diff_op | ( | ) | const |
shared_ptr< const bdry_diff_op > bvp::BVP::get_bdry_diff_op | ( | ) | const |
const map< point, double > & bvp::BVP::get_f | ( | ) | const |
const map< point, double > & bvp::BVP::get_g | ( | ) | const |
void bvp::BVP::set_f | ( | const realfunc & | f_in | ) |
void bvp::BVP::set_g | ( | const realfunc & | g_in | ) |
void bvp::BVP::set_f | ( | const map< point, double > & | f_in | ) |
Change or set interior values of this BVP.
Given an std::map of interior values, this function sets or changes the corresponding interior values in the BVP.
f_in | - An std::map assigning scalar values to interior points. |
00270 { 00271 for( map<point,double>::const_iterator I = f_in.begin(); 00272 I != f_in.end(); I++){ 00273 if( !contains(Omega->get_interior(), I->first ) ){ 00274 badArgument exc; 00275 exc.reason = 00276 "Bad specification of f in BVP: " 00277 "gave a point not in the interior."; 00278 exc.line = __LINE__; 00279 exc.file = __FILE__; 00280 throw exc; 00281 } 00282 f[I->first] = I->second; 00283 } 00284 }
void bvp::BVP::set_g | ( | const map< point, double > & | g_in | ) |
Change or set interior values of this BVP.
Given an std::map of boundary values, this function sets or changes the corresponding boundary values in the BVP.
g_in | - An std::map assigning scalar values to boundary points. |
00285 { 00286 for( map<point,double>::const_iterator I = g_in.begin(); 00287 I != g_in.end(); I++){ 00288 if( !contains(Omega->get_boundary(), I->first ) ){ 00289 badArgument exc; 00290 exc.reason = 00291 "Bad specification of g in BVP: " 00292 "gave a point not on the boundary."; 00293 exc.line = __LINE__; 00294 exc.file = __FILE__; 00295 throw exc; 00296 } 00297 g[I->first] = I -> second; 00298 } 00299 }
shared_ptr<const domain> bvp::BVP::Omega [private] |
shared_ptr<const diff_op> bvp::BVP::L [private] |
shared_ptr<const bdry_diff_op> bvp::BVP::B [private] |
map<point, double> bvp::BVP::f [private] |
map<point, double> bvp::BVP::g [private] |