20 #include "headcpp.hpp"
22 #include "spheric.hpp"
24 #include "tensor_impl.hpp"
43 for (
int i=0 ; i<
nbr_coefs(0)-order ; i++) {
48 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
53 pos_galerkin = pos_cf ;
54 pos_galerkin.
set(1) = 0 ;
55 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
56 -2*(*so.
cf)(pos_galerkin) ;
63 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
68 pos_galerkin = pos_cf ;
69 pos_galerkin.
set(1) = 0 ;
70 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
71 -(*so.
cf)(pos_galerkin) ;
79 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
84 pos_galerkin = pos_cf ;
85 pos_galerkin.
set(1) = 1 ;
86 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
87 - j*(*so.
cf)(pos_galerkin) ;
95 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
100 pos_galerkin = pos_cf ;
101 pos_galerkin.
set(1) = 0 ;
102 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
103 - (2*j+1)*(*so.
cf)(pos_galerkin) ;
109 cerr <<
"Unknow theta basis in Domain_shell::export_tau_val_domain_mquant" << endl ;
124 int kmin = 2*mlim + 2 ;
137 for (
int i=0 ; i<
nbr_coefs(0)-order ; i++) {
142 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
147 pos_galerkin = pos_cf ;
148 pos_galerkin.
set(1) = 0 ;
149 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
150 -2*(*so.
cf)(pos_galerkin) ;
157 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
162 pos_galerkin = pos_cf ;
163 pos_galerkin.
set(1) = 0 ;
164 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
165 -(*so.
cf)(pos_galerkin) ;
173 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
178 pos_galerkin = pos_cf ;
179 pos_galerkin.
set(1) = 1 ;
180 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
181 -j*(*so.
cf)(pos_galerkin) ;
189 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
194 pos_galerkin = pos_cf ;
195 pos_galerkin.
set(1) = 0 ;
196 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
197 -(2*j+1)*(*so.
cf)(pos_galerkin) ;
203 cerr <<
"Unknow theta basis in Domain_shell::export_tau_val_domain" << endl ;
237 else for (
int i=0 ; i<n_cmp ; i++) {
238 if ((*p_cmp[i])(0)==1)
240 if ((*p_cmp[i])(0)==2)
242 if ((*p_cmp[i])(0)==3)
254 else for (
int i=0 ; i<n_cmp ; i++) {
255 if ((*p_cmp[i])(0)==1)
257 if ((*p_cmp[i])(0)==2)
259 if ((*p_cmp[i])(0)==3)
271 else for (
int i=0 ; i<n_cmp ; i++) {
272 if ((*p_cmp[i])(0)==1)
274 if ((*p_cmp[i])(0)==2)
276 if ((*p_cmp[i])(0)==3)
282 cerr <<
"Unknown type of vector Domain_shell::export_tau" << endl ;
299 else for (
int i=0 ; i<n_cmp ; i++) {
300 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
302 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
304 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
306 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
308 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
310 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
328 else for (
int i=0 ; i<n_cmp ; i++) {
329 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
331 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
333 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
335 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
337 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
339 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
341 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
343 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
345 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
363 else for (
int i=0 ; i<n_cmp ; i++) {
364 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
366 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
368 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
370 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
372 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
374 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
376 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
378 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
380 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
395 else for (
int i=0 ; i<n_cmp ; i++) {
396 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
398 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
400 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
402 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
404 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
406 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
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)==1))
432 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
434 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
436 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
438 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
440 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
455 else for (
int i=0 ; i<n_cmp ; i++) {
456 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
458 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
460 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
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)==3))
472 cerr <<
"Unknown type of 2-tensor Domain_shell::export_tau" << endl ;
478 cerr <<
"Valence " << val <<
" not implemented in Domain_shell::export_tau" << 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(const Val_domain &eq, int mlim, int order, Array< double > &res, int &pos_res, int ncond) const
Exports a residual equation in the bulk.
void export_tau_val_domain_mquant(const Val_domain &eq, int mquant, int order, Array< double > &res, int &pos_res, int ncond) const
Exports a residual equation in the bulk.
virtual void export_tau(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 in the bulk.
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 .
int get_m_quant() 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.
bool is_m_quant_affected() const
Checks whether the additional parameter is affected (used for boson stars for instance).
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.
Array< double > * cf
Pointer on the Array of the values in the coefficients space.
void coef() const
Computes the coefficients.
const Base_spectral & get_base() const
Returns the basis of decomposition.