781 lines
42 KiB
C++
781 lines
42 KiB
C++
|
|
// This file is part of the Herezh++ application.
|
|
//
|
|
// The finite element software Herezh++ is dedicated to the field
|
|
// of mechanics for large transformations of solid structures.
|
|
// It is developed by Gérard Rio (APP: IDDN.FR.010.0106078.000.R.P.2006.035.20600)
|
|
// INSTITUT DE RECHERCHE DUPUY DE LÔME (IRDL) <https://www.irdl.fr/>.
|
|
//
|
|
// Herezh++ is distributed under GPL 3 license ou ultérieure.
|
|
//
|
|
// Copyright (C) 1997-2022 Université Bretagne Sud (France)
|
|
// AUTHOR : Gérard Rio
|
|
// E-MAIL : gerardrio56@free.fr
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License,
|
|
// or (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
// See the GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
//
|
|
// For more information, please consult: <https://herezh.irdl.fr/>.
|
|
|
|
//#include "Debug.h"
|
|
# include "Met_abstraite.h"
|
|
# include "Util.h"
|
|
using namespace std; //introduces namespace std
|
|
// a priori on n'en n'a pas besoin mais c'est pour que l'éditeur reconnaisse les différentes
|
|
// fonctions ??
|
|
|
|
|
|
// =========================================================================================
|
|
// vu la taille des executables le fichier est decompose en trois
|
|
// le premier : Met_abstraite1s2.cp concerne les constructeurs, destructeur et
|
|
// la gestion des variables
|
|
// le deuxième : Met_abstraite2s2.cp concerne le calcul des méthodes publiques
|
|
// le troisième: Met_abstraite2s2.cp concerne le calcul des méthodes privées
|
|
// =========================================================================================
|
|
|
|
// ***********$ il faut utiliser des références pour optimiser l'opérateur parenthèse
|
|
/// ceci dans la plupart des routines gourmandes !!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
|
Met_abstraite::Met_abstraite () : // constructeur par defaut mettant les pointeurs a NULL
|
|
d_gijBB_t(),d_gijBB_tdt(),d2_gijBB_tdt(),d_gijHH_t(),d_gijHH_tdt(),d_jacobien_t(),d_jacobien_tdt(),
|
|
tab_ddl(),tab(),posi_tab(1),d_gradVBB_t(),d_gradVBB_tdt(),d_gradVmoyBB_t(),d_gradVmoyBB_tdt()
|
|
,V_moy_t(),V_moy_tdt(),nbddl_sup_xi(0)
|
|
{ dim_base = 0; nbvec_base = 0;
|
|
M0 = NULL;Mt = NULL;d_Mt = NULL;Mtdt = NULL;d_Mtdt = NULL;
|
|
V0 = NULL;Vt = NULL;d_Vt = NULL;Vtdt = NULL;d_Vtdt = NULL;
|
|
giB_0 = NULL;giB_t = NULL; giB_tdt = NULL;
|
|
giH_0 = NULL;giH_t = NULL;giH_tdt = NULL;
|
|
gijBB_0 = NULL;gijBB_t = NULL;gijBB_tdt = NULL;
|
|
gijHH_0 = NULL;gijHH_t = NULL;gijHH_tdt = NULL;
|
|
gradVBB_t = NULL; gradVBB_tdt = NULL;gradVmoyBB_t=NULL;gradVmoyBB_tdt=NULL;
|
|
dmatV_moy_t=NULL; dmatV_moy_tdt = NULL;
|
|
d_giB_t = NULL;d_giB_tdt = NULL;
|
|
d_giH_t = NULL;d_giH_tdt = NULL;
|
|
nomb_noeud = 0; // a priori le nombre de noeud est nul
|
|
Init_conteneur_de_retour_methode(); // Init des conteneurs de retour de fonction
|
|
};
|
|
// constructeur permettant de dimensionner uniquement certaine variables
|
|
// dim = dimension de l'espace, nbvec = nb de vecteur des bases, tab = liste
|
|
// des variables a initialiser
|
|
Met_abstraite::Met_abstraite (int dim,int nbvec,const DdlElement& tabddl,
|
|
const Tableau<Enum_variable_metrique>& tabb,int nb_noeud
|
|
,int nnbddl_sup_xi):
|
|
tab_ddl(tabddl),tab(tabb),
|
|
d_gijBB_t(),d_gijBB_tdt(),d2_gijBB_tdt(),d_gijHH_t(),d_gijHH_tdt(),
|
|
d_jacobien_t(),d_jacobien_tdt(),posi_tab(1)
|
|
,d_gradVBB_t(),d_gradVBB_tdt(),d_gradVmoyBB_t(),d_gradVmoyBB_tdt()
|
|
,V_moy_t(),V_moy_tdt(),nbddl_sup_xi(nnbddl_sup_xi)
|
|
{ dim_base = dim; nbvec_base = nbvec;
|
|
Allocation();
|
|
nomb_noeud = nb_noeud;
|
|
Init_conteneur_de_retour_methode(); // mise à jour des conteneurs de retour de fonction
|
|
};
|
|
// Constructeur de copie :
|
|
Met_abstraite::Met_abstraite (const Met_abstraite& a) :
|
|
tab_ddl(a.tab_ddl), dim_base(a.dim_base) , nbvec_base(a.nbvec_base)
|
|
,nomb_noeud(a.nomb_noeud),tab(a.tab)
|
|
,jacobien_0(a.jacobien_0) , jacobien_t(a.jacobien_t),
|
|
jacobien_tdt(a.jacobien_tdt), d_gijBB_t() ,
|
|
d_gijBB_tdt (a.d_gijBB_tdt.Taille()), d_gijHH_t(a.d_gijHH_t.Taille()) ,
|
|
d2_gijBB_tdt(a.d2_gijBB_tdt.Taille1()), // a priori la matrice est carré
|
|
d_gijHH_tdt (a.d_gijHH_tdt.Taille()), d_jacobien_t(a.d_jacobien_t),
|
|
d_jacobien_tdt(a.d_jacobien_tdt),posi_tab(1),d_gradVBB_t(),d_gradVBB_tdt()
|
|
,d_gradVmoyBB_t(a.d_gradVmoyBB_t),d_gradVmoyBB_tdt(a.d_gradVmoyBB_tdt)
|
|
,V_moy_t(a.V_moy_t),V_moy_tdt(a.V_moy_tdt),nbddl_sup_xi(a.nbddl_sup_xi)
|
|
{ // on met à NULL les grandeurs pointées
|
|
M0 = NULL;Mt = NULL;d_Mt = NULL;Mtdt = NULL;d_Mtdt = NULL;
|
|
V0 = NULL;Vt = NULL;d_Vt = NULL;Vtdt = NULL;d_Vtdt = NULL;
|
|
giB_0 = NULL;giB_t = NULL; giB_tdt = NULL;
|
|
giH_0 = NULL;giH_t = NULL;giH_tdt = NULL;
|
|
gijBB_0 = NULL;gijBB_t = NULL;gijBB_tdt = NULL;
|
|
gijHH_0 = NULL;gijHH_t = NULL;gijHH_tdt = NULL;
|
|
gradVmoyBB_t = NULL; gradVmoyBB_tdt = NULL;
|
|
gradVBB_t = NULL; gradVBB_tdt = NULL;
|
|
dmatV_moy_t = NULL; dmatV_moy_tdt = NULL;
|
|
d_giB_t = NULL;d_giB_tdt = NULL;
|
|
d_giH_t = NULL;d_giH_tdt = NULL;
|
|
// on recopie les grandeurs
|
|
Copie_met(a);
|
|
Init_conteneur_de_retour_methode(); // mise à jour des conteneurs de retour de fonction
|
|
};
|
|
|
|
Met_abstraite::~Met_abstraite ()
|
|
{ Deallocation();
|
|
};
|
|
|
|
/// surcharge de l'opérateur d'affectation
|
|
Met_abstraite& Met_abstraite::operator = (const Met_abstraite& met)
|
|
{ // copie des grandeurs pointées et désallocation si nécessaire
|
|
Copie_met(met);
|
|
// copie des grandeurs non pointées
|
|
tab=met.tab;
|
|
tab_ddl = met.tab_ddl;
|
|
dim_base = met.dim_base;
|
|
nbvec_base = met.nbvec_base;
|
|
nomb_noeud = met.nomb_noeud;
|
|
jacobien_0 = met.jacobien_0;
|
|
jacobien_t = met.jacobien_t;
|
|
jacobien_tdt = met.jacobien_tdt;
|
|
d_jacobien_t = met.d_jacobien_t;
|
|
d_jacobien_tdt = met.d_jacobien_tdt;
|
|
return (*this);
|
|
};
|
|
|
|
// affichage minimale des éléments de métrique de base
|
|
void Met_abstraite::Affiche() const
|
|
{ cout << "\n -- info elements de base de la metrique -- ";
|
|
if (giB_0 != NULL)
|
|
{ cout << "\n giB_0: "; giB_0->Affiche();};
|
|
if (giB_t != NULL)
|
|
{ cout << "\n giB_t: "; giB_t->Affiche();};
|
|
if (giB_tdt != NULL)
|
|
{ cout << "\n giB_tdt: "; giB_tdt->Affiche();};
|
|
if (giH_0 != NULL)
|
|
{ cout << "\n giH_0: "; giH_0->Affiche();};
|
|
if (giH_t != NULL)
|
|
{ cout << "\n giH_t: "; giH_t->Affiche();};
|
|
if (giH_tdt != NULL)
|
|
{ cout << "\n giH_tdt: "; giH_tdt->Affiche();};
|
|
|
|
if (gijBB_0 != NULL)
|
|
{ cout << "\n gijBB_0: "; gijBB_0->Ecriture(cout);}
|
|
if (gijBB_t != NULL)
|
|
{ cout << "\n gijBB_t: "; gijBB_t->Ecriture(cout);}
|
|
if (gijBB_tdt != NULL)
|
|
{ cout << "\n gijBB_tdt: "; gijBB_tdt->Ecriture(cout);}
|
|
if (gijHH_0 != NULL)
|
|
{ cout << "\n gijHH_0: "; gijHH_0->Ecriture(cout);}
|
|
if (gijHH_t != NULL)
|
|
{ cout << "\n gijHH_t: "; gijHH_t->Ecriture(cout);}
|
|
if (gijHH_tdt != NULL)
|
|
{ cout << "\n gijHH_tdt: "; gijHH_tdt->Ecriture(cout);}
|
|
|
|
cout << "\n jacobien_0= "<< jacobien_0
|
|
<< " jacobien_t= "<< jacobien_t
|
|
<< " jacobien_tdt= "<< jacobien_tdt;
|
|
cout << "\n -- fin info elements de metrique --" << flush;
|
|
};
|
|
|
|
// ------------------------ gestion de la memoire --------------------------
|
|
// Changement d'initialisation des differentes variables
|
|
void Met_abstraite::PlusInitVariables(Tableau<Enum_variable_metrique>& tab)
|
|
{ // on définit un tableau d'indicateurs pour gérer le tableau tab interne
|
|
int tabtaille = tab.Taille();
|
|
Tableau <bool> tabbool(tabtaille,false);
|
|
// on alloue en fonction des parametres
|
|
int nbddl_x = tab_ddl.NbDdl_famille(X1); // nombre de ddl en position
|
|
nbddl_x += nbddl_sup_xi; // on tiens compte de ddl sup éventuels
|
|
int nbddl_v = tab_ddl.NbDdl_famille(V1); // nombre de ddl en vitesse
|
|
nbddl_v += nbddl_sup_xi; // on tiens compte de ddl sup éventuels
|
|
|
|
if (Existe(tab,iM0) && (M0 == NULL) )
|
|
{M0 = new Coordonnee(dim_base);tabbool(Existe_num(tab,iM0))=true;}
|
|
if (Existe(tab,iMt) && (Mt == NULL) )
|
|
{Mt = new Coordonnee(dim_base);tabbool(Existe_num(tab,iMt))=true;}
|
|
if (Existe(tab,idMt) && (d_Mt == NULL) )
|
|
{Coordonnee toto(dim_base); d_Mt = new Tableau <Coordonnee> (nbddl_x,toto);
|
|
tabbool(Existe_num(tab,idMt))=true;}
|
|
if (Existe(tab,iMtdt) && (Mtdt == NULL) )
|
|
{Mtdt = new Coordonnee(dim_base);tabbool(Existe_num(tab,iMtdt))=true;}
|
|
if (Existe(tab,idMtdt) && (d_Mtdt == NULL) )
|
|
{Coordonnee toto(dim_base); d_Mtdt = new Tableau <Coordonnee> (nbddl_x,toto);
|
|
tabbool(Existe_num(tab,idMtdt))=true;}
|
|
if (Existe(tab,iV0) && (V0 == NULL) )
|
|
{V0 = new Coordonnee(dim_base);tabbool(Existe_num(tab,iV0))=true;}
|
|
if (Existe(tab,iVt) && (Vt == NULL) )
|
|
{Vt = new Coordonnee(dim_base);tabbool(Existe_num(tab,iVt))=true;}
|
|
if (Existe(tab,idVt) && (d_Vt == NULL) )
|
|
{Coordonnee toto(dim_base); d_Vt = new Tableau <Coordonnee> (nbddl_x,toto);
|
|
tabbool(Existe_num(tab,idVt))=true;}
|
|
if (Existe(tab,iVtdt) && (Vtdt == NULL) )
|
|
{Vtdt = new Coordonnee(dim_base);tabbool(Existe_num(tab,iVtdt))=true;}
|
|
if (Existe(tab,idVtdt) && (d_Vtdt == NULL) )
|
|
{Coordonnee toto(dim_base); d_Vtdt = new Tableau <Coordonnee> (nbddl_x,toto);
|
|
tabbool(Existe_num(tab,idVtdt))=true;}
|
|
if (Existe(tab,igiB_0) && (giB_0 == NULL) )
|
|
{giB_0 = new BaseB(dim_base,nbvec_base);tabbool(Existe_num(tab,igiB_0))=true;}
|
|
if (Existe(tab,igiB_t) && (giB_t == NULL) )
|
|
{giB_t = new BaseB(dim_base,nbvec_base);tabbool(Existe_num(tab,igiB_t))=true;}
|
|
if (Existe(tab,igiB_tdt) && (giB_tdt == NULL) )
|
|
{giB_tdt = new BaseB(dim_base,nbvec_base);tabbool(Existe_num(tab,igiB_tdt))=true;}
|
|
if (Existe(tab,igiH_0) && (giH_0 == NULL) )
|
|
{giH_0 = new BaseH (dim_base,nbvec_base);tabbool(Existe_num(tab,igiH_0))=true;}
|
|
if (Existe(tab,igiH_t) && (giH_t == NULL) )
|
|
{giH_t = new BaseH (dim_base,nbvec_base);tabbool(Existe_num(tab,igiH_t))=true;}
|
|
if (Existe(tab,igiH_tdt) && (giH_tdt == NULL) )
|
|
{giH_tdt = new BaseH (dim_base,nbvec_base);tabbool(Existe_num(tab,igiH_tdt))=true;}
|
|
if (Existe(tab,igijBB_0) && (gijBB_0 == NULL) )
|
|
{gijBB_0 = NevezTenseurBB(nbvec_base);tabbool(Existe_num(tab,igijBB_0))=true;}
|
|
if (Existe(tab,igijBB_t) && (gijBB_t == NULL) )
|
|
{gijBB_t = NevezTenseurBB(nbvec_base);tabbool(Existe_num(tab,igijBB_t))=true;}
|
|
if (Existe(tab,igijBB_tdt) && (gijBB_tdt == NULL) )
|
|
{gijBB_tdt = NevezTenseurBB(nbvec_base);tabbool(Existe_num(tab,igijBB_tdt))=true;}
|
|
if (Existe(tab,igijHH_0) && (gijHH_0 == NULL) )
|
|
{gijHH_0 = NevezTenseurHH(nbvec_base);tabbool(Existe_num(tab,igijHH_0))=true;}
|
|
if (Existe(tab,igijHH_t) && (gijHH_t == NULL) )
|
|
{gijHH_t = NevezTenseurHH(nbvec_base);tabbool(Existe_num(tab,igijHH_t))=true;}
|
|
if (Existe(tab,igijHH_tdt) && (gijHH_tdt == NULL) )
|
|
{gijHH_tdt = NevezTenseurHH(nbvec_base);tabbool(Existe_num(tab,igijHH_tdt))=true;}
|
|
if (Existe(tab,igradVmoyBB_t) && (gradVmoyBB_t == NULL) )
|
|
{if (nbvec_base != 1)
|
|
{gradVmoyBB_t = NevezTenseurBB(-nbvec_base);} // tenseur non symétrique
|
|
else
|
|
{gradVmoyBB_t = NevezTenseurBB(nbvec_base);} // cas 1D pas de différence symétrique non symétrique
|
|
tabbool(Existe_num(tab,igradVmoyBB_t))=true;
|
|
// on dimensionne également le tableau des vitesses moyennes aux noeuds
|
|
V_moy_t.Change_taille(nomb_noeud); for (int i=1;i<=nomb_noeud;i++) V_moy_t(i).Change_dim(dim_base);
|
|
// et leurs dérivées covariantes
|
|
if (dmatV_moy_t == NULL)
|
|
{dmatV_moy_t = new BaseB(dim_base,nbvec_base);};
|
|
}
|
|
if (Existe(tab,igradVmoyBB_tdt) && (gradVmoyBB_tdt == NULL) )
|
|
{if (nbvec_base != 1)
|
|
{gradVmoyBB_tdt = NevezTenseurBB(-nbvec_base);} // tenseur non symétrique
|
|
else
|
|
{gradVmoyBB_tdt = NevezTenseurBB(nbvec_base);} // cas 1D pas de différence symétrique non symétrique
|
|
tabbool(Existe_num(tab,igradVmoyBB_tdt))=true;
|
|
// on dimensionne également le tableau des vitesses moyennes aux noeuds
|
|
V_moy_tdt.Change_taille(nomb_noeud); for (int i=1;i<=nomb_noeud;i++) V_moy_tdt(i).Change_dim(dim_base);
|
|
// et leurs dérivées covariantes
|
|
if (dmatV_moy_t == NULL)
|
|
{dmatV_moy_tdt = new BaseB(dim_base,nbvec_base);};
|
|
}
|
|
if (Existe(tab,igradVBB_t) && (gradVBB_t == NULL) )
|
|
{if (nbvec_base != 1)
|
|
{gradVBB_t = NevezTenseurBB(-nbvec_base);} // tenseur non symétrique
|
|
else
|
|
{gradVBB_t = NevezTenseurBB(nbvec_base);} // cas 1D pas de différence symétrique non symétrique
|
|
tabbool(Existe_num(tab,igradVBB_t))=true;
|
|
}
|
|
if (Existe(tab,igradVBB_tdt) && (gradVBB_tdt == NULL) )
|
|
{if (nbvec_base != 1)
|
|
{gradVBB_tdt = NevezTenseurBB(-nbvec_base);} // tenseur non symétrique
|
|
else
|
|
{gradVBB_tdt = NevezTenseurBB(nbvec_base);} // cas 1D pas de différence symétrique non symétrique
|
|
tabbool(Existe_num(tab,igradVBB_tdt))=true;
|
|
}
|
|
if (Existe(tab,id_giB_t) && (d_giB_t == NULL) )
|
|
{ BaseB truc(dim_base,nbvec_base,0);
|
|
tabbool(Existe_num(tab,id_giB_t))=true;
|
|
d_giB_t = new Tableau <BaseB> (nbddl_x,truc); }
|
|
if (Existe(tab,id_giB_tdt) && (d_giB_tdt == NULL) )
|
|
{ BaseB truc(dim_base,nbvec_base,0);
|
|
tabbool(Existe_num(tab,id_giB_tdt))=true;
|
|
d_giB_tdt = new Tableau <BaseB> (nbddl_x,truc); }
|
|
if (Existe(tab,id_giH_t) && (d_giH_t == NULL) )
|
|
{ BaseH truc(dim_base,nbvec_base,0);
|
|
tabbool(Existe_num(tab,id_giH_t))=true;
|
|
d_giH_t = new Tableau <BaseH> (nbddl_x,truc); }
|
|
if (Existe(tab,id_giH_tdt) && (d_giH_tdt == NULL) )
|
|
{ BaseH truc(dim_base,nbvec_base,0);
|
|
tabbool(Existe_num(tab,id_giH_tdt))=true;
|
|
d_giH_tdt = new Tableau <BaseH> (nbddl_x,truc); }
|
|
if (Existe(tab,id_gijBB_t) && ( d_gijBB_t.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gijBB_t))=true;
|
|
d_gijBB_t.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijBB_t(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gijBB_tdt) && ( d_gijBB_tdt.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gijBB_tdt))=true;
|
|
d_gijBB_tdt.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijBB_tdt(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id2_gijBB_tdt) && ( d2_gijBB_tdt.Taille1() == 0) )
|
|
{ tabbool(Existe_num(tab,id2_gijBB_tdt))=true;
|
|
d2_gijBB_tdt.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
for (int j=1;j<=nbddl_x;j++)
|
|
d2_gijBB_tdt(i,j) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gijHH_t) && (d_gijHH_t.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gijHH_t))=true;
|
|
d_gijHH_t.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijHH_t(i) = NevezTenseurHH(nbvec_base); }
|
|
if (Existe(tab,id_gijHH_tdt) && (d_gijHH_tdt.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gijHH_tdt))=true;
|
|
d_gijHH_tdt.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijHH_tdt(i) = NevezTenseurHH(nbvec_base); }
|
|
if (Existe(tab,id_jacobien_t) && (d_jacobien_t.Taille() == 0) )
|
|
{d_jacobien_t.Change_taille(nbddl_x);tabbool(Existe_num(tab,id_jacobien_t))=true;}
|
|
if (Existe(tab,id_jacobien_tdt) && (d_jacobien_tdt.Taille() == 0) )
|
|
{d_jacobien_tdt.Change_taille(nbddl_x);tabbool(Existe_num(tab,id_jacobien_tdt))=true;}
|
|
if (Existe(tab,id_gradVmoyBB_t) && ( d_gradVmoyBB_t.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gradVmoyBB_t))=true;
|
|
d_gradVmoyBB_t.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVmoyBB_t(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gradVmoyBB_tdt) && ( d_gradVmoyBB_tdt.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gradVmoyBB_tdt))=true;
|
|
d_gradVmoyBB_tdt.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVmoyBB_tdt(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gradVBB_t) && ( d_gradVBB_t.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gradVBB_t))=true;
|
|
d_gradVBB_t.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVBB_t(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gradVBB_tdt) && ( d_gradVBB_tdt.Taille() == 0) )
|
|
{ tabbool(Existe_num(tab,id_gradVBB_tdt))=true;
|
|
d_gradVBB_tdt.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVBB_tdt(i) = NevezTenseurBB(nbvec_base); }
|
|
// maintenant on met à jour le tableau local tab,
|
|
int nbplus = 0;
|
|
// on compte les éléments à rajouter
|
|
for (int i=1;i<=tabtaille;i++) if(tabbool(i)) nbplus++;
|
|
// on agrandi le tableau existant et on le complète
|
|
int taille_i = this->tab.Taille();
|
|
this->tab.Change_taille(taille_i + nbplus);
|
|
nbplus = 0;
|
|
for (int i=1;i<=tabtaille;i++)
|
|
if(tabbool(i))
|
|
{ nbplus++; this->tab(taille_i + nbplus) = tab(i);}
|
|
// comme on a changé tab, on réinitialise posi_tab
|
|
posi_tab = 1;
|
|
Init_conteneur_de_retour_methode(); // Init des conteneurs de retour de fonction
|
|
};
|
|
// initialisation de la dimension , du nb de vecteur et du tableau de ddl
|
|
// cette fonction n'agi qu'une fois , lors des autres appels elle ne fait rien
|
|
void Met_abstraite::Dim_NbVec(int dim,int nbvec,DdlElement& tabddl,int nb_noeud_interpol)
|
|
{ if(dim_base == 0)
|
|
dim_base = dim;
|
|
if(nbvec_base == 0)
|
|
nbvec_base = nbvec;
|
|
if(tab_ddl.NbDdl() == 0)
|
|
tab_ddl = tabddl;
|
|
nomb_noeud=nb_noeud_interpol;
|
|
};
|
|
|
|
//---------------------------------- fonctions privées -------------------------------------------
|
|
|
|
//== Existe, recherche si un element de l'enumeration existe
|
|
// retourne 1 si x appartiend au tableau 0 sinon
|
|
bool Met_abstraite::Existe(Tableau<Enum_variable_metrique> &tab,const Enum_variable_metrique& x)
|
|
{ int tabtaille = tab.Taille();
|
|
// dans le cas ou posi_tab concernait un tableau plus grand (par exemple le tableau tab de la métrique
|
|
// il n'est pas utilisatble on le remet à 1
|
|
if (posi_tab >= tabtaille) posi_tab = 1;
|
|
for (int i = Met_abstraite::posi_tab; i<= tabtaille; i++)
|
|
if(x == tab(i)) { Met_abstraite::posi_tab = i;
|
|
return true;}
|
|
if (Met_abstraite::posi_tab <= tabtaille)
|
|
{for (int i = 1;i< Met_abstraite::posi_tab;i++)
|
|
if(x == tab(i)) { Met_abstraite::posi_tab = i;
|
|
return true;}
|
|
}
|
|
else { cout << "\n erreur dans posi_tab = " << posi_tab
|
|
<< " \n bool Met_abstraite::Existe(...";
|
|
Sortie(1);
|
|
}
|
|
return false ;
|
|
};
|
|
|
|
//== Existe_num, recherche si un element de l'enumeration existe
|
|
// retourne le numéro si x appartiend au tableau, 0 sinon
|
|
int Met_abstraite::Existe_num(Tableau<Enum_variable_metrique>& tab,const Enum_variable_metrique& x)
|
|
{ int tabtaille = tab.Taille();
|
|
// dans le cas ou posi_tab concernait un tableau plus grand (par exemple le tableau tab de la métrique
|
|
// il n'est pas utilisatble on le remet à 1
|
|
if (posi_tab >= tabtaille) posi_tab = 1;
|
|
for (int i = 1; i<= tabtaille; i++)
|
|
if(x == tab(i)) { Met_abstraite::posi_tab = i;
|
|
return i;}
|
|
if (Met_abstraite::posi_tab <= tabtaille)
|
|
{for (int i = 1;i< Met_abstraite::posi_tab;i++)
|
|
if(x == tab(i)) { Met_abstraite::posi_tab = i;
|
|
return i;}
|
|
}
|
|
else { cout << "\n erreur dans posi_tab = " << posi_tab
|
|
<< " \n int Met_abstraite::Existe(...";
|
|
Sortie(1);
|
|
}
|
|
return 0 ;
|
|
};
|
|
|
|
// allocation de la memoire
|
|
void Met_abstraite::Allocation ()
|
|
{
|
|
// on met les pointeurs a NULL
|
|
M0 = NULL;Mt = NULL;d_Mt = NULL;Mtdt = NULL;d_Mtdt = NULL;
|
|
V0 = NULL;Vt = NULL;d_Vt = NULL;Vtdt = NULL;d_Vtdt = NULL;
|
|
giB_0 = NULL;giB_t = NULL; giB_tdt = NULL;
|
|
giH_0 = NULL;giH_t = NULL;giH_tdt = NULL;
|
|
gijBB_0 = NULL;gijBB_t = NULL;gijBB_tdt = NULL;
|
|
gijHH_0 = NULL;gijHH_t = NULL;gijHH_tdt = NULL;
|
|
gradVmoyBB_t = NULL; gradVmoyBB_tdt = NULL;
|
|
gradVBB_t = NULL; gradVBB_tdt = NULL;
|
|
dmatV_moy_t = NULL; dmatV_moy_tdt = NULL;
|
|
d_giB_t = NULL;d_giB_tdt = NULL;
|
|
d_giH_t = NULL;d_giH_tdt = NULL;
|
|
// on alloue en fonction des parametres
|
|
int nbddl_x = tab_ddl.NbDdl_famille(X1); // nombre de ddl en position
|
|
nbddl_x += nbddl_sup_xi; // on tiens compte de ddl sup éventuels
|
|
int nbddl_v = tab_ddl.NbDdl_famille(V1); // nombre de ddl en vitesse
|
|
nbddl_v += nbddl_sup_xi; // on tiens compte de ddl sup éventuels
|
|
|
|
if (Existe(tab,iM0)) M0 = new Coordonnee(dim_base);
|
|
if (Existe(tab,iMt)) Mt = new Coordonnee(dim_base);
|
|
if (Existe(tab,idMt))
|
|
{Coordonnee toto(dim_base); d_Mt = new Tableau <Coordonnee> (nbddl_x,toto);}
|
|
if (Existe(tab,iMtdt)) Mtdt = new Coordonnee(dim_base);
|
|
if (Existe(tab,idMtdt))
|
|
{Coordonnee toto(dim_base); d_Mtdt = new Tableau <Coordonnee> (nbddl_x,toto);}
|
|
if (Existe(tab,iV0)) V0 = new Coordonnee(dim_base);
|
|
if (Existe(tab,iVt)) Vt = new Coordonnee(dim_base);
|
|
if (Existe(tab,idVt))
|
|
{Coordonnee toto(dim_base); d_Vt = new Tableau <Coordonnee> (nbddl_x,toto);}
|
|
if (Existe(tab,iVtdt)) Vtdt = new Coordonnee(dim_base);
|
|
if (Existe(tab,idVtdt))
|
|
{Coordonnee toto(dim_base); d_Vtdt = new Tableau <Coordonnee> (nbddl_x,toto);}
|
|
if (Existe(tab,igiB_0)) giB_0 = new BaseB(dim_base,nbvec_base);
|
|
if (Existe(tab,igiB_t)) giB_t = new BaseB(dim_base,nbvec_base);
|
|
if (Existe(tab,igiB_tdt)) giB_tdt = new BaseB(dim_base,nbvec_base);
|
|
if (Existe(tab,igiH_0)) giH_0 = new BaseH (dim_base,nbvec_base);
|
|
if (Existe(tab,igiH_t)) giH_t = new BaseH (dim_base,nbvec_base);
|
|
if (Existe(tab,igiH_tdt)) giH_tdt = new BaseH (dim_base,nbvec_base);
|
|
if (Existe(tab,igijBB_0)) gijBB_0 = NevezTenseurBB(nbvec_base);
|
|
if (Existe(tab,igijBB_t)) gijBB_t = NevezTenseurBB(nbvec_base);
|
|
if (Existe(tab,igijBB_tdt)) gijBB_tdt = NevezTenseurBB(nbvec_base);
|
|
if (Existe(tab,igijHH_0)) gijHH_0 = NevezTenseurHH(nbvec_base);
|
|
if (Existe(tab,igijHH_t)) gijHH_t = NevezTenseurHH(nbvec_base);
|
|
if (Existe(tab,igijHH_tdt)) gijHH_tdt = NevezTenseurHH(nbvec_base);
|
|
if (Existe(tab,igradVmoyBB_t))
|
|
{gradVmoyBB_t = NevezTenseurBB(-nbvec_base);
|
|
// on dimensionne également le tableau des vitesses moyennes aux noeuds
|
|
V_moy_t.Change_taille(nomb_noeud); for (int i=1;i<=nomb_noeud;i++) V_moy_t(i).Change_dim(dim_base);
|
|
// et leurs dérivées covariantes
|
|
dmatV_moy_t = new BaseB(dim_base,nbvec_base);
|
|
};
|
|
if (Existe(tab,igradVmoyBB_tdt))
|
|
{gradVmoyBB_tdt = NevezTenseurBB(-nbvec_base);
|
|
// on dimensionne également le tableau des vitesses moyennes aux noeuds
|
|
V_moy_tdt.Change_taille(nomb_noeud); for (int i=1;i<=nomb_noeud;i++) V_moy_tdt(i).Change_dim(dim_base);
|
|
// et leurs dérivées covariantes
|
|
dmatV_moy_tdt = new BaseB(dim_base,nbvec_base);
|
|
};
|
|
if (Existe(tab,igradVBB_t)) gradVBB_t = NevezTenseurBB(-nbvec_base);
|
|
if (Existe(tab,igradVBB_tdt)) gradVBB_tdt = NevezTenseurBB(-nbvec_base);
|
|
if (Existe(tab,id_giB_t)) { BaseB truc(dim_base,nbvec_base,0);
|
|
d_giB_t = new Tableau <BaseB> (nbddl_x,truc); }
|
|
if (Existe(tab,id_giB_tdt)) { BaseB truc(dim_base,nbvec_base,0);
|
|
d_giB_tdt = new Tableau <BaseB> (nbddl_x,truc); }
|
|
if (Existe(tab,id_giH_t)) { BaseH truc(dim_base,nbvec_base,0);
|
|
d_giH_t = new Tableau <BaseH> (nbddl_x,truc); }
|
|
if (Existe(tab,id_giH_tdt)) { BaseH truc(dim_base,nbvec_base,0);
|
|
d_giH_tdt = new Tableau <BaseH> (nbddl_x,truc); }
|
|
if (Existe(tab,id_gijBB_t)) { d_gijBB_t.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijBB_t(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gijBB_tdt)) { d_gijBB_tdt.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijBB_tdt(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id2_gijBB_tdt)) { d2_gijBB_tdt.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
for (int j=1;j<=nbddl_x;j++)
|
|
d2_gijBB_tdt(i,j) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gijHH_t)) { d_gijHH_t.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijHH_t(i) = NevezTenseurHH(nbvec_base); }
|
|
if (Existe(tab,id_gijHH_tdt)) { d_gijHH_tdt.Change_taille(nbddl_x);
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
d_gijHH_tdt(i) = NevezTenseurHH(nbvec_base); }
|
|
if (Existe(tab,id_jacobien_t)) d_jacobien_t.Change_taille(nbddl_x);
|
|
if (Existe(tab,id_jacobien_tdt)) d_jacobien_tdt.Change_taille(nbddl_x);
|
|
if (Existe(tab,id_gradVmoyBB_t)) { d_gradVmoyBB_t.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVmoyBB_t(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gradVmoyBB_tdt)) { d_gradVmoyBB_tdt.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVmoyBB_tdt(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gradVBB_t)) { d_gradVBB_t.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVBB_t(i) = NevezTenseurBB(nbvec_base); }
|
|
if (Existe(tab,id_gradVBB_tdt)) { d_gradVBB_tdt.Change_taille(nbddl_v);
|
|
for (int i=1;i<=nbddl_v;i++)
|
|
d_gradVBB_tdt(i) = NevezTenseurBB(nbvec_base); }
|
|
};
|
|
|
|
// deallocation de la memoire compléte
|
|
void Met_abstraite::Deallocation()
|
|
{ Deallocation(tab);
|
|
// mise a zero des tableaux
|
|
tab_ddl.TailleZero();
|
|
dim_base = 0;
|
|
nbvec_base = 0;
|
|
posi_tab=1;
|
|
};
|
|
|
|
// deallocation de la memoire en fonction d'un tableau d'énumération
|
|
void Met_abstraite::Deallocation( Tableau<Enum_variable_metrique>& tib)
|
|
{
|
|
if (Existe(tib,iM0)) {delete M0;M0=NULL;};
|
|
if (Existe(tib,iMt)) {delete Mt;Mt=NULL;};
|
|
if (Existe(tib,idMt)) {delete d_Mt;d_Mt=NULL;};
|
|
if (Existe(tib,iMtdt)) {delete Mtdt;Mtdt=NULL;};
|
|
if (Existe(tib,idMtdt)) {delete d_Mtdt;d_Mtdt=NULL;};
|
|
if (Existe(tib,iV0)) {delete V0;V0=NULL;};
|
|
if (Existe(tib,iVt)) {delete Vt;Vt=NULL;};
|
|
if (Existe(tib,idVt)) {delete d_Vt;d_Vt=NULL;};
|
|
if (Existe(tib,iVtdt)) {delete Vtdt;Vtdt=NULL;};
|
|
if (Existe(tib,idVtdt)) {delete d_Vtdt;d_Vtdt=NULL;};
|
|
if (Existe(tib,igiB_0)) {delete giB_0;giB_0=NULL;};
|
|
if (Existe(tib,igiB_t)) {delete giB_t;giB_t=NULL;};
|
|
if (Existe(tib,igiB_tdt)) {delete giB_tdt;giB_tdt=NULL;};
|
|
if (Existe(tib,igiH_0)) {delete giH_0;giH_0=NULL;};
|
|
if (Existe(tib,igiH_t)) {delete giH_t;giH_t=NULL;};
|
|
if (Existe(tib,igiH_tdt)) {delete giH_tdt;giH_tdt=NULL;};
|
|
if (Existe(tib,igijBB_0)) {delete gijBB_0;gijBB_0=NULL;};
|
|
if (Existe(tib,igijBB_t)) {delete gijBB_t;gijBB_t=NULL;};
|
|
if (Existe(tib,igijBB_tdt)) {delete gijBB_tdt;gijBB_tdt=NULL;};
|
|
if (Existe(tib,igijHH_0)) {delete gijHH_0;gijHH_0=NULL;};
|
|
if (Existe(tib,igijHH_t)) {delete gijHH_t;gijHH_t=NULL;};
|
|
if (Existe(tib,igijHH_tdt)) {delete gijHH_tdt;gijHH_tdt=NULL;};
|
|
if (Existe(tib,igradVmoyBB_t))
|
|
{delete gradVmoyBB_t;gradVmoyBB_t=NULL;
|
|
delete dmatV_moy_t; dmatV_moy_t=NULL;
|
|
};
|
|
if (Existe(tib,igradVmoyBB_tdt))
|
|
{delete gradVmoyBB_tdt;gradVmoyBB_tdt=NULL;
|
|
delete dmatV_moy_tdt; dmatV_moy_tdt=NULL;
|
|
};
|
|
if (Existe(tib,igradVBB_t)) {delete gradVBB_t;gradVBB_t=NULL;};
|
|
if (Existe(tib,igradVBB_tdt)) {delete gradVBB_tdt;gradVBB_tdt=NULL;};
|
|
if (Existe(tib,id_giB_t)) {delete d_giB_t;d_giB_t=NULL;};
|
|
if (Existe(tib,id_giB_tdt)) {delete d_giB_tdt;d_giB_tdt=NULL;};
|
|
if (Existe(tib,id_giH_t)) {delete d_giH_t;d_giH_t=NULL;};
|
|
if (Existe(tib,id_giH_tdt)) {delete d_giH_tdt;d_giH_tdt=NULL;};
|
|
if (Existe(tib,id_gijBB_t)) { for (int i = 1; i<= d_gijBB_t.Taille(); i++)
|
|
delete d_gijBB_t(i);
|
|
d_gijBB_t.Change_taille(0); }
|
|
if (Existe(tib,id_gijBB_tdt)) { for (int i = 1; i<= d_gijBB_tdt.Taille(); i++)
|
|
delete d_gijBB_tdt(i);
|
|
d_gijBB_tdt.Change_taille(0); }
|
|
if (Existe(tib,id2_gijBB_tdt))
|
|
{ for (int i = 1; i<= d2_gijBB_tdt.Taille1(); i++)
|
|
for (int j = 1; j<= d2_gijBB_tdt.Taille2(); j++)
|
|
delete d2_gijBB_tdt(i,j);
|
|
d2_gijBB_tdt.Change_taille(0); }
|
|
if (Existe(tib,id_gijHH_t)) { for (int i = 1; i<= d_gijHH_t.Taille(); i++)
|
|
delete d_gijHH_t(i);
|
|
d_gijHH_t.Change_taille(0); }
|
|
if (Existe(tib,id_gijHH_tdt)) { for (int i = 1; i<= d_gijHH_tdt.Taille(); i++)
|
|
delete d_gijHH_tdt(i);
|
|
d_gijHH_tdt.Change_taille(0); }
|
|
if (Existe(tib,id_jacobien_t)) d_jacobien_t.Change_taille(0);
|
|
if (Existe(tib,id_jacobien_tdt)) d_jacobien_tdt.Change_taille(0);
|
|
if (Existe(tib,id_gradVmoyBB_t)) { for (int i = 1; i<= d_gradVmoyBB_t.Taille(); i++)
|
|
delete d_gradVmoyBB_t(i);
|
|
d_gradVmoyBB_t.Change_taille(0); }
|
|
if (Existe(tib,id_gradVmoyBB_tdt)) { for (int i = 1; i<= d_gradVmoyBB_tdt.Taille(); i++)
|
|
delete d_gradVmoyBB_tdt(i);
|
|
d_gradVmoyBB_tdt.Change_taille(0); }
|
|
if (Existe(tib,id_gradVBB_t)) { for (int i = 1; i<= d_gradVBB_t.Taille(); i++)
|
|
delete d_gradVBB_t(i);
|
|
d_gradVBB_t.Change_taille(0); }
|
|
if (Existe(tib,id_gradVBB_tdt)) { for (int i = 1; i<= d_gradVBB_tdt.Taille(); i++)
|
|
delete d_gradVBB_tdt(i);
|
|
d_gradVBB_tdt.Change_taille(0); }
|
|
posi_tab=1; // car le tableau tab a changé
|
|
// maintenant on reinitialise à NULL les variables de retour
|
|
Impli toto; ex_impli = toto;
|
|
};
|
|
|
|
// copie en fonction de l'instance passée
|
|
// concerne que les grandeurs pointées
|
|
void Met_abstraite::Copie_met(const Met_abstraite& a)
|
|
{int nbddl_x = tab_ddl.NbDdl_famille(X1); // nombre de ddl en position
|
|
nbddl_sup_xi = a.nbddl_sup_xi;
|
|
nbddl_x += nbddl_sup_xi; // on tiens compte de ddl sup éventuels
|
|
int nbddl_v = tab_ddl.NbDdl_famille(V1); // nombre de ddl en vitesse
|
|
nbddl_v += nbddl_sup_xi; // on tiens compte de ddl sup éventuels
|
|
nomb_noeud = a.nomb_noeud;
|
|
|
|
if (a.M0 != NULL)
|
|
{if (M0==NULL) M0 = new Coordonnee(*(a.M0)); else *M0=*a.M0;}
|
|
else {if (M0!=NULL) {delete M0;M0=NULL;}}
|
|
if (a.Mt != NULL)
|
|
{if (Mt==NULL) Mt = new Coordonnee(*(a.Mt)); else *Mt=*a.Mt;}
|
|
else {if (Mt!=NULL) {delete Mt;Mt=NULL;}}
|
|
if (a.d_Mt != NULL)
|
|
{if (d_Mt==NULL) d_Mt = new Tableau <Coordonnee> (*(a.d_Mt)); else *d_Mt=*a.d_Mt;}
|
|
else {if (d_Mt != NULL) {delete d_Mt;d_Mt=NULL;}}
|
|
if (a.Mtdt != NULL)
|
|
{if (Mtdt==NULL) Mtdt = new Coordonnee(*(a.Mtdt)); else *Mtdt=*a.Mtdt;}
|
|
else {if (Mtdt!=NULL) {delete Mtdt;Mtdt=NULL;}}
|
|
if (a.d_Mtdt != NULL)
|
|
{if (d_Mtdt==NULL) d_Mtdt = new Tableau <Coordonnee> (*(a.d_Mtdt)); else *d_Mtdt=*a.d_Mtdt;}
|
|
else {if (d_Mtdt != NULL) {delete d_Mtdt;d_Mtdt=NULL;}}
|
|
if (a.V0 != NULL)
|
|
{if (V0==NULL) V0 = new Coordonnee(*(a.V0)); else *V0=*a.V0;}
|
|
else {if (V0!=NULL) {delete V0;V0=NULL;}}
|
|
if (a.Vt != NULL)
|
|
{if (Vt==NULL) Vt = new Coordonnee(*(a.Vt)); else *Vt=*a.Vt;}
|
|
else {if (Vt!=NULL) {delete Vt;Vt=NULL;}}
|
|
if (a.d_Vt != NULL)
|
|
{if (d_Vt==NULL) d_Vt = new Tableau <Coordonnee> (*(a.d_Vt)); else *d_Vt=*a.d_Vt;}
|
|
else {if (d_Vt != NULL) {delete d_Vt;d_Vt=NULL;}}
|
|
if (a.Vtdt != NULL)
|
|
{if (Vtdt==NULL) Vtdt = new Coordonnee(*(a.Vtdt)); else *Vtdt=*a.Vtdt;}
|
|
else {if (Vtdt!=NULL) {delete Vtdt;Vtdt=NULL;}}
|
|
if (a.d_Vtdt != NULL)
|
|
{if (d_Vtdt==NULL) d_Vtdt = new Tableau <Coordonnee> (*(a.d_Vtdt)); else *d_Vtdt=*a.d_Vtdt;}
|
|
else {if (d_Vtdt != NULL) {delete d_Vtdt;d_Vtdt=NULL;}}
|
|
if (a.giB_0 != NULL)
|
|
{if (giB_0==NULL) giB_0 = new BaseB(*(a.giB_0)); else *giB_0=*a.giB_0;}
|
|
else {if (giB_0!=NULL) {delete giB_0;giB_0 = NULL;}}
|
|
if (a.giB_t != NULL)
|
|
{if (giB_t==NULL) giB_t = new BaseB(*(a.giB_t)); else *giB_t=*a.giB_t;}
|
|
else {if (giB_t!=NULL) {delete giB_t;giB_t = NULL;}}
|
|
if (a.giB_tdt != NULL)
|
|
{if (giB_tdt==NULL) giB_tdt = new BaseB(*(a.giB_tdt)); else *giB_tdt=*a.giB_tdt;}
|
|
else {if (giB_tdt!=NULL) {delete giB_tdt;giB_tdt = NULL;}}
|
|
if (a.giH_0 != NULL)
|
|
{if (giH_0==NULL) giH_0 = new BaseH(*(a.giH_0)); else *giH_0=*a.giH_0;}
|
|
else {if (giH_0!=NULL) {delete giH_0;giH_0 = NULL;}}
|
|
if (a.giH_t != NULL)
|
|
{if (giH_t==NULL) giH_t = new BaseH(*(a.giH_t)); else *giH_t=*a.giH_t;}
|
|
else {if (giH_t!=NULL) {delete giH_t;giH_t = NULL;}}
|
|
if (a.giH_tdt != NULL)
|
|
{if (giH_tdt==NULL) giH_tdt = new BaseH(*(a.giH_tdt)); else *giH_tdt=*a.giH_tdt;}
|
|
else {if (giH_tdt!=NULL) {delete giH_tdt;giH_tdt = NULL;}}
|
|
if (a.gijBB_0 != NULL)
|
|
{if (gijBB_0==NULL) gijBB_0 = NevezTenseurBB(*a.gijBB_0);else *gijBB_0=*a.gijBB_0;}
|
|
else {if (gijBB_0!=NULL) {delete gijBB_0;gijBB_0 = NULL;}}
|
|
if (a.gijBB_t != NULL)
|
|
{if (gijBB_t==NULL) gijBB_t = NevezTenseurBB(*a.gijBB_t);else *gijBB_t=*a.gijBB_t;}
|
|
else {if (gijBB_t!=NULL) {delete gijBB_t;gijBB_t = NULL;}}
|
|
if (a.gijBB_tdt != NULL)
|
|
{if (gijBB_tdt==NULL) gijBB_tdt = NevezTenseurBB(*a.gijBB_tdt);else *gijBB_tdt=*a.gijBB_tdt;}
|
|
else {if (gijBB_tdt!=NULL) {delete gijBB_tdt;gijBB_tdt = NULL;}}
|
|
if (a.gijHH_0 != NULL)
|
|
{if (gijHH_0==NULL) gijHH_0 = NevezTenseurHH(*a.gijHH_0);else *gijHH_0=*a.gijHH_0;}
|
|
else {if (gijHH_0!=NULL) {delete gijHH_0;gijHH_0 = NULL;}}
|
|
if (a.gijHH_t != NULL)
|
|
{if (gijHH_t==NULL) gijHH_t = NevezTenseurHH(*a.gijHH_t);else *gijHH_t=*a.gijHH_t;}
|
|
else {if (gijHH_t!=NULL) {delete gijHH_t;gijHH_t = NULL;}}
|
|
if (a.gijHH_tdt != NULL)
|
|
{if (gijHH_tdt==NULL) gijHH_tdt = NevezTenseurHH(*a.gijHH_tdt);else *gijHH_tdt=*a.gijHH_tdt;}
|
|
else {if (gijHH_tdt!=NULL) {delete gijHH_tdt;gijHH_tdt = NULL;}}
|
|
if (a.gradVmoyBB_t != NULL)
|
|
{if (gradVmoyBB_t==NULL) gradVmoyBB_t = NevezTenseurBB(*a.gradVmoyBB_t);else *gradVmoyBB_t=*a.gradVmoyBB_t;}
|
|
else {if (gradVmoyBB_t!=NULL) {delete gradVmoyBB_t;gradVmoyBB_t = NULL;}}
|
|
if (a.gradVmoyBB_tdt != NULL)
|
|
{if (gradVmoyBB_tdt==NULL) gradVmoyBB_tdt = NevezTenseurBB(*a.gradVmoyBB_tdt);else *gradVmoyBB_tdt=*a.gradVmoyBB_tdt;}
|
|
else {if (gradVmoyBB_tdt!=NULL) {delete gradVmoyBB_tdt;gradVmoyBB_tdt = NULL;}}
|
|
if (a.gradVBB_t != NULL)
|
|
{if (gradVBB_t==NULL) gradVBB_t = NevezTenseurBB(*a.gradVBB_t);else *gradVBB_t=*a.gradVBB_t;}
|
|
else {if (gradVBB_t!=NULL) {delete gradVBB_t;gradVBB_t = NULL;}}
|
|
if (a.gradVBB_tdt != NULL)
|
|
{if (gradVBB_tdt==NULL) gradVBB_tdt = NevezTenseurBB(*a.gradVBB_tdt);else *gradVBB_tdt=*a.gradVBB_tdt;}
|
|
else {if (gradVBB_tdt!=NULL) {delete gradVBB_tdt;gradVBB_tdt = NULL;}}
|
|
if (a.d_giB_t != NULL)
|
|
{if (d_giB_t==NULL) d_giB_t = new Tableau <BaseB>( *a.d_giB_t);else *d_giB_t = *a.d_giB_t;}
|
|
else {if (d_giB_t!=NULL) {delete d_giB_t;d_giB_t = NULL;} }
|
|
if (a.d_giB_tdt != NULL)
|
|
{if (d_giB_tdt==NULL) d_giB_tdt = new Tableau <BaseB>( *a.d_giB_tdt);else *d_giB_tdt = *a.d_giB_tdt;}
|
|
else {if (d_giB_tdt!=NULL) {delete d_giB_tdt;d_giB_tdt = NULL;} }
|
|
if (a.d_giH_t != NULL)
|
|
{if (d_giH_t==NULL) d_giH_t = new Tableau <BaseH>( *a.d_giH_t);else *d_giH_t = *a.d_giH_t;}
|
|
else {if (d_giH_t!=NULL) {delete d_giH_t;d_giH_t = NULL;} }
|
|
if (a.d_giH_tdt != NULL)
|
|
{if (d_giH_tdt==NULL) d_giH_tdt = new Tableau <BaseH>( *a.d_giH_tdt);else *d_giH_tdt = *a.d_giH_tdt;}
|
|
else {if (d_giH_tdt!=NULL) {delete d_giH_tdt;d_giH_tdt = NULL;} }
|
|
if (Existe(tab,id_gijBB_t))
|
|
{ d_gijBB_t.Change_taille(a.d_gijBB_t.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gijBB_t(i) = NevezTenseurBB(nbvec_base);
|
|
*((d_gijBB_t)(i)) = *((a.d_gijBB_t)(i)) ; } }
|
|
else d_gijBB_t.Change_taille(0);
|
|
if (Existe(tab,id_gijBB_tdt))
|
|
{ d_gijBB_tdt.Change_taille(a.d_gijBB_tdt.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gijBB_tdt(i) = NevezTenseurBB(nbvec_base);
|
|
*((d_gijBB_tdt)(i)) = *((a.d_gijBB_tdt)(i)) ; }}
|
|
else d_gijBB_tdt.Change_taille(0);
|
|
if (Existe(tab,id2_gijBB_tdt))
|
|
{ d2_gijBB_tdt.Change_taille(a.d2_gijBB_tdt.Taille1()); // a priori carré
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
for (int j=1;j<=nbddl_x;j++)
|
|
{ d2_gijBB_tdt(i,j) = NevezTenseurBB(nbvec_base);
|
|
*((d2_gijBB_tdt)(i,j)) = *((a.d2_gijBB_tdt)(i,j)) ; }}
|
|
else d2_gijBB_tdt.Change_taille(0);
|
|
if (Existe(tab,id_gijHH_t))
|
|
{ d_gijHH_t.Change_taille(a.d_gijHH_t.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gijHH_t(i) = NevezTenseurHH(nbvec_base);
|
|
*((d_gijHH_t)(i)) = *((a.d_gijHH_t)(i)) ; }}
|
|
else d_gijHH_t.Change_taille(0);
|
|
if (Existe(tab,id_gijHH_tdt))
|
|
{ d_gijHH_tdt.Change_taille(a.d_gijHH_tdt.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gijHH_tdt(i) = NevezTenseurHH(nbvec_base);
|
|
*((d_gijHH_tdt)(i)) = *((a.d_gijHH_tdt)(i)); }}
|
|
else d_gijHH_tdt.Change_taille(0);
|
|
if (Existe(tab,id_gradVmoyBB_t))
|
|
{ d_gradVmoyBB_t.Change_taille(a.d_gradVmoyBB_t.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gradVmoyBB_t(i) = NevezTenseurBB(nbvec_base);
|
|
*((d_gradVmoyBB_t)(i)) = *((a.d_gradVmoyBB_t)(i)) ; } }
|
|
else d_gradVmoyBB_t.Change_taille(0);
|
|
if (Existe(tab,id_gradVmoyBB_tdt))
|
|
{ d_gradVmoyBB_tdt.Change_taille(a.d_gradVmoyBB_tdt.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gradVmoyBB_tdt(i) = NevezTenseurBB(nbvec_base);
|
|
*((d_gradVmoyBB_tdt)(i)) = *((a.d_gradVmoyBB_tdt)(i)) ; } }
|
|
else d_gradVmoyBB_tdt.Change_taille(0);
|
|
if (Existe(tab,id_gradVBB_t))
|
|
{ d_gradVBB_t.Change_taille(a.d_gradVBB_t.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gradVBB_t(i) = NevezTenseurBB(nbvec_base);
|
|
*((d_gradVBB_t)(i)) = *((a.d_gradVBB_t)(i)) ; } }
|
|
else d_gradVBB_t.Change_taille(0);
|
|
if (Existe(tab,id_gradVBB_tdt))
|
|
{ d_gradVBB_tdt.Change_taille(a.d_gradVBB_tdt.Taille());
|
|
for (int i=1;i<=nbddl_x;i++)
|
|
{ d_gradVBB_tdt(i) = NevezTenseurBB(nbvec_base);
|
|
*((d_gradVBB_tdt)(i)) = *((a.d_gradVBB_tdt)(i)) ; } }
|
|
else d_gradVBB_tdt.Change_taille(0);
|
|
};
|
|
|
|
// initialisation des conteneurs de retour des méthodes
|
|
void Met_abstraite::Init_conteneur_de_retour_methode()
|
|
{ ex_impli.Mise_a_jour_grandeur(giB_0,giH_0,giB_t,giH_t,giB_tdt,d_giB_tdt,giH_tdt,d_giH_tdt
|
|
,gijBB_0,gijHH_0,gijBB_t,gijHH_t,gijBB_tdt,gijHH_tdt,gradVmoyBB_t,gradVmoyBB_tdt,gradVBB_tdt
|
|
,&d_gijBB_tdt,&d2_gijBB_tdt,&d_gijHH_tdt,&jacobien_tdt,&jacobien_t,&jacobien_0,&d_jacobien_tdt
|
|
,&d_gradVmoyBB_t,&d_gradVmoyBB_tdt,&d_gradVBB_t,&d_gradVBB_tdt);
|
|
ex_expli.Mise_a_jour_grandeur(giB_0,giH_0,giB_t,giH_t,gijBB_0,gijHH_0,gijBB_t,gijHH_t,gradVmoyBB_t,gradVBB_t,
|
|
&d_gijBB_t,&jacobien_t,&jacobien_0);
|
|
ex_expli_t_tdt.Mise_a_jour_grandeur(giB_0,giH_0,giB_t,giH_t,giB_tdt,giH_tdt,gijBB_0,gijHH_0,gijBB_t,gijHH_t,gijBB_tdt
|
|
,gijHH_tdt,gradVmoyBB_t,gradVmoyBB_tdt,gradVBB_tdt,&d_gijBB_tdt
|
|
,&jacobien_tdt,&jacobien_t,&jacobien_0);
|
|
ex_gijHH_0_et_giH_0.Mise_a_jour_grandeur(giH_0,gijHH_0);
|
|
ex_Dynamiq.Mise_a_jour_grandeur(giB_0,giB_tdt,gijBB_0,gijBB_tdt,
|
|
&jacobien_tdt,&jacobien_0);
|
|
ex_flambe_lin.Mise_a_jour_grandeur(giB_0,giH_0,giB_t,giH_t,giB_tdt,d_giB_tdt,giH_tdt,d_giH_tdt
|
|
,gijBB_0,gijHH_0,gijBB_t,gijHH_t,gijBB_tdt,gijHH_tdt,gradVmoyBB_t,gradVmoyBB_tdt,gradVBB_tdt
|
|
,&d_gijBB_tdt,&d2_gijBB_tdt,&d_gijHH_tdt,&jacobien_tdt,&jacobien_t,&jacobien_0,&d_jacobien_tdt
|
|
,&d_gradVmoyBB_t,&d_gradVmoyBB_tdt,&d_gradVBB_t,&d_gradVBB_tdt);
|
|
umat_cont.Mise_a_jour_grandeur(giB_0,giH_0,giB_t,giH_t,giB_tdt,giH_tdt,gijBB_0,gijHH_0,gijBB_t,gijHH_t,gijBB_tdt
|
|
,gijHH_tdt,gradVmoyBB_t,gradVmoyBB_tdt,gradVBB_tdt,&jacobien_tdt,&jacobien_t,&jacobien_0);
|
|
ex_InfoImp.Mise_a_jour_grandeur(M0,Mtdt,giB_0,giB_tdt,giH_0,giH_tdt,gijHH_tdt,gijBB_tdt,gijBB_0,gijHH_0);
|
|
ex_InfoExp_t.Mise_a_jour_grandeur(M0,Mt,giB_0,giB_t,giH_0,giH_t,gijHH_t,gijBB_t,gijBB_0,gijHH_0);
|
|
ex_InfoExp_tdt.Mise_a_jour_grandeur(M0,Mtdt,giB_0,giB_tdt,giH_0,giH_tdt,gijHH_tdt,gijBB_tdt,gijBB_0,gijHH_0);
|
|
ex_Info0_t_tdt.Mise_a_jour_grandeur(M0,Mt,Mtdt,giB_0,giB_t,giB_tdt,giH_0,giH_t,giH_tdt);
|
|
};
|
|
|
|
|
|
|
|
|
|
|