20 #include "headcpp.hpp"
21 #include "spheric_symphi.hpp"
22 #include "array_math.hpp"
24 #include "tensor_impl.hpp"
43 int mquant, kmin, kmax ;
64 cerr <<
"Unknow phi basis in Domain_compact_symphi::export_tau_val_domain" << endl ;
71 for (
int k=kmin ; k<=kmax ; k++) {
87 cerr <<
"Unknow phi basis in Domain_compact_symphi::export_tau_val_domain" << endl ;
100 for (
int i=0 ; i<
nbr_coefs(0)-order ; i++) {
106 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
112 pos_gal_t.
set(1) = 0 ;
114 sec.
set(pos_sec) = (*so.
cf)(pos_cf) + fact_t*(*so.
cf)(pos_gal_t) ;
123 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
129 pos_gal_t.
set(1) = 0 ;
131 sec.
set(pos_sec) = (*so.
cf)(pos_cf) + fact_t*(*so.
cf)(pos_gal_t) ;
140 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
146 pos_gal_t.
set(1) = 1 ;
148 sec.
set(pos_sec) = (*so.
cf)(pos_cf) + fact_t*(*so.
cf)(pos_gal_t) ;
158 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
164 pos_gal_t.
set(1) = 0 ;
166 sec.
set(pos_sec) = (*so.
cf)(pos_cf) + fact_t*(*so.
cf)(pos_gal_t) ;
172 cerr <<
"Unknow theta basis in Domain_compact_symphi::export_tau_val_domain" << endl ;
197 else for (
int i=0 ; i<n_cmp ; i++) {
198 if ((*p_cmp[i])(0)==1)
200 if ((*p_cmp[i])(0)==2)
202 if ((*p_cmp[i])(0)==3)
209 cerr <<
"Unknown type of vector Domain_compact_symphi::export_tau" << endl ;
226 else for (
int i=0 ; i<n_cmp ; i++) {
227 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
229 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
231 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
233 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
235 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
237 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
255 else for (
int i=0 ; i<n_cmp ; i++) {
256 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
258 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
260 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
262 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
264 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
266 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
268 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
270 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
272 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
278 cerr <<
"Unknown type of 2-tensor Domain_compact_symphi::export_tau" << endl ;
284 cerr <<
"Valence " << val <<
" not implemented in Domain_compact_symphi::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.
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.
void export_tau_val_domain(const Val_domain &eq, int order, Array< double > &res, int &pos_res, int ncond) const
Exports a residual equation 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.
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.
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.