13 #ifndef KRATOS_CALCULATE_DISTANCE_TO_BOUNDARY_PROCESS_H_INCLUDED
14 #define KRATOS_CALCULATE_DISTANCE_TO_BOUNDARY_PROCESS_H_INCLUDED
86 mrModelPart(rModel.GetModelPart(ThisParameters[
"computing_model_part_name"].GetString())),
87 mrBoundaryPart(rModel.GetModelPart(ThisParameters[
"absorbing_boundary_name"].GetString()))
90 mInitializeDistance = (msInstancesCount == 1);
92 mRSquaredThreshold = ThisParameters[
"r_squared_threshold"].
GetDouble();
93 FindApproximatingGeometry(mpBoundary, mrBoundaryPart);
100 double RSquaredThreshold = 0.99) :
102 mrModelPart(rComputingModelPart),
103 mrBoundaryPart(rBoundaryModelPart)
106 mInitializeDistance = (msInstancesCount == 1);
107 mRSquaredThreshold = RSquaredThreshold;
108 FindApproximatingGeometry(mpBoundary, mrBoundaryPart);
125 int Check()
override;
127 void ExecuteBeforeSolutionLoop()
override;
129 const Parameters GetDefaultParameters()
const override;
146 virtual std::string
Info()
const override
148 std::stringstream buffer;
149 buffer <<
"CalculateDistanceToBoundaryProcess";
154 virtual void PrintInfo(std::ostream& rOStream)
const override
160 virtual void PrintData(std::ostream& rOStream)
const override
176 static std::size_t msInstancesCount;
184 GeometryType::Pointer mpBoundary;
185 double mRSquaredThreshold;
186 bool mBruteForceSearch;
187 bool mInitializeDistance;
198 void FindApproximatingGeometry(GeometryType::Pointer& pEntity,
const ModelPart& rBoundaryPart);
202 double SquaredDistance(
const Point& rPointA,
const Point& rPointB);
204 double Distance(
const Point& rPointA,
const Point& rPointB);
251 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Calculate the minimum distance from all the nodes to a boundary condition in 2D.
Definition: calculate_distance_to_boundary_process.h:65
CalculateDistanceToBoundaryProcess(Model &rModel, Parameters ThisParameters)
Constructor with Model and Parameters.
Definition: calculate_distance_to_boundary_process.h:82
virtual ~CalculateDistanceToBoundaryProcess()
Destructor.
Definition: calculate_distance_to_boundary_process.h:112
Node NodeType
Definition: calculate_distance_to_boundary_process.h:75
KRATOS_CLASS_POINTER_DEFINITION(CalculateDistanceToBoundaryProcess)
Pointer definition of CalculateDistanceToBoundaryProcess.
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: calculate_distance_to_boundary_process.h:154
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: calculate_distance_to_boundary_process.h:160
Geometry< Point > GeometryType
Definition: calculate_distance_to_boundary_process.h:73
virtual std::string Info() const override
Turn back information as a string.
Definition: calculate_distance_to_boundary_process.h:146
CalculateDistanceToBoundaryProcess(ModelPart &rComputingModelPart, ModelPart &rBoundaryModelPart, double RSquaredThreshold=0.99)
Constructor with ModelPart.
Definition: calculate_distance_to_boundary_process.h:97
Geometry base class.
Definition: geometry.h:71
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
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
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
Point class.
Definition: point.h:59
The base class for all processes in Kratos.
Definition: process.h:49
Kratos::ModelPart ModelPart
Definition: kratos_wrapper.h:31
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