20 #include "headcpp.hpp"
21 #include "adapted.hpp"
23 #include "array_math.hpp"
25 #include "tensor_impl.hpp"
36 int kmin = 2*mlim + 2 ;
49 for (
int i=0 ; i<
nbr_coefs(0)-order ; i++) {
54 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
59 pos_galerkin = pos_cf ;
60 pos_galerkin.
set(1) = 0 ;
61 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
62 -2*(*so.
cf)(pos_galerkin) ;
69 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
74 pos_galerkin = pos_cf ;
75 pos_galerkin.
set(1) = 0 ;
76 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
77 -(*so.
cf)(pos_galerkin) ;
85 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
90 pos_galerkin = pos_cf ;
91 pos_galerkin.
set(1) = 1 ;
92 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
93 -j*(*so.
cf)(pos_galerkin) ;
101 sec.
set(pos_sec) = (*so.
cf)(pos_cf) ;
106 pos_galerkin = pos_cf ;
107 pos_galerkin.
set(1) = 0 ;
108 sec.
set(pos_sec) = (*so.
cf)(pos_cf)
109 -(2*j+1)*(*so.
cf)(pos_galerkin) ;
115 cerr <<
"Unknow theta basis in Domain_shell_outer_adapted::export_tau_val_domain" << endl ;
143 else for (
int i=0 ; i<n_cmp ; i++) {
144 if ((*p_cmp[i])(0)==1)
146 if ((*p_cmp[i])(0)==2)
148 if ((*p_cmp[i])(0)==3)
160 else for (
int i=0 ; i<n_cmp ; i++) {
161 if ((*p_cmp[i])(0)==1)
163 if ((*p_cmp[i])(0)==2)
165 if ((*p_cmp[i])(0)==3)
171 cerr <<
"Unknown type of vector Domain_shell_outer_adapted::export_tau" << endl ;
188 else for (
int i=0 ; i<n_cmp ; i++) {
189 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
191 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
193 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
195 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
197 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
199 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
217 else for (
int i=0 ; i<n_cmp ; i++) {
218 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
220 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
222 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
224 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
226 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
228 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
230 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
232 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
234 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
252 else for (
int i=0 ; i<n_cmp ; i++) {
253 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
255 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
257 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
259 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
261 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
263 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
265 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
267 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
269 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
284 else for (
int i=0 ; i<n_cmp ; i++) {
285 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
287 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
289 if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
291 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
293 if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
295 if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
301 cerr <<
"Unknown type of 2-tensor Domain_shell_outer_adapted::export_tau" << endl ;
307 cerr <<
"Valence " << val <<
" not implemented in Domain_shell_outer_adapted::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 mlim, 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.
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.
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.