bvp::BVP Class Reference

A boundary value problem. More...

#include <bvp.hpp>

Inheritance diagram for bvp::BVP:

Inheritance graph
[legend]
Collaboration diagram for bvp::BVP:

Collaboration graph
[legend]

List of all members.

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 domainget_domain () const
 Get the domain of this BVP.
shared_ptr< const diff_opget_diff_op () const
 Get the interior operator of this BVP.
shared_ptr< const bdry_diff_opget_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 domainOmega
shared_ptr< const diff_opL
shared_ptr< const bdry_diff_opB
map< point, double > f
map< point, double > g


Detailed Description

A boundary value problem.

A boundary value problem is a domain $\Omega$, a differential operator $\mathcal{L}$ on $\Omega$, a boundary differential operator $\mathcal{B}$ on $\partial\Omega$, and the right hand side values of the equations. Think

\[ \begin{cases} \mathcal{L}u = f &\text{on } \Omega \\ \mathcal{B}u = g &\text{on } \partial\Omega. \end{cases} \]


Constructor & Destructor Documentation

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.

Parameters:
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   }

Here is the call graph for this function:

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.

Parameters:
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   }

Here is the call graph for this function:

virtual bvp::BVP::~BVP (  )  [inline, virtual]

00159 {};

bvp::BVP::BVP ( const BVP  )  [inline, private]

No copying allowed!

00196 {}; 


Member Function Documentation

shared_ptr< const domain > bvp::BVP::get_domain (  )  const

Get the domain of this BVP.

00254                                                 {
00255     return Omega;
00256   }

shared_ptr< const diff_op > bvp::BVP::get_diff_op (  )  const

Get the interior operator of this BVP.

00257                                                   {
00258     return L;
00259   }

shared_ptr< const bdry_diff_op > bvp::BVP::get_bdry_diff_op (  )  const

Get the boundary operator of this BVP.

00260                                                             {
00261     return B;
00262   }  

const map< point, double > & bvp::BVP::get_f (  )  const

Get the interior values of this BVP.

00263                                             {
00264     return f;
00265   }

const map< point, double > & bvp::BVP::get_g (  )  const

Get the boundary values of this BVP.

00266                                             {
00267     return g;
00268   }

void bvp::BVP::set_f ( const realfunc f_in  ) 

Change the interior values of this BVP.

00300                                      {
00301     for(set<point>::iterator I = Omega->get_interior().begin();
00302         I != Omega->get_interior().end(); I++)
00303       f[*I] = f_in(*I);
00304   }

void bvp::BVP::set_g ( const realfunc g_in  ) 

Change the boundary values of this BVP.

00306                                      {
00307     for(set<point>::iterator I = Omega->get_boundary().begin();
00308         I != Omega->get_boundary().end(); I++)
00309       g[*I] = g_in(*I);
00310   }

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.

Parameters:
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   }

Here is the call graph for this function:

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.

Parameters:
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   }

Here is the call graph for this function:


Member Data Documentation

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]


The documentation for this class was generated from the following files:

Generated on Fri Jun 6 17:28:25 2008 by  doxygen 1.5.6