14 #if !defined(KRATOS_ROM_BUILDER_AND_SOLVER)
15 #define KRATOS_ROM_BUILDER_AND_SOLVER
20 #include "concurrentqueue/concurrentqueue.h"
60 template <
class TSparseSpace,
class TDenseSpace,
class TLinearSolver>
112 typedef moodycamel::ConcurrentQueue<DofType::Pointer>
DofQueue;
119 typename TLinearSolver::Pointer pNewLinearSystemSolver,
129 typename TLinearSolver::Pointer pNewLinearSystemSolver)
130 :
BuilderAndSolver<TSparseSpace, TDenseSpace, TLinearSolver>(pNewLinearSystemSolver)
146 typename TLinearSolver::Pointer pNewLinearSystemSolver,
149 return Kratos::make_shared<ClassType>(pNewLinearSystemSolver,ThisParameters);
153 typename TSchemeType::Pointer pScheme,
189 <<
"Reaction variable not set for the following :\n"
190 <<
"Node : " << r_dof.Id() <<
'\n'
191 <<
"Dof : " << r_dof <<
'\n'
192 <<
"Not possible to calculate reactions." << std::endl;
200 typename TSchemeType::Pointer pScheme,
206 TSparseSpace::SetToZero(rb);
225 auto dof_iterator = r_dof_set.begin() +
Index;
226 dof_iterator->SetEquationId(
Index);
251 return mNumberOfRomModes;
262 const auto& r_node = rModelPart.
GetNode(r_dof.
Id());
263 const Matrix& r_rom_nodal_basis = r_node.GetValue(ROM_BASIS);
285 typename TSchemeType::Pointer pScheme,
296 BuildROM(pScheme, rModelPart, Arom, brom);
297 SolveROM(rModelPart, Arom, brom, Dx);
303 typename TSchemeType::Pointer pScheme,
342 "name" : "rom_builder_and_solver",
343 "nodal_unknowns" : [],
344 "number_of_rom_dofs" : 10,
345 "rom_bns_settings" : {}
349 return default_parameters;
354 return "rom_builder_and_solver";
372 virtual std::string
Info()
const override
374 return "ROMBuilderAndSolver";
378 virtual void PrintInfo(std::ostream &rOStream)
const override
384 virtual void PrintData(std::ostream &rOStream)
const override
406 std::unordered_map<Kratos::VariableData::KeyType, Matrix::size_type>
mMapPhi;
428 if(!r_elements.empty())
437 double& r_bi = rb[
dofs[
i]->EquationId()];
444 if(!r_conditions.empty())
452 double& r_bi = rb[
dofs[
i]->EquationId()];
472 mNumberOfRomModes = ThisParameters[
"number_of_rom_dofs"].
GetInt();
476 for (
const auto& r_var_name : ThisParameters[
"nodal_unknowns"].GetStringArray()) {
481 KRATOS_ERROR <<
"Variable \""<< r_var_name <<
"\" not valid" << std::endl;
491 using ElementQueue = moodycamel::ConcurrentQueue<Element::Pointer>;
492 using ConditionQueue = moodycamel::ConcurrentQueue<Condition::Pointer>;
495 ElementQueue element_queue;
497 [&](Element::Pointer p_element)
499 if (p_element->Has(HROM_WEIGHT)) {
500 element_queue.enqueue(std::move(p_element));
502 p_element->SetValue(HROM_WEIGHT, 1.0);
507 ConditionQueue condition_queue;
509 [&](Condition::Pointer p_condition)
511 if (p_condition->Has(HROM_WEIGHT)) {
512 condition_queue.enqueue(std::move(p_condition));
514 p_condition->SetValue(HROM_WEIGHT, 1.0);
520 mSelectedElements.reserve(element_queue.size_approx());
521 Element::Pointer p_element;
522 while ( (err_id = element_queue.try_dequeue(p_element)) != 0) {
523 mSelectedElements.push_back(std::move(p_element));
527 mSelectedConditions.reserve(condition_queue.size_approx());
528 Condition::Pointer p_condition;
529 while ( (err_id = condition_queue.try_dequeue(p_condition)) != 0) {
530 mSelectedConditions.push_back(std::move(p_condition));
534 mHromSimulation = !(mSelectedElements.empty() && mSelectedConditions.empty());
535 mHromWeightsInitialized =
true;
541 typename TSchemeType::Pointer pScheme,
550 for(
auto& p_dof: r_dof_list) {
551 r_queue.enqueue(std::move(p_dof));
561 pScheme->GetDofList(r_element, r_dof_list, rModelPart.GetProcessInfo());
562 enqueue_bulk_move(dof_queue, r_dof_list);
569 pScheme->GetDofList(r_condition, r_dof_list, rModelPart.GetProcessInfo());
570 enqueue_bulk_move(dof_queue, r_dof_list);
574 std::pair<DofsVectorType, DofsVectorType> tls_ms_dof_lists;
576 [&](
const MasterSlaveConstraint& r_constraint, std::pair<DofsVectorType, DofsVectorType>& r_dof_lists)
578 r_constraint.GetDofList(r_dof_lists.first, r_dof_lists.second, rModelPart.GetProcessInfo());
580 enqueue_bulk_move(dof_queue, r_dof_lists.first);
581 enqueue_bulk_move(dof_queue, r_dof_lists.second);
594 dof_array.
reserve(rDofQueue.size_approx());
597 while ( (err_id = rDofQueue.try_dequeue(p_dof)) != 0) {
598 dof_array.push_back(std::move(p_dof));
640 bool mInitialized =
false;
644 mValue = first_value;
667 const std::lock_guard<LockObject> scope_lock(ParallelUtilities::GetGlobalLock());
668 LocalReduce(rOther.
mValue);
675 template<
typename TMatrix>
678 if(
mat.size1() != rows ||
mat.size2() != cols) {
679 mat.resize(rows, cols,
false);
687 typename TSchemeType::Pointer pScheme,
695 rA =
ZeroMatrix(GetNumberOfROMModes(), GetNumberOfROMModes());
709 AssemblyTLS assembly_tls_container(GetNumberOfROMModes());
711 auto& elements = mHromSimulation ? mSelectedElements : rModelPart.
Elements();
712 if(!elements.empty())
715 block_for_each<SystemSumReducer>(elements, assembly_tls_container,
718 return CalculateLocalContribution(r_element, r_thread_prealloc, *pScheme, r_current_process_info);
722 auto& conditions = mHromSimulation ? mSelectedConditions : rModelPart.
Conditions();
723 if(!conditions.empty())
728 std::tie(Aconditions, bconditions) =
729 block_for_each<SystemSumReducer>(conditions, assembly_tls_container,
732 return CalculateLocalContribution(r_condition, r_thread_prealloc, *pScheme, r_current_process_info);
739 KRATOS_INFO_IF(
"ROMBuilderAndSolver", (this->GetEchoLevel() > 0)) <<
"Build time: " << assembling_timer.ElapsedSeconds() << std::endl;
740 KRATOS_INFO_IF(
"ROMBuilderAndSolver", (this->GetEchoLevel() > 2)) <<
"Finished parallel building" << std::endl;
761 KRATOS_INFO_IF(
"ROMBuilderAndSolver", (this->GetEchoLevel() > 0)) <<
"Solve reduced system time: " << solving_timer.ElapsedSeconds() << std::endl;
765 noalias(r_root_mp.GetValue(ROM_SOLUTION_INCREMENT)) += dxrom;
769 ProjectToFineBasis(dxrom, rModelPart, rDx);
770 KRATOS_INFO_IF(
"ROMBuilderAndSolver", (this->GetEchoLevel() > 0)) <<
"Project to fine basis time: " << backward_projection_timer.ElapsedSeconds() << std::endl;
800 template<
typename TEntity>
801 std::tuple<LocalSystemMatrixType, LocalSystemVectorType> CalculateLocalContribution(
803 AssemblyTLS& rPreAlloc,
804 TSchemeType& rScheme,
807 if (rEntity.IsDefined(ACTIVE) && rEntity.IsNot(ACTIVE))
809 rPreAlloc.romA =
ZeroMatrix(GetNumberOfROMModes(), GetNumberOfROMModes());
810 rPreAlloc.romB =
ZeroVector(GetNumberOfROMModes());
811 return std::tie(rPreAlloc.romA, rPreAlloc.romB);
815 rScheme.CalculateSystemContributions(rEntity, rPreAlloc.lhs, rPreAlloc.rhs, rPreAlloc.eq_id, rCurrentProcessInfo);
816 rEntity.GetDofList(rPreAlloc.dofs, rCurrentProcessInfo);
818 const SizeType ndofs = rPreAlloc.dofs.size();
819 ResizeIfNeeded(rPreAlloc.phiE, ndofs, GetNumberOfROMModes());
820 ResizeIfNeeded(rPreAlloc.aux, ndofs, GetNumberOfROMModes());
822 const auto &r_geom = rEntity.GetGeometry();
823 RomAuxiliaryUtilities::GetPhiElemental(rPreAlloc.phiE, rPreAlloc.dofs, r_geom, mMapPhi);
825 const double h_rom_weight = mHromSimulation ? rEntity.GetValue(HROM_WEIGHT) : 1.0;
827 noalias(rPreAlloc.aux) =
prod(rPreAlloc.lhs, rPreAlloc.phiE);
828 noalias(rPreAlloc.romA) =
prod(
trans(rPreAlloc.phiE), rPreAlloc.aux) * h_rom_weight;
829 noalias(rPreAlloc.romB) =
prod(
trans(rPreAlloc.phiE), rPreAlloc.rhs) * h_rom_weight;
831 return std::tie(rPreAlloc.romA, rPreAlloc.romB);
Current class provides an implementation for the base builder and solving operations.
Definition: builder_and_solver.h:64
std::size_t IndexType
Definition of the index type.
Definition: builder_and_solver.h:76
TSparseSpace::VectorType TSystemVectorType
Definition of the vector size.
Definition: builder_and_solver.h:85
virtual void InitializeSolutionStep(ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb)
It applies certain operations at the system of equations at the beginning of the solution step.
Definition: builder_and_solver.h:553
bool GetCalculateReactionsFlag() const
This method returns the flag mCalculateReactionsFlag.
Definition: builder_and_solver.h:184
TSparseSpace::MatrixType TSystemMatrixType
Definition of the sparse matrix.
Definition: builder_and_solver.h:82
ModelPart::ConditionsContainerType ConditionsArrayType
Definition: builder_and_solver.h:111
virtual void AssignSettings(const Parameters ThisParameters)
This method assigns settings to member variables.
Definition: builder_and_solver.h:780
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: builder_and_solver.h:767
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
void SetDofSetIsInitializedFlag(bool DofSetIsInitialized)
This method sets the flag mDofSetIsInitialized.
Definition: builder_and_solver.h:211
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
unsigned int GetEquationSystemSize() const
This method returns the value mEquationSystemSize.
Definition: builder_and_solver.h:238
TSparseSpace::MatrixPointerType TSystemMatrixPointerType
Definition of the pointer to the sparse matrix.
Definition: builder_and_solver.h:88
std::size_t SizeType
Definition of the size type.
Definition: builder_and_solver.h:73
int GetEchoLevel() const
It returns the echo level.
Definition: builder_and_solver.h:674
virtual DofsArrayType & GetDofSet()
It allows to get the list of Dofs from the element.
Definition: builder_and_solver.h:507
virtual Parameters GetDefaultParameters() const
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: builder_and_solver.h:628
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
Definition: builtin_timer.h:26
Base class for all Conditions.
Definition: condition.h:59
virtual void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
Definition: condition.h:273
virtual void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: condition.h:440
TDataType & GetValue(const Variable< TDataType > &rThisVariable)
Gets the value associated with a given variable.
Definition: data_value_container.h:268
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
const VariableData & GetVariable() const
Definition: dof.h:303
IndexType Id() const
Definition: dof.h:292
EquationIdType EquationId() const
Definition: dof.h:324
TDataType & GetSolutionStepReactionValue(IndexType SolutionStepIndex=0)
Definition: dof.h:278
Base class for all Elements.
Definition: element.h:60
virtual void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo)
Definition: element.h:437
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
virtual void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const
Definition: element.h:271
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
This class is useful for index iteration over containers.
Definition: parallel_utilities.h:451
void for_each(TUnaryFunction &&f)
Definition: parallel_utilities.h:514
std::size_t size_type
Definition: amatrix_interface.h:57
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
Definition: amatrix_interface.h:497
Definition: amatrix_interface.h:530
A class that implements the interface for different master-slave constraints to be applied on a syste...
Definition: master_slave_constraint.h:76
Various mathematical utilitiy functions.
Definition: math_utils.h:62
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MasterSlaveConstraintContainerType & MasterSlaveConstraints(IndexType ThisIndex=0)
Definition: model_part.h:654
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ModelPart & GetRootModelPart()
Definition: model_part.cpp:510
ElementsContainerType & Elements(IndexType ThisIndex=0)
Definition: model_part.h:1189
NodeType & GetNode(IndexType NodeId, IndexType ThisIndex=0)
Definition: model_part.h:433
This class defines the node.
Definition: node.h:65
static int GetNumThreads()
Returns the current number of threads.
Definition: parallel_utilities.cpp:34
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
int GetInt() const
This method returns the integer contained in the current Parameter.
Definition: kratos_parameters.cpp:666
Parameters Clone() const
Generates a clone of the current document.
Definition: kratos_parameters.cpp:397
SizeType size() const
This method returns the total size of the current array parameter.
Definition: kratos_parameters.cpp:993
void AddMissingParameters(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing contain at least all parameters...
Definition: kratos_parameters.cpp:1369
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
size_type size() const
Returns the number of elements in the container.
Definition: pointer_vector_set.h:502
void swap(PointerVectorSet &rOther)
Swaps the contents of this PointerVectorSet with another.
Definition: pointer_vector_set.h:532
TContainerType & GetContainer()
Definition: pointer_vector_set.h:778
void reserve(int reservedsize)
Reserves memory for a specified number of elements.
Definition: pointer_vector_set.h:733
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Definition: rom_builder_and_solver.h:62
virtual void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: rom_builder_and_solver.h:378
static void ResizeIfNeeded(TMatrix &mat, const SizeType rows, const SizeType cols)
Definition: rom_builder_and_solver.h:676
BaseType::TSystemMatrixType TSystemMatrixType
Definition: rom_builder_and_solver.h:91
virtual void SolveROM(ModelPart &rModelPart, RomSystemMatrixType &rA, RomSystemVectorType &rb, TSystemVectorType &rDx)
Definition: rom_builder_and_solver.h:748
DofType::Pointer DofPointerType
Definition: rom_builder_and_solver.h:111
void InitializeHROMWeights(ModelPart &rModelPart)
Definition: rom_builder_and_solver.h:487
void ProjectToFineBasis(const TSystemVectorType &rRomUnkowns, const ModelPart &rModelPart, TSystemVectorType &rDx) const
Definition: rom_builder_and_solver.h:254
ElementsArrayType mSelectedElements
Definition: rom_builder_and_solver.h:408
ModelPart::MasterSlaveConstraintContainerType MasterSlaveConstraintContainerType
Additional definitions.
Definition: rom_builder_and_solver.h:101
BaseType::TSchemeType TSchemeType
Definition: rom_builder_and_solver.h:89
virtual void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: rom_builder_and_solver.h:384
BaseType::TSystemVectorType TSystemVectorType
Definition: rom_builder_and_solver.h:92
ConditionsArrayType mSelectedConditions
Definition: rom_builder_and_solver.h:409
NodeType::DofType DofType
Definition: rom_builder_and_solver.h:110
static DofsArrayType SortAndRemoveDuplicateDofs(DofQueue &rDofQueue)
Definition: rom_builder_and_solver.h:589
SizeType GetNumberOfROMModes() const noexcept
Definition: rom_builder_and_solver.h:249
Element::DofsVectorType DofsVectorType
Definition: rom_builder_and_solver.h:103
ROMBuilderAndSolver(typename TLinearSolver::Pointer pNewLinearSystemSolver)
Definition: rom_builder_and_solver.h:128
moodycamel::ConcurrentQueue< DofType::Pointer > DofQueue
Definition: rom_builder_and_solver.h:112
void SetUpSystem(ModelPart &rModelPart) override
It organises the dofset in order to speed up the building phase.
Definition: rom_builder_and_solver.h:219
Node NodeType
DoF types definition.
Definition: rom_builder_and_solver.h:109
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: rom_builder_and_solver.h:338
virtual void InitializeSolutionStep(ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
It applies certain operations at the system of equations at the beginning of the solution step.
Definition: rom_builder_and_solver.h:269
BaseType::LocalSystemVectorType LocalSystemVectorType
Definition: rom_builder_and_solver.h:93
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: rom_builder_and_solver.h:466
~ROMBuilderAndSolver()=default
BaseType::Pointer Create(typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters) const override
Create method.
Definition: rom_builder_and_solver.h:145
ROMBuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > ClassType
The definition of the current class.
Definition: rom_builder_and_solver.h:85
BuilderAndSolver< TSparseSpace, TDenseSpace, TLinearSolver > BaseType
Definition of the classes from the base class.
Definition: rom_builder_and_solver.h:88
bool mHromSimulation
Definition: rom_builder_and_solver.h:411
LocalSystemMatrixType RomSystemMatrixType
Definition: rom_builder_and_solver.h:105
BaseType::TSystemMatrixPointerType TSystemMatrixPointerType
Definition: rom_builder_and_solver.h:95
BaseType::ConditionsArrayType ConditionsArrayType
Definition: rom_builder_and_solver.h:98
void ResizeAndInitializeVectors(typename TSchemeType::Pointer pScheme, TSystemMatrixPointerType &pA, TSystemVectorPointerType &pDx, TSystemVectorPointerType &pb, ModelPart &rModelPart) override
This method initializes and resizes the system of equations.
Definition: rom_builder_and_solver.h:302
BaseType::TSystemVectorPointerType TSystemVectorPointerType
Definition: rom_builder_and_solver.h:96
void BuildAndSolve(typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &A, TSystemVectorType &Dx, TSystemVectorType &b) override
Function to perform the building and solving phase at the same time.
Definition: rom_builder_and_solver.h:284
std::unordered_map< Kratos::VariableData::KeyType, Matrix::size_type > mMapPhi
Definition: rom_builder_and_solver.h:406
std::size_t IndexType
Definition: rom_builder_and_solver.h:82
void BuildRHSNoDirichlet(ModelPart &rModelPart, TSystemVectorType &rb)
Definition: rom_builder_and_solver.h:418
KRATOS_CLASS_POINTER_DEFINITION(ROMBuilderAndSolver)
virtual void BuildROM(typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, RomSystemMatrixType &rA, RomSystemVectorType &rb)
Definition: rom_builder_and_solver.h:686
std::size_t SizeType
Definition: rom_builder_and_solver.h:81
bool mHromWeightsInitialized
Definition: rom_builder_and_solver.h:412
ROMBuilderAndSolver(typename TLinearSolver::Pointer pNewLinearSystemSolver, Parameters ThisParameters)
Definition: rom_builder_and_solver.h:118
void CalculateReactions(typename TSchemeType::Pointer pScheme, ModelPart &rModelPart, TSystemMatrixType &rA, TSystemVectorType &rDx, TSystemVectorType &rb) override
It computes the reactions of the system.
Definition: rom_builder_and_solver.h:199
static std::string Name()
Definition: rom_builder_and_solver.h:352
LocalSystemVectorType RomSystemVectorType
Definition: rom_builder_and_solver.h:106
boost::numeric::ublas::compressed_matrix< double > CompressedMatrixType
Definition: rom_builder_and_solver.h:104
BaseType::ElementsArrayType ElementsArrayType
Definition: rom_builder_and_solver.h:97
virtual std::string Info() const override
Turn back information as a string.
Definition: rom_builder_and_solver.h:372
Element::EquationIdVectorType EquationIdVectorType
Definition: rom_builder_and_solver.h:102
BaseType::LocalSystemMatrixType LocalSystemMatrixType
Definition: rom_builder_and_solver.h:94
void SetUpDofSet(typename TSchemeType::Pointer pScheme, ModelPart &rModelPart) override
Builds the list of the DofSets involved in the problem by "asking" to each element and condition its ...
Definition: rom_builder_and_solver.h:152
SizeType mNodalDofs
Definition: rom_builder_and_solver.h:405
static DofQueue ExtractDofSet(typename TSchemeType::Pointer pScheme, ModelPart &rModelPart)
Definition: rom_builder_and_solver.h:540
BaseType::DofsArrayType DofsArrayType
Definition: rom_builder_and_solver.h:90
This class provides the implementation of the basic tasks that are needed by the solution strategy.
Definition: scheme.h:56
KeyType Key() const
Definition: variable_data.h:187
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF_NOT(conditional)
Definition: exception.h:163
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_INFO_IF(label, conditional)
Definition: logger.h:251
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
std::size_t SizeType
Definition: nurbs_utilities.h:41
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
void AtomicAdd(TDataType &target, const TDataType &value)
Definition: atomic_utilities.h:55
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
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
rhs
Definition: generate_frictional_mortar_condition.py:297
lhs
Definition: generate_frictional_mortar_condition.py:297
dofs
Enforced auxTangentSlipNonObjective = delta_time * gap_time_derivative_non_objective....
Definition: generate_frictional_mortar_condition.py:210
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
tuple const
Definition: ode_solve.py:403
int k
Definition: quadrature.py:595
mat
Definition: script_ELASTIC.py:155
A
Definition: sensitivityMatrix.py:70
integer i
Definition: TensorModule.f:17
Definition: reduction_utilities.h:310
Definition: rom_builder_and_solver.h:612
AssemblyTLS(SizeType NRomModes)
Definition: rom_builder_and_solver.h:613
RomSystemMatrixType romA
Definition: rom_builder_and_solver.h:624
RomSystemVectorType romB
Definition: rom_builder_and_solver.h:625
Definition: rom_builder_and_solver.h:635
bool mInitialized
Definition: rom_builder_and_solver.h:640
T value_type
Definition: rom_builder_and_solver.h:636
T mValue
Definition: rom_builder_and_solver.h:639
void Init(const value_type &first_value)
Definition: rom_builder_and_solver.h:642
void LocalReduce(const value_type &value)
Definition: rom_builder_and_solver.h:654
T return_type
Definition: rom_builder_and_solver.h:637
return_type GetValue() const
access to reduced value
Definition: rom_builder_and_solver.h:649
void ThreadSafeReduce(const NonTrivialSumReduction &rOther)
Definition: rom_builder_and_solver.h:663