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_compact::export_tau_val_domain_mquant" << endl ;
123 int kmin = 2*mlim + 2 ;
136 for (
int i=0 ; i<
nbr_coefs(0)-order ; i++) {
141 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
146 pos_galerkin = pos_cf ;
147 pos_galerkin.
set(1) = 0 ;
148 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
149 -2*(*so.
cf)(pos_galerkin) ;
156 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
161 pos_galerkin = pos_cf ;
162 pos_galerkin.
set(1) = 0 ;
163 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
164 -(*so.
cf)(pos_galerkin) ;
172 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
177 pos_galerkin = pos_cf ;
178 pos_galerkin.
set(1) = 1 ;
179 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
180 -j*(*so.
cf)(pos_galerkin) ;
188 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
193 pos_galerkin = pos_cf ;
194 pos_galerkin.
set(1) = 0 ;
195 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
196 -(2*j+1)*(*so.
cf)(pos_galerkin) ;
202 cerr <<
"Unknow theta basis in Domain_compact::export_tau_val_domain" << endl ;
236 else for (
int i=0 ; i<n_cmp ; i++) {
237 if ((*p_cmp[i])(0)==1)
239 if ((*p_cmp[i])(0)==2)
241 if ((*p_cmp[i])(0)==3)
253 else for (
int i=0 ; i<n_cmp ; i++) {
254 if ((*p_cmp[i])(0)==1)
256 if ((*p_cmp[i])(0)==2)
258 if ((*p_cmp[i])(0)==3)
264 cerr <<
"Unknown type of vector Domain_compact::export_tau" << endl ;
281 else for (
int i=0 ; i<n_cmp ; i++) {
282 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
284 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
286 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
288 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
290 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
292 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
310 else for (
int i=0 ; i<n_cmp ; i++) {
311 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
313 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
315 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
317 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
319 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
321 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
323 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
325 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
327 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
345 else for (
int i=0 ; i<n_cmp ; i++) {
346 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
348 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
350 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
352 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
354 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
356 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
358 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
360 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
362 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
377 else for (
int i=0 ; i<n_cmp ; i++) {
378 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
380 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
382 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
384 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
386 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
388 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
394 cerr <<
"Unknown type of 2-tensor Domain_compact::export_tau" << endl ;
400 cerr <<
"Valence " << val <<
" not implemented in Domain_compact::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.