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.
hypoelastic_solid_stress_tensor_calculate_process.h
Go to the documentation of this file.
1 /*
2 ==============================================================================
3 KratosULFApplication
4 A library based on:
5 Kratos
6 A General Purpose Software for Multi-Physics Finite Element Analysis
7 Version 1.0 (Released on march 05, 2007).
8 
9 Copyright 2007
10 Pooyan Dadvand, Riccardo Rossi, Pawel Ryzhakov
11 pooyan@cimne.upc.edu
12 rrossi@cimne.upc.edu
13 - CIMNE (International Center for Numerical Methods in Engineering),
14 Gran Capita' s/n, 08034 Barcelona, Spain
15 
16 
17 Permission is hereby granted, free of charge, to any person obtaining
18 a copy of this software and associated documentation files (the
19 "Software"), to deal in the Software without restriction, including
20 without limitation the rights to use, copy, modify, merge, publish,
21 distribute, sublicense and/or sell copies of the Software, and to
22 permit persons to whom the Software is furnished to do so, subject to
23 the following condition:
24 
25 Distribution of this code for any commercial purpose is permissible
26 ONLY BY DIRECT ARRANGEMENT WITH THE COPYRIGHT OWNERS.
27 
28 The above copyright notice and this permission notice shall be
29 included in all copies or substantial portions of the Software.
30 
31 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
37 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 
39 ==============================================================================
40 */
41 
42 
43 //
44 // Project Name: Kratos
45 // Last Modified by: $Author: rrossi $
46 // Date: $Date: 2007-05-16 13:59:01 $
47 // Revision: $Revision: 1.4 $ 12 November 2007 - 3D added
48 //
49 //
50 // THIS PROCESS is INVENTED in order to CALCULATE THE PRESSURE and
51 //STORE it node-wise.
52 //THIS IS FOR THE METHOD, where we do not calculate pressure force...
53 
54 #if !defined(KRATOS_HYPOELASTIC_CALCULATE_PROCESS_INCLUDED )
55 #define KRATOS_HYPOELASTIC_CALCULATE_PROCESS_INCLUDED
56 
57 
58 
59 // System includes
60 #include <string>
61 #include <iostream>
62 #include <algorithm>
63 
64 // External includes
65 
66 
67 // Project includes
68 #include "includes/define.h"
69 #include "processes/process.h"
70 #include "includes/node.h"
71 #include "includes/element.h"
72 #include "includes/model_part.h"
73 #include "utilities/geometry_utilities.h"
74 #include "ULF_application.h"
75 
76 
77 namespace Kratos
78 {
79 
82 
86 
87 
91 
95 
99 
101 
108  : public Process
109 {
110 public:
113 
116 
120 
123  : mr_model_part(model_part),mdomain_size(domain_size)
124  {
125  }
126 
129  {
130  }
131 
132 
136 
137  void operator()()
138  {
139  Execute();
140  }
141 
142 
146 
147  void Execute() override
148  {
149  KRATOS_TRY
150 
151  ProcessInfo& proc_info = mr_model_part.GetProcessInfo();
152  double dummy;
153 
154  //THIS SHOULD BE EXECUTED ONLY FOR THOSE ELEMENTS OF THE MONOLITHIC MODEL THAT ARE IDENTIFIED TO BELONG TO THE SOLID domain
155  //THIS CAN BE DONE BY USING SOME FLAG... TO DO... now it is applied to all elements
156  //first initialize the pressure force to the old value
157 
158  //set the pressure to the old value
159  for(ModelPart::ElementsContainerType::iterator im = mr_model_part.ElementsBegin() ;
160  im != mr_model_part.ElementsEnd() ; ++im)
161  {
162  im->Calculate(CAUCHY_STRESS_TENSOR,dummy,proc_info);
163  }
164 
165  KRATOS_WATCH("Executed of Cauchy stress tensor computation of the hypoelastic element");
166 
167 
168  KRATOS_CATCH("")
169  }
170 
171 
175 
176 
180 
181 
185 
187  std::string Info() const override
188  {
189  return "HypoelasticStressCalculateProcess";
190  }
191 
193  void PrintInfo(std::ostream& rOStream) const override
194  {
195  rOStream << "HypoelasticStressCalculateProcess";
196  }
197 
199  void PrintData(std::ostream& rOStream) const override
200  {
201  }
202 
203 
207 
208 
210 
211 protected:
214 
215 
219 
220 
224 
225 
229 
230 
234 
235 
239 
240 
244 
245 
247 
248 private:
251 
252 
256  ModelPart& mr_model_part;
257  double m_min_h;
258  unsigned int mdomain_size;
259 
260 
264 
265 
269 
270 
274 
275 
279 
280 
284 
286 // HypoelasticStressCalculateProcess& operator=(HypoelasticStressCalculateProcess const& rOther);
287 
289 // HypoelasticStressCalculateProcess(HypoelasticStressCalculateProcess const& rOther);
290 
291 
293 
294 }; // Class HypoelasticStressCalculateProcess
295 
297 
300 
301 
305 
306 
308 inline std::istream& operator >> (std::istream& rIStream,
310 
312 inline std::ostream& operator << (std::ostream& rOStream,
314 {
315  rThis.PrintInfo(rOStream);
316  rOStream << std::endl;
317  rThis.PrintData(rOStream);
318 
319  return rOStream;
320 }
322 
323 
324 } // namespace Kratos.
325 
326 #endif // KRATOS_HYPOELASTIC_CALCULATE_PROCESS_INCLUDED defined
327 
328 
Short class definition.
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:109
~HypoelasticStressCalculateProcess() override
Destructor.
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:128
HypoelasticStressCalculateProcess(ModelPart &model_part, unsigned int domain_size)
Default constructor.
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:122
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:147
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:193
std::string Info() const override
Turn back information as a string.
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:187
void operator()()
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:137
KRATOS_CLASS_POINTER_DEFINITION(HypoelasticStressCalculateProcess)
Pointer definition of HypoelasticStressCalculateProcess.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: hypoelastic_solid_stress_tensor_calculate_process.h:199
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
The base class for all processes in Kratos.
Definition: process.h:49
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_WATCH(variable)
Definition: define.h:806
#define KRATOS_TRY
Definition: define.h:109
im
Definition: GenerateCN.py:100
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
int domain_size
Definition: face_heat.py:4
model_part
Definition: face_heat.py:14
dummy
Definition: script.py:194