51 #if !defined(KRATOS_MARK_BAD_ELEMENTS_PROCESS_INCLUDED )
52 #define KRATOS_MARK_BAD_ELEMENTS_PROCESS_INCLUDED
70 #include "custom_utilities/geometry_utilities2D.h"
104 class MarkBadElementsProcess
145 for(ModelPart::ElementsContainerType::const_iterator
im = mr_model_part.
ElementsBegin(); in!=mr_model_part.
ElementsEnd(); in++)
149 double x2 = pgeom[2].X();
151 double y0 = pgeom[0].Y();
152 double y1 = pgeom[1].Y();
153 double y2 = pgeom[2].Y();
160 msJ(0,0)=2.0*(
x1-x0);
161 msJ(0,1)=2.0*(y1-y0);
162 msJ(1,0)=2.0*(
x2-x0);
163 msJ(1,1)=2.0*(y2-y0);
166 double detJ = msJ(0,0)*msJ(1,1)-msJ(0,1)*msJ(1,0);
168 msJinv(0,0) = msJ(1,1);
169 msJinv(0,1) = -msJ(0,1);
170 msJinv(1,0) = -msJ(1,0);
171 msJinv(1,1) = msJ(0,0);
173 bounded_matrix<double,2,2> check;
180 pgeom[0].GetSolutionStepValue(IS_BOUNDARY) = 1;
181 pgeom[1].GetSolutionStepValue(IS_BOUNDARY) = 1;
182 pgeom[2].GetSolutionStepValue(IS_BOUNDARY) = 1;
189 double x0_2 = x0*x0 + y0*y0;
190 double x1_2 =
x1*
x1 + y1*y1;
191 double x2_2 =
x2*
x2 + y2*y2;
197 ms_rhs[0] = (x1_2 - x0_2);
198 ms_rhs[1] = (x2_2 - x0_2);
203 double radius = sqrt(pow(msc[0]-x0,2)+pow(msc[1]-y0,2));
207 h = pgeom[0].FastGetSolutionStepValue(NODAL_H);
208 h += pgeom[1].FastGetSolutionStepValue(NODAL_H);
209 h += pgeom[2].FastGetSolutionStepValue(NODAL_H);
242 std::string
Info()
const override
244 return "MarkBadElementsProcess";
250 rOStream <<
"MarkBadElementsProcess";
360 inline std::istream&
operator >> (std::istream& rIStream,
361 MarkBadElementsProcess& rThis);
364 inline std::ostream&
operator << (std::ostream& rOStream,
365 const MarkBadElementsProcess& rThis)
367 rThis.PrintInfo(rOStream);
368 rOStream << std::endl;
369 rThis.PrintData(rOStream);
Short class definition.
Definition: mark_bad_elements_process.h:106
void operator()()
Definition: mark_bad_elements_process.h:132
MarkBadElementsProcess(ModelPart &model_part)
Default constructor.
Definition: mark_bad_elements_process.h:119
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mark_bad_elements_process.h:254
std::string Info() const override
Turn back information as a string.
Definition: mark_bad_elements_process.h:242
KRATOS_CLASS_POINTER_DEFINITION(MarkBadElementsProcess)
Pointer definition of PushStructureProcess.
~MarkBadElementsProcess() override
Destructor.
Definition: mark_bad_elements_process.h:125
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: mark_bad_elements_process.h:144
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mark_bad_elements_process.h:248
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
im
Definition: GenerateCN.py:100
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
model_part
Definition: face_heat.py:14
h
Definition: generate_droplet_dynamics.py:91
x2
Definition: generate_frictional_mortar_condition.py:122
x1
Definition: generate_frictional_mortar_condition.py:121
float radius
Definition: mesh_to_mdpa_converter.py:18
e
Definition: run_cpp_mpi_tests.py:31