From 80ea207bd4f27e1dda77f8dd01b5c8d74a482f27 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Sun, 17 Jun 2012 12:21:22 +0000 Subject: [PATCH] cleanup --- Solver/FuncGradDisc.h | 11 +++++------ Solver/FuncHeaviside.h | 11 +++++------ Solver/STensor43.cpp | 21 +++++++++++---------- Solver/filters.cpp | 11 +++++------ Solver/filters.h | 11 +++++------ Solver/functionSpace.cpp | 18 ++++++++---------- Solver/materialLaw.h | 15 ++++++--------- Solver/quadratureRules.h | 13 +++++-------- Solver/solverAlgorithms.h | 14 +++++--------- Solver/solverField.h | 14 +++++--------- Solver/terms.cpp | 19 ++++++++----------- Solver/terms.h | 14 +++++--------- Solver/terms.hpp | 31 ++++++++++++++----------------- 13 files changed, 87 insertions(+), 116 deletions(-) diff --git a/Solver/FuncGradDisc.h b/Solver/FuncGradDisc.h index 0dc7006ce9..c641e9aa90 100644 --- a/Solver/FuncGradDisc.h +++ b/Solver/FuncGradDisc.h @@ -1,11 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// Description : Heaviside function based on level set discontinuity description -// -// -// Author: <Boris Sedji>, 01/2010 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Boris Sedji // #ifndef _FUNCGRADDISC_H_ diff --git a/Solver/FuncHeaviside.h b/Solver/FuncHeaviside.h index 06e321e9c5..812ce983f5 100644 --- a/Solver/FuncHeaviside.h +++ b/Solver/FuncHeaviside.h @@ -1,11 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// Description : Heaviside function based on level set discontinuity description -// -// -// Author: <Boris Sedji>, 01/2010 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Boris Sedji // #ifndef _FUNCHEAVISIDE_H_ diff --git a/Solver/STensor43.cpp b/Solver/STensor43.cpp index dc33abe653..65f85f0aa1 100644 --- a/Solver/STensor43.cpp +++ b/Solver/STensor43.cpp @@ -12,17 +12,18 @@ void STensor43::print (const char *s) const { char format[2048]; - const char l[256]="%12.5E %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E \n"; + const char l[256] = "%12.5E %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E %12.5E \n"; sprintf (format, " tensor4 %s : \n %s %s %s \n %s %s %s \n %s %s %s \n",s, l,l,l, l,l,l, l,l,l); - printf(format,s,_val[ 0],_val[ 1],_val[ 2], _val[ 3],_val[ 4],_val[ 5], _val[ 6],_val[ 7],_val[ 8], - _val[ 9],_val[10],_val[11], _val[12],_val[13],_val[14], _val[15],_val[16],_val[17], - _val[18],_val[19],_val[20], _val[21],_val[22],_val[23], _val[24],_val[25],_val[26], + printf(format, s, + _val[ 0],_val[ 1],_val[ 2], _val[ 3],_val[ 4],_val[ 5], _val[ 6],_val[ 7],_val[ 8], + _val[ 9],_val[10],_val[11], _val[12],_val[13],_val[14], _val[15],_val[16],_val[17], + _val[18],_val[19],_val[20], _val[21],_val[22],_val[23], _val[24],_val[25],_val[26], - _val[27],_val[28],_val[29], _val[30],_val[31],_val[32], _val[33],_val[34],_val[35], - _val[36],_val[37],_val[38], _val[39],_val[40],_val[41], _val[42],_val[43],_val[44], - _val[45],_val[46],_val[47], _val[48],_val[49],_val[50], _val[51],_val[52],_val[53], + _val[27],_val[28],_val[29], _val[30],_val[31],_val[32], _val[33],_val[34],_val[35], + _val[36],_val[37],_val[38], _val[39],_val[40],_val[41], _val[42],_val[43],_val[44], + _val[45],_val[46],_val[47], _val[48],_val[49],_val[50], _val[51],_val[52],_val[53], - _val[54],_val[55],_val[56], _val[57],_val[58],_val[59], _val[60],_val[61],_val[62], - _val[63],_val[64],_val[65], _val[66],_val[67],_val[68], _val[69],_val[70],_val[71], - _val[72],_val[73],_val[74], _val[75],_val[76],_val[77], _val[78],_val[79],_val[80]); + _val[54],_val[55],_val[56], _val[57],_val[58],_val[59], _val[60],_val[61],_val[62], + _val[63],_val[64],_val[65], _val[66],_val[67],_val[68], _val[69],_val[70],_val[71], + _val[72],_val[73],_val[74], _val[75],_val[76],_val[77], _val[78],_val[79],_val[80]); } diff --git a/Solver/filters.cpp b/Solver/filters.cpp index 3db2a5ddb4..b3554d8755 100644 --- a/Solver/filters.cpp +++ b/Solver/filters.cpp @@ -1,11 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// Description : Filters for function space dof selection -// -// -// Author: <Eric Bechet>::<Boris Sedji>, 02/2010 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Boris Sedji // #include "filters.h" diff --git a/Solver/filters.h b/Solver/filters.h index 37ca454f47..f12f9a1d3f 100644 --- a/Solver/filters.h +++ b/Solver/filters.h @@ -1,11 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// Description : Filters for function space dof selection -// -// -// Author: <Eric Bechet>::<Boris Sedji>, 02/2010 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Boris Sedji // #ifndef _FILTERS_H_ diff --git a/Solver/functionSpace.cpp b/Solver/functionSpace.cpp index 09fc017e23..1aee0820c7 100644 --- a/Solver/functionSpace.cpp +++ b/Solver/functionSpace.cpp @@ -1,17 +1,15 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Implementation: functionSpace -// -// Description: -// -// -// Author: <Eric Bechet>, (C) 2009 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Eric Bechet // + #include "functionSpace.h" -const SVector3 VectorLagrangeFunctionSpaceOfElement::BasisVectors[3] = +const SVector3 VectorLagrangeFunctionSpaceOfElement::BasisVectors[3] = {SVector3(1, 0, 0), SVector3(0, 1, 0), SVector3(0, 0, 1)}; -const SVector3 VectorLagrangeFunctionSpace::BasisVectors[3] = +const SVector3 VectorLagrangeFunctionSpace::BasisVectors[3] = {SVector3(1, 0, 0), SVector3(0, 1, 0), SVector3(0, 0, 1)}; diff --git a/Solver/materialLaw.h b/Solver/materialLaw.h index 05863c58b1..6eeb6cc33f 100644 --- a/Solver/materialLaw.h +++ b/Solver/materialLaw.h @@ -1,13 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Interface: materialLaw -// -// Description: -// -// -// Author: <Eric Bechet>, (C) 2009 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Eric Bechet // #ifndef _MATERIALLAW_H_ @@ -17,7 +14,7 @@ class Material { public: virtual ~Material() {} - + }; diff --git a/Solver/quadratureRules.h b/Solver/quadratureRules.h index ec2fa9a320..182deff1ad 100644 --- a/Solver/quadratureRules.h +++ b/Solver/quadratureRules.h @@ -1,13 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Interface: quadratureRules -// -// Description: -// -// -// Author: <Eric Bechet>, (C) 2009 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Eric Bechet // #ifndef _QUADRATURERULES_H_ diff --git a/Solver/solverAlgorithms.h b/Solver/solverAlgorithms.h index 6272fb389e..49654c8c50 100644 --- a/Solver/solverAlgorithms.h +++ b/Solver/solverAlgorithms.h @@ -1,15 +1,11 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Interface: solverAlgorithms +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // -// Description: +// Contributor(s): +// Eric Bechet // -// -// Author: <Eric Bechet>, (C) 2009 -// -// Copyright: See COPYING file that comes with this distribution -// -// - #ifndef _SOLVERALGORITHMS_H_ #define _SOLVERALGORITHMS_H_ diff --git a/Solver/solverField.h b/Solver/solverField.h index 4e31277784..1ee290cac2 100644 --- a/Solver/solverField.h +++ b/Solver/solverField.h @@ -1,15 +1,11 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Interface: field +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // -// Description: +// Contributor(s): +// Eric Bechet // -// -// Author: <Eric Bechet>, (C) 2009 -// -// Copyright: See COPYING file that comes with this distribution -// -// - #ifndef _SOLVERFIELD_H_ #define _SOLVERFIELD_H_ diff --git a/Solver/terms.cpp b/Solver/terms.cpp index 08622668b3..4585da57e6 100644 --- a/Solver/terms.cpp +++ b/Solver/terms.cpp @@ -1,13 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Implementation: terms -// -// Description: -// -// -// Author: <Eric Bechet>, (C) 2011 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Eric Bechet // #include "terms.h" @@ -20,7 +17,7 @@ void BilinearTermToScalarTerm::get(MElement *ele, int npts, IntPt *GP, double &v val = localMatrix(0, 0); } -void BilinearTermBase::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const +void BilinearTermBase::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const { std::vector<fullMatrix<double> > mv(npts); get(ele,npts,GP,mv); @@ -59,7 +56,7 @@ IsotropicElasticTerm::IsotropicElasticTerm(FunctionSpace<SVector3>& space1_, dou double C44 = (C11 - C12) / 2; /* FACT = E / (1 - nu * nu); // plane stress (plates) C11 = FACT; - C12 = nu * FACT; + C12 = nu * FACT; C44 = (1. - nu) * .5 * FACT;*/ H.scale(0.); for(int i = 0; i < 3; ++i) { H(i, i) = C11; H(i + 3, i + 3) = C44; } @@ -177,7 +174,7 @@ void LagMultTerm::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) double jac[3][3]; m.resize(nbFF1, nbFF2); m.setAll(0.); - for(int i = 0; i < npts; i++) + for(int i = 0; i < npts; i++) { double u = GP[i].pt[0]; double v = GP[i].pt[1]; double w = GP[i].pt[2]; const double weight = GP[i].weight; const double detJ = ele->getJacobian(u, v, w, jac); diff --git a/Solver/terms.h b/Solver/terms.h index 4721f09014..4a49a7c936 100644 --- a/Solver/terms.h +++ b/Solver/terms.h @@ -1,15 +1,11 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Interface: terms +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // -// Description: +// Contributor(s): +// Eric Bechet // -// -// Author: <Eric Bechet>, (C) 2011 -// -// Copyright: See COPYING file that comes with this distribution -// -// - #ifndef _TERMS_H_ #define _TERMS_H_ diff --git a/Solver/terms.hpp b/Solver/terms.hpp index 844efa9d84..fda50e8a9f 100644 --- a/Solver/terms.hpp +++ b/Solver/terms.hpp @@ -1,13 +1,10 @@ +// Gmsh - Copyright (C) 1997-2012 C. Geuzaine, J.-F. Remacle // -// C++ Template Implementations: terms -// -// Description: -// -// -// Author: <Eric Bechet>, (C) 2011 -// -// Copyright: See COPYING file that comes with this distribution +// See the LICENSE.txt file for license information. Please report all +// bugs and problems to <gmsh@geuz.org>. // +// Contributor(s): +// Eric Bechet // #include "terms.h" @@ -33,7 +30,7 @@ template<class T2> void LinearTermBase<T2>::get(MElement *ele, int npts, IntPt * } } -template<class T2> void PlusTerm<T2>::get(MElement *ele, int npts, IntPt *GP, fullVector<T2> &v) const +template<class T2> void PlusTerm<T2>::get(MElement *ele, int npts, IntPt *GP, fullVector<T2> &v) const { fullVector<T2> v2; a->get(ele,npts,GP,v); @@ -90,7 +87,7 @@ template<class T1> void LaplaceTerm<T1, T1>::get(MElement *ele, int npts, IntPt } } -template<class T1> void LoadTerm<T1>::get(MElement *ele, int npts, IntPt *GP, fullVector<double> &m) const +template<class T1> void LoadTerm<T1>::get(MElement *ele, int npts, IntPt *GP, fullVector<double> &m) const { if(ele->getParent()) ele = ele->getParent(); int nbFF = LinearTerm<T1>::space1.getNumKeys(ele); @@ -117,7 +114,7 @@ template<class T2> BilinearTermContract<T2> operator |(const LinearTermBase<T2>& return BilinearTermContract<T2>(L1,L2); } -template<class T2> void BilinearTermContract<T2>::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const +template<class T2> void BilinearTermContract<T2>::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const { fullVector<T2> va; fullVector<T2> vb; @@ -131,12 +128,12 @@ template<class T2> void BilinearTermContract<T2>::get(MElement *ele, int npts, I } -template<class T2> void BilinearTermContractWithLaw<T2>::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const +template<class T2> void BilinearTermContractWithLaw<T2>::get(MElement *ele, int npts, IntPt *GP, fullMatrix<double> &m) const { BilinearTermBase::get(ele,npts,GP,m); } - -template<class T2> void BilinearTermContractWithLaw<T2>::get(MElement *ele, int npts, IntPt *GP, std::vector<fullMatrix<double> > &mv) const + +template<class T2> void BilinearTermContractWithLaw<T2>::get(MElement *ele, int npts, IntPt *GP, std::vector<fullMatrix<double> > &mv) const { std::vector<fullVector<T2> > va(npts); std::vector<fullVector<T2> > vb(npts); @@ -158,7 +155,7 @@ template<class T2> PlusTerm<T2> LinearTermBase<T2>::operator +(const LinearTermB return PlusTerm<T2>(*this,other); } /* -template<class T1> void GradTerm<T1>::get(MElement *ele, int npts, IntPt *GP, fullVector<typename TensorialTraits<T1>::GradType > &vec) const +template<class T1> void GradTerm<T1>::get(MElement *ele, int npts, IntPt *GP, fullVector<typename TensorialTraits<T1>::GradType > &vec) const { int nbFF = LinearTerm<T1,typename TensorialTraits<T1>::GradType>::space1.getNumKeys(ele); double jac[3][3]; @@ -178,7 +175,7 @@ template<class T1> void GradTerm<T1>::get(MElement *ele, int npts, IntPt *GP, fu } } */ -template<class T1> void GradTerm<T1>::get(MElement *ele, int npts, IntPt *GP, std::vector<fullVector<typename TensorialTraits<T1>::GradType > > &vvec) const +template<class T1> void GradTerm<T1>::get(MElement *ele, int npts, IntPt *GP, std::vector<fullVector<typename TensorialTraits<T1>::GradType > > &vvec) const { int nbFF = LinearTerm<T1,typename TensorialTraits<T1>::GradType>::space1.getNumKeys(ele); for(int i = 0; i < npts; i++) @@ -196,7 +193,7 @@ template<class T1> void GradTerm<T1>::get(MElement *ele, int npts, IntPt *GP, st -template<class T1> void LoadTermOnBorder<T1>::get(MElement *ele, int npts, IntPt *GP, fullVector<double> &m) const +template<class T1> void LoadTermOnBorder<T1>::get(MElement *ele, int npts, IntPt *GP, fullVector<double> &m) const { MElement *elep; if (ele->getParent()) elep = ele->getParent(); -- GitLab