// ************************************************************************ // --- Logiciel MEF++ // --- // --- Copyright 1996-2006 GIREF, Université Laval // --- TOUS DROITS RÉSERVÉS // --- ALL RIGHTS RESERVED // --- // --- Ce logiciel est couvert par la Loi sur le droit d'auteur. // --- L'utilisation, ou la modification de ce logiciel sous toutes ses // --- formes, que ce soit code source ou code compilé, à des fins // --- personnelles et non commerciales sont autorisées sans frais pour // --- autant que la présente notice de copyright ainsi que cette // --- permission apparaissent dans toutes les copies ainsi que dans la // --- documentation. // --- Le GIREF et l'Université Laval ne prétendent en aucune façon que // --- ce code convient à un emploi quelconque. Celui-ci est distribué // --- sans aucune garantie implicite ou explicite. // ************************************************************************ // ******************************************************************** // Nom du fichier: ChampQijklCelluleViscoMaxwellHPP // // Nom de la classe: ChampQijklCelluleViscoMaxwellHPP.cc // // ******************************************************************** #include "ChampQijklCelluleViscoMaxwellHPP.h" #include "ChampTensorielO4Sym.h" #include "fonctionsTenseurs.h" // ******************************************************************** // // Description: Constructeur par défaut. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** ChampQijklCelluleViscoMaxwellHPP::ChampQijklCelluleViscoMaxwellHPP(const std::string& pNom) :aChampElasticiteRef(0), aChampFonctionElasticiteViscositeRef(0), aChampMultiplicateur_b(0), aChampMultiplicateur_bPrecedent(0), aChampDeriveeMultiplicateur_b(0), aChampDeriveeMultiplicateur_bPrecedent(0), aChampFonctionVieillisementLambda(0), aChampFonctionVieillisementLambdaPrecedent(0), aChampIndicateurEtat(0), aPasDeTemps(0), aThetaSchema(0), aAppelRecursifComposante(false) { _GIREF_CONSTRUCTEUR_INVARIANTS; for (Entier i = 0; i < 21; ++i) { aComposantes[i].asgnParametres(*this, i); } asgnNom(pNom); _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Constructeur par copie. // // Entrée: pChampQijklCelluleViscoMaxwellHPP: l'objet à copier // // Sortie: Aucune // // ******************************************************************** ChampQijklCelluleViscoMaxwellHPP::ChampQijklCelluleViscoMaxwellHPP(const ChampQijklCelluleViscoMaxwellHPP& pChampQijklCelluleViscoMaxwellHPP) : ChampAnalytiqueBaseDiscParElement(), aAppelRecursifComposante(false) { _GIREF_APPEL_TEST_INVARIANTS(pChampQijklCelluleViscoMaxwellHPP); _GIREF_CONSTRUCTEUR_INVARIANTS; for (Entier i = 0; i < 21;++i) { aComposantes[i].asgnParametres(*this, i); } asgnNom(pChampQijklCelluleViscoMaxwellHPP.reqNom()); *this = pChampQijklCelluleViscoMaxwellHPP; _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Destructeur. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** ChampQijklCelluleViscoMaxwellHPP::~ChampQijklCelluleViscoMaxwellHPP() { _GIREF_TEST_INVARIANTS; _GIREF_DESTRUCTEUR_INVARIANTS; } // ******************************************************************** // // Description: Opérateur d'assignation. // // Entrée: pChampQijklCelluleViscoMaxwellHPP: l'objet à copier // // Sortie: Une référence sur l'objet courant // // ******************************************************************** ChampQijklCelluleViscoMaxwellHPP& ChampQijklCelluleViscoMaxwellHPP::operator= (const ChampQijklCelluleViscoMaxwellHPP& pChampQijklCelluleViscoMaxwellHPP) { _GIREF_TEST_INVARIANTS; _GIREF_APPEL_TEST_INVARIANTS(pChampQijklCelluleViscoMaxwellHPP); ChampAnalytiqueBaseDiscParElement::operator=(pChampQijklCelluleViscoMaxwellHPP); if (this != &pChampQijklCelluleViscoMaxwellHPP) { aChampElasticiteRef = pChampQijklCelluleViscoMaxwellHPP.aChampElasticiteRef; aChampFonctionElasticiteViscositeRef = pChampQijklCelluleViscoMaxwellHPP.aChampFonctionElasticiteViscositeRef; aChampMultiplicateur_b = pChampQijklCelluleViscoMaxwellHPP.aChampMultiplicateur_b; aChampDeriveeMultiplicateur_b = pChampQijklCelluleViscoMaxwellHPP.aChampDeriveeMultiplicateur_b; aChampFonctionVieillisementLambda = pChampQijklCelluleViscoMaxwellHPP.aChampFonctionVieillisementLambda; aChampMultiplicateur_bPrecedent = pChampQijklCelluleViscoMaxwellHPP.aChampMultiplicateur_bPrecedent; aChampDeriveeMultiplicateur_bPrecedent = pChampQijklCelluleViscoMaxwellHPP.aChampDeriveeMultiplicateur_bPrecedent; aChampFonctionVieillisementLambdaPrecedent = pChampQijklCelluleViscoMaxwellHPP.aChampFonctionVieillisementLambdaPrecedent; aChampIndicateurEtat = pChampQijklCelluleViscoMaxwellHPP.aChampIndicateurEtat; aPasDeTemps = pChampQijklCelluleViscoMaxwellHPP.aPasDeTemps; aThetaSchema = pChampQijklCelluleViscoMaxwellHPP.aThetaSchema; } _GIREF_TEST_INVARIANTS; return *this; } // ******************************************************************** // // Description: Méthode d'assignation des champs necessaire a la construction du // tenseur dans le cas ou on a dépendance en temps de l'élasticité. // // Entrée: pChampElasticiteRef le tenseur O4 d'élasticité de référence qui NE DEPEND PAS DU TEMPS // pChampFonctionElasticiteViscositeRe le tenseur O4 de viscosité de référence qui NE DEPEND PAS DU TEMPS // pPasDeTemps Longeur du pas de temps // pThetaSchema parametre du theta schema // Sortie: Rien // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::asgnChampsSansVieillissement(ChampTensorielO4Sym &pChampElasticiteRef, ChampTensorielO4Sym &pChampFonctionElasticiteViscositeRef, DReel &pPasDeTemps, const DReel &pThetaSchema) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(0!= &pChampElasticiteRef, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampFonctionElasticiteViscositeRef, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pPasDeTemps, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pThetaSchema, "Pointeur nul!"); aChampElasticiteRef = &pChampElasticiteRef; aChampFonctionElasticiteViscositeRef = &pChampFonctionElasticiteViscositeRef; aPasDeTemps = &pPasDeTemps; aThetaSchema = pThetaSchema; aChampMultiplicateur_b =0; aChampDeriveeMultiplicateur_b=0; aChampFonctionVieillisementLambda=0; aChampMultiplicateur_bPrecedent =0; aChampDeriveeMultiplicateur_bPrecedent=0; aChampFonctionVieillisementLambdaPrecedent=0; _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Méthode d'assignation des champs necessaire a la construction du // tenseur dans le cas ou on a dépendance en temps de l'élasticité. // // Entrée: pChampElasticiteRef le tenseur O4 d'élasticité de référence qui NE DEPEND PAS DU TEMPS // pChampViscositeRef le tenseur O4 de viscosité de référence qui NE DEPEND PAS DU TEMPS // pChampMultiplicateur_b le champs scalaire de la valeur courante de b // pChampChampFonctionVieillisementLambda le champs scalaire de la valeur courante de l // pChampMultiplicateur_bPrecedent le champs scalaire de la valeur precedente de b // pChampFonctionVieillisementLambdaPrecedent le champs scalaire de la valeur precedent de l // pChampDeriveeMultiplicateur_b le champs scalaire de la derive courant de b // ChampDeriveeMultiplicateur_bPrecedent le champs scalaire de la derivee precedent de l // pChampIndicateurEtat indicateur de la loi de comportement Hooke <=0 ou Bazant >0 // // Sortie: Rien // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::asgnChampsAvecVieillissement(ChampTensorielO4Sym &pChampElasticiteRef, ChampTensorielO4Sym &pChampFonctionElasticiteViscositeRef, ChampScalaire &pChampMultiplicateur_b, ChampScalaire &pChampMultiplicateur_bPrecedent, ChampScalaire &pChampDeriveeMultiplicateur_b, ChampScalaire &pChampDeriveeMultiplicateur_bPrecedent, ChampScalaire &pChampFonctionVieillisementLambda, ChampScalaire &pChampFonctionVieillisementLambdaPrecedent, ChampScalaire &pChampIndicateurEtat, DReel &pPasDeTemps, const DReel &pThetaSchema) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(0!= &pChampElasticiteRef, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampFonctionElasticiteViscositeRef, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampMultiplicateur_b, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampDeriveeMultiplicateur_b, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampFonctionVieillisementLambda, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampMultiplicateur_bPrecedent, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampDeriveeMultiplicateur_bPrecedent, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampFonctionVieillisementLambdaPrecedent,"Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampIndicateurEtat, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pPasDeTemps, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pThetaSchema, "Pointeur nul!"); aChampElasticiteRef = &pChampElasticiteRef; aChampFonctionElasticiteViscositeRef = &pChampFonctionElasticiteViscositeRef; aChampMultiplicateur_b = &pChampMultiplicateur_b; aChampDeriveeMultiplicateur_b = &pChampDeriveeMultiplicateur_b; aChampFonctionVieillisementLambda = &pChampFonctionVieillisementLambda; aChampMultiplicateur_bPrecedent = &pChampMultiplicateur_bPrecedent; aChampDeriveeMultiplicateur_bPrecedent = &pChampDeriveeMultiplicateur_bPrecedent; aChampFonctionVieillisementLambdaPrecedent = &pChampFonctionVieillisementLambdaPrecedent; aChampIndicateurEtat = &pChampIndicateurEtat; aPasDeTemps = &pPasDeTemps; aThetaSchema = pThetaSchema; _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Méthode permettant d'assigner un nouveau temps // au Champ. Les évaluations subséquentes utiliseront // cette valeur, si elles en ont besoin. On appelle la méthode sur // chacune des composantes du champ // // Entrée: pTemps, le nouveau temps à utiliser. // // Sortie: Aucune // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::asgnTemps(const DReel& pTemps) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(0 != aChampElasticiteRef, "Le champ d'elasticiteRef n'est pas assigné"); if (!aAppelRecursifComposante) { aAppelRecursifComposante = true; ChampAnalytiqueBaseDiscParElement::asgnTemps(pTemps); if(aChampIndicateurEtat){ aChampMultiplicateur_b -> asgnTemps(pTemps); aChampDeriveeMultiplicateur_b -> asgnTemps(pTemps); aChampFonctionVieillisementLambda -> asgnTemps(pTemps); aChampMultiplicateur_bPrecedent -> asgnTemps(pTemps); aChampDeriveeMultiplicateur_bPrecedent -> asgnTemps(pTemps); aChampFonctionVieillisementLambdaPrecedent -> asgnTemps(pTemps); aChampIndicateurEtat -> asgnTemps(pTemps); } aAppelRecursifComposante = false; } _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: evalue(X,Y,Z,T) = evaluation de l'ExpressionAlgebrique // // Entrée: pCoor, la coordonnee a laquelle evaluer la fonction // pTemps, le temps de l'evaluation de la fonction // // Sortie: L'evaluation de la fonction // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::evalue(const Vecteur3D& /*pCoor*/, const DReel& /*pTemps*/, TenseurO4Sym& /*pValeur*/) const { _GIREF_TEST_INVARIANTS; _GIREF_ASSERTION(false, "Pas implanté"); _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Crée un champ du même type // // Entrée: Aucune // // Sortie: Un pointeur vers l'objet créé // // ******************************************************************** ChampQijklCelluleViscoMaxwellHPP* ChampQijklCelluleViscoMaxwellHPP::newChamp() const { _GIREF_TEST_INVARIANTS; return new ChampQijklCelluleViscoMaxwellHPP(); } // ******************************************************************** // // Description: Crée un champ du même type en se copiant soi-même // // Entrée: Aucune // // Sortie: Un pointeur vers l'objet créé // // ******************************************************************** ChampQijklCelluleViscoMaxwellHPP* ChampQijklCelluleViscoMaxwellHPP::newChampCopie() const { _GIREF_TEST_INVARIANTS; return new ChampQijklCelluleViscoMaxwellHPP(*this); } // ******************************************************************** // // Description: Retourne le ChampScalContinu representant la // composante X du Champ courant. // // Entrée: Aucune // // Sortie: Une reference sur la composante X // // ******************************************************************** ChampScalaire& ChampQijklCelluleViscoMaxwellHPP::reqComposante(const Entier pIndice) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(21> pIndice && 0<= pIndice, "Indice trop grand ou trop petit"); return aComposantes[pIndice]; } // ******************************************************************** // // Description: Retourne le ChampScalContinu representant la // composante X du Champ courant. // // Entrée: Aucune // // Sortie: Une reference sur la composante X // // ******************************************************************** const ChampScalaire& ChampQijklCelluleViscoMaxwellHPP::reqComposante(const Entier pIndice) const { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(21 > pIndice && 0<= pIndice, "Indice trop grand ou trop petit"); return aComposantes[pIndice]; } // ******************************************************************** // // Description: Methode de lecture du Champ // // Entrée: pEntree, un "Input Stream". // // Sortie: Un message d'erreur s'il y a un probleme a la lecture. // // ******************************************************************** ERMsg ChampQijklCelluleViscoMaxwellHPP::importeVersion0(std::istream& /*pEntree*/) { _GIREF_TEST_INVARIANTS; ERMsg lMsg; lMsg = ERMsg(ERMsg::ERREUR,"ERR_FORMAT_FICHIER"); lMsg.ajoute("ChampQijklCelluleViscoMaxwellHPP"); _GIREF_TEST_INVARIANTS; return lMsg; } // ******************************************************************** // // Description: Methode d'ecriture du Champ // // Entrée: pSortie, un "Output Stream". // // Sortie: Un message d'erreur s'il y a un probleme a l'ecriture. // // ******************************************************************** ERMsg ChampQijklCelluleViscoMaxwellHPP::exporteVersion0(std::ostream& _GIREF_PARAM_DEBUG(pSortie)) const { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION((pSortie), "Le ostream pSortie est en erreur"); ERMsg lMsg; _GIREF_ASSERTION(false,"Operation non supportee (nouveau format)"); _GIREF_TEST_INVARIANTS; return lMsg; } // ******************************************************************** // // Description: Assignation des évaluations à faire sur le champ. // // Entrée: Entier pChoixEvaluations: Les évaluations à faire. // // Sortie: Aucune // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::ajouteEvaluationsAFaire(Entier pChoixEvaluations, const SchemaIntg& pSchemaIntg) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(!EvalsChampLocal::reqChoixPourChampComporteEvaluationsAutresQueChamp(pChoixEvaluations), "Pas supporté"); if (!aAppelRecursifComposante && pChoixEvaluations & EvalsChampLocal::EvalueChamp) { aAppelRecursifComposante = true; ChampAnalytiqueBaseDiscParElement::ajouteEvaluationsAFaire(pChoixEvaluations, pSchemaIntg); aAppelRecursifComposante = false; // on ajoute les evaluations a faire a chaque composante aChampElasticiteRef -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); aChampFonctionElasticiteViscositeRef -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); if(aChampIndicateurEtat){ aChampMultiplicateur_b -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); aChampDeriveeMultiplicateur_b -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); aChampFonctionVieillisementLambda -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); aChampMultiplicateur_bPrecedent -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); aChampDeriveeMultiplicateur_bPrecedent -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); aChampFonctionVieillisementLambdaPrecedent -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); aChampIndicateurEtat -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); } } _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: On remet à zéro les évaluations à faire. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::remetAZeroEvaluationsAFaire(const SchemaIntg& pSchemaIntg) { _GIREF_TEST_INVARIANTS; if (!aAppelRecursifComposante) { aAppelRecursifComposante = true; ChampAnalytiqueBaseDiscParElement::remetAZeroEvaluationsAFaire(pSchemaIntg); aAppelRecursifComposante = false; aChampElasticiteRef -> remetAZeroEvaluationsAFaire(pSchemaIntg); aChampFonctionElasticiteViscositeRef -> remetAZeroEvaluationsAFaire(pSchemaIntg); if(aChampIndicateurEtat){ aChampMultiplicateur_b -> remetAZeroEvaluationsAFaire(pSchemaIntg); aChampDeriveeMultiplicateur_b -> remetAZeroEvaluationsAFaire(pSchemaIntg); aChampFonctionVieillisementLambda -> remetAZeroEvaluationsAFaire(pSchemaIntg); aChampMultiplicateur_bPrecedent -> remetAZeroEvaluationsAFaire(pSchemaIntg); aChampDeriveeMultiplicateur_bPrecedent -> remetAZeroEvaluationsAFaire(pSchemaIntg); aChampFonctionVieillisementLambdaPrecedent -> remetAZeroEvaluationsAFaire(pSchemaIntg); aChampIndicateurEtat -> remetAZeroEvaluationsAFaire(pSchemaIntg); } } _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Méthode qui ajoute un schéma d'intégration afin que les // fonctions de bases soient précalculées et les calculs // de "transfert" sur un éléments soient stockés. // // Entrée: const SchemaIntg& pSchemaIntg: Le schéma à assigner // // Sortie: Aucune // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::ajouteSchemaIntegration(const SchemaIntg& pSchemaIntg) { _GIREF_TEST_INVARIANTS; if (!aAppelRecursifComposante) { aAppelRecursifComposante = true; ChampAnalytiqueBaseDiscParElement::ajouteSchemaIntegration(pSchemaIntg); aAppelRecursifComposante = false; aChampElasticiteRef -> ajouteSchemaIntegration(pSchemaIntg); aChampFonctionElasticiteViscositeRef -> ajouteSchemaIntegration(pSchemaIntg); if(aChampIndicateurEtat){ aChampMultiplicateur_b -> ajouteSchemaIntegration(pSchemaIntg); aChampDeriveeMultiplicateur_b -> ajouteSchemaIntegration(pSchemaIntg); aChampFonctionVieillisementLambda -> ajouteSchemaIntegration(pSchemaIntg); aChampMultiplicateur_bPrecedent -> ajouteSchemaIntegration(pSchemaIntg); aChampDeriveeMultiplicateur_bPrecedent -> ajouteSchemaIntegration(pSchemaIntg); aChampFonctionVieillisementLambdaPrecedent -> ajouteSchemaIntegration(pSchemaIntg); aChampIndicateurEtat -> ajouteSchemaIntegration(pSchemaIntg); } } _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Méthode qui efface toutes les mémoires de fonctions de bases // précalculées. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::enleveToutSchemaIntegrations() { _GIREF_TEST_INVARIANTS; if (!aAppelRecursifComposante) { aAppelRecursifComposante = true; ChampAnalytiqueBaseDiscParElement::enleveToutSchemaIntegrations(); aAppelRecursifComposante = false; aChampElasticiteRef -> enleveToutSchemaIntegrations(); aChampFonctionElasticiteViscositeRef -> enleveToutSchemaIntegrations(); if(aChampIndicateurEtat){ aChampMultiplicateur_b -> enleveToutSchemaIntegrations(); aChampDeriveeMultiplicateur_b -> enleveToutSchemaIntegrations(); aChampFonctionVieillisementLambda -> enleveToutSchemaIntegrations(); aChampMultiplicateur_bPrecedent -> enleveToutSchemaIntegrations(); aChampDeriveeMultiplicateur_bPrecedent -> enleveToutSchemaIntegrations(); aChampFonctionVieillisementLambdaPrecedent -> enleveToutSchemaIntegrations(); aChampIndicateurEtat -> enleveToutSchemaIntegrations(); } } _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Méthode qui transfert les informations d'interpolation // sur un élément. Si elles sont pré-calculées, on trasnfert simplement // le pointeur. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** template const VectDyn >& ChampQijklCelluleViscoMaxwellHPP::transfertChampSurGenerique(const PTTypeObjet& pObjet, const SchemaIntg& pSchemaIntg, const VectDyn& pVectInfoLocalesTransformation) const { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(aConteneurMemoireChamp[pSchemaIntg.reqIndiceSchemaAjoute()].reqSchemaIntg() == pSchemaIntg, "Mauvais Schéma d'intégration dans la mémoire"); _GIREF_PRECONDITION(!EvalsChampLocal::reqChoixPourChampComporteEvaluationsAutresQueChamp(aConteneurMemoireChamp[pSchemaIntg.reqIndiceSchemaAjoute()].reqEvaluationsAFaire()), "Pas supporté"); _GIREF_PRECONDITION((aChampIndicateurEtat && aChampMultiplicateur_b) || (!aChampIndicateurEtat && !aChampMultiplicateur_b), "Incompatibilité entre l'indicateur d'état et le multiplicateur de l'élasticité au pas courant"); const Entier lNoIndiceSchema = pSchemaIntg.reqIndiceSchemaAjoute(); // Ici on transfert l'information calculée sur l'élément par pointeur. VectDyn >& lVectInfoLocalesChamp = aConteneurMemoireChamp[lNoIndiceSchema].reqVectInfoLocalesChamp(); //Est-ce que la mémoire contient l'information sur le bon élément? if (Champ::reqMemoireChampDesactivee() || TraitMemoireChamp::reqDernierObjetEvalue(aConteneurMemoireChamp[lNoIndiceSchema]) != &pObjet) { const Entier lChoixEvaluations = aConteneurMemoireChamp[lNoIndiceSchema].reqEvaluationsAFaire(); const bool lFlagEvalueChamp = lChoixEvaluations & EvalsChampLocal::EvalueChamp; // Valeurs de l'evaluation const EntierN lNbPtIntg = pVectInfoLocalesTransformation.reqLongueur(); lVectInfoLocalesChamp.asgnLongueur(lNbPtIntg); if (lFlagEvalueChamp) { const VectDyn& lVectInfoElas = aChampElasticiteRef->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); const VectDyn& lVectInfoFonctElasVisc = aChampFonctionElasticiteViscositeRef->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); const VectDyn >* lVectInfoMultiplicateur_b = 0; const VectDyn >* lVectInfoDeriveeMultiplicateur_b = 0; const VectDyn >* lVectInfoFonctVielLambda = 0; const VectDyn >* lVectInfoMultiplicateur_bPrec = 0; const VectDyn >* lVectInfoDeriveeMultiplicateur_bPrec = 0; const VectDyn >* lVectInfoFonctVielLambdaPrec = 0; const VectDyn >* lVectInfoIndicateurEtat = 0; if(aChampIndicateurEtat){ lVectInfoMultiplicateur_b = &aChampMultiplicateur_b->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoDeriveeMultiplicateur_b = &aChampDeriveeMultiplicateur_b->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoMultiplicateur_bPrec = &aChampMultiplicateur_bPrecedent->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoDeriveeMultiplicateur_bPrec = &aChampDeriveeMultiplicateur_bPrecedent->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoIndicateurEtat = &aChampIndicateurEtat->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoFonctVielLambda = &aChampFonctionVieillisementLambda->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoFonctVielLambdaPrec = &aChampFonctionVieillisementLambdaPrecedent->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); } { // On fait le calcul TenseurO4Sym lUniteO4(1.); DReel lUn =1.0; const DReel lMoinsUn =-1.0; const Entier lNbPtIntg = lVectInfoElas.reqLongueur(); for (Entier lPt = 0; lPt < lNbPtIntg; ++lPt) { // Boucle sur les points d'integrations bool lUtiliseHooke(true); //Debug Georges if(aChampIndicateurEtat) { lUtiliseHooke = ((*lVectInfoIndicateurEtat)[lPt].reqValeurChamp() <= 0.); } DReel lB = 1.; DReel lBPrec = 1.; DReel lLambda = 1.; DReel lLambdaPrec = 1.; DReel lDivise = 0.; DReel lDivisePrec = 0.; DReel lDeriveeB = 0.; DReel lDeriveeBPrec = 0.; DReel lCoef1 = -(lUn-(aThetaSchema))*(*aPasDeTemps); DReel lCoef2 = (aThetaSchema)*(*aPasDeTemps); if(aChampIndicateurEtat) { lB = (*lVectInfoMultiplicateur_b)[lPt].reqValeurChamp(); lBPrec = (*lVectInfoMultiplicateur_bPrec)[lPt].reqValeurChamp(); lLambda = (*lVectInfoFonctVielLambda)[lPt].reqValeurChamp(); lLambdaPrec = (*lVectInfoFonctVielLambdaPrec)[lPt].reqValeurChamp(); } TenseurO4Sym lUniteO4(1.); TenseurO4Sym lMoinsUniteO4(-1.); TenseurO4Sym lMoinsUnitePrecO4(-1.); TenseurO4Sym lUnitePrecO4Int(1.); TenseurO4Sym lAlpha = (lVectInfoFonctElasVisc[lPt].reqValeurChamp())*(lLambda); TenseurO4Sym lAlphaPrecedent = (lVectInfoFonctElasVisc[lPt].reqValeurChamp())*(lLambdaPrec); if (aChampIndicateurEtat) { lDeriveeB = (*lVectInfoDeriveeMultiplicateur_b)[lPt].reqValeurChamp(); lDeriveeBPrec = (*lVectInfoDeriveeMultiplicateur_bPrec)[lPt].reqValeurChamp(); lDivise = lDeriveeB/lB; lDivisePrec = lDeriveeBPrec/lBPrec; } if(lUtiliseHooke) { // On complete la construction de Alpha et AlphaPrecedent lMoinsUniteO4*=lDivise; lMoinsUnitePrecO4*=lDivisePrec; lAlpha+=lMoinsUniteO4; lAlphaPrecedent+=lMoinsUnitePrecO4; } else {// Bazant std::cout<<" !! On est dans la la branche Bazant "<::reqDernierObjetEvalue(aConteneurMemoireChamp[lNoIndiceSchema]), "Aye dernier element pas stocke"); _GIREF_TEST_INVARIANTS; return lVectInfoLocalesChamp; } // ******************************************************************** // // Description: Méthode qui transfert les informations d'interpolation // sur un élément. Si elles sont pré-calculées, on trasnfert simplement // le pointeur. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** const VectDyn >& ChampQijklCelluleViscoMaxwellHPP::transfertChampSur(const Maillage::TypeElement& pElement, const SchemaIntg& pSchemaIntg, const VectDyn& pVectInfoLocalesTransformation) const { _GIREF_TEST_INVARIANTS; return transfertChampSurGenerique(pElement, pSchemaIntg, pVectInfoLocalesTransformation); } // ******************************************************************** // // Description: Methode de lecture du Champ // // Entrée: pEntree, un "Input Stream". // // Sortie: Un message d'erreur s'il y a un probleme a la lecture. // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::lisVirtuel (PRStreamLecture& pPRLecture) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION((pPRLecture), "Le PRStreamLecture pPRLecture est en erreur"); // std::string lNumeroVersion; lisDebutClasse(pPRLecture,"ChampQijklCelluleViscoMaxwellHPP"); lisNumeroVersion(pPRLecture,lNumeroVersion); if(pPRLecture && lNumeroVersion != "Version 1.0") { pPRLecture.asgMsg(ERMsg(ERMsg::ERREUR, "ERR_NUMERO_VERSION")); } // ChampAnalytiqueBaseDiscParElement::lisVirtuel(pPRLecture); // lisFinClasse(pPRLecture,"ChampQijklCelluleViscoMaxwellHPP"); // _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Methode d'ecriture du Champ // // Entrée: pSortie, un "Output Stream". // // Sortie: Un message d'erreur s'il y a un probleme a l'ecriture. // // ******************************************************************** void ChampQijklCelluleViscoMaxwellHPP::ecrisVirtuel (PRStreamEcriture& pPREcriture) const { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION((pPREcriture), "Le PRStreamEcriture pPREcriture est en erreur"); // ecrisDebutClasse(pPREcriture,"ChampQijklCelluleViscoMaxwellHPP"); ecrisNumeroVersion(pPREcriture,"Version 1.0"); // ChampAnalytiqueBaseDiscParElement::ecrisVirtuel(pPREcriture); ERMsg lMsg = ERMsg(ERMsg::OK); // ecrisFinClasse(pPREcriture,"ChampQijklCelluleViscoMaxwellHPP"); // _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Méthode qui teste les invariants de la classe. // // Entrée: Aucune // // Sortie: Arrêt du programme en cas d'erreur // // ******************************************************************** #ifdef GIREF_MODE_DEBUG void ChampQijklCelluleViscoMaxwellHPP::testInvariants() const { ChampAnalytiqueBaseDiscParElement::testInvariants(); _GIREF_TEST_OBJET_INVARIANTS; } #endif // #ifdef GIREF_MODE_DEBUG