This file is indexed.

/usr/include/lorene/C++/Include/base_vect.h is in liblorene-dev 0.0.0~cvs20161116+dfsg-1ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
/*
 *  Definition of Lorene classes Base_vect
 *				 Base_vect_cart
 *				 Base_vect_spher
 *
 */

/*
 *   Copyright (c) 2000-2001 Eric Gourgoulhon
 *
 *   This file is part of LORENE.
 *
 *   LORENE 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 2 of the License, or
 *   (at your option) any later version.
 *
 *   LORENE 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 LORENE; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */


#ifndef __BASE_VECT_H_ 
#define __BASE_VECT_H_ 


/*
 * $Id: base_vect.h,v 1.7 2014/10/13 08:52:31 j_novak Exp $
 * $Log: base_vect.h,v $
 * Revision 1.7  2014/10/13 08:52:31  j_novak
 * Lorene classes and functions now belong to the namespace Lorene.
 *
 * Revision 1.6  2014/10/06 15:09:39  j_novak
 * Modified #include directives to use c++ syntax.
 *
 * Revision 1.5  2004/03/22 13:12:40  j_novak
 * Modification of comments to use doxygen instead of doc++
 *
 * Revision 1.4  2002/10/16 14:36:28  j_novak
 * Reorganization of #include instructions of standard C++, in order to
 * use experimental version 3 of gcc.
 *
 * Revision 1.3  2002/09/13 09:17:31  j_novak
 * Modif. commentaires
 *
 * Revision 1.2  2002/06/17 14:05:16  j_novak
 * friend functions are now also declared outside the class definition
 *
 * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
 * LORENE
 *
 * Revision 2.6  2000/02/28  15:42:15  eric
 * Ajout de la fonction Base_vect_cart::get_align().
 *
 * Revision 2.5  2000/02/09  14:45:40  eric
 * *** empty log message ***
 *
 * Revision 2.4  2000/02/09  13:22:50  eric
 * REFONTE COMPLETE DE LA CLASSE
 * L'identification n'est plus base sur un membre statique (numero
 *  d'instance) mais sur les caracteres physiques (rot_phi, etc...)
 * Ajout des constructeurs par copie et lecture de fichier.
 *
 * Revision 2.3  2000/01/12  16:27:13  eric
 * Les constructeurs a un seul argument sont declares explicit.
 *
 * Revision 2.2  2000/01/10  13:34:52  eric
 * Modif commentairez.
 *
 * Revision 2.1  2000/01/10  13:26:49  eric
 * Ajout de la fonction set_rot_phi.
 *
 * Revision 2.0  2000/01/10  12:43:15  eric
 * *** empty log message ***
 *
 *
 * $Header: /cvsroot/Lorene/C++/Include/base_vect.h,v 1.7 2014/10/13 08:52:31 j_novak Exp $
 *
 */

// Headers C
#include <cstdio>
#include "headcpp.h"

// Lorene classes
namespace Lorene {
class Tenseur ; 

		    //-----------------------------------//
		    //	    class Base_vect (base class) //
		    //-----------------------------------//

/**
 * Vectorial bases (triads) with respect to which the tensorial components are
 * defined. \ingroup (tensor)
 *
 */
class Base_vect {
    
    // Data : 
    // -----
    protected:
	char name[100] ;		///< Name of the basis


    // Constructors - Destructor
    // -------------------------
	
    protected:
	Base_vect() ;			    ///< Standard constructor

	/// Standard constructor with name
	explicit Base_vect(const char* name_i) ; 

	Base_vect(const Base_vect& ) ;	///< Copy constructor 
	 
    protected:
	/** Constructor from a file.
	 *  This constructor is protected because any \c Base_vect 
	 *  construction from a file must be done via the function 
	 *  \c Base_vect::bvect_from_file . 
	 */
	explicit Base_vect(FILE* ) ; 

    public:
	virtual ~Base_vect() ;			///< Destructor

    // Mutator / Assignment
    // --------------------

    private:
	 /// Assignement operator (not implemented).
	void operator=(const Base_vect& ) ;	  


    public: 
	/// Sets the basis name
	void set_name(const char* name_i) ; 


    // Extraction of information
    // -------------------------
    public:
	const char* get_name() const ;	///< Returns the basis name
	
	/** Returns a number to identify the sub-classe of \c Base_vect the
	 *  object belongs to. 
	 */
	virtual int identify() const = 0 ; 

    // Outputs
    // -------
    public:
	virtual void sauve(FILE* ) const ;	///< Save in a file

	/// Display
	friend ostream& operator<<(ostream& , const Base_vect& ) ;	

    protected: 
	virtual ostream& operator>>(ostream &) const = 0 ;    ///< Operator >>

    // Miscellaneous
    // -------------
    
    public:
	/** Construction of a vectorial basis from a file 
	 * (see \c sauve(FILE* ) ).
	 */
	static Base_vect* bvect_from_file(FILE* ) ; 

	/// Comparison operator (egality)
	virtual bool operator==(const Base_vect& ) const = 0 ;  

	/// Comparison operator (difference)
	bool operator!=(const Base_vect& ) const ;  
	
	/// Change the basis in which the components of a tensor are expressed
	virtual void change_basis(Tenseur& ) const = 0 ; 

};

ostream& operator<<(ostream& , const Base_vect& ) ;	


		    //-----------------------------------//
		    //	    class Base_vect_cart	 //
		    //-----------------------------------//


/**
 * Cartesian vectorial bases (triads). \ingroup (tensor)
 *
 */
class Base_vect_cart : public Base_vect {
    
