This file is indexed.

/usr/include/ASL/num/aslFDElasticity.h is in libasl-dev 0.1.7-2.

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
/*
 * Advanced Simulation Library <http://asl.org.il>
 * 
 * Copyright 2015 Avtech Scientific <http://avtechscientific.com>
 *
 *
 * This file is part of Advanced Simulation Library (ASL).
 *
 * ASL is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, version 3 of the License.
 *
 * ASL 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 Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with ASL. If not, see <http://www.gnu.org/licenses/>.
 *
 */


#ifndef ASLFDELASTICITY_H
#define ASLFDELASTICITY_H

#include "aslNumMethod.h"
#include "acl/aclMath/aclVectorOfElementsDef.h"

namespace acl{
	class Kernel;
	class VectorOfElementsData;
}

namespace asl
{
	class VectorTemplate;
	class TemplateVE;

	template <typename V> class DataWithGhostNodes;
	typedef DataWithGhostNodes<acl::VectorOfElementsData> DataWithGhostNodesACLData;
	typedef std::shared_ptr<DataWithGhostNodesACLData> SPDataWithGhostNodesACLData;
	typedef DataWithGhostNodes<acl::VectorOfElements> DataWithGhostNodesACL;
	typedef std::shared_ptr<DataWithGhostNodesACL> SPDataWithGhostNodesACL;

	namespace elasticity
	{
		acl::VectorOfElements strain(vector<TemplateVE> & displacment);
		acl::VectorOfElements stressLinear(acl::VectorOfElements & strain);
//		VectorOfElements linearEqLaplasTerm(TemplateVE displacment);
	}

	/// abstract class for elasticity solver
	class ElasticityCommonA: public NumMethod
	{
		public:
			typedef SPDataWithGhostNodesACLData Data;
			typedef acl::VectorOfElements Param;
		protected:
			std::unique_ptr<acl::Kernel> kernel;

			Data displacementData;
			Data displacementInternalData;			
				
			Param bulkModulus;
			Param shearModulus;
			Param force;
		public:			
			const VectorTemplate* vectorTemplate;

			ElasticityCommonA();
			/**
			 \param d is a displacement field
			 \param bM is the bulk modulus
			 \param sM is the shear modulus
			 \param vT is a vector template			 
			 */
			ElasticityCommonA(Data d, Param bM, Param sM, const VectorTemplate* vT);
			~ElasticityCommonA();
			void setVectorTemplate(const VectorTemplate* vT);
			VectorTemplate getVectorTemplate();

			virtual void init()=0;
			virtual void execute()=0;			

			void setForce(Param f);
			inline Data getDisplacementData() const;
			inline Data getDisplacementInternalData() const;
			inline const Param getBulkModulus() const;
			inline const Param getShearModulus() const;
	};
	
	/// Numerical method which computes homogenious isotropic elasticity equation
	/**
		 \ingroup Elasticity
		 \ingroup NumMethods
	 */
	class FDElasticityIncompressibleStatic: public ElasticityCommonA
	{
		private:
			Data pressure;
			Data pressureInternalData;
		public:			
			FDElasticityIncompressibleStatic();
			/**
			 \param d is a displacement field
			 \param bM is the bulk modulus
			 \param sM is the shear modulus
			 \param vT is a vector template			 
			 */
			FDElasticityIncompressibleStatic(Data d, Param bM, Param sM, const VectorTemplate* vT);
			~FDElasticityIncompressibleStatic();

			virtual void init();
			virtual void execute();			

			inline Data getPressureData() const;
	};

	typedef std::shared_ptr<FDElasticityIncompressibleStatic> SPFDElasticityIncompressibleStatic;

