14 #if !defined(KRATOS_VMS_ADJOINT_ELEMENT_H_INCLUDED)
15 #define KRATOS_VMS_ADJOINT_ELEMENT_H_INCLUDED
32 #include "utilities/geometry_utilities.h"
53 template<
unsigned int TDim >
61 explicit ThisExtensions(
Element* pElement)
66 void GetFirstDerivativesVector(
69 std::size_t Step)
override
72 rVector.resize(mpElement->GetGeometry().WorkingSpaceDimension() + 1);
73 std::size_t index = 0;
76 if (mpElement->GetGeometry().WorkingSpaceDimension() == 3) {
83 void GetSecondDerivativesVector(
86 std::size_t Step)
override
88 auto& r_node = mpElement->GetGeometry()[NodeId];
89 rVector.resize(mpElement->GetGeometry().WorkingSpaceDimension() + 1);
90 std::size_t index = 0;
93 if (mpElement->GetGeometry().WorkingSpaceDimension() == 3) {
100 void GetAuxiliaryVector(
103 std::size_t Step)
override
105 auto& r_node = mpElement->GetGeometry()[NodeId];
106 rVector.resize(mpElement->GetGeometry().WorkingSpaceDimension() + 1);
107 std::size_t index = 0;
112 if (mpElement->GetGeometry().WorkingSpaceDimension() == 3) {
119 void GetFirstDerivativesVariables(std::vector<VariableData const*>& rVariables)
const override
121 rVariables.resize(1);
122 rVariables[0] = &ADJOINT_FLUID_VECTOR_2;
125 void GetSecondDerivativesVariables(std::vector<VariableData const*>& rVariables)
const override
127 rVariables.resize(1);
128 rVariables[0] = &ADJOINT_FLUID_VECTOR_3;
131 void GetAuxiliaryVariables(std::vector<VariableData const*>& rVariables)
const override
133 rVariables.resize(1);
134 rVariables[0] = &AUX_ADJOINT_FLUID_VECTOR_1;
146 constexpr
static unsigned int TNumNodes = TDim + 1;
148 constexpr
static unsigned int TBlockSize = TDim + 1;
150 constexpr
static unsigned int TFluidLocalSize = TBlockSize * TNumNodes;
152 constexpr
static unsigned int TCoordLocalSize = TDim * TNumNodes;
196 GeometryType::Pointer pGeometry)
203 GeometryType::Pointer pGeometry,
204 PropertiesType::Pointer pProperties)
205 :
Element(NewId, pGeometry, pProperties)
218 this->
SetValue(ADJOINT_EXTENSIONS, Kratos::make_shared<ThisExtensions>(
this));
229 PropertiesType::Pointer pProperties)
const override
233 return Kratos::make_intrusive<VMSAdjointElement<TDim>>(
234 NewId, this->GetGeometry().Create(ThisNodes), pProperties);
241 GeometryType::Pointer pGeom,
242 PropertiesType::Pointer pProperties)
const override
246 return Kratos::make_intrusive<VMSAdjointElement<TDim>>(
247 NewId, pGeom, pProperties);
265 for (
IndexType i_node = 0; i_node < this->GetGeometry().size(); ++i_node) {
266 const auto& r_node = this->GetGeometry()[i_node];
282 if (rProcessInfo[OSS_SWITCH] == 1) {
284 <<
"OSS projections are not yet supported with VMS adjoints.\n";
295 int Step = 0)
const override
298 this->GetValuesArray(
values, Step);
299 if (rValues.size() != TFluidLocalSize) {
300 rValues.
resize(TFluidLocalSize,
false);
307 const int Step = 0)
const
309 const auto& r_geometry = this->GetGeometry();
311 for (
IndexType i_node = 0; i_node < TNumNodes; ++i_node) {
312 const auto& r_node = r_geometry[i_node];
313 const auto& r_velocity = r_node.FastGetSolutionStepValue(ADJOINT_FLUID_VECTOR_1, Step);
315 rValues[local_index++] = r_velocity[
d];
317 rValues[local_index++] = r_node.FastGetSolutionStepValue(ADJOINT_FLUID_SCALAR_1, Step);
324 int Step = 0)
const override
326 if (rValues.size() != TFluidLocalSize) {
327 rValues.
resize(TFluidLocalSize,
false);
336 std::fill(rValues.begin(), rValues.end(), 0.0);
342 int Step = 0)
const override
345 this->GetSecondDerivativesArray(
values, Step);
346 if (rValues.size() != TFluidLocalSize) {
347 rValues.
resize(TFluidLocalSize,
false);
356 const auto& r_geometry = this->GetGeometry();
358 for (
IndexType i_node = 0; i_node < TNumNodes; ++i_node) {
359 const auto& r_acceleration = r_geometry[i_node].FastGetSolutionStepValue(
360 ADJOINT_FLUID_VECTOR_3, Step);
362 rValues[local_index++] = r_acceleration[
d];
364 rValues[local_index++] = 0.0;
376 if (rLeftHandSideMatrix.size1() != TFluidLocalSize ||
377 rLeftHandSideMatrix.size2() != TFluidLocalSize)
378 rLeftHandSideMatrix.
resize(TFluidLocalSize, TFluidLocalSize,
false);
382 if (rRightHandSideVector.size() != TFluidLocalSize)
383 rRightHandSideVector.
resize(TFluidLocalSize,
false);
406 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
407 for (
unsigned int d = 0;
d < TDim; ++
d) {
408 rRightHandSideVector[local_index++] +=
424 if (rDampingMatrix.size1() != TFluidLocalSize)
425 rDampingMatrix.
resize(TFluidLocalSize, TFluidLocalSize,
false);
429 const auto& r_geometry = this->GetGeometry();
441 r_geometry,
N, std::tie(
density, DENSITY),
443 std::tie(mesh_velocity, MESH_VELOCITY),
449 const double element_size = this->CalculateElementSize(
gauss_weight);
455 double tau_one, tau_two;
456 this->CalculateStabilizationParameters(tau_one, tau_two,
norm_2(effective_velocity),
458 rCurrentProcessInfo);
460 this->AddIntegrationPointVelocityContribution(
468 for (
unsigned int i_node = 0; i_node < TNumNodes; ++i_node) {
469 const auto& r_node = r_geometry[i_node];
470 const auto&
velocity = r_node.FastGetSolutionStepValue(VELOCITY);
471 for (
unsigned int d = 0;
d < TDim; ++
d) {
474 values[local_index++] = r_node.FastGetSolutionStepValue(PRESSURE);
484 if (rLeftHandSideMatrix.size1() != TFluidLocalSize ||
485 rLeftHandSideMatrix.size2() != TFluidLocalSize)
486 rLeftHandSideMatrix.
resize(TFluidLocalSize, TFluidLocalSize,
false);
488 rLeftHandSideMatrix.
clear();
524 this->CalculateFirstDerivativesLHS(LHS, rCurrentProcessInfo);
525 rLeftHandSideMatrix.
resize(LHS.size1(), LHS.size2());
526 noalias(rLeftHandSideMatrix) = LHS;
533 this->CalculatePrimalGradientOfVMSSteadyTerm(rLeftHandSideMatrix, rCurrentProcessInfo);
534 this->AddPrimalGradientOfVMSMassTerm(rLeftHandSideMatrix, ACCELERATION,
535 -1.0, rCurrentProcessInfo);
536 rLeftHandSideMatrix =
trans(rLeftHandSideMatrix);
555 this->CalculateSecondDerivativesLHS(LHS, rCurrentProcessInfo);
556 rLeftHandSideMatrix.
resize(LHS.size1(), LHS.size2(),
false);
557 noalias(rLeftHandSideMatrix) = LHS;
564 this->CalculateVMSMassMatrix(rLeftHandSideMatrix, rCurrentProcessInfo);
565 rLeftHandSideMatrix = -
trans(rLeftHandSideMatrix);
573 if (rMassMatrix.size1() != TFluidLocalSize)
574 rMassMatrix.
resize(TFluidLocalSize, TFluidLocalSize,
false);
576 rMassMatrix =
ZeroMatrix(TFluidLocalSize, TFluidLocalSize);
578 const auto& r_geometry = this->GetGeometry();
592 std::tie(mesh_velocity, MESH_VELOCITY),
598 double Coeff =
density * Area / TNumNodes;
599 unsigned int DofIndex = 0;
600 for (
unsigned int iNode = 0; iNode < TNumNodes; ++iNode)
602 for (
unsigned int d = 0;
d < TDim; ++
d)
604 rMassMatrix(DofIndex, DofIndex) += Coeff;
614 const double ElemSize = this->CalculateElementSize(Area);
615 double TauOne, TauTwo;
616 this->CalculateStabilizationParameters(TauOne, TauTwo,
norm_2(effective_velocity), ElemSize,
density,
620 this->AddMassStabTerms(rMassMatrix,
density, effective_velocity, TauOne,
N, DN_DX, Area);
648 this->AuxiliaryCalculateSensitivityMatrix(rSensitivityVariable, local_matrix, rCurrentProcessInfo);
649 rOutput.
resize(local_matrix.size1(), local_matrix.size2(),
false);
650 noalias(rOutput) = local_matrix;
661 if (rVariable == PRIMAL_RELAXED_SECOND_DERIVATIVE_VALUES) {
662 if (rOutput.size() != TFluidLocalSize) {
663 rOutput.
resize(TFluidLocalSize,
false);
666 const auto& r_geometry = this->GetGeometry();
673 const auto& value = r_geometry[
i].FastGetSolutionStepValue(ACCELERATION);
675 rOutput[local_index++] = value[
j];
678 rOutput[local_index++] = 0.0;
681 KRATOS_ERROR <<
"Unsupported variable type is requested. [ rVariable.Name() = " << rVariable.
Name() <<
" ].\n";
689 const ProcessInfo& rCurrentProcessInfo)
const override
692 this->GetDofArray(
dofs, rCurrentProcessInfo);
693 if (rElementalDofList.size() !=
dofs.size()) {
694 rElementalDofList.resize(
dofs.size());
696 std::copy(
dofs.begin(),
dofs.end(), rElementalDofList.begin());
705 const ProcessInfo& rCurrentProcessInfo)
const override
708 this->EquationIdArray(ids, rCurrentProcessInfo);
709 if (rResult.size() != ids.size()) {
710 rResult.resize(ids.size());
712 std::copy(ids.begin(), ids.end(), rResult.begin());
723 std::string
Info()
const override
725 std::stringstream buffer;
726 buffer <<
"VMSAdjointElement" << this->GetGeometry().WorkingSpaceDimension()
727 <<
"D #" << this->Id();
733 rOStream <<
"VMSAdjointElement"
734 << this->GetGeometry().WorkingSpaceDimension() <<
"D #"
735 << this->Id() << std::endl;
736 rOStream <<
"Number of Nodes: " << this->GetGeometry().PointsNumber()
742 this->PrintInfo(rOStream);
743 rOStream <<
"Geometry Data: " << std::endl;
744 this->GetGeometry().PrintData(rOStream);
756 const double Density,
763 const unsigned int BlockSize = TDim + 1;
765 double Coef = Weight * TauOne;
766 unsigned int FirstRow(0), FirstCol(0);
773 for (
unsigned int i = 0;
i < TNumNodes; ++
i)
776 for (
unsigned int j = 0;
j < TNumNodes; ++
j)
779 K = Coef * Density * AGradN[
i] * Density * rShapeFunc[
j];
781 for (
unsigned int d = 0;
d < TDim; ++
d)
783 rLHSMatrix(FirstRow +
d, FirstCol +
d) +=
K;
785 rLHSMatrix(FirstRow + TDim, FirstCol +
d) += Coef * Density * rShapeDeriv(
i,
d) * rShapeFunc[
j];
788 FirstCol += BlockSize;
791 FirstRow += BlockSize;
799 const double Density,
800 const double Viscosity,
813 unsigned int FirstRow(0),
815 double K, G, PDivV,
L, qF;
819 for (
unsigned int i = 0;
i < TNumNodes; ++
i)
821 for (
unsigned int j = 0;
j < TNumNodes; ++
j)
826 K = Density * rShapeFunc[
i] * AGradN[
j];
827 K += TauOne * Density * AGradN[
i] * Density *
834 for (
unsigned int m = 0;
m < TDim; ++
m)
840 G = TauOne * Density * AGradN[
i] *
842 PDivV = rShapeDeriv(
i,
m) * rShapeFunc[
j];
845 rDampingMatrix(FirstRow +
m, FirstCol + TDim) += Weight * (G - PDivV);
847 rDampingMatrix(FirstCol + TDim, FirstRow +
m) += Weight * (G + PDivV);
850 L += rShapeDeriv(
i,
m) * rShapeDeriv(
j,
m);
852 for (
unsigned int n = 0;
n < TDim; ++
n)
855 rDampingMatrix(FirstRow +
m, FirstCol +
n) +=
856 Weight * TauTwo * rShapeDeriv(
i,
m) * rShapeDeriv(
j,
n);
861 for (
unsigned int d = 0;
d < TDim; ++
d)
862 rDampingMatrix(FirstRow +
d, FirstCol +
d) +=
K;
865 rDampingMatrix(FirstRow + TDim, FirstCol + TDim) += Weight * TauOne *
L;
868 FirstCol += TBlockSize;
873 for (
unsigned int d = 0;
d < TDim; ++
d) {
874 rDampRHS[FirstRow +
d] +=
875 Weight * TauOne * Density * AGradN[
i] *
877 qF += rShapeDeriv(
i,
d) * BodyForce[
d];
879 rDampRHS[FirstRow + TDim] +=
880 Weight * TauOne * qF;
883 FirstRow += TBlockSize;
889 this->AddViscousTerm(viscous_contribution, rShapeDeriv, Viscosity * Weight);
890 noalias(rDampingMatrix) += viscous_contribution;
900 if (rSensitivityVariable == SHAPE_SENSITIVITY) {
901 this->CalculateShapeGradientOfVMSSteadyTerm(rOutput, rCurrentProcessInfo);
902 this->AddShapeGradientOfVMSMassTerm(rOutput, ACCELERATION, -1.0, rCurrentProcessInfo);
904 KRATOS_ERROR <<
"Sensitivity variable " << rSensitivityVariable
905 <<
" not supported." << std::endl;
928 double Density, Viscosity;
932 std::tie(Density, DENSITY),
933 std::tie(Viscosity, VISCOSITY),
934 std::tie(Velocity, VELOCITY));
936 Viscosity *= Density;
941 DensityVelGradN[
i] = 0.0;
943 DensityVelGradN[
i] += Density * DN_DX(
i,
d) * Velocity[
d];
948 double VelNorm = 0.0;
950 VelNorm += Velocity[
d] * Velocity[
d];
953 VelNorm = std::sqrt(VelNorm);
954 const double ElemSize = this->CalculateElementSize(Volume);
955 double TauOne, TauTwo;
956 this->CalculateStabilizationParameters(TauOne, TauTwo, VelNorm, ElemSize, Density,
957 Viscosity, rCurrentProcessInfo);
960 const double LumpedMass = Density * Volume /
static_cast<double>(TNumNodes);
964 rMassMatrix(DofIndex, DofIndex) += LumpedMass;
974 const double diag = DensityVelGradN[
i] * TauOne * Density *
N[
j];
977 rMassMatrix(FirstRow +
d, FirstCol +
d) += Volume * diag;
978 rMassMatrix(FirstRow + TDim, FirstCol +
d) +=
979 Volume * DN_DX(
i,
d) * TauOne * Density *
N[
j];
982 FirstCol += TBlockSize;
985 FirstRow += TBlockSize;
1017 double Density, Viscosity;
1021 std::tie(Density, DENSITY),
1022 std::tie(Viscosity, VISCOSITY),
1023 std::tie(Velocity, VELOCITY),
1024 std::tie(
X, rVariable));
1026 Viscosity *= Density;
1031 DensityVelGradN[
i] = 0.0;
1033 DensityVelGradN[
i] += Density * DN_DX(
i,
d) * Velocity[
d];
1038 double VelNorm = 0.0;
1040 VelNorm += Velocity[
d] * Velocity[
d];
1042 VelNorm = std::sqrt(VelNorm);
1043 const double ElemSize = this->CalculateElementSize(Volume);
1044 double TauOne, TauTwo;
1045 this->CalculateStabilizationParameters(TauOne, TauTwo, VelNorm, ElemSize, Density,
1046 Viscosity, rCurrentProcessInfo);
1054 if (VelNorm > 0.0) {
1055 const double CoefOne = -2.0 * Density * TauOne * TauOne / (ElemSize * VelNorm);
1056 const double CoefTwo = 0.5 * Density * ElemSize / VelNorm;
1060 TauOneDeriv(
i,
d) = CoefOne *
N[
i] * Velocity[
d];
1061 TauTwoDeriv(
i,
d) = CoefTwo *
N[
i] * Velocity[
d];
1069 DensityXGradN[
i] = 0.0;
1071 DensityXGradN[
i] += Density * DN_DX(
i,
d) *
X[
d];
1084 valmn += DensityVelGradN[
i] * TauOneDeriv(
j,
n) * Density *
X[
m];
1086 valmn += Density *
N[
j] * DN_DX(
i,
n) * TauOne * Density *
X[
m];
1088 rOutputMatrix(FirstRow +
m, FirstCol +
n) +=
alpha * Volume * valmn;
1091 rOutputMatrix(FirstRow + TDim, FirstCol +
m) +=
1092 alpha * Volume * DensityXGradN[
i] * TauOneDeriv(
j,
m);
1095 FirstCol += TBlockSize;
1098 FirstRow += TBlockSize;
1130 double Density, Viscosity;
1134 std::tie(Density, DENSITY),
1135 std::tie(Viscosity, VISCOSITY),
1136 std::tie(Velocity, VELOCITY));
1138 Viscosity *= Density;
1142 noalias(DensityVelGradN) = Density *
prod(DN_DX, Velocity);
1145 const double InvDetJ = 1.0 / this->GetGeometry().DeterminantOfJacobian(0);
1147 this->CalculateDeterminantOfJacobianDerivatives(DetJDerivatives);
1150 double VelNorm =
norm_2(Velocity);
1151 double ElemSize = this->CalculateElementSize(Volume);
1152 double TauOne, TauTwo;
1153 this->CalculateStabilizationParameters(TauOne, TauTwo, VelNorm, ElemSize, Density,
1154 Viscosity, rCurrentProcessInfo);
1160 const auto& r_value =
1161 this->GetGeometry()[
i].FastGetSolutionStepValue(rVariable);
1163 X[DofIndex++] = r_value[
d];
1165 X[DofIndex++] = 0.0;
1172 for (
IndexType iCoord = 0; iCoord < TCoordLocalSize; ++iCoord) {
1174 const double DetJDeriv = DetJDerivatives[iCoord];
1180 DN_DX_Deriv(
i,
d) = -DN_DX(iCoord / TDim,
d) * DN_DX(
i, iCoord % TDim);
1185 double VolumeDeriv = Volume * InvDetJ * DetJDeriv;
1189 noalias(DensityVelGradNDeriv) = Density *
prod(DN_DX_Deriv, Velocity);
1192 double TauOneDeriv, TauTwoDeriv;
1193 this->CalculateStabilizationParametersDerivative(
1194 TauOneDeriv, TauTwoDeriv, TauOne, TauTwo, VelNorm, ElemSize,
1195 Density, Viscosity, DetJDeriv);
1207 const double LumpedMassDeriv = Density * VolumeDeriv /
static_cast<double>(TNumNodes);
1209 for (
IndexType i_node = 0; i_node < TNumNodes; ++i_node) {
1211 LHS(DofIndex, DofIndex) += LumpedMassDeriv;
1224 diag += DensityVelGradN[
i] * TauOne * Density *
N[
j];
1225 ddiag += DensityVelGradNDeriv[
i] * TauOne * Density *
N[
j];
1226 ddiag += DensityVelGradN[
i] * TauOneDeriv * Density *
N[
j];
1229 double valn = DN_DX(
i,
n) * TauOne * Density *
N[
j];
1231 dvaln += DN_DX_Deriv(
i,
n) * TauOne * Density *
N[
j];
1232 dvaln += DN_DX(
i,
n) * TauOneDeriv * Density *
N[
j];
1234 LHS(FirstRow +
n, FirstCol +
n) +=
1235 VolumeDeriv * diag + Volume * ddiag;
1237 LHS(FirstRow + TDim, FirstCol +
n) +=
1238 VolumeDeriv * valn + Volume * dvaln;
1241 FirstCol += TBlockSize;
1244 FirstRow += TBlockSize;
1252 rOutputMatrix(iCoord,
k) +=
alpha * Derivative[
k];
1275 rAdjointMatrix.
clear();
1286 double Density, Viscosity;
1290 std::tie(Density, DENSITY),
1291 std::tie(Viscosity, VISCOSITY),
1292 std::tie(Velocity, VELOCITY),
1293 std::tie(BodyForce, BODY_FORCE));
1295 Viscosity *= Density;
1296 BodyForce *= Density;
1300 noalias(DensityVelGradN) = Density *
prod(DN_DX, Velocity);
1304 this->CalculateVelocityGradient(DensityGradVel, DN_DX);
1307 double DivVel = 0.0;
1309 DivVel += DensityGradVel(
d,
d);
1312 DensityGradVel *= Density;
1316 this->CalculatePressureGradient(GradP, DN_DX);
1320 noalias(DN_DX_DensityGradVel) =
prod(DN_DX, DensityGradVel);
1324 noalias(DN_DX_DensityGradVel_Vel) =
prod(DN_DX_DensityGradVel, Velocity);
1328 noalias(DensityGradVel_Vel) =
prod(DensityGradVel, Velocity);
1336 noalias(DN_DX_BodyForce) =
prod(DN_DX, BodyForce);
1339 double VelNorm =
norm_2(Velocity);
1340 double ElemSize = this->CalculateElementSize(Volume);
1341 double TauOne, TauTwo;
1342 this->CalculateStabilizationParameters(TauOne, TauTwo, VelNorm, ElemSize, Density,
1343 Viscosity, rCurrentProcessInfo);
1352 if (VelNorm > 0.0) {
1353 double CoefOne = -2.0 * Density * TauOne * TauOne / (ElemSize * VelNorm);
1354 double CoefTwo = 0.5 * Density * ElemSize / VelNorm;
1358 TauOneDeriv(
i,
d) = CoefOne *
N[
i] * Velocity[
d];
1359 TauTwoDeriv(
i,
d) = CoefTwo *
N[
i] * Velocity[
d];
1378 diag +=
N[
i] * DensityVelGradN[
j];
1382 diag += DensityVelGradN[
i] * TauOne * DensityVelGradN[
j];
1389 valmn +=
N[
i] *
N[
j] * DensityGradVel(
m,
n);
1393 valmn += DensityVelGradN[
i] * TauOne *
N[
j] *
1394 DensityGradVel(
m,
n);
1395 valmn += DensityVelGradN[
i] * TauOneDeriv(
j,
n) *
1396 DensityGradVel_Vel[
m];
1397 valmn += Density *
N[
j] * DN_DX(
i,
n) * TauOne *
1398 DensityGradVel_Vel[
m];
1402 valmn += DN_DX(
i,
m) * TauTwo * DN_DX(
j,
n);
1403 valmn += DN_DX(
i,
m) * TauTwoDeriv(
j,
n) * DivVel;
1407 valmn += TauOneDeriv(
j,
n) * DensityVelGradN[
i] * GradP[
m];
1408 valmn += Density * TauOne *
N[
j] * DN_DX(
i,
n) * GradP[
m];
1412 valmn -=
N[
j] * DN_DX(
i,
n) * TauOne * Density * BodyForce[
m];
1413 valmn -= DensityVelGradN[
i] * TauOneDeriv(
j,
n) * BodyForce[
m];
1415 rAdjointMatrix(FirstRow +
m, FirstCol +
n) += Volume * valmn;
1418 rAdjointMatrix(FirstRow +
m, FirstCol +
m) += Volume * diag;
1425 valmp -= DN_DX(
i,
m) *
N[
j];
1429 valmp += TauOne * DensityVelGradN[
i] * DN_DX(
j,
m);
1433 valpn +=
N[
i] * DN_DX(
j,
m);
1437 valpn += DN_DX_GradP[
i] * TauOneDeriv(
j,
m);
1441 valpn += DN_DX(
i,
m) * TauOne * DensityVelGradN[
j];
1442 valpn += DN_DX_DensityGradVel(
i,
m) * TauOne *
N[
j];
1443 valpn += DN_DX_DensityGradVel_Vel[
i] * TauOneDeriv(
j,
m);
1447 valpn -= DN_DX_BodyForce[
i] * TauOneDeriv(
j,
m);
1449 rAdjointMatrix(FirstRow +
m, FirstCol + TDim) += Volume * valmp;
1450 rAdjointMatrix(FirstRow + TDim, FirstCol +
m) += Volume * valpn;
1457 valpp += DN_DX(
i,
d) * DN_DX(
j,
d);
1461 rAdjointMatrix(FirstRow + TDim, FirstCol + TDim) += Volume * valpp;
1463 FirstCol += TBlockSize;
1466 FirstRow += TBlockSize;
1471 this->AddViscousTerm(rAdjointMatrix, DN_DX, Viscosity * Volume);
1474 noalias(rAdjointMatrix) = -rAdjointMatrix;
1508 double Density, Viscosity;
1512 std::tie(Density, DENSITY),
1513 std::tie(Viscosity, VISCOSITY),
1514 std::tie(Velocity, VELOCITY),
1515 std::tie(BodyForce, BODY_FORCE));
1517 BodyForce *= Density;
1518 Viscosity *= Density;
1522 noalias(DensityVelGradN) = Density *
prod(DN_DX, Velocity);
1525 const double InvDetJ = 1.0 / this->GetGeometry().DeterminantOfJacobian(0);
1527 this->CalculateDeterminantOfJacobianDerivatives(DetJDerivatives);
1530 double VelNorm =
norm_2(Velocity);
1531 double ElemSize = this->CalculateElementSize(Volume);
1532 double TauOne, TauTwo;
1533 this->CalculateStabilizationParameters(TauOne, TauTwo, VelNorm, ElemSize, Density,
1534 Viscosity, rCurrentProcessInfo);
1540 for (
IndexType i_node = 0; i_node < TNumNodes; ++i_node) {
1541 const auto& r_velocity =
1542 this->GetGeometry()[i_node].FastGetSolutionStepValue(VELOCITY);
1544 FluidValues[DofIndex++] = r_velocity[
d];
1546 FluidValues[DofIndex++] =
1547 this->GetGeometry()[i_node].FastGetSolutionStepValue(PRESSURE);
1553 for (
IndexType iCoord = 0; iCoord < TCoordLocalSize; ++iCoord) {
1555 const double DetJDeriv = DetJDerivatives[iCoord];
1561 DN_DX_Deriv(
i,
d) = -DN_DX(iCoord / TDim,
d) * DN_DX(
i, iCoord % TDim);
1566 const double VolumeDeriv = Volume * InvDetJ * DetJDeriv;
1570 noalias(DensityVelGradNDeriv) = Density *
prod(DN_DX_Deriv, Velocity);
1573 double TauOneDeriv, TauTwoDeriv;
1574 this->CalculateStabilizationParametersDerivative(
1575 TauOneDeriv, TauTwoDeriv, TauOne, TauTwo, VelNorm, ElemSize,
1576 Density, Viscosity, DetJDeriv);
1594 diag +=
N[
i] * DensityVelGradN[
j];
1595 ddiag +=
N[
i] * DensityVelGradNDeriv[
j];
1599 diag += DensityVelGradN[
i] * TauOne * DensityVelGradN[
j];
1600 ddiag += DensityVelGradNDeriv[
i] * TauOne * DensityVelGradN[
j] +
1601 DensityVelGradN[
i] * TauOneDeriv * DensityVelGradN[
j] +
1602 DensityVelGradN[
i] * TauOne * DensityVelGradNDeriv[
j];
1608 double valmn = DN_DX(
i,
m) * TauTwo * DN_DX(
j,
n);
1609 double dvalmn = DN_DX_Deriv(
i,
m) * TauTwo * DN_DX(
j,
n) +
1610 DN_DX(
i,
m) * TauTwoDeriv * DN_DX(
j,
n) +
1611 DN_DX(
i,
m) * TauTwo * DN_DX_Deriv(
j,
n);
1613 LHS(
i * TBlockSize +
m,
j * TBlockSize +
n) +=
1614 VolumeDeriv * valmn + Volume * dvalmn;
1616 LHS(
i * TBlockSize +
m,
j * TBlockSize +
m) +=
1617 VolumeDeriv * diag + Volume * ddiag;
1620 double dvalmp = 0.0;
1623 valmp -= DN_DX(
i,
m) *
N[
j];
1624 dvalmp -= DN_DX_Deriv(
i,
m) *
N[
j];
1628 valmp += TauOne * DensityVelGradN[
i] * DN_DX(
j,
m);
1629 dvalmp += TauOneDeriv * DensityVelGradN[
i] * DN_DX(
j,
m) +
1630 TauOne * DensityVelGradNDeriv[
i] * DN_DX(
j,
m) +
1631 TauOne * DensityVelGradN[
i] * DN_DX_Deriv(
j,
m);
1634 double dvalpn = 0.0;
1637 valpn +=
N[
i] * DN_DX(
j,
m);
1638 dvalpn +=
N[
i] * DN_DX_Deriv(
j,
m);
1642 valpn += TauOne * DensityVelGradN[
j] * DN_DX(
i,
m);
1643 dvalpn += TauOneDeriv * DensityVelGradN[
j] * DN_DX(
i,
m) +
1644 TauOne * DensityVelGradNDeriv[
j] * DN_DX(
i,
m) +
1645 TauOne * DensityVelGradN[
j] * DN_DX_Deriv(
i,
m);
1647 LHS(
i * TBlockSize +
m,
j * TBlockSize + TDim) +=
1648 VolumeDeriv * valmp + Volume * dvalmp;
1649 LHS(
i * TBlockSize + TDim,
j * TBlockSize +
m) +=
1650 VolumeDeriv * valpn + Volume * dvalpn;
1654 double dvalpp = 0.0;
1658 valpp += DN_DX(
i,
d) * DN_DX(
j,
d) * TauOne;
1659 dvalpp += DN_DX_Deriv(
i,
d) * DN_DX(
j,
d) * TauOne +
1660 DN_DX(
i,
d) * DN_DX_Deriv(
j,
d) * TauOne +
1661 DN_DX(
i,
d) * DN_DX(
j,
d) * TauOneDeriv;
1664 LHS(
i * TBlockSize + TDim,
j * TBlockSize + TDim) +=
1665 VolumeDeriv * valpp + Volume * dvalpp;
1669 double DN_DX_BodyForce = 0.0;
1670 double DN_DX_BodyForceDeriv = 0.0;
1672 DN_DX_BodyForce += DN_DX(
i,
d) * BodyForce[
d];
1673 DN_DX_BodyForceDeriv += DN_DX_Deriv(
i,
d) * BodyForce[
d];
1681 valm +=
N[
i] * BodyForce[
m];
1685 valm += TauOne * DensityVelGradN[
i] * BodyForce[
m];
1686 dvalm += TauOneDeriv * DensityVelGradN[
i] * BodyForce[
m] +
1687 TauOne * DensityVelGradNDeriv[
i] * BodyForce[
m];
1689 RHS[
i * TBlockSize +
m] += VolumeDeriv * valm + Volume * dvalm;
1692 double valp = TauOne * DN_DX_BodyForce;
1693 double dvalp = TauOneDeriv * DN_DX_BodyForce + TauOne * DN_DX_BodyForceDeriv;
1695 RHS[
i * TBlockSize + TDim] += VolumeDeriv * valp + Volume * dvalp;
1698 this->AddViscousTermDerivative(LHS, DN_DX, DN_DX_Deriv, Viscosity * Volume,
1699 Viscosity * VolumeDeriv);
1704 noalias(ResidualDerivative) = RHS -
prod(LHS, FluidValues);
1706 rShapeDerivativesMatrix(iCoord,
k) = ResidualDerivative[
k];
1726 const auto& r_geometry = this->GetGeometry();
1728 const auto& r_velocity = r_geometry[0].FastGetSolutionStepValue(VELOCITY, 0);
1731 rGradVel(
m,
n) = rDN_DX(0,
n) * r_velocity[
m];
1736 for (
IndexType i_node = 1; i_node < TNumNodes; ++i_node) {
1737 const auto& r_velocity = r_geometry[i_node].FastGetSolutionStepValue(VELOCITY, 0);
1740 rGradVel(
m,
n) += rDN_DX(i_node,
n) * r_velocity[
m];
1756 const auto& r_geometry = this->GetGeometry();
1759 rGradP[
d] = rDN_DX(0,
d) * r_geometry[0].FastGetSolutionStepValue(PRESSURE);
1763 for (
IndexType i_node = 1; i_node < TNumNodes; ++i_node) {
1765 rGradP[
d] += rDN_DX(i_node,
d) *
1766 r_geometry[i_node].FastGetSolutionStepValue(PRESSURE);
1805 const double VelNorm,
1806 const double ElemSize,
1807 const double Density,
1808 const double Viscosity,
1812 double tmp = -rCurrentProcessInfo[DYNAMIC_TAU] / rCurrentProcessInfo[DELTA_TIME];
1813 tmp += 2.0 * VelNorm / ElemSize;
1815 tmp += 4.0 * Viscosity / (ElemSize * ElemSize);
1816 rTauOne = 1.0 /
tmp;
1817 rTauTwo = Viscosity + 0.5 * Density * ElemSize * VelNorm;
1834 double& rTauOneDeriv,
1835 double& rTauTwoDeriv,
1836 const double TauOne,
1837 const double TauTwo,
1838 const double VelNorm,
1839 const double ElemSize,
1840 const double Density,
1841 const double Viscosity,
1842 const double DetJDeriv)
const;
1854 const double Weight)
const;
1871 const double Weight,
1872 const double WeightDeriv)
const;
1887 void save(
Serializer& rSerializer)
const override
1909 VMSAdjointElement&
operator=(VMSAdjointElement
const& rOther);
1911 VMSAdjointElement(VMSAdjointElement
const& rOther);
1923 template<
unsigned int TDim>
1930 template<
unsigned int TDim>
1934 rOStream << std::endl;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Interface extensions for adjoint elements and conditions.
Definition: adjoint_extensions.h:37
Base class for all Elements.
Definition: element.h:60
virtual void CalculateSecondDerivativesLHS(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo)
Definition: element.h:536
virtual void CalculateFirstDerivativesLHS(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo)
Definition: element.h:479
std::size_t SizeType
Definition: element.h:94
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
virtual int Check(const ProcessInfo &rCurrentProcessInfo) const
Definition: element.h:904
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: element.h:92
std::size_t IndexType
Definition: flags.h:74
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
static void CalculateGeometryData(const GeometryType &rGeometry, BoundedMatrix< double, 4, 3 > &rDN_DX, array_1d< double, 4 > &rN, double &rVolume)
This function is designed to compute the shape function derivatives, shape functions and volume in 3D...
Definition: geometry_utilities.h:176
Wrapper for a function which behaves like an arithmetic type.
Definition: indirect_scalar.h:45
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
void clear()
Definition: amatrix_interface.h:284
iterator begin()
Definition: amatrix_interface.h:241
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
An adjoint element for discrete shape sensitivity of VMS fluid element.
Definition: vms_adjoint_element.h:55
void CalculateShapeGradientOfVMSSteadyTerm(BoundedMatrix< double, TCoordLocalSize, TFluidLocalSize > &rShapeDerivativesMatrix, const ProcessInfo &rCurrentProcessInfo) const
Calculate the partial derivatives of damping term w.r.t. shape parameters.
Definition: vms_adjoint_element.h:1493
Element::MatrixType MatrixType
Definition: vms_adjoint_element.h:168
void GetValuesArray(ArrayType &rValues, const int Step=0) const
Definition: vms_adjoint_element.h:305
Element::Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const override
Creates a new element of this type.
Definition: vms_adjoint_element.h:226
void GetSecondDerivativesArray(ArrayType &rValues, int Step=0) const
Definition: vms_adjoint_element.h:352
void AddPrimalGradientOfVMSMassTerm(BoundedMatrix< double, TFluidLocalSize, TFluidLocalSize > &rOutputMatrix, const Variable< array_1d< double, 3 >> &rVariable, double alpha, const ProcessInfo &rCurrentProcessInfo) const
Adds primal gradient of the VMS mass matrix multiplied by a vector.
Definition: vms_adjoint_element.h:1001
void CalculateFirstDerivativesLHS(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Calculates the adjoint matrix for velocity and pressure.
Definition: vms_adjoint_element.h:519
void GetFirstDerivativesArray(ArrayType &rValues, int Step=0) const
Definition: vms_adjoint_element.h:332
void CalculateStabilizationParametersDerivative(double &rTauOneDeriv, double &rTauTwoDeriv, const double TauOne, const double TauTwo, const double VelNorm, const double ElemSize, const double Density, const double Viscosity, const double DetJDeriv) const
Returns stabilization parameters derived w.r.t a node's coordinate.
Element::GeometryType GeometryType
Definition: vms_adjoint_element.h:158
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Definition: vms_adjoint_element.h:687
~VMSAdjointElement() override
Definition: vms_adjoint_element.h:209
Element::DofsVectorType DofsVectorType
Definition: vms_adjoint_element.h:170
void CalculatePrimalGradientOfVMSSteadyTerm(BoundedMatrix< double, TFluidLocalSize, TFluidLocalSize > &rAdjointMatrix, const ProcessInfo &rCurrentProcessInfo) const
Calculates the elemental contribution to the steady adjoint system matrix.
Definition: vms_adjoint_element.h:1269
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Definition: vms_adjoint_element.h:703
void AddViscousTerm(BoundedMatrix< double, TFluidLocalSize, TFluidLocalSize > &rResult, const ShapeFunctionDerivativesType &rDN_DX, const double Weight) const
Adds viscous contributions to adjoint system matrix.
void CalculateDampingMatrix(MatrixType &rDampingMatrix, const ProcessInfo &rProcessInfo) override
Definition: vms_adjoint_element.h:623
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_adjoint_element.h:480
VMSAdjointElement(IndexType NewId=0)
Definition: vms_adjoint_element.h:189
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_adjoint_element.h:368
Element::NodesArrayType NodesArrayType
Definition: vms_adjoint_element.h:162
void AddShapeGradientOfVMSMassTerm(BoundedMatrix< double, TCoordLocalSize, TFluidLocalSize > &rOutputMatrix, const Variable< array_1d< double, 3 >> &rVariable, double alpha, const ProcessInfo &rCurrentProcessInfo) const
Adds shape gradient of the VMS mass matrix multiplied by a vector.
Definition: vms_adjoint_element.h:1114
Element::IndexType IndexType
Definition: vms_adjoint_element.h:154
Element::VectorType VectorType
Definition: vms_adjoint_element.h:164
void GetFirstDerivativesVector(VectorType &rValues, int Step=0) const override
Returns the adjoint velocity values stored in this element's nodes.
Definition: vms_adjoint_element.h:322
int Check(const ProcessInfo &rProcessInfo) const override
Checks for proper element geometry, nodal variables and dofs.
Definition: vms_adjoint_element.h:257
void AddMassStabTerms(MatrixType &rLHSMatrix, const double Density, const array_1d< double, TDim > &rAdvVel, const double TauOne, const array_1d< double, TNumNodes > &rShapeFunc, const BoundedMatrix< double, TNumNodes, TDim > &rShapeDeriv, const double Weight)
Definition: vms_adjoint_element.h:754
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: vms_adjoint_element.h:740
Element::Pointer Create(IndexType NewId, GeometryType::Pointer pGeom, PropertiesType::Pointer pProperties) const override
It creates a new element pointer.
Definition: vms_adjoint_element.h:239
std::string Info() const override
Turn back information as a string.
Definition: vms_adjoint_element.h:723
void CalculatePressureGradient(array_1d< double, TDim > &rGradP, const ShapeFunctionDerivativesType &rDN_DX) const
Returns the pressure gradient.
Definition: vms_adjoint_element.h:1752
VMSAdjointElement(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: vms_adjoint_element.h:194
void GetSecondDerivativesVector(VectorType &rValues, int Step=0) const override
Returns the adjoint acceleration values stored in this element's nodes.
Definition: vms_adjoint_element.h:340
VMSAdjointElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: vms_adjoint_element.h:201
void CalculateFirstDerivativesLHS(BoundedMatrix< double, TFluidLocalSize, TFluidLocalSize > &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo)
Definition: vms_adjoint_element.h:529
std::array< Dof< double >::Pointer, TFluidLocalSize > DofsArrayType
Definition: vms_adjoint_element.h:172
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(VMSAdjointElement)
Pointer definition.
std::array< std::size_t, TFluidLocalSize > EquationIdArrayType
Definition: vms_adjoint_element.h:176
void CalculateMassMatrix(MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_adjoint_element.h:568
void Calculate(const Variable< Vector > &rVariable, Vector &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_adjoint_element.h:654
Element::PropertiesType PropertiesType
Definition: vms_adjoint_element.h:160
void GetDofArray(DofsArrayType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
void EquationIdArray(EquationIdArrayType &rResult, const ProcessInfo &rProcessInfo) const
void AddViscousTermDerivative(BoundedMatrix< double, TFluidLocalSize, TFluidLocalSize > &rResult, const ShapeFunctionDerivativesType &rDN_DX, const ShapeFunctionDerivativesType &rDN_DX_Deriv, const double Weight, const double WeightDeriv) const
Adds derivative of viscous term w.r.t a node's coordinate.
std::array< double, TFluidLocalSize > ArrayType
Definition: vms_adjoint_element.h:166
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: vms_adjoint_element.h:731
void CalculateSecondDerivativesLHS(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
Calculates the adjoint matrix for acceleration.
Definition: vms_adjoint_element.h:550
void CalculateVMSMassMatrix(BoundedMatrix< double, TFluidLocalSize, TFluidLocalSize > &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) const
Calculate VMS-stabilized (lumped) mass matrix.
Definition: vms_adjoint_element.h:912
void AddIntegrationPointVelocityContribution(MatrixType &rDampingMatrix, VectorType &rDampRHS, const double Density, const double Viscosity, const array_1d< double, TDim > &rAdvVel, const array_1d< double, TDim > &rBodyForce, const double TauOne, const double TauTwo, const array_1d< double, TNumNodes > &rShapeFunc, const BoundedMatrix< double, TNumNodes, TDim > &rShapeDeriv, const double Weight)
Definition: vms_adjoint_element.h:796
void Initialize(const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_adjoint_element.h:216
void CalculateDeterminantOfJacobianDerivatives(array_1d< double, TCoordLocalSize > &rDetJDerivatives) const
Returns derivatives of determinant of Jacobian w.r.t coordinates.
void AuxiliaryCalculateSensitivityMatrix(const Variable< array_1d< double, 3 >> &rSensitivityVariable, BoundedMatrix< double, TCoordLocalSize, TFluidLocalSize > &rOutput, const ProcessInfo &rCurrentProcessInfo)
Definition: vms_adjoint_element.h:893
double CalculateElementSize(const double Volume) const
Returns the element's size.
void GetValuesVector(VectorType &rValues, int Step=0) const override
Returns the adjoint values stored in this element's nodes.
Definition: vms_adjoint_element.h:293
void CalculateSensitivityMatrix(const Variable< array_1d< double, 3 >> &rSensitivityVariable, Matrix &rOutput, const ProcessInfo &rCurrentProcessInfo) override
Calculates the sensitivity matrix.
Definition: vms_adjoint_element.h:642
void CalculateVelocityGradient(BoundedMatrix< double, TDim, TDim > &rGradVel, const ShapeFunctionDerivativesType &rDN_DX) const
Returns the gradient matrix of the velocity.
Definition: vms_adjoint_element.h:1722
Element::SizeType SizeType
Definition: vms_adjoint_element.h:156
Element::EquationIdVectorType EquationIdVectorType
Definition: vms_adjoint_element.h:174
void CalculateSecondDerivativesLHS(BoundedMatrix< double, TFluidLocalSize, TFluidLocalSize > &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo)
Definition: vms_adjoint_element.h:560
BoundedMatrix< double, TNumNodes, TDim > ShapeFunctionDerivativesType
Definition: vms_adjoint_element.h:179
void CalculateStabilizationParameters(double &rTauOne, double &rTauTwo, const double VelNorm, const double ElemSize, const double Density, const double Viscosity, const ProcessInfo &rCurrentProcessInfo) const
Returns the VMS stabilization parameters.
Definition: vms_adjoint_element.h:1802
void CalculateLocalVelocityContribution(MatrixType &rDampingMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_adjoint_element.h:417
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
Definition: vms_adjoint_element.h:491
const std::string & Name() const
Definition: variable_data.h:201
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
static void EvaluateInPoint(const GeometryType &rGeometry, const Vector &rShapeFunction, const int Step, const TRefVariableValuePairArgs &... rValueVariablePairs)
Evaluates given list of variable pairs at gauss point locations at step.
Definition: fluid_calculation_utilities.h:75
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_CHECK_DOF_IN_NODE(TheVariable, TheNode)
Definition: checks.h:176
#define KRATOS_CHECK_VARIABLE_IN_NODAL_DATA(TheVariable, TheNode)
Definition: checks.h:171
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
IndirectScalar< typename TVariableType::Type > MakeIndirectScalar(Node &rNode, const TVariableType &rVariable)
Definition: indirect_scalar.h:120
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
float velocity
Definition: PecletTest.py:54
list coeff
Definition: bombardelli_test.py:41
list values
Definition: bombardelli_test.py:42
def SetValue(entity, variable, value)
Definition: coupling_interface_data.py:256
float viscosity
Definition: edgebased_var.py:8
float density
Definition: face_heat.py:56
gauss_weight
Definition: generate_axisymmetric_navier_stokes_element.py:33
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
dofs
Enforced auxTangentSlipNonObjective = delta_time * gap_time_derivative_non_objective....
Definition: generate_frictional_mortar_condition.py:210
tuple tmp
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:98
def load(f)
Definition: ode_solve.py:307
int L
Definition: ode_solve.py:390
int d
Definition: ode_solve.py:397
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
int m
Definition: run_marine_rain_substepping.py:8
body_force
Definition: script_ELASTIC.py:102
N
Definition: sensitivityMatrix.py:29
K
Definition: sensitivityMatrix.py:73
integer i
Definition: TensorModule.f:17