    // Data : 
    // -----
    private:
	/// Angle between the \e x --axis and the absolute frame \e X --axis
	double rot_phi ;	

	/**
	 * Indicator of alignment with respect to the absolute frame: \\
	 *   \c align = 1  : basis aligned with the absolute frame 
	 *			(\f${\tt rot\_phi = 0}\f$) \\
	 *   \c align = -1  : basis anti-aligned with the absolute frame 
	 *			(\f${\tt rot\_phi} = \pi\f$) \\
	 *   \c align = 0  : general case 
	 */
	int align ; 

    // Constructors - Destructor
    // -------------------------
	
    public:
	explicit Base_vect_cart(double rot_phi_i) ;   ///< Standard constructor

	/// Standard constructor with name
	Base_vect_cart(double rot_phi_i, const char* name_i) ; 

 	Base_vect_cart(const Base_vect_cart& ) ;    ///< Copy constructor
	 
    protected:
	/** Constructor from a file.
	 *  This constructor is protected because any \c Base_vect_cart  
	 *  construction from a file must be done via the function 
	 *  \c Base_vect::bvect_from_file . 
	 */
	explicit Base_vect_cart(FILE* ) ; 

	/// The construction function from a file
	friend Base_vect* Base_vect::bvect_from_file(FILE* ) ; 

    public:
	virtual ~Base_vect_cart() ;			///< Destructor

    // Mutators
    // --------

    public:
	/// Assignment to another \c Base_vect_cart 
	void operator=(const Base_vect_cart& ) ;

	/** Sets a new value to the angle \c rot_phi 
	 *  between the \e x --axis and the absolute frame \e X --axis
	 */
	void set_rot_phi(double rot_phi_i) ; 

    private: 
	/// Computes \c align  from the value of \c rot_phi
	void set_align() ; 
	
    // Miscellaneous
    // -------------

    public:    	
	/// Comparison operator (egality)
	virtual bool operator==(const Base_vect& ) const ; 

	/// Change the basis in which the components of a tensor are expressed
	virtual void change_basis(Tenseur& ) const ; 

	/** Returns a number to identify the sub-classe of \c Base_vect the
	 *  object belongs to. 
	 */
	virtual int identify() const ; 

	/** Returns the
	 *  indicator of alignment with respect to the absolute frame.
	 * 
	 *  @return 
	 *   1 : basis aligned with the absolute frame 
	 *			(\f${\tt rot\_phi = 0}\f$) \\
	 *   -1 : basis anti-aligned with the absolute frame 
	 *			(\f${\tt rot\_phi} = \pi\f$) \\
	 *   0 : general case 
	 */
	int get_align() const {return align;} ; 

    // Outputs
    // -------

    public: 
	virtual void sauve(FILE* ) const ;	///< Save in a file

    protected: 
	virtual ostream& operator>>(ostream &) const ;    ///< Operator >>


};

		    //-----------------------------------//
		    //	    class Base_vect_spher	 //
		    //-----------------------------------//


/**
 * Spherical orthonormal vectorial bases (triads).\ingroup (tensor)
 *
 */
class Base_vect_spher : public Base_vect {
    
    // Data : 
    // -----
    private:
	double ori_x ;		///< Absolute coordinate \e X of the origin
	double ori_y ;		///< Absolute coordinate \e Y  of the origin
	double ori_z ;		///< Absolute coordinate \e Z of the origin
    
	/// Angle between the \e x --axis and the absolute frame \e X --axis
	double rot_phi ;	

	

    // Constructors - Destructor
    // -------------------------
	
    public:
	Base_vect_spher(double xa0, double ya0, double za0,  
			double rot_phi_i) ;   ///< Standard constructor

	/// Standard constructor with name
	Base_vect_spher(double xa0, double ya0, double za0, 
			double rot_phi_i, const char* name_i) ; 

	Base_vect_spher(const Base_vect_spher& ) ;	///< Copy constructor
	 
    protected:
	/** Constructor from a file.
	 *  This constructor is protected because any \c Base_vect_spher  
	 *  construction from a file must be done via the function 
	 *  \c Base_vect::bvect_from_file . 
	 */
	explicit Base_vect_spher(FILE* ) ; 

	/// The construction function from a file
	friend Base_vect* Base_vect::bvect_from_file(FILE* ) ; 

    public:
	virtual ~Base_vect_spher() ;			///< Destructor

    // Mutators
    // --------
    public:
	/// Assignment to another \c Base_vect_spher 
	void operator=(const Base_vect_spher& ) ;

    public:
	/// Sets a new origin
	void set_ori(double xa0, double ya0, double za0) ;  

	/** Sets a new value to the angle \c rot_phi 
	 *  between the \e x --axis and the absolute frame \e X --axis
	 */
	void set_rot_phi(double rot_phi_i) ; 

    // Miscellaneous
    // -------------
    	
    public:    	
	/// Comparison operator (egality)
	virtual bool operator==(const Base_vect& ) const ; 

	/// Change the basis in which the components of a tensor are expressed
	virtual void change_basis(Tenseur& ) const ; 

	/** Returns a number to identify the sub-classe of \c Base_vect the
	 *  object belongs to. 
	 */
	virtual int identify() const ; 

    // Outputs
    // -------

    public: 
	virtual void sauve(FILE* ) const ;	///< Save in a file

    protected: 
	virtual ostream& operator>>(ostream &) const ;    ///< Operator >>


};

}
#endif