20 #include "headcpp.hpp"
22 #include "spheric.hpp"
24 #include "tensor_impl.hpp"
41 assert (baset==COS_EVEN) ;
54 assert (baset==SIN_ODD) ;
67 assert (baset==SIN_ODD) ;
80 int mquant = (k%2==0) ?
int(k/2) : int((k-1)/2) ;
83 assert (baset==COS_EVEN) ;
86 pos_galerkin = pos_cf ;
87 pos_galerkin.
set(1) = 0 ;
94 assert (baset==SIN_ODD) ;
119 assert (baset==SIN_EVEN) ;
132 assert (baset==COS_ODD) ;
145 assert (baset==COS_ODD) ;
158 int mquant = (k%2==0) ?
int(k/2) : int((k-1)/2) ;
161 assert (baset==SIN_EVEN) ;
162 for (
int j= 1 ; j<
nbr_coefs(1)-1 ; j++) {
170 assert (baset==COS_ODD) ;
173 pos_galerkin = pos_cf ;
174 pos_galerkin.
set(1) = 0 ;
199 assert (baset==SIN_ODD) ;
212 assert (baset==COS_EVEN) ;
225 assert (baset==COS_EVEN) ;
238 int mquant = (k%2==0) ?
int(k/2) : int((k-1)/2) ;
241 assert (baset==SIN_ODD) ;
242 for (
int j= 0 ; j<
nbr_coefs(1)-1 ; j++) {
250 assert (baset==COS_EVEN) ;
253 pos_galerkin = pos_cf ;
254 pos_galerkin.
set(1) = 0 ;
269 int kmin = 2*mlim + 2 ;
289 pos_galerkin = pos_cf ;
290 pos_galerkin.
set(1) = 0 ;
304 pos_galerkin = pos_cf ;
305 pos_galerkin.
set(1) = 0 ;
320 pos_galerkin = pos_cf ;
321 pos_galerkin.
set(1) = 1 ;
336 pos_galerkin = pos_cf ;
337 pos_galerkin.
set(1) = 0 ;
344 cerr <<
"Unknow theta basis in Domain_nucleus::export_tau_val_domain_boundary" << endl ;
356 if (bound!=OUTER_BC) {
357 cerr <<
"Unknown boundary in Domain_nucleus::export_tau_boundary" << endl ;
378 else for (
int i=0 ; i<n_cmp ; i++) {
379 if ((*p_cmp[i])(0)==1)
381 if ((*p_cmp[i])(0)==2)
383 if ((*p_cmp[i])(0)==3)
395 else for (
int i=0 ; i<n_cmp ; i++) {
396 if ((*p_cmp[i])(0)==1)
398 if ((*p_cmp[i])(0)==2)
400 if ((*p_cmp[i])(0)==3)
406 cerr <<
"Unknown type of vector Domain_nucleus::export_tau_boundary" << endl ;
423 else for (
int i=0 ; i<n_cmp ; i++) {
424 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
426 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
428 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
430 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
432 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
434 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
453 else for (
int i=0 ; i<n_cmp ; i++) {
454 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
456 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
458 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
460 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
462 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
464 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
466 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
468 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
470 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
476 cerr <<
"Unknown type of 2-tensor Domain_nucleus::export_tau_boundary" << endl ;
482 cerr <<
"Valence " << val <<
" not implemented in Domain_nucleus::export_tau_boundary" << endl ;
reference set(const Index &pos)
Read/write of an element.
Bases_container bases_1d
Arrays containing the various basis of decomposition.
int get_basis(int nd) const
Read only the basis in a given domain.
void export_tau_val_domain_boundary_vr(const Val_domain &eq, int bound, Array< double > &res, int &pos_res, int ncond) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
void export_tau_val_domain_boundary(const Val_domain &eq, int mlim, int bound, Array< double > &res, int &pos_res, int ncond) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
virtual double val_boundary(int, const Val_domain &, const Index &) const
Computes the value of a field at a boundary.
void export_tau_val_domain_boundary_vp(const Val_domain &eq, int bound, Array< double > &res, int &pos_res, int ncond) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
void export_tau_val_domain_boundary_vt(const Val_domain &eq, int bound, Array< double > &res, int &pos_res, int ncond) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
virtual void export_tau_boundary(const Tensor &, int, int, Array< double > &, int &, const Array< int > &, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Exports all the residual equations corresponding to a tensorial one on a given boundary It makes use ...
Dim_array nbr_coefs
Number of coefficients.
Class that gives the position inside a multi-dimensional Array.
int & set(int i)
Read/write of the position in a given dimension.
int get_m_order() const
Returns .
bool is_m_order_affected() const
Checks whether the additional parameter order is affected (not very used).
const Param_tensor & get_parameters() const
Returns a pointer on the possible additional parameter.
const Base_tensor & get_basis() const
Returns the vectorial basis (triad) on which the components are defined.
int get_n_comp() const
Returns the number of stored components.
int get_valence() const
Returns the valence.
Class for storing the basis of decompositions of a field and its values on both the configuration and...
bool check_if_zero() const
Check whether the logical state is zero or not.
void coef() const
Computes the coefficients.
const Base_spectral & get_base() const
Returns the basis of decomposition.