// ************************************************************************ // --- 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: ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP // // Nom de la classe: ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.cc // // ******************************************************************** #include "ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.h" #include "ChampTensorielO4Sym.h" #include "fonctionsTenseurs.h" // ******************************************************************** // // Description: Constructeur par défaut. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP(const std::string& pNom) :aChampElasticiteRef(0), aChampFonctionElasticiteViscositeRef(0), aChampMultiplicateur_b(0), aChampDeriveeMultiplicateur_b(0), aChampFonctionVieillisementLambda(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: pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP: l'objet à copier // // Sortie: Aucune // // ******************************************************************** ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP(const ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP& pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP) : ChampAnalytiqueBaseDiscParElement(), aAppelRecursifComposante(false) { _GIREF_APPEL_TEST_INVARIANTS(pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP); _GIREF_CONSTRUCTEUR_INVARIANTS; for (Entier i = 0; i < 21;++i) { aComposantes[i].asgnParametres(*this, i); } asgnNom(pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.reqNom()); *this = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP; _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: Destructeur. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::~ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP() { _GIREF_TEST_INVARIANTS; _GIREF_DESTRUCTEUR_INVARIANTS; } // ******************************************************************** // // Description: Opérateur d'assignation. // // Entrée: pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP: l'objet à copier // // Sortie: Une référence sur l'objet courant // // ******************************************************************** ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP& ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::operator= (const ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP& pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP) { _GIREF_TEST_INVARIANTS; _GIREF_APPEL_TEST_INVARIANTS(pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP); ChampAnalytiqueBaseDiscParElement::operator=(pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP); if (this != &pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP) { aChampElasticiteRef = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.aChampElasticiteRef; aChampFonctionElasticiteViscositeRef = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.aChampFonctionElasticiteViscositeRef; aChampMultiplicateur_b = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.aChampMultiplicateur_b; aChampDeriveeMultiplicateur_b = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.aChampDeriveeMultiplicateur_b; aChampIndicateurEtat = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.aChampIndicateurEtat; aPasDeTemps = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.aPasDeTemps; aThetaSchema = pChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP.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 PAS de dépendance en temps de l'ÉLASTICITÉ. // ATTENTION On suppose que le multiplicateur sur l'élasticité b(x) = 1. // // Entrée: pChampElasticite le tenseur O4 d'élasticité qui NE DEPEND PAS DU TEMPS // pChampFonctionElasticiteViscositeRef le tenseur O4 de la de référence qui NE DEPEND PAS DU TEMPS // pPasDeTemps le pas de discretisation en temps // pThetaSchema le theta =0, 1, 1/2 respectivement // // // Sortie: Rien // // ******************************************************************** void ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::asgnChampsSansVieillissement(ChampTensorielO4Sym &pChampElasticite, ChampTensorielO4Sym &pChampFonctionElasticiteViscositeRef, DReel &pPasDeTemps, const DReel &pThetaSchema) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION(0!= &pChampElasticite, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pChampFonctionElasticiteViscositeRef, "Pointeur nul!"); _GIREF_PRECONDITION(0!= &pPasDeTemps, "Pointeur nul!"); // _GIREF_PRECONDITION(0!= &pThetaSchema, "Pointeur nul!"); aChampElasticiteRef = &pChampElasticite; aChampFonctionElasticiteViscositeRef = &pChampFonctionElasticiteViscositeRef; aPasDeTemps = &pPasDeTemps; aThetaSchema = pThetaSchema; aChampMultiplicateur_b = 0; aChampFonctionVieillisementLambda = 0; aChampIndicateurEtat = 0; //<- sert d'indicateur de vieillissement _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 // pChampDeltaTempsReduit la variation du temps réduit (l'intégrale de b/a sur [t_n,t_n+1]) // pChampMultiplicateur_b le champs scalaire de la valeur courante de b // pChampChampFonctionVieillisementLambda le champs scalaire de la valeur courante de l // pChampIndicateurEtat indicateur de la loi de comportement Hooke <=0 ou Bazant >0 // // Sortie: Rien // // ******************************************************************** void ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::asgnChampsAvecVieillissement(ChampTensorielO4Sym &pChampElasticiteRef, ChampTensorielO4Sym &pChampFonctionElasticiteViscositeRef, ChampScalaire &pChampMultiplicateur_b, ChampScalaire &pChampDeriveeMultiplicateur_b, ChampScalaire &pChampFonctionVieillisementLambda, 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!= &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; 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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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); 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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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éé // // ******************************************************************** ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP* ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::newChamp() const { _GIREF_TEST_INVARIANTS; return new ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP(); } // ******************************************************************** // // 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éé // // ******************************************************************** ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP* ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::newChampCopie() const { _GIREF_TEST_INVARIANTS; return new ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP(*this); } // ******************************************************************** // // Description: Retourne le ChampScalContinu representant la // composante X du Champ courant. // // Entrée: Aucune // // Sortie: Une reference sur la composante X // // ******************************************************************** ChampScalaire& ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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& ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::importeVersion0(std::istream& /*pEntree*/) { _GIREF_TEST_INVARIANTS; ERMsg lMsg; lMsg = ERMsg(ERMsg::ERREUR,"ERR_FORMAT_FICHIER"); lMsg.ajoute("ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP"); _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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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); aChampIndicateurEtat -> ajouteEvaluationsAFaire(EvalsChampLocal::EvalueChamp,pSchemaIntg); } } _GIREF_TEST_INVARIANTS; } // ******************************************************************** // // Description: On remet à zéro les évaluations à faire. // // Entrée: Aucune // // Sortie: Aucune // // ******************************************************************** void ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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); 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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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); 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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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(); 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 >& ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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 >* lVectInfoIndicateurEtat = 0; if(aChampIndicateurEtat){ lVectInfoMultiplicateur_b = &aChampMultiplicateur_b->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoDeriveeMultiplicateur_b = &aChampDeriveeMultiplicateur_b->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoIndicateurEtat = &aChampIndicateurEtat->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); lVectInfoFonctVielLambda = &aChampFonctionVieillisementLambda->transfertChampSur(pObjet, pSchemaIntg, pVectInfoLocalesTransformation); } { // On fait le calcul const Entier lNbPtIntg = lVectInfoElas.reqLongueur(); TenseurO4Sym lUniteO4(1.); 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 lLambda = 1; DReel lDivise = 1; DReel lDeriveeB = 0; DReel lCoef2 = (aThetaSchema)*(*aPasDeTemps); if(aChampIndicateurEtat) { lB = (*lVectInfoMultiplicateur_b)[lPt].reqValeurChamp(); lLambda = (*lVectInfoFonctVielLambda)[lPt].reqValeurChamp(); } const DReel lMoisUn = -1.0; TenseurO4Sym lUniteO4(1.); TenseurO4Sym lMoinsUniteO4(-1.); TenseurO4Sym lUniteIntO4(1.); TenseurO4Sym lAlpha = (lVectInfoFonctElasVisc[lPt].reqValeurChamp())*(lLambda); TenseurO4Sym lGamma(0.); if (aChampIndicateurEtat) { lDeriveeB = (*lVectInfoDeriveeMultiplicateur_b)[lPt].reqValeurChamp(); } lUniteIntO4*= lDeriveeB; lGamma+=lUniteIntO4; lDivise = lDeriveeB/lB; if(lUtiliseHooke) { // On complete la construction de Alpha et AlphaPrecedent lMoinsUniteO4*=lDivise; lAlpha+=lMoinsUniteO4; } 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 >& ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::lisVirtuel (PRStreamLecture& pPRLecture) { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION((pPRLecture), "Le PRStreamLecture pPRLecture est en erreur"); // std::string lNumeroVersion; lisDebutClasse(pPRLecture,"ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP"); lisNumeroVersion(pPRLecture,lNumeroVersion); if(pPRLecture && lNumeroVersion != "Version 1.0") { pPRLecture.asgMsg(ERMsg(ERMsg::ERREUR, "ERR_NUMERO_VERSION")); } // ChampAnalytiqueBaseDiscParElement::lisVirtuel(pPRLecture); // lisFinClasse(pPRLecture,"ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP"); // _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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::ecrisVirtuel (PRStreamEcriture& pPREcriture) const { _GIREF_TEST_INVARIANTS; _GIREF_PRECONDITION((pPREcriture), "Le PRStreamEcriture pPREcriture est en erreur"); // ecrisDebutClasse(pPREcriture,"ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP"); ecrisNumeroVersion(pPREcriture,"Version 1.0"); // ChampAnalytiqueBaseDiscParElement::ecrisVirtuel(pPREcriture); ERMsg lMsg = ERMsg(ERMsg::OK); // ecrisFinClasse(pPREcriture,"ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP"); // _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 ChampCelluleViscoElastiqueFormulationThetaSchemasMaxwellHPP::testInvariants() const { ChampAnalytiqueBaseDiscParElement::testInvariants(); _GIREF_TEST_OBJET_INVARIANTS; } #endif // #ifdef GIREF_MODE_DEBUG