47 #ifndef _DARCYSOLVERNONLINEAR_H_ 48 #define _DARCYSOLVERNONLINEAR_H_ 1
50 #include <lifev/darcy/solver/DarcySolverLinear.hpp> 246 template <
typename MeshType >
300 virtual void setup ();
565 template <
typename MeshType >
583 template <
typename MeshType >
598 template <
typename MeshType >
604 const typename darcySolverLinear_Type::data_Type::data_Type& dataFile = * (
this->M_data->dataFilePtr() );
607 const std::string dataPath =
this->M_data->section() +
"/non-linear";
610 const UInt maxIter = dataFile ( ( dataPath +
"/fixed_point_iteration" ).data(), 10 );
614 const Real tol = dataFile ( ( dataPath +
"/fixed_point_toll" ).data(), 1.e-8 );
620 template <
typename MeshType >
646 /
this->M_primalField->getVector().norm2();
649 this->M_displayer->leaderPrint (
"Fixed point scheme\n" );
668 std::cerr <<
"Attention the fixed point scheme did not reach convergence." 669 << std::endl <<
"Max of iterations " << M_fixedPointMaxIteration
670 << std::endl <<
"Number of iterations " << M_fixedPointNumIteration
678 template <
typename MeshType >
688 this->M_data->dataTimePtr()->initialTime() );
697 template <
typename MeshType >
MeshType mesh_Type
Typedef for mesh template.
darcySolverLinear_Type::dataPtr_Type dataPtr_Type
Shared pointer for the data type.
const UInt & fixedPointMaxIteration() const
Returns maximum number of fixed point iterations allowed.
void setFixedPointTolerance(const Real &tol)
const Real & fixedPointTolerance() const
Returns fixed point tolerance.
Real fixedPointResidual()
Returns the residual between two iterations of the fixed point scheme.
darcySolverLinear_Type::matrixFctPtr_Type matrixFctPtr_Type
Shared pointer to a matrix value function.
Real & fixedPointTolerance()
Returns fixed point tolerance.
darcySolverLinear_Type::scalarFieldPtr_Type scalarFieldPtr_Type
Shared pointer to a scalar field.
void setFixedPointMaxIteration(const UInt &maxit)
Real M_fixedPointResidual
The residual between two iteration of the fixed point scheme.
DarcySolverNonLinear()
Constructor for the class.
scalarFieldPtr_Type & primalPreviousIterationPtr()
Returns the pointer of the primal solution field at previous step.
virtual void setInversePermeability(const matrixFctPtr_Type &invPerm)
Set the inverse of diffusion tensor,.
void setupNonLinear()
Set up the data for the non-linear solver.
DarcySolverNonLinear(const darcySolverNonLinear_Type &)
Inhibited copy constructor.
DarcySolverLinear< mesh_Type > darcySolverLinear_Type
Darcy solver class.
UInt & fixedPointMaxIteration()
Returns maximum number of fixed point iterations allowed.
scalarFieldPtr_Type M_primalFieldPreviousIteration
Primal solution at previous iteration step.
scalarFctPtr_Type M_primalFieldZeroIterationFct
Primal solution at zero time step.
DarcySolverNonLinear< mesh_Type > darcySolverNonLinear_Type
Self typedef.
void fixedPoint()
Perform the fixed point loop to solve the non-linear problem.
UInt M_fixedPointNumIteration
The current iterations for the fixed point method.
virtual ~DarcySolverNonLinear()
Virtual destructor.
virtual void solve()
Solve the problem performing the fixed point scheme.
double Real
Generic real data.
UInt fixedPointNumIteration()
virtual void setup()
Set up the linear solver and the preconditioner for the linear system.
implements a mixed-hybrid FE Darcy solver.
darcySolverLinear_Type::data_Type data_Type
Typedef for the data type.
darcySolverLinear_Type::scalarField_Type scalarField_Type
Scalar field.
virtual void resetVariables()
Update all problem variables.
Real M_fixedPointTolerance
Tollerance for the stopping criteria for the fixed point method.
const scalarFieldPtr_Type & primalPreviousIterationPtr() const
Returns the pointer of the primal solution field at previous step.
void setPrimalZeroIteration(const scalarFctPtr_Type &primalZeroIteration)
Initial guess for fixed point iteration.
uint32_type UInt
generic unsigned integer (used mainly for addressing)
darcySolverNonLinear_Type & operator=(const darcySolverNonLinear_Type &)
Inhibited assign operator.
UInt M_fixedPointMaxIteration
The maximum number of iterations for the fixed point method.
implements a non-linear Darcy solver
darcySolverLinear_Type::scalarFctPtr_Type scalarFctPtr_Type
Shared pointer to a scalar value function.