11 #ifndef MAPPER_VERTEX_MORPHING_H
12 #define MAPPER_VERTEX_MORPHING_H
27 #include "custom_utilities/filter_function.h"
90 : mrOriginModelPart(rOriginModelPart),
91 mrDestinationModelPart(rDestinationModelPart),
92 mMapperSettings(MapperSettings),
93 mFilterRadius(MapperSettings[
"filter_radius"].GetDouble())
112 void Initialize()
override;
127 void Update()
override;
146 virtual std::string
Info()
const override
148 return "MapperVertexMorphing";
152 virtual void PrintInfo(std::ostream& rOStream)
const override
154 rOStream <<
"MapperVertexMorphing";
158 virtual void PrintData(std::ostream& rOStream)
const override
184 bool mIsMappingInitialized =
false;
195 virtual void InitializeComputationOfMappingMatrix();
199 return mFilterRadius;
229 unsigned int mBucketSize = 100;
230 NodeVector mListOfNodesInOriginModelPart;
231 KDTree::Pointer mpSearchTree;
234 SparseMatrixType mMappingMatrix;
235 std::vector<Vector> mValuesOrigin;
236 std::vector<Vector> mValuesDestination;
237 double mFilterRadius;
249 void CreateListOfNodesInOriginModelPart();
252 void CreateFilterFunction();
255 void InitializeMappingVariables();
258 void AssignMappingIds();
261 void CreateSearchTreeWithAllNodesInOriginModelPart();
264 void ComputeMappingMatrix();
268 const NodeVector& neighbor_nodes,
269 const unsigned int number_of_neighbors,
270 std::vector<double>& list_of_weights,
271 double& sum_of_weights );
275 NodeVector& neighbor_nodes,
276 unsigned int number_of_neighbors,
277 std::vector<double>& list_of_weights,
278 double& sum_of_weights );
Short class definition.
Definition: bucket.h:57
Base Class for all Mappers.
Definition: mapper.h:43
Short class definition.
Definition: mapper_vertex_morphing.h:58
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mapper_vertex_morphing.h:152
KRATOS_CLASS_POINTER_DEFINITION(MapperVertexMorphing)
Pointer definition of MapperVertexMorphing.
virtual std::string Info() const override
Turn back information as a string.
Definition: mapper_vertex_morphing.h:146
std::vector< NodeType::Pointer >::iterator NodeIterator
Definition: mapper_vertex_morphing.h:67
Parameters mMapperSettings
Definition: mapper_vertex_morphing.h:182
ModelPart & mrDestinationModelPart
Definition: mapper_vertex_morphing.h:181
SparseSpaceType::MatrixType SparseMatrixType
Definition: mapper_vertex_morphing.h:74
Tree< KDTreePartition< BucketType > > KDTree
Definition: mapper_vertex_morphing.h:79
ModelPart & mrOriginModelPart
Definition: mapper_vertex_morphing.h:180
Node ::Pointer NodeTypePointer
Definition: mapper_vertex_morphing.h:65
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: mapper_vertex_morphing.h:69
std::vector< NodeType::Pointer > NodeVector
Definition: mapper_vertex_morphing.h:66
double GetVertexMorphingRadius(const NodeType &rNode) const override
Definition: mapper_vertex_morphing.h:197
MapperVertexMorphing(ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, Parameters MapperSettings)
Default constructor.
Definition: mapper_vertex_morphing.h:89
Node NodeType
Definition: mapper_vertex_morphing.h:64
std::vector< double >::iterator DoubleVectorIterator
Definition: mapper_vertex_morphing.h:68
array_1d< double, 3 > array_3d
Definition: mapper_vertex_morphing.h:70
FilterFunction::UniquePointer mpFilterFunction
Definition: mapper_vertex_morphing.h:183
Bucket< 3, NodeType, NodeVector, NodeTypePointer, NodeIterator, DoubleVectorIterator > BucketType
Definition: mapper_vertex_morphing.h:78
SparseSpaceType::VectorType VectorType
Definition: mapper_vertex_morphing.h:75
UblasSpace< double, CompressedMatrix, Vector > SparseSpaceType
Definition: mapper_vertex_morphing.h:73
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mapper_vertex_morphing.h:158
virtual ~MapperVertexMorphing()
Destructor.
Definition: mapper_vertex_morphing.h:98
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
A generic tree data structure for spatial partitioning.
Definition: tree.h:190
A class template for handling data types, matrices, and vectors in a Ublas space.
Definition: ublas_space.h:121
TMatrixType MatrixType
The matrix type considered.
Definition: ublas_space.h:133
TVectorType VectorType
The vector type considered.
Definition: ublas_space.h:136
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
void ComputeWeightForAllNeighbors(double &rSumOfWeights, std::vector< double > &rListOfWeights, const FilterFunction &rFilterFunction, const DampingFunction &rDampingFunction, const double Radius, const EntityPoint< TEntityType > &rDesignPoint, const std::vector< typename EntityPoint< TEntityType >::Pointer > &rNeighbourNodes, const std::vector< typename EntityPoint< TEntityType >::Pointer > &rDampingNeighbourNodes, const IndexType NumberOfNeighbours, Expression const *const pExpression)
Definition: explicit_filter.cpp:125
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21