ope_pois_tens_rr.C
/*
* Methods of class Ope_pois_tens_rr
*
* (see file ope_elementary.h for documentation)
*
*/
/*
* Copyright (c) 2004 Jerome Novak
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* LORENE 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
char ope_pois_tens_rr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Ope_elementary/Ope_pois_vect_r/ope_pois_tens_rr.C,v 1.2 2014/10/13 08:53:34 j_novak Exp $" ;
/*
* $Id: ope_pois_tens_rr.C,v 1.2 2014/10/13 08:53:34 j_novak Exp $
* $Log: ope_pois_tens_rr.C,v $
* Revision 1.2 2014/10/13 08:53:34 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.1 2004/12/23 16:30:15 j_novak
* New files and class for the solution of the rr component of the tensor Poisson
* equation.
*
*
*
* $Header: /cvsroot/Lorene/C++/Source/Ope_elementary/Ope_pois_vect_r/ope_pois_tens_rr.C,v 1.2 2014/10/13 08:53:34 j_novak Exp $
*
*/
#include"type_parite.h"
#include "ope_elementary.h"
namespace Lorene {
Matrice ope_ptens_rr_mat(int , int , double , int, int ) ;
Tbl sh_ptens_rr(int, int, double, int) ;
Matrice cl_ptens_rr (const Matrice&, int, double, int, int) ;
Matrice nondeg_ptens_rr (const Matrice&, int, double, int, int) ;
Tbl val_solh (int, double, double, int) ;
// Standard constructor :
Ope_pois_tens_rr::Ope_pois_tens_rr (int nbr, int baser, double alf, double bet, int lq, int dz):
Ope_poisson(nbr, baser, alf, bet, lq, dz)
{
assert (dzpuis == 4) ;
assert (l_quant > 1) ;
}
// Constructor by copy :
Ope_pois_tens_rr::Ope_pois_tens_rr (const Ope_pois_tens_rr& so) : Ope_poisson(so)
{
assert (dzpuis == 4) ;
assert (l_quant > 1) ;
}
// Destructor :
Ope_pois_tens_rr::~Ope_pois_tens_rr() {}
// True functions :
void Ope_pois_tens_rr::do_ope_mat() const {
if (ope_mat != 0x0)
delete ope_mat ;
ope_mat = new Matrice
(ope_ptens_rr_mat(nr, l_quant, beta/alpha, dzpuis, base_r)) ;
}
void Ope_pois_tens_rr::do_ope_cl() const {
if (ope_mat == 0x0)
do_ope_mat() ;
if (ope_cl != 0x0)
delete ope_cl ;
ope_cl = new Matrice
(cl_ptens_rr(*ope_mat, l_quant, beta/alpha, dzpuis, base_r)) ;
}
void Ope_pois_tens_rr::do_non_dege() const {
if (ope_cl == 0x0)
do_ope_cl() ;
if (non_dege != 0x0)
delete non_dege ;
non_dege = new Matrice
(nondeg_ptens_rr(*ope_cl, l_quant, beta/alpha, dzpuis, base_r)) ;
}
Tbl Ope_pois_tens_rr::get_solh() const {
assert (l_quant > 1) ;
int l1 = l_quant - 2 ;
int l2 = l_quant + 2 ;
Tbl valeurs1 (val_solh (l1, alpha, beta, base_r)) ;
Tbl valeurs2 (val_solh (l2, alpha, beta, base_r)) ;
assert (valeurs1.get_ndim() == valeurs2.get_ndim()) ;
if (valeurs1.get_ndim() == 2) {
// cas 2 sh
s_one_plus = valeurs1(0,0) ;
s_one_minus = valeurs1(0,1) ;
ds_one_plus = valeurs1(0,2) ;
ds_one_minus = valeurs1(0,3) ;
s_two_plus = valeurs2(1,0) ;
s_two_minus = valeurs2(1,1) ;
ds_two_plus = valeurs2(1,2) ;
ds_two_minus = valeurs2(1,3) ;
}
else {
// cas 1 sh :
Tbl& valeurs = (base_r == R_CHEBU) ? valeurs2 : valeurs1 ;
s_one_plus = valeurs(0) ;
s_one_minus = valeurs(1) ;
ds_one_plus = valeurs(2) ;
ds_one_minus = valeurs(3) ;
}
return sh_ptens_rr(nr, l_quant, beta/alpha, base_r) ;
}
}
Lorene::Matrice
Matrix handling.
Definition matrice.h:152
Lorene::Ope_elementary::ope_mat
Matrice * ope_mat
Pointer on the matrix representation of the operator.
Definition ope_elementary.h:114
Lorene::Ope_elementary::ds_two_minus
double ds_two_minus
Value of the derivative of the second homogeneous solution at the inner boundary.
Definition ope_elementary.h:160
Lorene::Ope_elementary::s_two_plus
double s_two_plus
Value of the second homogeneous solution at the outer boundary.
Definition ope_elementary.h:146
Lorene::Ope_elementary::s_one_minus
double s_one_minus
Value of the first homogeneous solution at the inner boundary.
Definition ope_elementary.h:131
Lorene::Ope_elementary::beta
double beta
Parameter of the associated mapping.
Definition ope_elementary.h:109
Lorene::Ope_elementary::ds_one_plus
double ds_one_plus
Value of the derivative of the first homogeneous solution at the outer boundary.
Definition ope_elementary.h:136
Lorene::Ope_elementary::ds_one_minus
double ds_one_minus
Value of the derivative of the first homogeneous solution at the inner boundary.
Definition ope_elementary.h:141
Lorene::Ope_elementary::alpha
double alpha
Parameter of the associated mapping.
Definition ope_elementary.h:108
Lorene::Ope_elementary::s_two_minus
double s_two_minus
Value of the second homogeneous solution at the inner boundary.
Definition ope_elementary.h:150
Lorene::Ope_elementary::base_r
int base_r
Radial basis of decomposition.
Definition ope_elementary.h:107
Lorene::Ope_elementary::s_one_plus
double s_one_plus
Value of the first homogeneous solution at the outer boundary.
Definition ope_elementary.h:127
Lorene::Ope_elementary::ope_cl
Matrice * ope_cl
Pointer on the banded-matrix of the operator.
Definition ope_elementary.h:118
Lorene::Ope_elementary::ds_two_plus
double ds_two_plus
Value of the derivative of the second homogeneous solution at the outer boundary.
Definition ope_elementary.h:155
Lorene::Ope_elementary::non_dege
Matrice * non_dege
Pointer on the non-degenerated matrix of the operator.
Definition ope_elementary.h:122
Lorene::Ope_elementary::nr
int nr
Number of radial points.
Definition ope_elementary.h:106
Lorene::Ope_pois_tens_rr::do_ope_cl
virtual void do_ope_cl() const
Computes the banded-matrix of the operator.
Definition ope_pois_tens_rr.C:83
Lorene::Ope_pois_tens_rr::get_solh
virtual Tbl get_solh() const
Computes the homogeneous solutions(s).
Definition ope_pois_tens_rr.C:105
Lorene::Ope_pois_tens_rr::do_ope_mat
virtual void do_ope_mat() const
Computes the matrix of the operator.
Definition ope_pois_tens_rr.C:75
Lorene::Ope_pois_tens_rr::do_non_dege
virtual void do_non_dege() const
Computes the non-degenerated matrix of the operator.
Definition ope_pois_tens_rr.C:94
Lorene::Ope_pois_tens_rr::~Ope_pois_tens_rr
virtual ~Ope_pois_tens_rr()
Destructor.
Definition ope_pois_tens_rr.C:72
Lorene::Ope_pois_tens_rr::Ope_pois_tens_rr
Ope_pois_tens_rr(int nbr, int baser, double alf, double bet, int lq, int dz)
Standard constructor.
Definition ope_pois_tens_rr.C:57
Lorene::Ope_poisson::dzpuis
int dzpuis
the associated dzpuis, if in the compactified domain.
Definition ope_elementary.h:329
Lorene::Ope_poisson::l_quant
int l_quant
quantum number
Definition ope_elementary.h:328
Lorene::Ope_poisson::Ope_poisson
Ope_poisson(int nbr, int baser, double alf, double bet, int lq, int dz)
Standard constructor.
Definition ope_poisson.C:46
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Tbl::get_ndim
int get_ndim() const
Gives the number of dimensions (ie dim.ndim).
Definition tbl.h:400
R_CHEBU
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
Definition type_parite.h:180
Lorene
Lorene prototypes.
Definition app_hor.h:64