59UPLhsAssembler :: UPLhsAssembler(
double alpha,
double deltaT) :
70 answer.
resize(ndofs, ndofs);
78 answer.
assemble(contrib, locu, locu);
81 answer.
assemble(contrib, locu, locp);
85 answer.
assemble(contrib, locp, locp);
88 answer.
assemble(contrib, locp, locp);
91 answer.
assemble(contrib, locp, locu);
109 contrib.
times((-1.0));
137 answer.
resize(ndofs, ndofs);
145 answer.
assemble(contrib, locu, locu);
148 answer.
assemble(contrib, locu, loct);
152 answer.
assemble(contrib, loct, loct);
155 answer.
assemble(contrib, loct, loct);
164 for (BCTracker::entryListType::iterator it = bcList.begin(); it != bcList.end(); ++it) {
166 int boundaryID = (*it).boundaryId;
177 answer.
assemble(contrib, loct, loct);
207 for (BCTracker::entryListType::iterator it = bcList.begin(); it != bcList.end(); ++it) {
209 int boundaryID = (*it).boundaryId;
248 EngngModel :: initializeFrom(ir);
277 field = std::make_unique<DofDistributedPrimaryField>(
this, 1, FT_TransportProblemUnknowns, 2, this->
alpha);
296double MPMProblem :: giveUnknownComponent(ValueModeType mode,
TimeStep *tStep,
Domain *d,
Dof *dof)
298 return this->
field->giveUnknownValue(dof, mode, tStep);
303MPMProblem :: giveDeltaT(
int n)
315MPMProblem :: giveDiscreteTime(
int iStep)
319 }
else if ( iStep == 0 ) {
343TimeStep *MPMProblem :: giveSolutionStepWhenIcApply(
bool force)
345 if (
master && (!force)) {
346 return master->giveSolutionStepWhenIcApply();
370 field->advanceSolution(tStep);
380 externalForces.
zero();
392 int currentIterations = 0;
402 SparseNonLinearSystemNM :: rlm_total,
417 this->
field->applyBoundaryCondition(tStep);
469 this->
field->applyBoundaryCondition(tStep);
508MPMProblem :: applyIC()
513 this->
field->applyDefaultInitialCondition();
526MPMProblem :: requiresEquationRenumbering(
TimeStep *tStep)
534 for (
auto &gbc : d->
giveBcs() ) {
549MPMProblem :: forceEquationNumbering()
552 return EngngModel :: forceEquationNumbering();
557MPMProblem :: printOutputAt(FILE *file,
TimeStep *tStep)
559 if ( !this->
giveDomain(1)->giveOutputManager()->testTimeStepOutput(tStep) ) {
563 EngngModel :: printOutputAt(file, tStep);
643 EngngModel :: updateYourself(tStep);
649 EngngModel :: saveContext(stream, mode);
650 field->saveContext(stream);
657 EngngModel :: restoreContext(stream, mode);
658 field->restoreContext(stream);
663MPMProblem :: giveUnknownDictHashIndx(ValueModeType mode,
TimeStep *tStep)
670MPMProblem :: requiresUnknownsDictionaryUpdate()
676MPMProblem :: checkConsistency()
678 return EngngModel :: checkConsistency();
683MPMProblem :: updateDomainLinks()
685 EngngModel :: updateDomainLinks();
697 OOFEM_ERROR(
"Unable to return field representation for non-current time step");
699 if ( key == FT_Displacements ) {
700 return std::make_shared<MaskedPrimaryField>( key, this->
field.get(),
IntArray{D_u, D_v, D_w} );
701 }
else if ( key == FT_Pressure ) {
702 return std::make_shared<MaskedPrimaryField>( key, this->
field.get(),
IntArray{P_f} );
703 }
else if ( key == FT_Temperature ) {
704 return std::make_shared<MaskedPrimaryField>( key, this->
field.get(),
IntArray{T_f} );
#define REGISTER_EngngModel(class)
virtual bool requiresActiveDofs()
const entryListType & getElementRecords(int elem)
std::list< Entry > entryListType
bcType giveType() const override
std ::vector< std ::unique_ptr< GeneralBoundaryCondition > > & giveBcs()
std ::vector< std ::unique_ptr< Element > > & giveElements()
BCTracker * giveBCTracker()
virtual void giveCharacteristicMatrix(FloatMatrix &answer, CharType type, TimeStep *tStep)
virtual int giveNumberOfDofs()
virtual void updateYourself(TimeStep *tStep)
virtual void giveCharacteristicVector(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep)
virtual void updateInternalState(TimeStep *tStep)
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
virtual TimeStep * giveCurrentStep(bool force=false)
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
EngngModelContext * giveContext()
Context requesting service.
EngngModel(int i, EngngModel *_master=NULL)
std ::unique_ptr< TimeStep > previousStep
Previous time step.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
int ndomains
Number of receiver domains.
Domain * giveDomain(int n)
std ::unique_ptr< TimeStep > currentStep
Current time step.
@ InternalForcesExchangeTag
EngngModel * master
Master e-model; if defined receiver is in maintained (slave) mode.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
std ::unique_ptr< TimeStep > stepWhenIcApply
Solution step when IC (initial conditions) apply.
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Domain * giveDomain() const
void registerField(FieldPtr eField, FieldType key)
void assemble(const FloatArray &fe, const IntArray &loc)
void zero()
Zeroes all coefficients of receiver.
bool isNotEmpty() const
Returns true if receiver is not empty.
void resize(Index rows, Index cols)
void zero()
Zeroes all coefficient of receiver.
bool isNotEmpty() const
Tests for empty matrix.
void assemble(const FloatMatrix &src, const IntArray &loc)
virtual int giveNumberOfInternalDofManagers()
Gives the number of internal dof managers.
virtual bcGeomType giveBCGeoType() const
Base class for elements based on mp (multi-physics) concept.
virtual void getSurfaceElementCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int isurf) const
Returns element code numbers of the unknowns associated with given boundary entity.
virtual void getEdgeElementCodeNumbers(IntArray &answer, const Variable::VariableQuantity q, int isurf) const
virtual void getLocalCodeNumbers(IntArray &answer, const Variable::VariableQuantity q) const
virtual void giveCharacteristicMatrixFromBC(FloatMatrix &answer, CharType type, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID)
virtual void giveCharacteristicVectorFromBC(FloatArray &answer, CharType type, ValueModeType mode, TimeStep *tStep, GeneralBoundaryCondition *bc, int boundaryID)
double deltaT
Length of time step.
FloatArray prescribedTimes
Specified times where the problem is solved.
std::string problemType
identifies what problem to solve (UP, UPV, etc)
int dtFunction
Associated time function for time step increment.
SparseMtrxType sparseMtrxType
void updateInternalRHS(FloatArray &answer, TimeStep *tStep, Domain *d, FloatArray *eNorm) override
std ::unique_ptr< SparseNonLinearSystemNM > nMethod
Numerical method used to solve the problem.
FieldPtr giveField(FieldType key, TimeStep *tStep) override
std ::unique_ptr< SparseMtrx > effectiveMatrix
NumericalMethod * giveNumericalMethod(MetaStep *mStep) override
Returns reference to receiver's numerical method.
std ::unique_ptr< DofDistributedPrimaryField > field
double initT
Initial time from which the computation runs. Default is zero.
double giveDiscreteTime(int iStep)
FloatArray internalForces
TimeStep * giveSolutionStepWhenIcApply(bool force=false) override
virtual void zero()=0
Zeroes the receiver.
ConvergedReason convergedReason
Status of solution step (Converged,.
double giveTimeIncrement()
Returns solution step associated time increment.
double giveTargetTime()
Returns target time.
int numberOfIterations
Number of itarations needed to achieve convergence.
int giveNumber()
Returns receiver's number.
TimeStep * givePreviousStep()
Returns pointer to previous solution step.
#define _IFT_EngngModel_smtype
#define OOFEM_LOG_INFO(...)
#define OOFEM_LOG_RELEVANT(...)
#define _IFT_MPMProblem_deltat
#define _IFT_MPMProblem_initt
#define _IFT_MPMProblem_deltatfunction
#define _IFT_MPMProblem_prescribedtimes
#define _IFT_MPMProblem_alpha
#define _IFT_MPMProblem_problemType
#define _IFT_MPMProblem_exportFields
Fields to export for staggered problems.
#define _IFT_MPMProblem_keepTangent
Fixes the tangent to be reused on each step.
FieldType
Physical type of field.
@ SurfaceLoadBGT
Distributed surface load.
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
@ SMT_Skyline
Symmetric skyline.
ClassFactory & classFactory
@ ConvectionBC
Newton type - transfer coefficient.
std::shared_ptr< Field > FieldPtr