45 MODULE interface_operators_routines
55 USE interface_matrices_routines
73 PUBLIC fieldcontinuity_finiteelementcalculate
75 PUBLIC frictionlesscontact_finiteelementcalculate
77 PUBLIC solidfluidoperator_finiteelementcalculate
86 SUBROUTINE fieldcontinuity_finiteelementcalculate(interfaceCondition,elementNumber,err,error,*)
91 INTEGER(INTG),
INTENT(IN) :: elementnumber
92 INTEGER(INTG),
INTENT(OUT) :: err
95 INTEGER(INTG) :: gausspoint, rowcomponentidx, rowidx, rowparameteridx, colcomponentidx, colidx, colparameteridx
96 INTEGER(INTG) :: rowmeshcomponentnumber,derivativeidx,derivative,localelementnode,interfacenode,interfacederivative
97 INTEGER(INTG) :: coupledmeshelementnumber,coupledmeshidx,coupledmeshvariabletype,lagrangevariabletype
98 INTEGER(INTG) :: connectedline,decompositionlinenumber,locallinenodeidx,connectedface,decompositionfacenumber,localfacenodeidx
99 REAL(DP) :: xi(3),rwg,pgmsi,pgnsi,matrixcoefficient
100 TYPE(
basis_type),
POINTER :: interfacedependentbasis,coupledmeshbasis,interfacegeometricbasis, &
101 & interfacePenaltyBasis,interfaceConnectivityBasis
103 TYPE(
field_type),
POINTER :: coupledmeshdependentfield,interfacedependentfield,interfacegeometricfield, &
104 & interfacePenaltyField
116 TYPE(
basis_type),
POINTER :: coupledmeshdependentbasis
117 TYPE(
field_type),
POINTER :: coupledmeshgeometricfield
118 INTEGER(INTG) :: meshcomponentnumber,numberofcoupledmeshgeocomp,numberofinterfacemeshxi,numberofcoupledmeshxi, &
119 & numberOfMatrixCoupledElements
120 INTEGER(INTG) :: datapointidx,localelementnumber,matrixelementidx
121 INTEGER(INTG) :: matrixcoefficients(2),interfaceelementnumber
123 enters(
"FieldContinuity_FiniteElementCalculate",err,error,*999)
125 IF(.NOT.
ASSOCIATED(interfacecondition))
CALL flag_error(
"Interface condition is not associated.",err,error,*999)
126 IF(.NOT.
ASSOCIATED(interfacecondition%INTERFACE_EQUATIONS))
CALL flag_error(
"Interface equations is not associated." &
128 IF(.NOT.
ASSOCIATED(interfacecondition%INTERFACE))
CALL flag_error(
"Interface is not associated.",err,error,*999)
130 interfaceequations=>interfacecondition%INTERFACE_EQUATIONS
132 SELECT CASE(interfacecondition%METHOD)
135 CALL flag_error(
"Not implemented.",err,error,*999)
139 SELECT CASE(interfacecondition%integrationType)
143 interfaceinterpolation=>interfaceequations%INTERPOLATION%INTERFACE_INTERPOLATION
144 interfacegeometricfield=>interfaceinterpolation%GEOMETRIC_FIELD
145 interfacedependentfield=>interfaceinterpolation%DEPENDENT_FIELD
146 interfacegeometricbasis=>interfacegeometricfield%DECOMPOSITION%DOMAIN(interfacegeometricfield% &
147 & decomposition%MESH_COMPONENT_NUMBER)%PTR%TOPOLOGY%ELEMENTS%ELEMENTS(elementnumber)%BASIS
148 interfacedependentbasis=>interfacedependentfield%DECOMPOSITION%DOMAIN(interfacedependentfield% &
149 & decomposition%MESH_COMPONENT_NUMBER)%PTR%TOPOLOGY%ELEMENTS%ELEMENTS(elementnumber)%BASIS
150 SELECT CASE(interfacecondition%METHOD)
152 interfacepenaltyfield=>interfaceinterpolation%PENALTY_FIELD
153 interfacepenaltybasis=>interfacepenaltyfield%DECOMPOSITION%DOMAIN(interfacepenaltyfield% &
154 & decomposition%MESH_COMPONENT_NUMBER)%PTR%TOPOLOGY%ELEMENTS%ELEMENTS(elementnumber)%BASIS
155 CALL field_interpolation_parameters_element_get(field_values_set_type,elementnumber,interfaceinterpolation% &
156 & penalty_interpolation(1)%INTERPOLATION_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
160 lagrangevariable=>interfaceequations%INTERFACE_MAPPING%LAGRANGE_VARIABLE
161 lagrangevariabletype=lagrangevariable%VARIABLE_TYPE
163 CALL field_interpolation_parameters_element_get(field_values_set_type,elementnumber,interfaceinterpolation% &
164 & geometric_interpolation(1)%INTERPOLATION_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
166 matrixcoefficient=1.0_dp
167 DO coupledmeshidx=1,interfaceequations%INTERFACE_MATRICES%NUMBER_OF_INTERFACE_MATRICES
168 IF(interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%UPDATE_MATRIX)
THEN 170 IF(coupledmeshidx>1)
THEN 171 matrixcoefficient=-1.0_dp
174 coupledmeshdependentfield=>interfaceequations%INTERPOLATION%VARIABLE_INTERPOLATION(coupledmeshidx)%DEPENDENT_FIELD
175 elementconnectivity=>interfacecondition%INTERFACE%MESH_CONNECTIVITY%ELEMENT_CONNECTIVITY(elementnumber,coupledmeshidx)
176 coupledmeshelementnumber=elementconnectivity%COUPLED_MESH_ELEMENT_NUMBER
177 interfacematrixvariable=> &
178 & interfaceequations%INTERFACE_MAPPING%INTERFACE_MATRIX_ROWS_TO_VAR_MAPS(coupledmeshidx)%VARIABLE
179 coupledmeshvariabletype=interfacematrixvariable%VARIABLE_TYPE
180 interfaceelementmatrix=>interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%ELEMENT_MATRIX
181 interfaceconnectivitybasis=>interfacecondition%INTERFACE%MESH_CONNECTIVITY%BASIS
187 DO gausspoint=1,interfacequadraturescheme%NUMBER_OF_GAUSS
195 & geometric_interpolation(1)%INTERPOLATED_POINT(field_u_variable_type)%PTR,err,error,*999)
196 CALL field_interpolated_point_metrics_calculate(interfacegeometricbasis%NUMBER_OF_XI,interfaceinterpolation% &
197 & geometric_interpolation(1)%INTERPOLATED_POINT_METRICS(field_u_variable_type)%PTR,err,error,*999)
198 rwg=interfaceinterpolation%GEOMETRIC_INTERPOLATION(1)%INTERPOLATED_POINT_METRICS(field_u_variable_type)%PTR% &
199 & jacobian*interfacequadraturescheme%GAUSS_WEIGHTS(gausspoint)
201 & coupledmeshidx==interfaceequations%INTERFACE_MATRICES%NUMBER_OF_INTERFACE_MATRICES)
THEN 203 & penalty_interpolation(1)%INTERPOLATED_POINT(field_u_variable_type)%PTR,err,error,*999)
205 DO rowcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
207 DO rowparameteridx=1,interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
208 pgnsi=interfacequadraturescheme%GAUSS_BASIS_FNS(rowparameteridx,
no_part_deriv,gausspoint)
210 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,rowidx)- &
211 & (1.0_dp/interfaceinterpolation%PENALTY_INTERPOLATION(1)% &
212 & interpolated_point(field_u_variable_type)%PTR%VALUES(1,1))*pgnsi**2.0_dp*rwg
219 xi(1:interfacedependentbasis%NUMBER_OF_XI)=interfaceoperators_interftocoupledmeshgausstransform( &
220 & elementconnectivity,interfaceconnectivitybasis,gausspoint,err,error)
224 DO rowcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
225 rowmeshcomponentnumber=interfacematrixvariable%COMPONENTS(rowcomponentidx)%MESH_COMPONENT_NUMBER
226 coupledmeshbasis=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
227 & elements%ELEMENTS(coupledmeshelementnumber)%BASIS
229 SELECT CASE(interfacedependentbasis%NUMBER_OF_XI)
232 connectedline = elementconnectivity%CONNECTED_LINE
233 decompositionlinenumber=coupledmeshdependentfield%DECOMPOSITION%TOPOLOGY% &
234 & elements%ELEMENTS(coupledmeshelementnumber)%ELEMENT_LINES(connectedline)
235 coupledmeshdomainline=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
236 & lines%LINES(decompositionlinenumber)
237 DO locallinenodeidx=1,coupledmeshbasis%NUMBER_OF_NODES_IN_LOCAL_LINE(connectedline)
238 localelementnode=coupledmeshbasis%NODE_NUMBERS_IN_LOCAL_LINE(locallinenodeidx,connectedline)
239 DO derivativeidx=1,coupledmeshdomainline%BASIS%NUMBER_OF_DERIVATIVES(locallinenodeidx)
240 derivative=coupledmeshbasis%DERIVATIVE_NUMBERS_IN_LOCAL_LINE(locallinenodeidx,connectedline)
241 derivative=coupledmeshdomainline%DERIVATIVES_IN_LINE(1,derivativeidx,locallinenodeidx)
242 rowparameteridx=coupledmeshbasis%ELEMENT_PARAMETER_INDEX(derivative,localelementnode)
244 rowidx=rowparameteridx+coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
245 DO interfacenode=1,interfacedependentbasis%NUMBER_OF_NODES
246 DO interfacederivative=1,interfacedependentbasis%NUMBER_OF_DERIVATIVES(interfacenode)
248 colparameteridx=interfacedependentbasis%ELEMENT_PARAMETER_INDEX(interfacederivative,interfacenode)
249 pgnsi=interfacequadraturescheme%GAUSS_BASIS_FNS(colparameteridx,
no_part_deriv,gausspoint)
250 colidx=colparameteridx+interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
252 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)+ &
253 & pgnsi*pgmsi*rwg*matrixcoefficient
261 SELECT CASE(coupledmeshbasis%NUMBER_OF_XI)
264 DO localelementnode=1,coupledmeshbasis%NUMBER_OF_NODES
265 DO derivative=1,coupledmeshbasis%NUMBER_OF_DERIVATIVES(localelementnode)
266 rowparameteridx=coupledmeshbasis%ELEMENT_PARAMETER_INDEX(derivative,localelementnode)
268 & xi(1:coupledmeshbasis%NUMBER_OF_XI),err,error)
269 rowidx=rowparameteridx+coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
270 DO interfacenode=1,interfacedependentbasis%NUMBER_OF_NODES
271 DO interfacederivative=1,interfacedependentbasis%NUMBER_OF_DERIVATIVES(interfacenode)
273 colparameteridx=interfacedependentbasis%ELEMENT_PARAMETER_INDEX(interfacederivative,interfacenode)
274 pgnsi=interfacequadraturescheme%GAUSS_BASIS_FNS(colparameteridx,
no_part_deriv,gausspoint)
275 colidx=colparameteridx+interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
277 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)+ &
278 & pgnsi*pgmsi*rwg*matrixcoefficient
285 connectedface = elementconnectivity%CONNECTED_FACE
286 decompositionfacenumber=coupledmeshdependentfield%DECOMPOSITION%TOPOLOGY% &
287 & elements%ELEMENTS(coupledmeshelementnumber)%ELEMENT_FACES(connectedface)
288 coupledmeshdomainface=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
289 & faces%FACES(decompositionfacenumber)
290 DO localfacenodeidx=1,coupledmeshbasis%NUMBER_OF_NODES_IN_LOCAL_FACE(connectedface)
291 localelementnode=coupledmeshbasis%NODE_NUMBERS_IN_LOCAL_FACE(localfacenodeidx,connectedface)
292 DO derivativeidx=1,coupledmeshdomainface%BASIS%NUMBER_OF_DERIVATIVES(localfacenodeidx)
293 derivative=coupledmeshbasis% &
294 & derivative_numbers_in_local_face(derivativeidx,localfacenodeidx,connectedface)
295 rowparameteridx=coupledmeshbasis%ELEMENT_PARAMETER_INDEX(derivative,localelementnode)
297 & xi(1:coupledmeshbasis%NUMBER_OF_XI),err,error)
298 rowidx=rowparameteridx+coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
299 DO interfacenode=1,interfacedependentbasis%NUMBER_OF_NODES
300 DO interfacederivative=1,interfacedependentbasis%NUMBER_OF_DERIVATIVES(interfacenode)
302 colparameteridx=interfacedependentbasis%ELEMENT_PARAMETER_INDEX(interfacederivative,interfacenode)
303 pgnsi=interfacequadraturescheme%GAUSS_BASIS_FNS(colparameteridx,
no_part_deriv,gausspoint)
304 colidx=colparameteridx+interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
306 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)+ &
307 & pgnsi*pgmsi*rwg*matrixcoefficient
325 & coupledmeshidx==interfaceequations%INTERFACE_MATRICES%NUMBER_OF_INTERFACE_MATRICES)
THEN 327 IF(interfacedependentfield%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 328 CALL field_interpolationparametersscalefactorselementget(elementnumber, &
329 & interfaceinterpolation%DEPENDENT_INTERPOLATION(1)%INTERPOLATION_PARAMETERS(lagrangevariabletype)%PTR, &
334 DO rowcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
336 DO rowparameteridx=1,interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
338 interfaceelementmatrix%MATRIX(rowidx,rowidx)=interfaceelementmatrix%MATRIX(rowidx,rowidx) * &
339 & interfaceinterpolation%DEPENDENT_INTERPOLATION(1)% &
340 & interpolation_parameters(lagrangevariabletype)%PTR%SCALE_FACTORS(rowparameteridx,rowcomponentidx)**2
346 IF(interfacedependentfield%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 347 CALL field_interpolationparametersscalefactorselementget(elementnumber, &
348 & interfaceinterpolation%DEPENDENT_INTERPOLATION(1)%INTERPOLATION_PARAMETERS(lagrangevariabletype)%PTR, &
353 DO rowcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
354 rowmeshcomponentnumber=interfacematrixvariable%COMPONENTS(rowcomponentidx)%MESH_COMPONENT_NUMBER
355 coupledmeshbasis=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
356 & elements%ELEMENTS(coupledmeshelementnumber)%BASIS
358 DO rowparameteridx=1,coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS
362 DO colcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
363 DO colparameteridx=1,interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
365 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx) * &
366 & interfaceinterpolation%DEPENDENT_INTERPOLATION(1)% &
367 & interpolation_parameters(lagrangevariabletype)%PTR%SCALE_FACTORS(colparameteridx,colcomponentidx)
374 IF(coupledmeshdependentfield%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 375 CALL field_interpolationparametersscalefactorselementget(coupledmeshelementnumber, &
376 & interfaceequations%INTERPOLATION%VARIABLE_INTERPOLATION(coupledmeshidx)% &
377 & dependent_interpolation(1)%INTERPOLATION_PARAMETERS(coupledmeshvariabletype)%PTR,err,error,*999)
379 DO rowcomponentidx=1,interfacematrixvariable%NUMBER_OF_COMPONENTS
381 DO rowparameteridx=1,coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS
385 DO colcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
386 DO colparameteridx=1,interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
388 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)* &
389 & interfaceequations%INTERPOLATION%VARIABLE_INTERPOLATION(coupledmeshidx)% &
390 & dependent_interpolation(1)%INTERPOLATION_PARAMETERS(coupledmeshvariabletype)%PTR% &
391 & scale_factors(rowparameteridx,rowcomponentidx)
403 matrixcoefficients(1)=1;
404 matrixcoefficients(2)=-1;
405 interfaceelementnumber = elementnumber
406 interface=>interfacecondition%INTERFACE
407 pointsconnectivity=>interface%pointsConnectivity
408 numberofinterfacemeshxi=pointsconnectivity%interfaceMesh%NUMBER_OF_DIMENSIONS
409 IF(
ASSOCIATED(pointsconnectivity))
THEN 410 decompositionelementdata=>interfacecondition%LAGRANGE%LAGRANGE_FIELD%DECOMPOSITION%TOPOLOGY%dataPoints% &
411 & elementdatapoint(interfaceelementnumber)
414 DO coupledmeshidx=1,interface%NUMBER_OF_COUPLED_MESHES
415 IF(interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%UPDATE_MATRIX)
THEN 416 numberofmatrixcoupledelements=pointsconnectivity%coupledElements(interfaceelementnumber,coupledmeshidx)% &
417 & numberofcoupledelements
418 numberofcoupledmeshxi=interface%COUPLED_MESHES(coupledmeshidx)%PTR%NUMBER_OF_DIMENSIONS
419 coupledmeshgeometricfield=>interfacecondition%DEPENDENT%EQUATIONS_SETS(coupledmeshidx)%PTR% &
420 & geometry%GEOMETRIC_FIELD
421 coupledmeshdependentfield=>interfacecondition%DEPENDENT%EQUATIONS_SETS(coupledmeshidx)%PTR% &
422 & dependent%DEPENDENT_FIELD
424 numberofcoupledmeshgeocomp=coupledmeshgeometricfield%VARIABLES(field_u_variable_type)%NUMBER_OF_COMPONENTS
425 interfaceelementmatrix=>interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%ELEMENT_MATRIX
427 meshcomponentnumber=coupledmeshdependentfield%VARIABLES(field_u_variable_type)%COMPONENTS(1)% &
428 & mesh_component_number
429 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
430 localelementnumber=pointsconnectivity%pointsConnectivity(datapointidx,coupledmeshidx)% &
431 & coupledmeshelementnumber
435 DO WHILE ((localelementnumber/=pointsconnectivity%coupledElements(interfaceelementnumber,coupledmeshidx)% &
436 & elementnumbers(matrixelementidx)).AND.(matrixelementidx/= &
437 & pointsconnectivity%coupledElements(interfaceelementnumber,coupledmeshidx)%numberOfCoupledElements))
438 matrixelementidx=matrixelementidx+1
440 xi(1:numberofcoupledmeshxi)=pointsconnectivity%pointsConnectivity(datapointidx,coupledmeshidx)% &
441 & xi(1:numberofcoupledmeshxi)
443 coupledmeshdependentbasis=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(meshcomponentnumber)%PTR% &
444 & topology%ELEMENTS%ELEMENTS(localelementnumber)%BASIS
445 DO rowcomponentidx=1,numberofcoupledmeshgeocomp
446 DO rowparameteridx=1,coupledmeshdependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
448 & xi(1:numberofcoupledmeshxi),err,error)*matrixcoefficients(coupledmeshidx)
449 rowidx=rowparameteridx+coupledmeshdependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
450 colidx=datapointidx+decompositionelementdata%numberOfProjectedData*(rowcomponentidx-1)
451 interfaceelementmatrix%MATRIX(rowidx,colidx)=pgmsi
457 IF(coupledmeshdependentfield%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 458 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
459 localelementnumber=pointsconnectivity%pointsConnectivity(datapointidx,coupledmeshidx)% &
460 & coupledmeshelementnumber
461 CALL field_interpolationparametersscalefactorselementget(localelementnumber,interfaceequations% &
462 & interpolation%VARIABLE_INTERPOLATION(coupledmeshidx)%DEPENDENT_INTERPOLATION(1)% &
463 & interpolation_parameters(field_u_variable_type)%PTR,err,error,*999)
466 DO WHILE ((localelementnumber/=pointsconnectivity%coupledElements(interfaceelementnumber,coupledmeshidx)% &
467 & elementnumbers(matrixelementidx)).AND.(matrixelementidx/= &
468 & pointsconnectivity%coupledElements(interfaceelementnumber,coupledmeshidx)%numberOfCoupledElements))
469 matrixelementidx=matrixelementidx+1
471 coupledmeshdependentbasis=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(meshcomponentnumber)%PTR% &
472 & topology%ELEMENTS%ELEMENTS(localelementnumber)%BASIS
473 DO rowcomponentidx=1,numberofcoupledmeshgeocomp
474 DO rowparameteridx=1,coupledmeshdependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
475 rowidx=rowparameteridx+coupledmeshdependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
476 colidx=datapointidx+decompositionelementdata%numberOfProjectedData*(rowcomponentidx-1)
477 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)* &
478 & interfaceequations%INTERPOLATION%VARIABLE_INTERPOLATION(coupledmeshidx)% &
479 & dependent_interpolation(1)%INTERPOLATION_PARAMETERS(field_u_variable_type)% &
480 &
ptr%SCALE_FACTORS(rowparameteridx,rowcomponentidx)
489 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
493 localerror=
"Interface condition integration type "//
trim(
number_to_vstring(interfacecondition%integrationType, &
494 &
"*",err,error))//
" is not valid." 495 CALL flagerror(localerror,err,error,*999)
499 CALL flag_error(
"Not implemented.",err,error,*999)
501 localerror=
"Interface condition method "//
trim(
number_to_vstring(interfacecondition%METHOD,
"*",err,error))// &
506 exits(
"FieldContinuity_FiniteElementCalculate")
508 999 errorsexits(
"FieldContinuity_FiniteElementCalculate",err,error)
511 END SUBROUTINE fieldcontinuity_finiteelementcalculate
518 SUBROUTINE frictionlesscontact_finiteelementcalculate(interfaceCondition,interfaceElementNumber,err,error,*)
522 INTEGER(INTG),
INTENT(IN) :: interfaceelementnumber
523 INTEGER(INTG),
INTENT(OUT) :: err
530 TYPE(
field_type),
POINTER :: coupledmeshdependentfield,penaltyfield
536 TYPE(
basis_type),
POINTER :: coupledmeshdependentbasis
539 INTEGER(INTG) :: meshcomponentnumber,numberofcoupledmeshgeocomp,numberofinterfacemeshxi,numberofcoupledmeshxi, &
540 & numberOfMatrixCoupledElements,localDof
541 INTEGER(INTG) :: datapointidx,coupledmeshidx,xiidx,localelementnumber,localfacelinenumber,matrixelementidx,rowcomponentidx, &
542 & rowParameterIdx,rowIdx,colIdx,componentIdx,globalDataPointNumber
543 INTEGER(INTG) :: matrixcoefficients(2)
544 REAL(DP) :: pgmsi,contactstiffness
545 REAL(DP) :: positionpoint(3),normalpoint(3),tangentspoint(3,3),xi(3)
546 LOGICAL :: reversenormal
547 REAL(DP),
ALLOCATABLE :: gaps(:),gapscomponents(:,:),normals(:,:)
548 LOGICAL,
ALLOCATABLE :: orthogonallyprojected(:)
553 enters(
"FrictionlessContact_FiniteElementCalculate",err,error,*999)
555 IF(
ASSOCIATED(interfacecondition))
THEN 556 interfaceequations=>interfacecondition%INTERFACE_EQUATIONS
557 IF(
ASSOCIATED(interfaceequations))
THEN 558 interface=>interfacecondition%INTERFACE
559 IF(
ASSOCIATED(interface))
THEN 560 SELECT CASE(interfacecondition%METHOD)
562 CALL flagerror(
"Not implemented.",err,error,*999)
564 SELECT CASE(interfacecondition%integrationType)
566 CALL flagerror(
"Mesh connectivity is not implemented for frictionless contact.",err,error,*999)
568 matrixcoefficients(1)=1;
569 matrixcoefficients(2)=-1;
570 pointsconnectivity=>interface%pointsConnectivity
571 numberofinterfacemeshxi=pointsconnectivity%interfaceMesh%NUMBER_OF_DIMENSIONS
572 IF(
ASSOCIATED(pointsconnectivity))
THEN 573 decompositionelementdata=>interfacecondition%LAGRANGE%LAGRANGE_FIELD%DECOMPOSITION%TOPOLOGY%dataPoints% &
574 & elementdatapoint(interfaceelementnumber)
579 ALLOCATE(orthogonallyprojected(decompositionelementdata%numberOfProjectedData),stat=err)
580 IF(err/=0)
CALL flagerror(
"Could not allocate orthogonal projected logicals.",err,error,*999)
581 orthogonallyprojected=.true.
582 DO coupledmeshidx=1,interface%NUMBER_OF_COUPLED_MESHES
583 coupledmeshdependentfield=>interfacecondition%DEPENDENT%EQUATIONS_SETS(coupledmeshidx)%PTR% &
584 & dependent%DEPENDENT_FIELD
586 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
587 globaldatapointnumber=decompositionelementdata%dataIndices(datapointidx)%globalNumber
588 DO xiidx=1,
SIZE(pointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)%reducedXi,1)
589 IF(abs(pointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)%reducedXi(xiidx)) &
591 orthogonallyprojected(datapointidx)=.false.
600 ALLOCATE(gaps(decompositionelementdata%numberOfProjectedData),stat=err)
601 IF(err/=0)
CALL flagerror(
"Could not allocate gaps.",err,error,*999)
603 ALLOCATE(gapscomponents(3,decompositionelementdata%numberOfProjectedData),stat=err)
604 IF(err/=0)
CALL flagerror(
"Could not allocate component gaps.",err,error,*999)
605 gapscomponents=0.0_dp
606 ALLOCATE(normals(3,decompositionelementdata%numberOfProjectedData),stat=err)
607 IF(err/=0)
CALL flagerror(
"Could not allocate normals.",err,error,*999)
614 DO coupledmeshidx=1,interface%NUMBER_OF_COUPLED_MESHES
615 coupledmeshdependentfield=>interfacecondition%DEPENDENT%FIELD_VARIABLES(coupledmeshidx)%PTR%FIELD
616 numberofcoupledmeshgeocomp=coupledmeshdependentfield%GEOMETRIC_FIELD%VARIABLE_TYPE_MAP(field_u_variable_type)% &
617 &
ptr%NUMBER_OF_COMPONENTS
618 NULLIFY(interpolatedpoints)
619 NULLIFY(interpolationparameters)
620 CALL field_interpolation_parameters_initialise(coupledmeshdependentfield,interpolationparameters,err,error, &
621 & *999,field_geometric_components_type)
622 CALL field_interpolated_points_initialise(interpolationparameters,interpolatedpoints,err,error,*999, &
623 & field_geometric_components_type)
624 interpolatedpoint=>interpolatedpoints(field_u_variable_type)%PTR
625 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
626 globaldatapointnumber=decompositionelementdata%dataIndices(datapointidx)%globalNumber
630 localelementnumber=pointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)% &
631 & coupledmeshelementnumber
632 localfacelinenumber=coupledmeshdependentfield%DECOMPOSITION%TOPOLOGY%ELEMENTS%ELEMENTS(localelementnumber)% &
633 & element_faces(pointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)% &
634 & elementlinefacenumber)
635 SELECT CASE(numberofinterfacemeshxi)
637 CALL field_interpolation_parameters_line_get(field_values_set_type,localfacelinenumber, &
638 & interpolationparameters(field_u_variable_type)%PTR,err,error,*999,field_geometric_components_type)
640 SELECT CASE(pointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)% &
641 & elementlinefacenumber)
643 reversenormal=.false.
647 CALL field_interpolation_parameters_face_get(field_values_set_type,localfacelinenumber, &
648 & interpolationparameters(field_u_variable_type)%PTR,err,error,*999,field_geometric_components_type)
655 CALL field_interpolate_xi(
first_part_deriv,pointsconnectivity%pointsConnectivity(globaldatapointnumber, &
656 & coupledmeshidx)%reducedXi(:),interpolatedpoint,err,error,*999,field_geometric_components_type)
657 gapscomponents(1:numberofcoupledmeshgeocomp,datapointidx)=gapscomponents(1:numberofcoupledmeshgeocomp, &
658 & datapointidx)+interpolatedpoint%VALUES(1:numberofcoupledmeshgeocomp,
no_part_deriv)* &
659 & matrixcoefficients(coupledmeshidx)
662 IF (coupledmeshidx==2)
THEN 663 CALL field_interpolatedpointsmetricsinitialise(interpolatedpoints,interpolatedpointsmetrics, &
665 CALL field_interpolated_point_metrics_calculate(numberofcoupledmeshgeocomp,interpolatedpointsmetrics &
666 & (field_u_variable_type)%PTR,err,error,*999)
667 CALL field_positionnormaltangentscalculateintptmetric(interpolatedpointsmetrics &
668 & (field_u_variable_type)%PTR,reversenormal,positionpoint,normalpoint,tangentspoint,err,error,*999)
669 normals(1:numberofcoupledmeshgeocomp,datapointidx)=normalpoint(1:numberofcoupledmeshgeocomp)
670 CALL field_interpolatedpointsmetricsfinalise(interpolatedpointsmetrics,err,error,*999)
674 CALL field_interpolation_parameters_finalise(interpolationparameters,err,error,*999)
675 CALL field_interpolated_points_finalise(interpolatedpoints,err,error,*999)
681 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
682 gaps(datapointidx)=dot_product(gapscomponents(1:numberofcoupledmeshgeocomp,datapointidx), &
683 & normals(1:numberofcoupledmeshgeocomp,datapointidx))
689 DO coupledmeshidx=1,interface%NUMBER_OF_COUPLED_MESHES
690 IF(interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%UPDATE_MATRIX)
THEN 691 numberofmatrixcoupledelements=pointsconnectivity%coupledElements(interfaceelementnumber,coupledmeshidx)% &
692 & numberofcoupledelements
693 numberofcoupledmeshxi=interface%COUPLED_MESHES(coupledmeshidx)%PTR%NUMBER_OF_DIMENSIONS
694 numberofcoupledmeshgeocomp=interfacecondition%DEPENDENT%EQUATIONS_SETS(coupledmeshidx)%PTR%GEOMETRY% &
695 & geometric_field%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR%NUMBER_OF_COMPONENTS
696 coupledmeshdependentfield=>interfacecondition%DEPENDENT%EQUATIONS_SETS(coupledmeshidx)%PTR% &
697 & dependent%DEPENDENT_FIELD
698 interfaceelementmatrix=>interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%ELEMENT_MATRIX
699 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
700 globaldatapointnumber=decompositionelementdata%dataIndices(datapointidx)%globalNumber
703 localelementnumber=pointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)% &
704 & coupledmeshelementnumber
707 DO WHILE (localelementnumber/=pointsconnectivity%coupledElements(interfaceelementnumber,coupledmeshidx)% &
708 & elementnumbers(matrixelementidx))
709 matrixelementidx=matrixelementidx+1
711 CALL field_interpolationparametersscalefactorselementget(localelementnumber,interfaceequations% &
712 & interpolation%VARIABLE_INTERPOLATION(coupledmeshidx)%DEPENDENT_INTERPOLATION(1)% &
713 & interpolation_parameters(field_u_variable_type)%PTR,err,error,*999)
714 xi(1:numberofcoupledmeshxi)=pointsconnectivity%pointsConnectivity(globaldatapointnumber,coupledmeshidx)% &
715 & xi(1:numberofcoupledmeshxi)
716 DO rowcomponentidx=1,numberofcoupledmeshgeocomp
717 meshcomponentnumber=coupledmeshdependentfield%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR% &
718 & components(rowcomponentidx)%MESH_COMPONENT_NUMBER
720 coupledmeshdependentbasis=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(meshcomponentnumber)%PTR% &
721 & topology%ELEMENTS%ELEMENTS(localelementnumber)%BASIS
723 DO rowparameteridx=1,coupledmeshdependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
725 & xi(1:numberofcoupledmeshxi),err,error)*normals(rowcomponentidx,datapointidx)* &
726 & matrixcoefficients(coupledmeshidx)
727 rowidx=coupledmeshdependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*numberofmatrixcoupledelements* &
728 & (rowcomponentidx-1)+coupledmeshdependentbasis%NUMBER_OF_ELEMENT_PARAMETERS* &
729 & (matrixelementidx-1)+rowparameteridx
733 interfaceelementmatrix%MATRIX(rowidx,colidx)=pgmsi*interfaceequations%INTERPOLATION% &
734 & variable_interpolation(coupledmeshidx)%DEPENDENT_INTERPOLATION(1)% &
735 & interpolation_parameters(field_u_variable_type)%PTR%SCALE_FACTORS(rowparameteridx,rowcomponentidx)
741 IF(interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%FIRST_ASSEMBLY) &
742 & interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%FIRST_ASSEMBLY=.false.
749 IF(
ALLOCATED(orthogonallyprojected))
DEALLOCATE(orthogonallyprojected)
750 IF(
ALLOCATED(gapscomponents))
DEALLOCATE(gapscomponents)
751 IF(
ALLOCATED(gaps))
DEALLOCATE(gaps)
757 interfacepenalty=>interfacecondition%PENALTY
758 IF(
ASSOCIATED(interfacepenalty))
THEN 759 penaltyfield=>interfacepenalty%PENALTY_FIELD
760 IF(
ASSOCIATED(penaltyfield))
THEN 761 penaltymatrix=>interfaceequations%INTERFACE_MATRICES%MATRICES(interfaceequations% &
762 & interface_matrices%NUMBER_OF_INTERFACE_MATRICES)%PTR
763 IF(
ASSOCIATED(penaltymatrix))
THEN 764 IF(penaltymatrix%FIRST_ASSEMBLY .AND. penaltymatrix%UPDATE_MATRIX)
THEN 765 DO componentidx=1,penaltyfield%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR%NUMBER_OF_COMPONENTS
766 SELECT CASE(penaltyfield%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR% &
767 & components(componentidx)%INTERPOLATION_TYPE)
768 CASE(field_constant_interpolation)
769 CALL field_parameter_set_get_constant(penaltyfield,field_u_variable_type,field_values_set_type, &
770 & componentidx,contactstiffness,err,error,*999)
771 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
772 penaltymatrix%ELEMENT_MATRIX%MATRIX(datapointidx,datapointidx)=-(1.0_dp/contactstiffness)
774 CASE(field_element_based_interpolation)
775 localdof=penaltyfield%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR%COMPONENTS(componentidx)% &
776 & param_to_dof_map%ELEMENT_PARAM2DOF_MAP%ELEMENTS(interfaceelementnumber)
777 CALL field_parameter_set_get_local_dof(penaltyfield,field_u_variable_type,field_values_set_type, &
778 & localdof,contactstiffness,err,error,*999)
779 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
780 penaltymatrix%ELEMENT_MATRIX%MATRIX(datapointidx,datapointidx)=-(1.0_dp/contactstiffness)
782 CASE(field_data_point_based_interpolation)
783 DO datapointidx=1,decompositionelementdata%numberOfProjectedData
784 localdof=penaltyfield%VARIABLE_TYPE_MAP(field_u_variable_type)%PTR%COMPONENTS(componentidx)% &
785 & param_to_dof_map%DATA_POINT_PARAM2DOF_MAP%DATA_POINTS(datapointidx)
786 CALL field_parameter_set_get_local_dof(penaltyfield,field_u_variable_type,field_values_set_type, &
787 & localdof,contactstiffness,err,error,*999)
788 penaltymatrix%ELEMENT_MATRIX%MATRIX(datapointidx,datapointidx)=-(1.0_dp/contactstiffness)
791 localerror=
"The interpolation type for component number "// &
796 & (componentidx)%INTERPOLATION_TYPE,
"*", err,error))//
" which is invalid for penalty field." 797 CALL flagerror(localerror,err,error,*999)
802 CALL flagerror(
"Interface penalty matrix is not associated.",err,error,*999)
805 CALL flagerror(
"Interface penalty field is not associated.",err,error,*999)
808 CALL flagerror(
"Interface penalty is not associated.",err,error,*999)
812 CALL flagerror(
"Interface points connectivity is not associated.",err,error,*999)
815 localerror=
"Interface condition integration type "//
trim(
number_to_vstring(interfacecondition%integrationType, &
816 &
"*",err,error))//
" is not valid." 817 CALL flagerror(localerror,err,error,*999)
820 CALL flagerror(
"Not implemented.",err,error,*999)
822 localerror=
"Interface condition method "//
trim(
number_to_vstring(interfacecondition%METHOD,
"*",err,error))// &
824 CALL flagerror(localerror,err,error,*999)
827 CALL flagerror(
"Interface is not associated.",err,error,*999)
830 CALL flagerror(
"Interface equations is not associated.",err,error,*999)
833 CALL flagerror(
"Interface condition is not associated.",err,error,*999)
836 exits(
"FrictionlessContact_FiniteElementCalculate")
838 999 errorsexits(
"FrictionlessContact_FiniteElementCalculate",err,error)
841 END SUBROUTINE frictionlesscontact_finiteelementcalculate
857 SUBROUTINE solidfluidoperator_finiteelementcalculate(interfaceCondition,elementNumber,err,error,*)
862 INTEGER(INTG),
INTENT(IN) :: elementnumber
863 INTEGER(INTG),
INTENT(OUT) :: err
866 INTEGER(INTG) :: gausspoint, rowcomponentidx, rowidx, rowparameteridx, colcomponentidx, colidx, colparameteridx
867 INTEGER(INTG) :: rowmeshcomponentnumber,derivativeidx,derivative,localelementnode,interfacenode,interfacederivative
868 INTEGER(INTG) :: coupledmeshelementnumber,coupledmeshidx,coupledmeshvariabletype,lagrangevariabletype
869 INTEGER(INTG) :: connectedline,decompositionlinenumber,locallinenodeidx,connectedface,decompositionfacenumber,localfacenodeidx
870 REAL(DP) :: xi(3),rwg,pgmsi,pgnsi,matrixcoefficient
871 TYPE(
basis_type),
POINTER :: interfacedependentbasis,coupledmeshbasis,interfacegeometricbasis, &
872 & interfaceConnectivityBasis
874 TYPE(
field_type),
POINTER :: coupledmeshdependentfield,interfacedependentfield,interfacegeometricfield
883 enters(
"SolidFluidOperator_FiniteElementCalculate",err,error,*999)
885 IF(.NOT.
ASSOCIATED(interfacecondition))
CALL flagerror(
"Interface condition is not associated.",err,error,*999)
886 IF(.NOT.
ASSOCIATED(interfacecondition%INTERFACE_EQUATIONS))
CALL flagerror(
"Interface equations is not associated." &
888 IF(.NOT.
ASSOCIATED(interfacecondition%INTERFACE))
CALL flagerror(
"Interface is not associated.",err,error,*999)
890 interfaceequations=>interfacecondition%INTERFACE_EQUATIONS
894 SELECT CASE(interfacecondition%METHOD)
896 CALL flagerror(
"Not implemented.",err,error,*999)
900 SELECT CASE(interfacecondition%integrationType)
903 interfaceinterpolation=>interfaceequations%INTERPOLATION%INTERFACE_INTERPOLATION
904 interfacegeometricfield=>interfaceinterpolation%GEOMETRIC_FIELD
905 interfacedependentfield=>interfaceinterpolation%DEPENDENT_FIELD
906 interfacegeometricbasis=>interfacegeometricfield%DECOMPOSITION%DOMAIN(interfacegeometricfield% &
907 & decomposition%MESH_COMPONENT_NUMBER)%PTR%TOPOLOGY%ELEMENTS%ELEMENTS(elementnumber)%BASIS
908 interfacedependentbasis=>interfacedependentfield%DECOMPOSITION%DOMAIN(interfacedependentfield% &
909 & decomposition%MESH_COMPONENT_NUMBER)%PTR%TOPOLOGY%ELEMENTS%ELEMENTS(elementnumber)%BASIS
912 lagrangevariable=>interfaceequations%INTERFACE_MAPPING%LAGRANGE_VARIABLE
914 lagrangevariabletype=lagrangevariable%VARIABLE_TYPE
916 CALL field_interpolation_parameters_element_get(field_values_set_type,elementnumber,interfaceinterpolation% &
917 & geometric_interpolation(1)%INTERPOLATION_PARAMETERS(field_u_variable_type)%PTR,err,error,*999)
919 matrixcoefficient=1.0_dp
921 DO coupledmeshidx=1,interfaceequations%INTERFACE_MATRICES%NUMBER_OF_INTERFACE_MATRICES
922 IF(interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%UPDATE_MATRIX)
THEN 924 IF(coupledmeshidx>1)
THEN 925 matrixcoefficient=-1.0_dp
928 coupledmeshdependentfield=>interfaceequations%INTERPOLATION%VARIABLE_INTERPOLATION(coupledmeshidx)%DEPENDENT_FIELD
929 elementconnectivity=>interfacecondition%INTERFACE%MESH_CONNECTIVITY%ELEMENT_CONNECTIVITY(elementnumber,coupledmeshidx)
930 coupledmeshelementnumber=elementconnectivity%COUPLED_MESH_ELEMENT_NUMBER
931 interfacematrixvariable=> &
932 & interfaceequations%INTERFACE_MAPPING%INTERFACE_MATRIX_ROWS_TO_VAR_MAPS(coupledmeshidx)%VARIABLE
933 coupledmeshvariabletype=interfacematrixvariable%VARIABLE_TYPE
934 interfaceelementmatrix=>interfaceequations%INTERFACE_MATRICES%MATRICES(coupledmeshidx)%PTR%ELEMENT_MATRIX
935 interfaceconnectivitybasis=>interfacecondition%INTERFACE%MESH_CONNECTIVITY%BASIS
942 DO gausspoint=1,interfacequadraturescheme%NUMBER_OF_GAUSS
951 & geometric_interpolation(1)%INTERPOLATED_POINT(field_u_variable_type)%PTR,err,error,*999)
953 CALL field_interpolated_point_metrics_calculate(interfacegeometricbasis%NUMBER_OF_XI,interfaceinterpolation% &
954 & geometric_interpolation(1)%INTERPOLATED_POINT_METRICS(field_u_variable_type)%PTR,err,error,*999)
957 rwg=interfaceinterpolation%GEOMETRIC_INTERPOLATION(1)%INTERPOLATED_POINT_METRICS(field_u_variable_type)%PTR% &
958 & jacobian*interfacequadraturescheme%GAUSS_WEIGHTS(gausspoint)
960 & coupledmeshidx==interfaceequations%INTERFACE_MATRICES%NUMBER_OF_INTERFACE_MATRICES)
THEN 961 CALL flagerror(
"Not implemented.",err,error,*999)
966 xi(1:
SIZE(elementconnectivity%XI,1))=interfaceoperators_interftocoupledmeshgausstransform( &
967 & elementconnectivity,interfaceconnectivitybasis,gausspoint,err,error)
970 DO rowcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
971 rowmeshcomponentnumber=interfacematrixvariable%COMPONENTS(rowcomponentidx)%MESH_COMPONENT_NUMBER
972 coupledmeshbasis=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
973 & elements%ELEMENTS(coupledmeshelementnumber)%BASIS
975 SELECT CASE(interfacedependentbasis%NUMBER_OF_XI)
978 connectedline=elementconnectivity%CONNECTED_LINE
979 decompositionlinenumber=coupledmeshdependentfield%DECOMPOSITION%TOPOLOGY% &
980 & elements%ELEMENTS(coupledmeshelementnumber)%ELEMENT_LINES(connectedline)
981 coupledmeshdomainline=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
982 & lines%LINES(decompositionlinenumber)
983 DO locallinenodeidx=1,coupledmeshbasis%NUMBER_OF_NODES_IN_LOCAL_LINE(connectedline)
984 localelementnode=coupledmeshbasis%NODE_NUMBERS_IN_LOCAL_LINE(locallinenodeidx,connectedline)
985 DO derivativeidx=1,coupledmeshdomainline%BASIS%NUMBER_OF_DERIVATIVES(locallinenodeidx)
987 derivative=coupledmeshbasis%DERIVATIVE_NUMBERS_IN_LOCAL_LINE(locallinenodeidx,connectedline)
988 derivative=coupledmeshdomainline%DERIVATIVES_IN_LINE(1,derivativeidx,locallinenodeidx)
990 rowparameteridx=coupledmeshbasis%ELEMENT_PARAMETER_INDEX(derivative,localelementnode)
995 rowidx=rowparameteridx+coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
996 DO interfacenode=1,interfacedependentbasis%NUMBER_OF_NODES
997 DO interfacederivative=1,interfacedependentbasis%NUMBER_OF_DERIVATIVES(interfacenode)
999 colparameteridx=interfacedependentbasis%ELEMENT_PARAMETER_INDEX(interfacederivative,interfacenode)
1002 pgnsi=interfacequadraturescheme%GAUSS_BASIS_FNS(colparameteridx,
no_part_deriv,gausspoint)
1003 colidx=colparameteridx+interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
1005 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)+ &
1006 & pgnsi*pgmsi*rwg*matrixcoefficient
1014 SELECT CASE(coupledmeshbasis%NUMBER_OF_XI)
1017 DO localelementnode=1,coupledmeshbasis%NUMBER_OF_NODES
1018 DO derivative=1,coupledmeshbasis%NUMBER_OF_DERIVATIVES(localelementnode)
1019 rowparameteridx=coupledmeshbasis%ELEMENT_PARAMETER_INDEX(derivative,localelementnode)
1023 & xi(1:coupledmeshbasis%NUMBER_OF_XI),err,error)
1024 rowidx=rowparameteridx+coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
1025 DO interfacenode=1,interfacedependentbasis%NUMBER_OF_NODES
1026 DO interfacederivative=1,interfacedependentbasis%NUMBER_OF_DERIVATIVES(interfacenode)
1028 colparameteridx=interfacedependentbasis%ELEMENT_PARAMETER_INDEX(interfacederivative,interfacenode)
1031 pgnsi=interfacequadraturescheme%GAUSS_BASIS_FNS(colparameteridx,
no_part_deriv,gausspoint)
1032 colidx=colparameteridx+interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
1034 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)+ &
1035 & pgnsi*pgmsi*rwg*matrixcoefficient
1042 connectedface = elementconnectivity%CONNECTED_FACE
1043 decompositionfacenumber=coupledmeshdependentfield%DECOMPOSITION%TOPOLOGY% &
1044 & elements%ELEMENTS(coupledmeshelementnumber)%ELEMENT_FACES(connectedface)
1045 coupledmeshdomainface=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
1046 & faces%FACES(decompositionfacenumber)
1047 DO localfacenodeidx=1,coupledmeshbasis%NUMBER_OF_NODES_IN_LOCAL_FACE(connectedface)
1048 localelementnode=coupledmeshbasis%NODE_NUMBERS_IN_LOCAL_FACE(localfacenodeidx,connectedface)
1049 DO derivativeidx=1,coupledmeshdomainface%BASIS%NUMBER_OF_DERIVATIVES(localfacenodeidx)
1050 derivative=coupledmeshbasis% &
1051 & derivative_numbers_in_local_face(derivativeidx,localfacenodeidx,connectedface)
1052 rowparameteridx=coupledmeshbasis%ELEMENT_PARAMETER_INDEX(derivative,localelementnode)
1056 & xi(1:coupledmeshbasis%NUMBER_OF_XI),err,error)
1057 rowidx=rowparameteridx+coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
1058 DO interfacenode=1,interfacedependentbasis%NUMBER_OF_NODES
1059 DO interfacederivative=1,interfacedependentbasis%NUMBER_OF_DERIVATIVES(interfacenode)
1061 colparameteridx=interfacedependentbasis%ELEMENT_PARAMETER_INDEX(interfacederivative,interfacenode)
1064 pgnsi=interfacequadraturescheme%GAUSS_BASIS_FNS(colparameteridx,
no_part_deriv,gausspoint)
1065 colidx=colparameteridx+interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS*(rowcomponentidx-1)
1067 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)+ &
1068 & pgnsi*pgmsi*rwg*matrixcoefficient
1086 & coupledmeshidx==interfaceequations%INTERFACE_MATRICES%NUMBER_OF_INTERFACE_MATRICES)
THEN 1087 CALL flagerror(
"Not implemented.",err,error,*999)
1090 IF(interfacedependentfield%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 1091 CALL field_interpolationparametersscalefactorselementget(elementnumber, &
1092 & interfaceinterpolation%DEPENDENT_INTERPOLATION(1)%INTERPOLATION_PARAMETERS(lagrangevariabletype)%PTR, &
1097 DO rowcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
1098 rowmeshcomponentnumber=interfacematrixvariable%COMPONENTS(rowcomponentidx)%MESH_COMPONENT_NUMBER
1099 coupledmeshbasis=>coupledmeshdependentfield%DECOMPOSITION%DOMAIN(rowmeshcomponentnumber)%PTR%TOPOLOGY% &
1100 & elements%ELEMENTS(coupledmeshelementnumber)%BASIS
1102 DO rowparameteridx=1,coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS
1106 DO colcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
1107 DO colparameteridx=1,interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
1109 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx) * &
1110 & interfaceinterpolation%DEPENDENT_INTERPOLATION(1)% &
1111 & interpolation_parameters(lagrangevariabletype)%PTR%SCALE_FACTORS(colparameteridx,colcomponentidx)
1118 IF(coupledmeshdependentfield%SCALINGS%SCALING_TYPE/=field_no_scaling)
THEN 1119 CALL field_interpolationparametersscalefactorselementget(coupledmeshelementnumber, &
1120 & interfaceequations%INTERPOLATION%VARIABLE_INTERPOLATION(coupledmeshidx)% &
1121 & dependent_interpolation(1)%INTERPOLATION_PARAMETERS(coupledmeshvariabletype)%PTR,err,error,*999)
1123 DO rowcomponentidx=1,interfacematrixvariable%NUMBER_OF_COMPONENTS
1125 DO rowparameteridx=1,coupledmeshbasis%NUMBER_OF_ELEMENT_PARAMETERS
1129 DO colcomponentidx=1,lagrangevariable%NUMBER_OF_COMPONENTS
1130 DO colparameteridx=1,interfacedependentbasis%NUMBER_OF_ELEMENT_PARAMETERS
1132 interfaceelementmatrix%MATRIX(rowidx,colidx)=interfaceelementmatrix%MATRIX(rowidx,colidx)* &
1133 & interfaceequations%INTERPOLATION%VARIABLE_INTERPOLATION(coupledmeshidx)% &
1134 & dependent_interpolation(1)%INTERPOLATION_PARAMETERS(coupledmeshvariabletype)%PTR% &
1135 & scale_factors(rowparameteridx,rowcomponentidx)
1146 CALL flagerror(
"Not implemented.",err,error,*999)
1148 localerror=
"Interface condition integration type "//
trim(
number_to_vstring(interfacecondition%integrationType, &
1149 &
"*",err,error))//
" is not valid." 1150 CALL flagerror(localerror,err,error,*999)
1154 CALL flagerror(
"Not implemented.",err,error,*999)
1156 localerror=
"Interface condition method "//
trim(
number_to_vstring(interfacecondition%METHOD,
"*",err,error))// &
1158 CALL flagerror(localerror,err,error,*999)
1161 exits(
"SolidFluidOperator_FiniteElementCalculate")
1163 999 errorsexits(
"SolidFluidOperator_FiniteElementCalculate",err,error)
1166 END SUBROUTINE solidfluidoperator_finiteelementcalculate
1172 FUNCTION interfaceoperators_interftocoupledmeshgausstransform(elementConnectivity,interfaceConnectivityBasis,GaussPoint,err,error)
1176 TYPE(
basis_type),
POINTER :: interfaceconnectivitybasis
1177 INTEGER(INTG),
INTENT(IN) :: gausspoint
1178 INTEGER(INTG),
INTENT(OUT) :: err
1181 REAL(DP) :: interfaceoperators_interftocoupledmeshgausstransform(size(elementconnectivity%xi,1))
1183 INTEGER(INTG) :: rowparameteridx
1185 enters(
"InterfaceOperators_InterfToCoupledMeshGaussTransform",err,error,*999)
1187 interfaceoperators_interftocoupledmeshgausstransform=0.0_dp
1188 DO rowparameteridx = 1,interfaceconnectivitybasis%NUMBER_OF_ELEMENT_PARAMETERS
1189 interfaceoperators_interftocoupledmeshgausstransform(:)= interfaceoperators_interftocoupledmeshgausstransform(:) + &
1190 & interfaceconnectivitybasis%QUADRATURE%QUADRATURE_SCHEME_MAP &
1192 & elementconnectivity%XI(:,1,rowparameteridx)
1195 exits(
"InterfaceOperators_InterfToCoupledMeshGaussTransform")
1197 999
errors(
"InterfaceOperators_InterfToCoupledMeshGaussTransform",err,error)
1198 exits(
"InterfaceOperators_InterfToCoupledMeshGaussTransform")
1201 END FUNCTION interfaceoperators_interftocoupledmeshgausstransform
1203 END MODULE interface_operators_routines
This module contains all basis function routines.
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
integer, parameter ptr
Pointer integer kind.
Contains the information for a face in a domain.
Converts a number to its equivalent varying string representation.
Evaluates the appropriate partial derivative index for the specificied basis function at a Xi locatio...
Contains information about an interface matrix.
integer(intg), parameter no_part_deriv
No partial derivative i.e., u.
integer(intg), parameter interface_condition_lagrange_multipliers_method
Lagrange multipliers interface condition method.
Contains information about the penalty field information for an interface condition.
This module contains all string manipulation and transformation routines.
Contains information for the interface condition data.
integer(intg), parameter first_part_deriv
First partial derivative i.e., du/ds.
This module contains routines for timing the program.
Contains information on the projected data points on an element, for decomposition since data points ...
Contains information for a field defined on a region.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
integer(intg), parameter interface_condition_augmented_lagrange_method
Augmented Lagrange multiplers interface condition method.
integer(intg), parameter, public basis_default_quadrature_scheme
Identifier for the default quadrature scheme.
integer(intg), parameter interface_condition_gauss_integration
Gauss points integration type, i.e. Loop over element Gauss points and sum up their contribution...
This module contains all interface mapping routines.
This module contains all program wide constants.
Contains the information for a line in a domain.
subroutine, public exits(NAME)
Records the exit out of the named procedure.
This module contains all type definitions in order to avoid cyclic module references.
integer(intg), parameter interface_condition_data_points_integration
Data points integration type i.e. Loop over data points and sum up their contribution.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
integer(intg), parameter interface_condition_penalty_method
Penalty interface condition method.
Contains information for an element matrix.
Contains information about the interpolation for a domain (interface or coupled mesh) in the interfac...
This module defines all constants shared across interface condition routines.
integer(intg), parameter interface_condition_point_to_point_method
Point to point interface condition method.
Contains the interpolated value (and the derivatives wrt xi) of a field at a point. Old CMISS name XG.
Contains information for a particular quadrature scheme.
This module handles all interface equations routines.
This module contains all routines dealing with (non-distributed) matrix and vectors types...
Contains information for a field variable defined on a field.
Contains information on the data point coupling/points connectivity between meshes in the an interfac...
Contains information on the mesh connectivity for a given coupled mesh element.
subroutine, public errors(NAME, ERR, ERROR)
Records the exiting error of the subroutine.
Contains information for the interface data.
Contains all information about a basis .
Flags an error condition.
Flags an error condition.
real(dp), parameter zero_tolerance
This module contains all kind definitions.
Contains information about the interface equations for an interface condition.