13 #if !defined(KRATOS_QUADRATURE_POINTS_UTILITY_H_INCLUDED)
14 #define KRATOS_QUADRATURE_POINTS_UTILITY_H_INCLUDED
33 template<
class TPo
intType>
53 typename GeometryType::Pointer pGeometry,
55 double integration_weight)
60 pGeometry->PointLocalCoordinates(local_coordinates, rCoordinates);
70 double integration_weight)
80 N_matrix(0,
i) =
N[
i];
106 double LocalTangentU,
107 double LocalTangentV,
113 rShapeFunctionContainer,
122 double LocalTangentU,
123 double LocalTangentV)
128 rShapeFunctionContainer,
136 Matrix LocalTangentMatrix,
142 rShapeFunctionContainer,
150 Matrix LocalTangentMatrix)
155 rShapeFunctionContainer,
156 LocalTangentMatrix );
166 if (WorkingSpaceDimension == 1 && LocalSpaceDimension == 1)
170 rShapeFunctionContainer,
172 else if (WorkingSpaceDimension == 2 && LocalSpaceDimension == 1)
176 rShapeFunctionContainer,
178 else if (WorkingSpaceDimension == 3 && LocalSpaceDimension == 1)
182 rShapeFunctionContainer,
184 else if (WorkingSpaceDimension == 2 && LocalSpaceDimension == 2)
188 rShapeFunctionContainer,
190 else if (WorkingSpaceDimension == 3 && LocalSpaceDimension == 2)
194 rShapeFunctionContainer,
196 else if (WorkingSpaceDimension == 3 && LocalSpaceDimension == 3)
200 rShapeFunctionContainer,
203 KRATOS_ERROR <<
"Working/Local space dimension combinations are "
204 <<
"not provided for QuadraturePointGeometry. WorkingSpaceDimension: "
205 << WorkingSpaceDimension <<
", LocalSpaceDimension: " << LocalSpaceDimension
216 if (WorkingSpaceDimension == 1 && LocalSpaceDimension == 1)
220 rShapeFunctionContainer);
221 else if (WorkingSpaceDimension == 2 && LocalSpaceDimension == 1)
225 rShapeFunctionContainer);
226 else if (WorkingSpaceDimension == 3 && LocalSpaceDimension == 1)
230 rShapeFunctionContainer);
231 else if (WorkingSpaceDimension == 2 && LocalSpaceDimension == 2)
235 rShapeFunctionContainer);
236 else if (WorkingSpaceDimension == 3 && LocalSpaceDimension == 2)
240 rShapeFunctionContainer);
241 else if (WorkingSpaceDimension == 3 && LocalSpaceDimension == 3)
245 rShapeFunctionContainer);
247 KRATOS_ERROR <<
"Working/Local space dimension combinations are "
248 <<
"not provided for QuadraturePointGeometry. WorkingSpaceDimension: "
249 << WorkingSpaceDimension <<
", LocalSpaceDimension: " << LocalSpaceDimension
254 static std::vector<GeometryPointerType>
Create(
258 auto integration_points = pGeometry->IntegrationPoints();
259 auto default_method = pGeometry->GetDefaultIntegrationMethod();
260 auto r_N = pGeometry->ShapeFunctionsValues();
262 std::vector<GeometryPointerType> geometry_pointer_vector(integration_points.size());
264 for (
IndexType i = 0;
i < integration_points.size(); ++
i)
269 N_i(0,
j) = r_N(
i,
j);
274 integration_points[
i],
276 pGeometry->ShapeFunctionLocalGradient(
i));
279 pGeometry->WorkingSpaceDimension(), pGeometry->LocalSpaceDimension(),
280 data_container, pGeometry->Points(), pGeometry.get());
282 return geometry_pointer_vector;
287 static std::vector<GeometryPointerType>
Create(
292 auto integration_points = pGeometry->IntegrationPoints(ThisIntegrationMethod);
293 auto r_N = pGeometry->ShapeFunctionsValues(ThisIntegrationMethod);
295 std::vector<GeometryPointerType> geometry_pointer_vector(integration_points.size());
297 for (
IndexType i = 0;
i < integration_points.size(); ++
i)
302 N_i(0,
j) = r_N(
i,
j);
306 ThisIntegrationMethod,
307 integration_points[
i],
309 pGeometry->ShapeFunctionLocalGradient(
i, ThisIntegrationMethod));
312 pGeometry->WorkingSpaceDimension(), pGeometry->LocalSpaceDimension(),
313 data_container, pGeometry->Points(), pGeometry.get());
315 return geometry_pointer_vector;
325 SizeType NumberOfShapeFunctionDerivatives)
328 <<
"Create can only compute shape functions up to an derivative order of 1. "
329 <<
"Demanded derivative order: " << NumberOfShapeFunctionDerivatives << std::endl;
332 if (rResultGeometries.
size() != rIntegrationPoints.size())
333 rResultGeometries.
resize(rIntegrationPoints.size());
339 for (
IndexType i = 0;
i < rIntegrationPoints.size(); ++
i)
344 if (NumberOfShapeFunctionDerivatives >= 0) {
347 N_matrix(0,
j) =
N[
j];
352 if (NumberOfShapeFunctionDerivatives > 0) {
357 default_method, rIntegrationPoints[
i],
362 data_container, rGeometry);
374 typename GeometryType::Pointer pGeometry,
376 const double rIntegrationWeight,
379 pGeometry->SetGeometryParent(&rParentGeometry);
380 pGeometry->Points() = rParentGeometry.
Points();
385 pGeometry->ShapeFunctionsValues(
N, rLocalCoordinates);
388 N_matrix(0,
i) =
N[
i];
392 pGeometry->ShapeFunctionsLocalGradients(DN_De, rLocalCoordinates);
395 pGeometry->GetDefaultIntegrationMethod(), int_p, N_matrix, DN_De);
397 pGeometry->SetGeometryShapeFunctionContainer(data_container);
A Class for the creation of integration points.
Definition: quadrature_points_utility.h:35
static GeometryType::Pointer CreateFromLocalCoordinates(GeometryType &rGeometry, const array_1d< double, 3 > &rLocalCoordinates, double integration_weight)
Definition: quadrature_points_utility.h:67
Geometry< TPointType > GeometryType
Definition: quadrature_points_utility.h:40
static GeometryPointerType CreateQuadraturePoint(SizeType WorkingSpaceDimension, SizeType LocalSpaceDimension, GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rShapeFunctionContainer, PointsArrayType rPoints)
Definition: quadrature_points_utility.h:210
static GeometryType::Pointer CreateFromCoordinates(typename GeometryType::Pointer pGeometry, const array_1d< double, 3 > &rCoordinates, double integration_weight)
Definition: quadrature_points_utility.h:52
PointerVector< TPointType > PointsArrayType
Definition: quadrature_points_utility.h:46
static std::vector< GeometryPointerType > Create(GeometryPointerType pGeometry)
Definition: quadrature_points_utility.h:254
static GeometryPointerType CreateQuadraturePointSurfaceInVolume(GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rShapeFunctionContainer, PointsArrayType rPoints, Matrix LocalTangentMatrix, GeometryType *pGeometryParent)
Definition: quadrature_points_utility.h:133
static void Create(GeometryType &rGeometry, typename GeometryType::GeometriesArrayType &rResultGeometries, typename GeometryType::IntegrationPointsArrayType &rIntegrationPoints, SizeType NumberOfShapeFunctionDerivatives)
creates a quadrature point geometry on a provided location.
Definition: quadrature_points_utility.h:321
static GeometryPointerType CreateQuadraturePointCurveOnSurface(GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rShapeFunctionContainer, PointsArrayType rPoints, double LocalTangentU, double LocalTangentV, GeometryType *pGeometryParent)
Definition: quadrature_points_utility.h:103
std::size_t SizeType
Definition: quadrature_points_utility.h:43
static std::vector< GeometryPointerType > Create(GeometryPointerType pGeometry, GeometryData::IntegrationMethod ThisIntegrationMethod)
Definition: quadrature_points_utility.h:287
Geometry< TPointType >::Pointer GeometryPointerType
Definition: quadrature_points_utility.h:41
static GeometryPointerType CreateQuadraturePoint(SizeType WorkingSpaceDimension, SizeType LocalSpaceDimension, GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rShapeFunctionContainer, PointsArrayType rPoints, GeometryType *pGeometryParent)
Definition: quadrature_points_utility.h:159
static GeometryPointerType CreateQuadraturePointCurveOnSurface(GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rShapeFunctionContainer, PointsArrayType rPoints, double LocalTangentU, double LocalTangentV)
Definition: quadrature_points_utility.h:119
static void UpdateFromLocalCoordinates(typename GeometryType::Pointer pGeometry, const array_1d< double, 3 > &rLocalCoordinates, const double rIntegrationWeight, GeometryType &rParentGeometry)
Definition: quadrature_points_utility.h:373
static GeometryPointerType CreateQuadraturePointSurfaceInVolume(GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rShapeFunctionContainer, PointsArrayType rPoints, Matrix LocalTangentMatrix)
Definition: quadrature_points_utility.h:147
std::size_t IndexType
Definition: quadrature_points_utility.h:44
IntegrationMethod
Definition: geometry_data.h:76
Geometry base class.
Definition: geometry.h:71
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
SizeType LocalSpaceDimension() const
Definition: geometry.h:1300
const Matrix & ShapeFunctionsValues() const
Definition: geometry.h:3393
const PointsArrayType & Points() const
Definition: geometry.h:1768
IntegrationMethod GetDefaultIntegrationMethod() const
Definition: geometry.h:2004
const ShapeFunctionsGradientsType & ShapeFunctionsLocalGradients() const
Definition: geometry.h:3539
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
Definition: geometry_shape_function_container.h:60
Short class definition.
Definition: integration_point.h:52
size_type size() const
Definition: pointer_vector.h:255
void resize(size_type dim)
Definition: pointer_vector.h:314
Definition: quadrature_point_curve_on_surface_geometry.h:43
A sinlge quadrature point, that can be used for geometries without a predefined integration scheme,...
Definition: quadrature_point_geometry.h:44
A sinlge quadrature point, that can be used for geometries without a predefined integration scheme,...
Definition: quadrature_point_surface_in_volume_geometry.h:40
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
shared_ptr< C > make_shared(Args &&...args)
Definition: smart_pointers.h:40
int j
Definition: quadrature.py:648
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17