// 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) . // // 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 . // // For more information, please consult: . #include "FrontPointF.h" //---------------------------------------------------------------- // def des donnees commune a tous les elements //---------------------------------------------------------------- GeomPoint FrontPointF::point ; // CONSTRUCTEURS : FrontPointF::FrontPointF () : // par defaut ElFrontiere(),phi_M(1,1.) {}; // fonction du tableau de 1 noeuds sommets // T est un vecteur normal optionnel au plan tangent au point FrontPointF::FrontPointF ( const Tableau & tab, const DdlElement& ddlElem,Coordonnee* Tt ) : ElFrontiere(tab,ddlElem,1),phi_M(1,1.) {if (Tt != NULL) {T = new Coordonnee(*Tt);} else T=NULL;}; // de copie FrontPointF::FrontPointF( const FrontPointF& a) : ElFrontiere(a),phi_M(1,1.) {if (a.T != NULL) {T = new Coordonnee(*(a.T));} else T=NULL;}; // DESTRUCTEUR : FrontPointF::~FrontPointF () {if (T != NULL) delete T;}; // surcharge de l'affectation ElFrontiere& FrontPointF::operator = ( const ElFrontiere& a) { if (this->TypeFrontiere() == a.TypeFrontiere()) { this->ElFrontiere::operator=(a); const FrontPointF& b = (FrontPointF&) a; if (b.T != NULL) {T = new Coordonnee(*(b.T));} else T=NULL; return *this; } else { cout << "\n erreur d\'affectation, le deux membres non pas le meme type "; cout << "\n ElFrontiere& FrontPointF::operator = (ElFrontiere& a) " << endl; Sortie (1); return *this; } }; // retourne le type de l'element frontiere string FrontPointF::TypeFrontiere() const { return string("FrontPointF");}; // creation d'un nouvelle element frontiere du type FrontPointF ElFrontiere * FrontPointF::NevezElemFront() const { ElFrontiere * pt; pt = new FrontPointF(*this); return pt; }; // creation d'un nouvelle element frontiere du type FrontPointF // avec des donnees differentes ElFrontiere * FrontPointF::NevezElemFront ( const Tableau & tab, const DdlElement& ddlElem) const { ElFrontiere * pt; pt = new FrontPointF(tab,ddlElem); return pt; }; // creation et ramene des pointeurs sur les frontieres de l'element frontiere // au premier appel il y a construction, ensuite on ne fait que ramener le tableau // à moins qu'il soit effacé Tableau & FrontPointF::Frontiere() {if (tabfront.Taille() == 0) {tabfront.Change_taille(1); // le point tabfront(1) = new FrontPointF(tabNoeud,ddlElem); } return tabfront; }; //----- lecture écriture de restart ----- // ceci concerne uniquement les informations spécifiques void FrontPointF::Lecture_base_info_ElFrontiere_pour_projection(ifstream& ent) { string toto; int test; ent >> toto >> test ; if (test) { if (T == NULL) T= new Coordonnee(ParaGlob::Dimension()); ent >> (*T); } else { if (T != NULL) delete T;}; }; void FrontPointF::Ecriture_base_info_ElFrontiere_pour_projection(ofstream& sort) { sort << " FrontPointF " ; if (T != NULL) { sort << " 1 " << *T ;} else { sort << " 0 ";}; }; /* // test si la position d'un point est du bon cote ( c-a-d hors matiere) ou non // si le point est sur la surface, ramène false // ramene true si hors matiere, sinon false // le test sur a est executer uniquement dans les cas suivants : // dimension 3D et frontiere 2D // dimension 3D axi et frontière 1D // dimension 2D et frontiere 1D // ->>> dimension 3D et frontiere 1D, pas de verif // ->>> autre cas ne doivent pas arriver normalement !! bool FrontPointF::BonCote_t( const Coordonnee& ) const { // dans le cas où le vecteur normal existe on test return false;}; // cas ou on utilise la frontiere a t bool FrontPointF::BonCote_tdt( const Coordonnee& ) const { return false;}; // cas ou on utilise la frontiere a tdt */