42 if ( result !=
IRRT_OK )
return result;
77 solutionVector->
resize(neq);
78 solutionVector->
zero();
119 #define DUMPMATRICES 0 122 lhs->toFloatMatrix(LHS_backup);
130 FILE *rhsFile = fopen(
"RHS.txt",
"w");
133 for (
int i = 1; i <= RHS->
giveSize(); i++ ) {
134 fprintf( rhsFile,
"%0.15e\n", RHS->
at(i) );
138 FILE *lhsFile = fopen(
"LHS.txt",
"w");
142 fprintf( lhsFile,
"%0.15e\t", LHS->
at(i, j) );
144 fprintf(lhsFile,
"\n");
149 if ( SolutionVector == NULL ) {
153 FILE *SolutionFile = fopen(
"SolutionVector.txt",
"w");
154 for (
int i = 1; i <= SolutionVector->
giveSize(); i++ ) {
155 fprintf( SolutionFile,
"%0.15e\n", SolutionVector->
at(i) );
157 fclose(SolutionFile);
188 OOFEM_ERROR(
"Unknown component id (%d)", (
int ) cmpn);
LinSystSolverType
The values of this type should be related not to specific solvers, but more to specific packages that...
The representation of EngngModel default unknown numbering.
std::unique_ptr< TimeStep > currentStep
Current time step.
virtual NumericalMethod * giveNumericalMethod(MetaStep *mStep)
Returns reference to receiver's numerical method.
Implementation for assembling internal forces vectors in standard monolithic, nonlinear FE-problems...
virtual int giveNumberOfDomainEquations(int di, const UnknownNumberingScheme &num)
Returns number of equations for given domain in active (current time step) time step.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
This class implements Newton-Raphson Method, derived from abstract NumericalMethod class for solving ...
SparseMtrx * createSparseMtrx(SparseMtrxType type)
Creates new instance of sparse matrix corresponding to given keyword.
Abstract class representing field of primary variables (those, which are unknown and are typically as...
virtual TimeStep * giveNextStep()
Returns next time step (next to current step) of receiver.
std::unique_ptr< TimeStep > previousStep
Previous time step.
double & at(int i)
Coefficient access function.
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
virtual double giveUnknownComponent(ValueModeType, TimeStep *, Domain *, Dof *)
Returns requested unknown.
virtual void updateComponent(TimeStep *tStep, NumericalCmpn cmpn, Domain *d)
Updates components mapped to numerical method if necessary during solution process.
This base class is an abstraction for numerical algorithm.
Implementation for assembling tangent matrices in standard monolithic FE-problems.
FloatArray externalForces
REGISTER_EngngModel(ProblemSequence)
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
virtual void solveYourselfAt(TimeStep *tStep)
Solves problem for given time step.
#define NM_NoSuccess
Numerical method failed to solve problem.
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, const MatrixAssembler &ma, const UnknownNumberingScheme &s, Domain *domain)
Assembles characteristic matrix of required type into given sparse matrix.
MetaStep * giveCurrentMetaStep()
Returns current meta step.
int giveNumber()
Returns receiver's number.
#define OOFEM_LOG_INFO(...)
NumericalCmpn
Type representing numerical component.
#define _IFT_EngngModel_smtype
int ndomains
Number of receiver domains.
int updateSharedDofManagers(FloatArray &answer, const UnknownNumberingScheme &s, int ExchangeTag)
Exchanges necessary remote DofManagers data.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
The reference incremental load vector is defined as totalLoadVector assembled at given time...
Implementation for assembling external forces vectors in standard monolithic FE-problems.
FloatArray internalForces
virtual void updateYourself(TimeStep *tStep)
Updates internal state after finishing time step.
double at(int i, int j) const
Coefficient access function.
std::unique_ptr< PrimaryField > PressureField
LinSystSolverType solverType
virtual int forceEquationNumbering()
Forces equation renumbering on all domains associated to engng model.
Class representing vector of real numbers.
std::unique_ptr< SparseMtrx > stiffnessMatrix
Implementation of matrix containing floating point numbers.
#define _IFT_EngngModel_lstype
IRResultType
Type defining the return values of InputRecord reading operations.
int giveNumberOfTimeStepWhenIcApply()
Returns the time step number, when initial conditions should apply.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description in input reader.
int parallelFlag
Flag indicating that the receiver runs in parallel.
void zero()
Zeroes all coefficients of receiver.
ClassFactory & classFactory
void assembleVectorFromElements(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from elements into given vector. ...
Abstract base class representing the "problem" under consideration.
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Domain * giveDomain(int n)
Service for accessing particular problem domain.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
void DumpMatricesToFile(FloatMatrix *LHS, FloatArray *RHS, FloatArray *SolutionVector)
FloatArray incrementOfSolution
void assembleVector(FloatArray &answer, TimeStep *tStep, const VectorAssembler &va, ValueModeType mode, const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms=NULL)
Assembles characteristic vector of required type from dofManagers, element, and active boundary condi...
Class representing solution step.
SparseMtrxType sparseMtrxType
std::unique_ptr< SparseNonLinearSystemNM > nMethod
DarcyFlow(int i, EngngModel *_master)
void resize(int s)
Resizes receiver towards requested size.
int equationNumberingCompleted
Equation numbering completed flag.