10 #if !defined(KRATOS_SHARED_POINTS_MAPPER_H_INCLUDED )
11 #define KRATOS_SHARED_POINTS_MAPPER_H_INCLUDED
20 #include "boost/smart_ptr.hpp"
78 if( OriginNodes.size()!=0 && DestinationNodes.size()!=0)
86 for(ModelPart::NodesContainerType::const_iterator origin_it = OriginNodes.begin(); origin_it != OriginNodes.end(); origin_it++)
88 for(ModelPart::NodesContainerType::const_iterator destination_it = DestinationNodes.begin(); destination_it != DestinationNodes.end(); destination_it++)
91 fabs(origin_it->X() - destination_it->X() ) <
tol &&
92 fabs(origin_it->Y() - destination_it->Y() ) <
tol &&
93 fabs(origin_it->Z() - destination_it->Z() ) <
tol
132 (it_destination++ )->FastGetSolutionStepValue(rDestinationVariable) =
133 (it_origin++ )->FastGetSolutionStepValue(rOriginVariable);
150 (it_origin++ )->FastGetSolutionStepValue(rOriginVariable) =
151 (it_destination++ )->FastGetSolutionStepValue(rDestinationVariable);
170 (it_destination++ )->FastGetSolutionStepValue(rDestinationVariable) =
171 (it_origin++ )->FastGetSolutionStepValue(rOriginVariable);
190 noalias((it_origin++ )->FastGetSolutionStepValue(rOriginVariable)) =
191 (it_destination++ )->FastGetSolutionStepValue(rDestinationVariable);
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector.h:89
Short class definition.
Definition: shared_points_mapper.h:56
void InverseScalarMap(const Variable< double > &rOriginVariable, const Variable< double > &rDestinationVariable)
Definition: shared_points_mapper.h:140
SharedPointsMapper(const ModelPart::NodesContainerType &OriginNodes, const ModelPart::NodesContainerType &DestinationNodes, double tol=1e-9)
Constructor with given array of Nodes.
Definition: shared_points_mapper.h:71
void ScalarMap(const Variable< double > &rOriginVariable, const Variable< double > &rDestinationVariable)
Definition: shared_points_mapper.h:122
virtual ~SharedPointsMapper()
Destructor.
Definition: shared_points_mapper.h:109
void InverseVectorMap(const Variable< array_1d< double, 3 > > &rOriginVariable, const Variable< array_1d< double, 3 > > &rDestinationVariable)
Definition: shared_points_mapper.h:180
virtual void PrintInfo(std::ostream &OStream) const
Print information about this object.
Definition: shared_points_mapper.h:216
void VectorMap(const Variable< array_1d< double, 3 > > &rOriginVariable, const Variable< array_1d< double, 3 > > &rDestinationVariable)
Definition: shared_points_mapper.h:160
virtual void PrintData(std::ostream &OStream) const
Print object's data.
Definition: shared_points_mapper.h:222
KRATOS_CLASS_POINTER_DEFINITION(SharedPointsMapper)
Counted pointer of SharedPointsMapper.
PointerVector< Node > mDestinationNodes
Definition: shared_points_mapper.h:244
PointerVector< Node > mOriginNodes
Definition: shared_points_mapper.h:242
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
int tol
Definition: hinsberg_optimization.py:138
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31