11 #ifndef MAPPER_VERTEX_MORPHING_MATRIX_FREE_H
12 #define MAPPER_VERTEX_MORPHING_MATRIX_FREE_H
26 #include "custom_utilities/filter_function.h"
84 : mrOriginModelPart( rOriginModelPart ),
85 mrDestinationModelPart( rDestinationModelPart ),
86 mMapperSettings( MapperSettings ),
87 mFilterRadius( MapperSettings[
"filter_radius"].GetDouble() ),
88 mMaxNumberOfNeighbors( MapperSettings[
"max_nodes_in_filter_radius"].GetInt())
108 void Initialize()
override;
123 void Update()
override;
143 virtual std::string
Info()
const override
145 return "MapperVertexMorphingMatrixFree";
149 virtual void PrintInfo(std::ostream& rOStream)
const override
151 rOStream <<
"MapperVertexMorphingMatrixFree";
155 virtual void PrintData(std::ostream& rOStream)
const override
217 double mFilterRadius;
218 unsigned int mMaxNumberOfNeighbors;
221 unsigned int mBucketSize = 100;
222 NodeVector mListOfNodesInOriginModelPart;
223 KDTree::Pointer mpSearchTree;
226 std::vector<Vector> mValuesOrigin;
227 std::vector<Vector> mValuesDestination;
228 bool mIsMappingInitialized =
false;
240 void CreateListOfNodesInOriginModelPart();
243 void CreateFilterFunction();
246 void InitializeMappingVariables();
249 void AssignMappingIds();
251 void CreateSearchTreeWithAllNodesInOriginModelPart();
254 void ThrowWarningIfNumberOfNeighborsExceedsLimit(
ModelPart::NodeType& given_node,
unsigned int number_of_neighbors);
258 const NodeVector& neighbor_nodes,
259 const unsigned int number_of_neighbors,
260 std::vector<double>& list_of_weights,
261 double& sum_of_weights );
264 double GetVertexMorphingRadius(
const NodeType& rNode)
const override
266 return mFilterRadius;
Short class definition.
Definition: bucket.h:57
Base Class for all Mappers.
Definition: mapper.h:43
Short class definition.
Definition: mapper_vertex_morphing_matrix_free.h:58
virtual std::string Info() const override
Turn back information as a string.
Definition: mapper_vertex_morphing_matrix_free.h:143
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mapper_vertex_morphing_matrix_free.h:155
Bucket< 3, NodeType, NodeVector, NodeTypePointer, NodeIterator, DoubleVectorIterator > BucketType
Definition: mapper_vertex_morphing_matrix_free.h:72
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: mapper_vertex_morphing_matrix_free.h:69
std::vector< double >::iterator DoubleVectorIterator
Definition: mapper_vertex_morphing_matrix_free.h:68
std::vector< NodeType::Pointer >::iterator NodeIterator
Definition: mapper_vertex_morphing_matrix_free.h:67
MapperVertexMorphingMatrixFree(ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart, Parameters MapperSettings)
Default constructor.
Definition: mapper_vertex_morphing_matrix_free.h:83
virtual ~MapperVertexMorphingMatrixFree()
Destructor.
Definition: mapper_vertex_morphing_matrix_free.h:93
Tree< KDTreePartition< BucketType > > KDTree
Definition: mapper_vertex_morphing_matrix_free.h:73
std::vector< NodeType::Pointer > NodeVector
Definition: mapper_vertex_morphing_matrix_free.h:66
Node ::Pointer NodeTypePointer
Definition: mapper_vertex_morphing_matrix_free.h:65
Node NodeType
Definition: mapper_vertex_morphing_matrix_free.h:64
FilterFunction::UniquePointer mpFilterFunction
Definition: mapper_vertex_morphing_matrix_free.h:131
KRATOS_CLASS_POINTER_DEFINITION(MapperVertexMorphingMatrixFree)
Pointer definition of MapperVertexMorphingMatrixFree.
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mapper_vertex_morphing_matrix_free.h:149
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
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