KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
pfem_particle_fluidonly.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3 Kratos
4 A General Purpose Software for Multi-Physics Finite Element Analysis
5 Version 1.0 (Released on march 05, 2007).
6 
7 Copyright 2007
8 Pooyan Dadvand, Riccardo Rossi
9 pooyan@cimne.upc.edu
10 rrossi@cimne.upc.edu
11 CIMNE (International Center for Numerical Methods in Engineering),
12 Gran Capita' s/n, 08034 Barcelona, Spain
13 
14 Permission is hereby granted, free of charge, to any person obtaining
15 a copy of this software and associated documentation files (the
16 "Software"), to deal in the Software without restriction, including
17 without limitation the rights to use, copy, modify, merge, publish,
18 distribute, sublicense and/or sell copies of the Software, and to
19 permit persons to whom the Software is furnished to do so, subject to
20 the following condition:
21 
22 Distribution of this code for any commercial purpose is permissible
23 ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNER.
24 
25 The above copyright notice and this permission notice shall be
26 included in all copies or substantial portions of the Software.
27 
28 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
31 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
32 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
33 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
34 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 
36 ==============================================================================
37 */
38 
39 //
40 // Project Name: Kratos
41 // Last Modified by: $Author: pablo $
42 // Date: $Date: 2013-03-05 11:34:12 $
43 // Revision: $Revision: 1.5 $
44 //
45 //
46 
47 
48 #if !defined(KRATOS_PFEM_PARTICLE_FLUID_H_INCLUDED )
49 #define KRATOS_PFEM_PARTICLE_FLUID_H_INCLUDED
50 
51 
52 
53 // System includes
54 #include <string>
55 #include <iostream>
56 #include <sstream>
57 #include <cstddef>
58 
59 
60 
61 // External includes
62 
63 
64 // Project includes
65 #include "includes/define.h"
66 #include "containers/array_1d.h"
67 #include "includes/serializer.h"
68 #include "geometries/point.h"
69 #include "includes/model_part.h"
70 
71 
72 namespace Kratos
73 {
74 
77 
81 
85 
89 
93 
95 
96 /*
97 @see Geometry
98 @see Node
99 @see IntegrationPoint
100 */
101 //template<std::size_t TDimension, class TDataType = double> //always size 3!
103 {
104 public:
107 
109  //KRATOS_CLASS_POINTER_DEFINITION(PFEM_Particle_Fluid);
111 
112  typedef double TDataType;
113 
115 
116  typedef Point Type;
117 
119 
120  typedef std::size_t SizeType;
121 
122  typedef std::size_t IndexType;
123 
127 
131 
133  PFEM_Particle_Fluid(TDataType const& NewX, TDataType const& NewY, TDataType const& NewZ) : Point(NewX, NewY, NewZ)
134  {
135  this->ERASE_FLAG=true; //initializing as useless particle
136  this->VELOCITY=ZeroVector(3);
137  this->DISTANCE=0.0;
138  }
139 
140  PFEM_Particle_Fluid() : Point(0.0, 0.0, 0.0)
141  {
142  this->ERASE_FLAG=true;
143  this->VELOCITY=ZeroVector(3);
144  this->DISTANCE=0.0;
145  }
146 
148  {}
149 
150  //returning references
152  {
153  return this->VELOCITY;
154  }
155 
156  float& GetVelocity(const unsigned int i)
157  {
158  return this->VELOCITY[i];
159  }
160 
161  float& GetDistance()
162  {
163  return this->DISTANCE;
164  }
165 
166  //double& GetTemperature()
167  //{
168  // return this->TEMPERATURE;
169  //}
170 
171  //double& GetOxygen()
172  //{
173  // return this->OXYGEN;
174  //}
175  /*
176  double& GetPressure()
177  {
178  return this->PRESSURE;
179  }
180  double& GetGradientDiscontinuity()
181  {
182  return this->GRADIENT_DISCONTINUITY;
183  }
184  */
185  /*
186  unsigned int& GetElementId()
187  {
188  return this->ELEMENT_ID;
189  }
190  */
191  bool& GetEraseFlag()
192  {
193  return this->ERASE_FLAG;
194  }
195 
196 
197 
198 
199 
200  //Copy constructor. Initialize this point with the coordinates
201  //of given particle.
202 
203  //PFEM_Particle(PFEM_Particle const& rOtherParticle)
204  // : Point(rOtherParticle) {}
205 
206 
207 private:
208  array_1d<float,3> VELOCITY;
209  float DISTANCE;
210  //double TEMPERATURE;
211  //double OXYGEN;
212  //Element::Pointer ELEMENT_WEAKPOINTER;
213  //unsigned int ELEMENT_ID;
214  //double GRADIENT_DISCONTINUITY;
215  bool ERASE_FLAG;
216 
217 
218 
219 };
220 
221 //typedef std::vector<PFEM_Particle_Fluid*> FluidParticlePointerVector;
222 
223 
224 //inline std::ostream& operator << (std::ostream& rOStream,
225 // const std::vector<PFEM_Particle_Fluid*>& rThis)
226 //{
227 //}
228 
229 
230 } //namespace Kratos
231 
232 #endif //KRATOS_PFEM_PARTICLE_FLUID_H_INCLUDED defined
PFEM Particle class.
Definition: pfem_particle_fluidonly.h:103
std::size_t IndexType
Definition: pfem_particle_fluidonly.h:122
PFEM_Particle_Fluid(TDataType const &NewX, TDataType const &NewY, TDataType const &NewZ)
Default constructor.
Definition: pfem_particle_fluidonly.h:133
~PFEM_Particle_Fluid()
Definition: pfem_particle_fluidonly.h:147
Point Type
Definition: pfem_particle_fluidonly.h:116
float & GetVelocity(const unsigned int i)
Definition: pfem_particle_fluidonly.h:156
bool & GetEraseFlag()
Definition: pfem_particle_fluidonly.h:191
BaseType CoordinatesArrayType
Definition: pfem_particle_fluidonly.h:118
double TDataType
Definition: pfem_particle_fluidonly.h:112
PFEM_Particle_Fluid()
Definition: pfem_particle_fluidonly.h:140
PFEM_Particle_Fluid * Pointer
Pointer definition of Point.
Definition: pfem_particle_fluidonly.h:110
array_1d< double, 3 > BaseType
Definition: pfem_particle_fluidonly.h:114
std::size_t SizeType
Definition: pfem_particle_fluidonly.h:120
array_1d< float, 3 > & GetVelocity()
Definition: pfem_particle_fluidonly.h:151
float & GetDistance()
Definition: pfem_particle_fluidonly.h:161
Point class.
Definition: point.h:59
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
integer i
Definition: TensorModule.f:17