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.
eigenvector_to_solution_step_variable_transfer_utility.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosSolidMechanicsApplication $
3 // Created by: $Author: michael.andre@tum.de $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: September 2016 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_EIGENVECTOR_TO_SOLUTION_STEP_VARIABLE_TRANSFER_UTILITY)
11 #define KRATOS_EIGENVECTOR_TO_SOLUTION_STEP_VARIABLE_TRANSFER_UTILITY
12 
13 // System includes
14 //#include <iterator>
15 
16 // External includes
17 
18 // Project includes
19 //#include "includes/define.h"
20 #include "includes/model_part.h"
21 
22 // Application includes
24 
25 namespace Kratos {
26 
29 
33 
37 
41 
45 
47 
56 public:
59 
61 
65 
67 
69 
73 
77 
78  void Transfer(ModelPart& rModelPart, int iEigenMode, int step=0)
79  {
80  for (auto itNode = rModelPart.NodesBegin(); itNode!= rModelPart.NodesEnd(); itNode++)
81  {
82  ModelPart::NodeType::DofsContainerType& rNodeDofs = itNode->GetDofs();
83  Matrix& rNodeEigenvectors = itNode->GetValue(EIGENVECTOR_MATRIX);
84  std::size_t j=0;
85  for (auto itDof = std::begin(rNodeDofs); itDof != std::end(rNodeDofs); itDof++)
86  (*itDof)->GetSolutionStepValue(step) = rNodeEigenvectors(iEigenMode,j++);
87  }
88  }
89 
93 
97 
101 
103 
104 protected:
107 
111 
115 
119 
123 
127 
131 
133 
134 private:
137 
141 
145 
149 
153 
157 
161 
163 
164 }; // class EigenvectorToSolutionStepVariableTransferUtility
165 
167 
170 
172 
173 }
174  // namespace Kratos
175 #endif // KRATOS_EIGENVECTOR_TO_SOLUTION_STEP_VARIABLE_TRANSFER_UTILITY defined
Transfer eigenvectors to solution step variables for GiD output or solution initialization.
Definition: eigenvector_to_solution_step_variable_transfer_utility.hpp:55
EigenvectorToSolutionStepVariableTransferUtility()
Definition: eigenvector_to_solution_step_variable_transfer_utility.hpp:66
virtual ~EigenvectorToSolutionStepVariableTransferUtility()
Definition: eigenvector_to_solution_step_variable_transfer_utility.hpp:68
void Transfer(ModelPart &rModelPart, int iEigenMode, int step=0)
Definition: eigenvector_to_solution_step_variable_transfer_utility.hpp:78
KRATOS_CLASS_POINTER_DEFINITION(EigenvectorToSolutionStepVariableTransferUtility)
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
std::vector< std::unique_ptr< Dof< double > >> DofsContainerType
The DoF container type definition.
Definition: node.h:92
end
Definition: DEM_benchmarks.py:180
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
int step
Definition: face_heat.py:88
int j
Definition: quadrature.py:648