10 #if !defined(KRATOS_RESIDUAL_BASED_ELIMINATION_QUASI_INCOMPRESSIBLE_BUILDER_AND_SOLVER )
11 #define KRATOS_RESIDUAL_BASED_ELIMINATION_QUASI_INCOMPRESSIBLE_BUILDER_AND_SOLVER
23 #include <pybind11/pybind11.h>
31 #include "utilities/geometry_utilities.h"
33 #include "boost/smart_ptr.hpp"
135 typename TLinearSolver::Pointer pNewLinearSystemSolver)
136 :
BuilderAndSolver< TSparseSpace,TDenseSpace,TLinearSolver >(pNewLinearSystemSolver)
156 typename TSchemeType::Pointer pScheme,
164 KRATOS_THROW_ERROR(std::runtime_error,
"For the quasi incompressible builder and solver this fct doesnt exist!",
"");
197 typename TSchemeType::Pointer pScheme,
207 for (
typename NodesArrayType::iterator it=r_model_part.
NodesBegin(); it!=r_model_part.
NodesEnd(); ++it)
209 if( (it->GetValue(NEIGHBOUR_NODES)).size() != 0 )
228 if constexpr (TDim==3)
313 unsigned int index = 0;
317 i_dof->SetEquationId(index) ;
342 if (
A.size1() == 0 || this->GetReshapeMatrixFlag() ==
true)
347 if(Dx.size() != this->mEquationSystemSize)
349 if(b.size() != this->mEquationSystemSize)
360 if(
mD.size1() != reduced_dim)
363 if(mMconsistent.size1() != reduced_dim)
373 typename TSchemeType::Pointer pScheme,
403 for (
typename ElementsArrayType::ptr_iterator it=pElements.ptr_begin(); it!=pElements.ptr_end(); ++it)
407 pScheme->CalculateSystemContributions(*it,LHS_Contribution,RHS_Contribution,EquationId,CurrentProcessInfo);
413 LHS_Contribution.resize(0,0,
false);
415 RHS_Contribution.resize(0,
false);
418 for (
typename ConditionsArrayType::ptr_iterator it=ConditionsArray.ptr_begin(); it!=ConditionsArray.ptr_end(); ++it)
421 pScheme->Condition_CalculateSystemContributions(*it,LHS_Contribution,RHS_Contribution,EquationId,CurrentProcessInfo);
429 std::vector< omp_lock_t > lock_array(
A.size1());
431 int A_size =
A.size1();
432 for (
int i = 0;
i < A_size;
i++)
433 omp_init_lock(&lock_array[
i]);
436 int number_of_threads = omp_get_max_threads();
438 vector<unsigned int> element_partition;
439 CreatePartition(number_of_threads, pElements.size(), element_partition);
444 double start_prod = omp_get_wtime();
446 #pragma omp parallel for
447 for (
int k = 0;
k < number_of_threads;
k++)
457 typename ElementsArrayType::ptr_iterator it_begin = pElements.ptr_begin() + element_partition[
k];
458 typename ElementsArrayType::ptr_iterator it_end = pElements.ptr_begin() + element_partition[
k + 1];
461 for (
typename ElementsArrayType::ptr_iterator it = it_begin; it != it_end; ++it)
465 pScheme->CalculateSystemContributions(*it, LHS_Contribution, RHS_Contribution, EquationId, CurrentProcessInfo);
468 Assemble(
A,
b, LHS_Contribution, RHS_Contribution, EquationId, lock_array);
488 vector<unsigned int> condition_partition;
489 CreatePartition(number_of_threads, ConditionsArray.size(), condition_partition);
491 #pragma omp parallel for
492 for (
int k = 0;
k < number_of_threads;
k++)
502 typename ConditionsArrayType::ptr_iterator it_begin = ConditionsArray.ptr_begin() + condition_partition[
k];
503 typename ConditionsArrayType::ptr_iterator it_end = ConditionsArray.ptr_begin() + condition_partition[
k + 1];
506 for (
typename ConditionsArrayType::ptr_iterator it = it_begin; it != it_end; ++it)
509 pScheme->Condition_CalculateSystemContributions(*it, LHS_Contribution, RHS_Contribution, EquationId, CurrentProcessInfo);
512 Assemble(
A,
b, LHS_Contribution, RHS_Contribution, EquationId, lock_array);
525 double stop_prod = omp_get_wtime();
526 std::cout <<
"time: " << stop_prod - start_prod << std::endl;
528 for (
int i = 0;
i < A_size;
i++)
529 omp_destroy_lock(&lock_array[
i]);
635 inline void CreatePartition(
unsigned int number_of_threads,
const int number_of_rows, vector<unsigned int>& partitions)
637 partitions.resize(number_of_threads + 1);
638 int partition_size = number_of_rows / number_of_threads;
640 partitions[number_of_threads] = number_of_rows;
641 for (
unsigned int i = 1;
i < number_of_threads;
i++)
642 partitions[
i] = partitions[
i - 1] + partition_size;
653 std::vector< omp_lock_t >& lock_array
656 unsigned int local_size = LHS_Contribution.size1();
658 for (
unsigned int i_local = 0; i_local <
local_size; i_local++)
660 unsigned int i_global = EquationId[i_local];
664 omp_set_lock(&lock_array[i_global]);
666 b[i_global] += RHS_Contribution(i_local);
667 for (
unsigned int j_local = 0; j_local <
local_size; j_local++)
669 unsigned int j_global = EquationId[j_local];
672 A(i_global, j_global) += LHS_Contribution(i_local, j_local);
676 omp_unset_lock(&lock_array[i_global]);
683 void AssembleRHS_parallel(
687 std::vector< omp_lock_t >& lock_array
690 unsigned int local_size = RHS_Contribution.size();
692 for (
unsigned int i_local = 0; i_local <
local_size; i_local++)
694 unsigned int i_global = EquationId[i_local];
698 omp_set_lock(&lock_array[i_global]);
700 b[i_global] += RHS_Contribution(i_local);
702 omp_unset_lock(&lock_array[i_global]);
718 unsigned int local_size = LHS_Contribution.size1();
720 for (
unsigned int i_local=0; i_local<
local_size; i_local++)
722 unsigned int i_global=EquationId[i_local];
725 for (
unsigned int j_local=0; j_local<
local_size; j_local++)
727 unsigned int j_global=EquationId[j_local];
729 A(i_global,j_global) += LHS_Contribution(i_local,j_local);
744 unsigned int local_size = RHS_Contribution.size();
746 for (
unsigned int i_local=0; i_local<
local_size; i_local++)
748 unsigned int i_global=EquationId[i_local];
752 b[i_global] += RHS_Contribution[i_local];
760 typename TSchemeType::Pointer pScheme,
767 TSparseSpace::SetToZero(
b);
770 for (
typename NodesArrayType::iterator node_iterator =r_model_part.
NodesBegin(); node_iterator !=r_model_part.
NodesEnd(); ++node_iterator)
772 node_iterator->FastGetSolutionStepValue(REACTION_X)=0.0;
773 node_iterator->FastGetSolutionStepValue(REACTION_Y)=0.0;
774 node_iterator->FastGetSolutionStepValue(REACTION_Z)=0.0;
806 if ( (*it2)->IsFixed() )
808 unsigned int eq_id=(*it2)->EquationId();
812 (*it2)->GetSolutionStepReactionValue() =
b[eq_id];
823 typename TSchemeType::Pointer pScheme,
850 for (
typename ElementsArrayType::ptr_iterator it=pElements.ptr_begin(); it!=pElements.ptr_end(); ++it)
853 pScheme->Calculate_RHS_Contribution(*it,RHS_Contribution,EquationId,CurrentProcessInfo);
859 LHS_Contribution.resize(0,0,
false);
860 RHS_Contribution.resize(0,
false);
863 for (
typename ConditionsArrayType::ptr_iterator it=ConditionsArray.ptr_begin(); it!=ConditionsArray.ptr_end(); ++it)
866 pScheme->Condition_Calculate_RHS_Contribution(*it,RHS_Contribution,EquationId,CurrentProcessInfo);
873 std::vector< omp_lock_t > lock_array(
b.size());
875 int b_size =
b.size();
876 for (
int i = 0;
i < b_size;
i++)
877 omp_init_lock(&lock_array[
i]);
880 int number_of_threads = omp_get_max_threads();
882 vector<unsigned int> element_partition;
883 CreatePartition(number_of_threads, pElements.size(), element_partition);
888 double start_prod = omp_get_wtime();
890 #pragma omp parallel for
891 for (
int k = 0;
k < number_of_threads;
k++)
900 typename ElementsArrayType::ptr_iterator it_begin = pElements.ptr_begin() + element_partition[
k];
901 typename ElementsArrayType::ptr_iterator it_end = pElements.ptr_begin() + element_partition[
k + 1];
904 for (
typename ElementsArrayType::ptr_iterator it = it_begin; it != it_end; ++it)
908 pScheme->Calculate_RHS_Contribution(*it,RHS_Contribution,EquationId,CurrentProcessInfo);
911 AssembleRHS_parallel(
b, RHS_Contribution, EquationId, lock_array);
931 vector<unsigned int> condition_partition;
932 CreatePartition(number_of_threads, ConditionsArray.size(), condition_partition);
934 #pragma omp parallel for
935 for (
int k = 0;
k < number_of_threads;
k++)
945 typename ConditionsArrayType::ptr_iterator it_begin = ConditionsArray.ptr_begin() + condition_partition[
k];
946 typename ConditionsArrayType::ptr_iterator it_end = ConditionsArray.ptr_begin() + condition_partition[
k + 1];
949 for (
typename ConditionsArrayType::ptr_iterator it = it_begin; it != it_end; ++it)
952 pScheme->Condition_Calculate_RHS_Contribution(*it,RHS_Contribution,EquationId,CurrentProcessInfo);
955 AssembleRHS_parallel(
b, RHS_Contribution, EquationId, lock_array);
968 double stop_prod = omp_get_wtime();
969 std::cout <<
"time: " << stop_prod - start_prod << std::endl;
971 for (
int i = 0;
i < b_size;
i++)
972 omp_destroy_lock(&lock_array[
i]);
990 std::vector<int> indices;
991 indices.reserve(1000);
995 for (
typename NodesArrayType::iterator node_iterator =r_model_part.
NodesBegin(); node_iterator !=r_model_part.
NodesEnd(); ++node_iterator)
999 if( (node_iterator->GetValue(NEIGHBOUR_NODES)).size() != 0 )
1002 total_nnz +=1+(node_iterator->GetValue(NEIGHBOUR_NODES)).size();
1007 A.reserve(total_nnz* TDim * TDim,
false);
1009 unsigned int row_index;
1012 unsigned int dof_position = r_model_part.
NodesBegin()->GetDofPosition(DISPLACEMENT_X);
1013 for (
typename NodesArrayType::iterator it=r_model_part.
NodesBegin(); it!=r_model_part.
NodesEnd(); ++it)
1016 if( neighb_nodes.
size() != 0 )
1019 row_index = it->GetDof(DISPLACEMENT_X,dof_position).EquationId();
1023 for(
unsigned int kk = 0; kk<TDim; kk++)
1030 i != neighb_nodes.
end();
i++)
1032 unsigned int tmp = (
i->GetDof(DISPLACEMENT_X,dof_position)).EquationId();
1033 for(
unsigned int kk = 0; kk<TDim; kk++)
1035 indices.push_back(
tmp + kk);
1038 std::sort(indices.begin(),indices.end());
1041 for(
unsigned int kk = 0; kk<TDim; kk++)
1043 for(
unsigned int j=0;
j<indices.size();
j++)
1045 A.push_back(row_index + kk,indices[
j] , 0.00);
1050 indices.erase(indices.begin(),indices.end());
1064 std::vector<int> indices;
1065 indices.reserve(1000);
1070 for (
typename NodesArrayType::iterator it=r_model_part.
NodesBegin(); it!=r_model_part.
NodesEnd(); ++it)
1073 if( (it->GetValue(NEIGHBOUR_NODES)).size() != 0 )
1076 total_nnz += 1+(it->GetValue(NEIGHBOUR_NODES)).size();
1080 Mconsistent.reserve(total_nnz,
false);
1082 unsigned int row_index;
1084 unsigned int dof_position = r_model_part.
NodesBegin()->GetDofPosition(DISPLACEMENT_X);
1086 for (
typename NodesArrayType::iterator it=r_model_part.
NodesBegin(); it!=r_model_part.
NodesEnd(); ++it)
1089 if( neighb_nodes.
size() != 0 )
1092 row_index = it->GetDof(DISPLACEMENT_X,dof_position).EquationId();
1107 i != neighb_nodes.
end();
i++)
1109 unsigned int tmp = (
i->GetDof(DISPLACEMENT_X,dof_position)).EquationId();
1110 indices.push_back(
tmp/TDim);
1113 std::sort(indices.begin(),indices.end());
1116 for(
unsigned int j=0;
j<indices.size();
j++)
1118 Mconsistent.push_back(row_index/TDim, indices[
j] , 0.00);
1122 indices.erase(indices.begin(),indices.end());
1137 std::vector<int> indices;
1138 indices.reserve(1000);
1142 for (
typename NodesContainerType::iterator it=r_model_part.
NodesBegin(); it!=r_model_part.
NodesEnd(); ++it)
1145 if( (it->GetValue(NEIGHBOUR_NODES)).size() != 0 )
1148 total_nnz += 1 + (it->GetValue(NEIGHBOUR_NODES)).size();
1152 mD.reserve(total_nnz* TDim,
false);
1154 unsigned int row_index;
1156 unsigned int dof_position = r_model_part.
NodesBegin()->GetDofPosition(DISPLACEMENT_X);
1158 for (
typename NodesArrayType::iterator it=r_model_part.
NodesBegin(); it!=r_model_part.
NodesEnd(); ++it)
1161 if( neighb_nodes.
size() != 0 )
1164 row_index = it->GetDof(DISPLACEMENT_X,dof_position).EquationId();
1168 for(
unsigned int kk = 0; kk<TDim; kk++)
1175 i != neighb_nodes.
end();
i++)
1177 unsigned int tmp = (
i->GetDof(DISPLACEMENT_X,dof_position)).EquationId();
1178 for(
unsigned int kk = 0; kk<TDim; kk++)
1180 indices.push_back(
tmp + kk);
1183 std::sort(indices.begin(),indices.end());
1187 for(
unsigned int j=0;
j<indices.size();
j++)
1189 mD.push_back(row_index/TDim, indices[
j] , 0.00);
1193 indices.erase(indices.begin(),indices.end());
1226 unsigned int dof_position = (r_model_part.
NodesBegin())->GetDofPosition(DISPLACEMENT_X);
1228 double aaa = 1.0/(TDim+1.0);
1230 for(ModelPart::ElementsContainerType::iterator
i = r_model_part.
ElementsBegin();
1237 unsigned int str_nr=0;
1240 for (
unsigned int k = 0;
k<geom.
size();
k++)
1242 str_nr+=(
unsigned int)(
i->GetGeometry()[
k].FastGetSolutionStepValue(IS_STRUCTURE));
1248 if (geom.
size()!=str_nr)
1256 for(
unsigned int ii = 0; ii<geom.
size(); ii++)
1258 local_indices[ii] = geom[ii].GetDof(DISPLACEMENT_X,dof_position).EquationId();
1265 for(
unsigned int row = 0;
row<TDim+1;
row++)
1267 unsigned int row_index = local_indices[
row] / (TDim);
1271 for(
unsigned int col = 0; col<TDim+1; col++)
1274 for(
unsigned int kkk = 0; kkk<TDim; kkk++)
1277 unsigned int col_index = local_indices[col]+kkk;
1281 mD(row_index,col_index) +=
temp * DN_DX(col,kkk);
1283 if (row_index==col_index)
1286 if constexpr (TDim==2)
1287 Mconsistent(row_index,col_index) += 0.25*
temp * 2.0;
1288 else if constexpr (TDim==3)
1289 Mconsistent(row_index,col_index) += 0.2*
temp * 2.0*2.5;
1294 if constexpr (TDim==2)
1295 Mconsistent(row_index,col_index) += 0.25*
temp ;
1296 else if constexpr (TDim==3)
1297 Mconsistent(row_index,col_index) += 0.2*
temp*0.0 ;
1312 std::vector< omp_lock_t > lock_array(
mD.size1());
1314 int D_size =
mD.size1();
1315 for (
int i = 0;
i < D_size;
i++)
1316 omp_init_lock(&lock_array[
i]);
1319 int number_of_threads = omp_get_max_threads();
1321 vector<unsigned int> element_partition;
1327 double start_prod = omp_get_wtime();
1331 #pragma omp parallel for
1332 for (
int k = 0;
k < number_of_threads;
k++)
1343 unsigned int dof_position = (r_model_part.
NodesBegin())->GetDofPosition(DISPLACEMENT_X);
1345 double aaa = 1.0/(TDim+1.0);
1351 typename ElementsArrayType::ptr_iterator it_begin = r_model_part.
Elements().
ptr_begin() + element_partition[
k];
1352 typename ElementsArrayType::ptr_iterator it_end = r_model_part.
Elements().
ptr_begin() + element_partition[
k + 1];
1357 for (
typename ElementsArrayType::ptr_iterator
i = it_begin;
i != it_end; ++
i)
1362 unsigned int str_nr=0;
1365 for (
unsigned int k = 0;
k<geom.
size();
k++)
1367 str_nr+=(
unsigned int)((*i)->GetGeometry()[
k].FastGetSolutionStepValue(IS_STRUCTURE));
1373 if (geom.
size()!=str_nr)
1381 for(
unsigned int ii = 0; ii<geom.
size(); ii++)
1383 local_indices[ii] = geom[ii].GetDof(DISPLACEMENT_X,dof_position).EquationId();
1390 for(
unsigned int row = 0;
row<TDim+1;
row++)
1392 unsigned int row_index = local_indices[
row] / (TDim);
1394 omp_set_lock(&lock_array[row_index]);
1398 for(
unsigned int col = 0; col<TDim+1; col++)
1400 unsigned int col_index = local_indices[col] /(TDim);
1401 if (row_index==col_index)
1404 if constexpr (TDim==2)
1405 Mconsistent(row_index,col_index) += 0.25*
temp * 2.0;
1406 else if constexpr (TDim==3)
1407 Mconsistent(row_index,col_index) += 0.2*
temp * 2.0;
1412 if constexpr (TDim==2)
1413 Mconsistent(row_index,col_index) += 0.25*
temp ;
1414 else if constexpr (TDim==3)
1415 Mconsistent(row_index,col_index) += 0.2*
temp ;
1419 for(
unsigned int kkk = 0; kkk<TDim; kkk++)
1422 unsigned int col_index = local_indices[col]+kkk;
1426 mD(row_index,col_index) +=
temp * DN_DX(col,kkk);
1432 omp_unset_lock(&lock_array[row_index]);
1440 double stop_prod = omp_get_wtime();
1441 std::cout <<
"time: " << stop_prod - start_prod << std::endl;
1443 for (
int i = 0;
i < D_size;
i++)
1444 omp_destroy_lock(&lock_array[
i]);
1681 unsigned int dof_position = (r_model_part.
NodesBegin())->GetDofPosition(DISPLACEMENT_X);
1683 double aaa = 1.0/(TDim+1.0);
1685 for(ModelPart::ElementsContainerType::iterator
i = r_model_part.
ElementsBegin();
1691 unsigned int str_nr=0;
1693 for (
unsigned int k = 0;
k<geom.
size();
k++)
1695 str_nr+=
int(
i->GetGeometry()[
k].FastGetSolutionStepValue(IS_STRUCTURE));
1698 if (geom.
size()!=str_nr)
1707 for(
unsigned int ii = 0; ii<geom.
size(); ii++)
1709 local_indices[ii] = geom[ii].GetDof(DISPLACEMENT_X,dof_position).EquationId();
1713 for(
unsigned int row = 0;
row<TDim+1;
row++)
1715 unsigned int row_index = local_indices[
row] / (TDim);
1745 for(ModelPart::ElementsContainerType::iterator
i = r_model_part.
ElementsBegin();
1750 unsigned int str_nr=0;
1751 for (
unsigned int k = 0;
k<
i->GetGeometry().size();
k++)
1753 str_nr+=(
unsigned int)(
i->GetGeometry()[
k].FastGetSolutionStepValue(IS_STRUCTURE));
1756 if (geom.
size()!=str_nr)
1766 for(
unsigned int ii = 0; ii<geom.
size(); ii++)
1768 local_indices[ii] = geom[ii].GetDof(DISPLACEMENT_X,dof_position).EquationId();
1785 for(
unsigned int row = 0;
row<TDim+1;
row++)
1787 unsigned int row_index = local_indices[
row] / (TDim);
1788 for(
unsigned int col = 0; col<TDim+1; col++)
1790 unsigned int col_index = local_indices[col] /(TDim);
1791 if (row_index==col_index)
1794 if constexpr (TDim==2)
1795 Mconsistent(row_index,col_index) += 0.25*
temp * 2.0;
1796 else if constexpr (TDim==3)
1797 Mconsistent(row_index,col_index) += 0.2*
temp * 2.0;
1803 if constexpr (TDim==2)
1804 Mconsistent(row_index,col_index) += 0.25*
temp ;
1805 else if constexpr (TDim==3)
1806 Mconsistent(row_index,col_index) += 0.2*
temp;
1830 if ( precond.size()!=vec.size() )
1832 if ( precond.size()!=result.size() )
1834 TSparseSpace::SetToZero(result);
1839 #pragma omp parallel for
1840 for (
int i=0; i<static_cast<int>(precond.size());
i++)
1842 result[
i]=precond[
i]*vec[
i];
1860 TSparseSpace::SetToZero(WorkArray);
1869 #pragma omp parallel for
1870 for(
int i=0; i<static_cast<int>(WorkArray.size());
i++)
1872 WorkArray[
i] *= Minv[
i];
1894 if ( Dx.size()!=xi.size() )
1912 typedef unsigned int size_type;
1913 typedef double value_type;
1917 TSparseSpace::SetToZero(preconditioner);
1921 if ( preconditioner.size()!=
A.size1() )
1925 for(
unsigned int i = 0;
i<
A.size1();
i++)
1927 preconditioner[
i] =
A(
i,
i);
1936 for (size_type
k = 0;
k < D.size1 (); ++
k)
1938 size_type begin = D.index1_data () [
k];
1939 size_type
end = D.index1_data () [
k + 1];
1942 for (size_type
i = begin;
i <
end; ++
i)
1944 unsigned int index_i = D.index2_data () [
i];
1945 value_type data_i = D.value_data()[
i];
1946 preconditioner[index_i] += Minv[
k]*data_i*data_i;
1953 for(
unsigned int i = 0;
i<
A.size1();
i++)
1958 if (fabs(preconditioner[
i])>1
e-26)
1960 preconditioner[
i] = 1.00/preconditioner[
i];
1962 preconditioner[
i] = 1000000000000000000.0;
1964 if (preconditioner[
i]<0.0)
1965 preconditioner[
i]*=-10000000000000000000.0;
1991 if (iter_number>max_iter_number)
1992 KRATOS_THROW_ERROR(std::logic_error,
"MAX NUMBER OF ITERATIONS EXCEEDED, UR CG DIDNT CONVERGE",
"")
2002 return( (ratio) < tolerance);
2014 double large_number = 1e20;
2017 if(i_dof->IsFixed() ==
true)
2019 unsigned int eq_id = i_dof->EquationId();
2021 A(eq_id,eq_id) += large_number;
2033 unsigned int dof_position = (r_model_part.
NodesBegin())->GetDofPosition(DISPLACEMENT_X);
2039 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2041 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0)
2043 i=in->GetDof(DISPLACEMENT_X,dof_position).EquationId()/TDim;
2044 p[
i]=in->FastGetSolutionStepValue(PRESSURE);
2052 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2054 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0)
2058 in->FastGetSolutionStepValue(FORCE_X)=f_p[in->GetDof(DISPLACEMENT_X,dof_position).EquationId()];
2059 in->FastGetSolutionStepValue(FORCE_Y)=f_p[in->GetDof(DISPLACEMENT_Y,dof_position).EquationId()];
2060 in->FastGetSolutionStepValue(FORCE_Z)=f_p[in->GetDof(DISPLACEMENT_Z,dof_position).EquationId()];
2070 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2072 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0)
2074 if (in->FastGetSolutionStepValue(IS_FLUID)==1.0 && in->FastGetSolutionStepValue(IS_FREE_SURFACE)==1.0)
2077 in->FastGetSolutionStepValue(PRESSURE)=
bulk_modulus*
density*(in->FastGetSolutionStepValue(NODAL_AREA) - in->FastGetSolutionStepValue(NODAL_AREA,1))/(in->FastGetSolutionStepValue(NODAL_AREA));
2104 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
2106 pres=it->FastGetSolutionStepValue(PRESSURE);
2107 it->FastGetSolutionStepValue(PRESSURE_OLD_IT)=pres;
2123 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
2125 it->FastGetSolutionStepValue(VAUX)=
ZeroVector(3);
2144 pres_inc[0] = geom[0].FastGetSolutionStepValue(PRESSURE_OLD_IT)-geom[0].FastGetSolutionStepValue(PRESSURE);
2145 pres_inc[1] = geom[1].FastGetSolutionStepValue(PRESSURE_OLD_IT)-geom[1].FastGetSolutionStepValue(PRESSURE);
2146 pres_inc[2] = geom[2].FastGetSolutionStepValue(PRESSURE_OLD_IT)-geom[2].FastGetSolutionStepValue(PRESSURE);
2158 for (
int ii = 0; ii< 3; ii++)
2176 geom[0].FastGetSolutionStepValue(VAUX) += aux;
2183 geom[1].FastGetSolutionStepValue(VAUX) += aux;
2188 geom[2].FastGetSolutionStepValue(VAUX) += aux;
2193 double coef=0.25*(1.0-alpha_bossak);
2198 for (
typename ModelPart::NodesContainerType::iterator it=
model_part.NodesBegin(); it!=
model_part.NodesEnd(); ++it)
2200 if( (it->GetValue(NEIGHBOUR_NODES)).size() != 0)
2203 if (it->FastGetSolutionStepValue(NODAL_MASS)>0.0000000001)
2207 double dt_sq_Minv =coef*
dt*
dt / it->FastGetSolutionStepValue(NODAL_MASS);
2211 if(!it->IsFixed(DISPLACEMENT_X))
2213 it->FastGetSolutionStepValue(DISPLACEMENT_X)+=dt_sq_Minv*
temp[0];
2215 if(!it->IsFixed(DISPLACEMENT_Y))
2217 it->FastGetSolutionStepValue(DISPLACEMENT_Y)+=dt_sq_Minv*
temp[1];
2231 double beta_newmark = 0.25*pow((1.00-alpha_bossak),2);
2233 double gamma_newmark = 0.5-alpha_bossak;
2243 double ma0=1.0/(beta_newmark*pow(
dt,2));
2244 double ma1=gamma_newmark/(beta_newmark*
dt);
2245 double ma2=1.0/(beta_newmark*
dt);
2246 double ma3=(1.0/(2.0*beta_newmark))-1.0;
2247 double ma4=(gamma_newmark/beta_newmark)-1.0;
2248 double ma5=
dt*0.5*((gamma_newmark/beta_newmark)-2.0);
2252 noalias(DeltaDisp) = (
i)->FastGetSolutionStepValue(DISPLACEMENT) - (
i)->FastGetSolutionStepValue(DISPLACEMENT,1);
2259 UpdateVelocity(CurrentVelocity,DeltaDisp,OldVelocity,OldAcceleration, ma1, ma4, ma5);
2260 UpdateAcceleration(CurrentAcceleration,DeltaDisp,OldVelocity,OldAcceleration, ma0, ma2, ma3);
2269 noalias(CurrentVelocity) = ma1*DeltaDisp - ma4*OldVelocity - ma5*OldAcceleration;
2276 noalias(CurrentAcceleration) = ma0*DeltaDisp - ma2*OldVelocity - ma3*OldAcceleration;
2283 unsigned int dof_position = (r_model_part.
NodesBegin())->GetDofPosition(DISPLACEMENT_X);
2288 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2290 in->FastGetSolutionStepValue(PRESSURE)=0.0;
2302 TSparseSpace::SetToZero(p_n);
2303 TSparseSpace::SetToZero(history);
2313 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2315 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0 )
2317 i=in->GetDof(DISPLACEMENT_X,dof_position).EquationId()/TDim;
2318 p_n[
i]=in->FastGetSolutionStepValue(PRESSURE,1);
2332 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2334 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0)
2336 aa=in->GetDof(DISPLACEMENT_X,dof_position).EquationId()/TDim;
2337 if (in->FastGetSolutionStepValue(IS_FLUID)==1.0)
2340 in->FastGetSolutionStepValue(PRESSURE)=(
mMdiagInv[aa]*history[aa])+
bulk_modulus*
density*(in->FastGetSolutionStepValue(NODAL_AREA) - in->FastGetSolutionStepValue(NODAL_AREA,1))/(in->FastGetSolutionStepValue(NODAL_AREA));
2375 TSparseSpace::SetToZero(p_n);
2376 TSparseSpace::SetToZero(dp);
2377 TSparseSpace::SetToZero(p_n1);
2378 TSparseSpace::SetToZero(history);
2531 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2533 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0 )
2537 p_n[
i]=in->FastGetSolutionStepValue(PRESSURE,1);
2558 displ[i_dof->EquationId()]=i_dof->GetSolutionStepValue()-i_dof->GetSolutionStepValue(1);
2577 for (
int ii=0; ii<size; ii++)
2580 p_n1[ii]=
mMdiagInv[ii]*(history[ii]+dp[ii]);
2592 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2594 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0 )
2596 in->FastGetSolutionStepValue(PRESSURE)=0.0;
2601 for (
typename NodesArrayType::iterator in=r_model_part.
NodesBegin(); in!=r_model_part.
NodesEnd(); ++in)
2603 if( (in->GetValue(NEIGHBOUR_NODES)).size() != 0 )
2607 in->FastGetSolutionStepValue(PRESSURE)=p_n1[aa];
Current class provides an implementation for the base builder and solving operations.
Definition: builder_and_solver.h:64
bool mDofSetIsInitialized
If the matrix is reshaped each step.
Definition: builder_and_solver.h:743
TSparseSpace::VectorType TSystemVectorType
Definition of the vector size.
Definition: builder_and_solver.h:85
ModelPart::NodesContainerType NodesArrayType
The containers of the entities.
Definition: builder_and_solver.h:109
TSparseSpace::MatrixType TSystemMatrixType
Definition of the sparse matrix.
Definition: builder_and_solver.h:82
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: builder_and_solver.h:111
TSystemVectorPointerType mpReactionsVector
Definition: builder_and_solver.h:751
TDenseSpace::MatrixType LocalSystemMatrixType
The local matrix definition.
Definition: builder_and_solver.h:94
TSparseSpace::VectorPointerType TSystemVectorPointerType
Definition of the pointer to the vector.
Definition: builder_and_solver.h:91
TSparseSpace::DataType TDataType
Definition of the data type.
Definition: builder_and_solver.h:79
DofsArrayType mDofSet
Pointer to the linear solver.
Definition: builder_and_solver.h:739
TDenseSpace::VectorType LocalSystemVectorType
The local vector definition.
Definition: builder_and_solver.h:97
TSparseSpace::MatrixPointerType TSystemMatrixPointerType
Definition of the pointer to the sparse matrix.
Definition: builder_and_solver.h:88
unsigned int mEquationSystemSize
Flag taking in account if it is needed or not to calculate the reactions.
Definition: builder_and_solver.h:747
ModelPart::ElementsContainerType ElementsArrayType
Definition: builder_and_solver.h:110
std::vector< std::size_t > EquationIdVectorType
Definition: condition.h:98
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
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
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
void push_back(TPointerType x)
Definition: global_pointers_vector.h:322
iterator begin()
Definition: global_pointers_vector.h:221
size_type size() const
Definition: global_pointers_vector.h:307
iterator end()
Definition: global_pointers_vector.h:229
Definition: amatrix_interface.h:41
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
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
ptr_iterator ptr_end()
Returns an iterator pointing to the end of the underlying data container.
Definition: pointer_vector_set.h:404
void clear()
Clear the set, removing all elements.
Definition: pointer_vector_set.h:663
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
ptr_iterator ptr_begin()
Returns an iterator pointing to the beginning of the underlying data container.
Definition: pointer_vector_set.h:386
size_type size() const
Returns the number of elements in the container.
Definition: pointer_vector_set.h:502
void push_back(TPointerType x)
Adds a pointer to the end of the set.
Definition: pointer_vector_set.h:544
void reserve(int reservedsize)
Reserves memory for a specified number of elements.
Definition: pointer_vector_set.h:733
iterator end()
Returns an iterator pointing to the end of the container.
Definition: pointer_vector_set.h:314
typename TContainerType::iterator ptr_iterator
Definition: pointer_vector_set.h:104
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:96
void CalculatePreconditionerDiagonalMatrix(const TSystemMatrixType &D, const TSystemVectorType &Minv, const TSystemMatrixType &A, TSystemVectorType &preconditioner)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1905
TSystemVectorType mMdiagInv
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:614
BaseType::NodesArrayType NodesArrayType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:121
void BuildAndSolve(typename TSchemeType::Pointer pScheme, ModelPart &r_model_part, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
Function to perform the building and solving phase at the same time.
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:155
void BuildRHS(typename TSchemeType::Pointer pScheme, ModelPart &r_model_part, TSystemVectorType &b)
Function to perform the build of the RHS. The vector could be sized as the total number of dofs or as...
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:822
void ReturnDx(TSystemVectorType &Dx, TSystemVectorType &xi)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1889
BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:116
BaseType::TSchemeType TSchemeType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:104
void FractionalStepProjection(ModelPart &model_part, double alpha_bossak)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2112
void CalculateNodalPressureForce(TSystemMatrixType &mD, TSystemVectorType &mMdiagInv, ModelPart &r_model_part)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2028
void UpdateAfterProjection(ModelPart &model_part, double alpha_bossak)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2225
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:102
BaseType::ElementsContainerType ElementsContainerType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:125
void Build(typename TSchemeType::Pointer pScheme, ModelPart &r_model_part, TSystemMatrixType &A, TSystemVectorType &b)
equivalent (but generally faster) then performing BuildLHS and BuildRHS
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:372
void InitializeSolutionStep(ModelPart &r_model_part, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
It applies certain operations at the system of equations at the beginning of the solution step.
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:169
BaseType::TDataType TDataType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:105
~ResidualBasedEliminationQuasiIncompressibleBuilderAndSolver() override
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:143
KRATOS_CLASS_POINTER_DEFINITION(ResidualBasedEliminationQuasiIncompressibleBuilderAndSolver)
void ComputePressureAtFreeSurface(ModelPart &r_model_part, double bulk_modulus, double density)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2068
TSystemMatrixType mD
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:612
void CreatePartition(unsigned int number_of_threads, const int number_of_rows, vector< unsigned int > &partitions)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:635
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:115
void UpdateVelocity(array_1d< double, 3 > &CurrentVelocity, const array_1d< double, 3 > &DeltaDisp, const array_1d< double, 3 > &OldVelocity, const array_1d< double, 3 > &OldAcceleration, double &ma1, double &ma4, double &ma5)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2265
void UpdatePressuresNew(TSystemMatrixType &mMconsistent, TSystemVectorType &mMdiagInv, ModelPart &r_model_part, double bulk_modulus, double density)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2279
BaseType::ElementsArrayType ElementsArrayType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:122
void AssembleRHS(TSystemVectorType &b, LocalSystemVectorType &RHS_Contribution, Element::EquationIdVectorType &EquationId)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:738
TSystemMatrixType mMconsistent
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:613
bool ConvergenceCheck(TSystemVectorType &residual, TSystemVectorType &b, const double &tolerance, const int &iter_number, const int &max_iter_number)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1985
BaseType::NodesArrayType NodesContainerType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:119
BaseType::TSystemMatrixType TSystemMatrixType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:109
void AssembleLHS(TSystemMatrixType &A, LocalSystemMatrixType &LHS_Contribution, Element::EquationIdVectorType &EquationId)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:712
void CalculateReactions(typename TSchemeType::Pointer pScheme, ModelPart &r_model_part, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
It computes the reactions of the system.
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:759
BaseType::DofsArrayType DofsArrayType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:107
void calc_GMinvD_prod(TSystemMatrixType &mD, TSystemVectorType &Minv, TSystemVectorType &x, TSystemVectorType &WorkArray, TSystemVectorType &destination)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1848
unsigned int mnumber_of_active_nodes
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:616
void SetUpSystem(ModelPart &r_model_part)
It organises the dofset in order to speed up the building phase.
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:306
void calc_prod_precond_vec(TSystemVectorType &vec, TSystemVectorType &precond, TSystemVectorType &result)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1824
void ConstructMatrixStructure(TSystemMatrixType &A, ModelPart &r_model_part)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:984
void SetUpDofSet(typename TSchemeType::Pointer pScheme, ModelPart &r_model_part)
Builds the list of the DofSets involved in the problem by "asking" to each element and condition its ...
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:196
void UpdatePressures(TSystemMatrixType &mD, TSystemMatrixType &mMconsistent, TSystemVectorType &mMdiagInv, ModelPart &r_model_part, double bulk_modulus, double density)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2353
void SavePressureIteration(ModelPart &model_part)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2100
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:113
void ConstructMatrixStructure_Mconsistent(TSystemMatrixType &Mconsistent, ModelPart &r_model_part)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1059
GlobalPointersVector< Node > mActiveNodes
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:617
void ConstructMatrixStructure_DivergenceMatrixD(TSystemMatrixType &mD, ModelPart &r_model_part)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1132
void FinalizeSolutionStep(ModelPart &r_model_part, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b)
It applies certain operations at the system of equations at the end of the solution step.
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:180
void UpdateAcceleration(array_1d< double, 3 > &CurrentAcceleration, const array_1d< double, 3 > &DeltaDisp, const array_1d< double, 3 > &OldVelocity, const array_1d< double, 3 > &OldAcceleration, double &ma0, double &ma2, double &ma3)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2272
BaseType::ConditionsArrayType ConditionsArrayType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:123
BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:117
void AssembleMassMatrices(TSystemMatrixType &Mconsistent, TSystemVectorType &mMdiagInv, ModelPart &r_model_part)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1669
TSystemVectorType mpreconditioner
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:615
ResidualBasedEliminationQuasiIncompressibleBuilderAndSolver(typename TLinearSolver::Pointer pNewLinearSystemSolver)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:134
BaseType::TSystemVectorType TSystemVectorType
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:111
void ModifyForDirichlet(TSystemMatrixType &A, TSystemVectorType &b)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:2010
void BuildAuxiliaries(TSystemMatrixType &mD, TSystemMatrixType &Mconsistent, TSystemVectorType &mMdiagInv, ModelPart &r_model_part)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:1205
void ResizeAndInitializeVectors(typename TSchemeType::Pointer pScheme, TSystemMatrixType &A, TSystemMatrixType &mD, TSystemVectorType &Dx, TSystemVectorType &b, TSystemMatrixType &mMconsistent, TSystemVectorType &mMdiagInv, ModelPart &rModelPart)
Definition: residualbased_elimination_quasiincompresible_builder_and_solver.h:328
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
dt
Definition: DEM_benchmarks.py:173
end
Definition: DEM_benchmarks.py:180
im
Definition: GenerateCN.py:100
void TransposeMult(SparseSpaceType &dummy, SparseSpaceType::MatrixType &rA, SparseSpaceType::VectorType &rX, SparseSpaceType::VectorType &rY)
Definition: add_strategies_to_python.cpp:104
double TwoNorm(SparseSpaceType &dummy, SparseSpaceType::VectorType &x)
Definition: add_strategies_to_python.cpp:164
TSpaceType::IndexType Size(TSpaceType &dummy, typename TSpaceType::VectorType const &rV)
Definition: add_strategies_to_python.cpp:111
void Mult(TSpaceType &dummy, typename TSpaceType::MatrixType &rA, typename TSpaceType::VectorType &rX, typename TSpaceType::VectorType &rY)
Definition: add_strategies_to_python.cpp:98
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
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
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::MatrixRow< const TExpressionType > row(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t RowIndex)
Definition: amatrix_interface.h:649
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
AMatrix::MatrixColumn< const TExpressionType > column(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t ColumnIndex)
Definition: amatrix_interface.h:637
model_part
Definition: face_heat.py:14
float density
Definition: face_heat.py:56
int local_size
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:17
tuple tmp
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:98
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
residual
Definition: hinsberg_optimization_4.py:433
float aux2
Definition: isotropic_damage_automatic_differentiation.py:240
float aux1
Definition: isotropic_damage_automatic_differentiation.py:239
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
float temp
Definition: rotating_cone.py:85
bulk_modulus
Definition: script.py:97
A
Definition: sensitivityMatrix.py:70
p
Definition: sensitivityMatrix.py:52
N
Definition: sensitivityMatrix.py:29
x
Definition: sensitivityMatrix.py:49
volume
Definition: sp_statistics.py:15
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31