	/// Numerical method which computes homogenious isotropic elasticity equation
	/**
		 \ingroup Elasticity
		 \ingroup NumMethods
	 */
	class FDElasticityRelaxation: public ElasticityCommonA
	{
		private:
			Data pressure;
			Data pressureInternalData;
			Param deltat;
			Param dumpingFactor;
		public:			
			FDElasticityRelaxation();
			/**
			 \param d is a displacement field
			 \param bM is the bulk modulus
			 \param sM is the shear modulus
			 \param dt is time step
			 \param vT is a vector template			 
			 */
			FDElasticityRelaxation(Data d, Param bM, Param sM, Param dt, const VectorTemplate* vT);
			~FDElasticityRelaxation();

			virtual void init();
			virtual void execute();			

			inline Data getPressureData() const;
			inline Param getDeltat() const;
			void setDumpingFactor(Param dumpF);
	};

	typedef std::shared_ptr<FDElasticityRelaxation> SPFDElasticityRelaxation;

	
	/// Numerical method which computes homogenious isotropic elasticity equation
	/**
		 \ingroup Elasticity
		 \ingroup NumMethods
		 
		 \f[ \rho\ddot u_j =(K+\mu/3)\nabla_j  \nabla_k u_k+ \mu \Delta u_j + \vec F \f]
		 where \f$K\f$ is the bulk modulus, \f$\mu\f$ is the shear modulus, 
		 \f$\vec u\f$ is a displacement vector field, \f$ \vec F\f$ external force
	*/
	class FDElasticity2: public ElasticityCommonA
	{
		private:
//			VData velocityData;
			Param deltat;
			Param dumpingFactor;
		public:			
			FDElasticity2();
			/**
			 \param d is a displacement field
			 \param bM is the bulk modulus
			 \param sM is the shear modulus
			 \param dt is time step
			 \param vT is a vector template			 
			 */
			FDElasticity2(Data d, Param bM, Param sM, 
			              Param dt, const VectorTemplate* vT);
			~FDElasticity2();

			virtual void init();
			virtual void execute();			
//			inline VData getVelocityData() const;

			inline Param getDeltat() const;
			void setDumpingFactor(Param dumpF);
	};

	typedef std::shared_ptr<FDElasticity2> SPFDElasticity2;
	
	/// Number of dimensions
	/**
		 \relates FDElasticity
	 */
	unsigned int nD(const ElasticityCommonA & e);

	SPFDElasticity2 generateFDElasticity(SPDataWithGhostNodesACLData d, 
	                                     double bM, 
	                                     double sM, 
	                                     double dt, 
	                                     const VectorTemplate* vT);

	SPFDElasticityIncompressibleStatic generateFDElasticityStatic(SPDataWithGhostNodesACLData d, 
	                                                              double bM, 
	                                                              double sM, 
	                                                              const VectorTemplate* vT);

	SPFDElasticityRelaxation generateFDElasticityRelax(SPDataWithGhostNodesACLData d, 
	                                                   double bM, 
	                                                   double sM, 
	                                                   double dt, 
	                                                   const VectorTemplate* vT);
	
//-------------------------IMPLEMENTATION------------------------

	inline ElasticityCommonA::Data 
		ElasticityCommonA::getDisplacementData() const
	{
		return displacementData;
	}

	inline ElasticityCommonA::Data ElasticityCommonA::getDisplacementInternalData() const
	{
		return displacementInternalData;
	}
	
	inline const ElasticityCommonA::Param 
		ElasticityCommonA::getBulkModulus() const
	{
		return bulkModulus;
	}
	
	inline const ElasticityCommonA::Param 
		ElasticityCommonA::getShearModulus() const
	{
		return shearModulus;
	}

	inline ElasticityCommonA::Data 
		FDElasticityIncompressibleStatic::getPressureData() const
	{
		return pressure;
	}
	
	inline FDElasticityRelaxation::Data 
		FDElasticityRelaxation::getPressureData() const
	{
		return pressure;
	}
	
	inline FDElasticity2::Param FDElasticity2::getDeltat() const
	{
		return deltat;
	}
	
} // asl
#endif // ASLFDELASTICITY_H