42 #include <lifev/multiscale/models/MultiscaleModelFSI1D.hpp> 83 #ifdef HAVE_LIFEV_DEBUG 84 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::MultiscaleModelFSI1D() \n";
93 physics_Type::factoryPhysics_Type::instance().registerProduct ( OneDFSI::LinearPhysics, &createOneDFSIPhysicsLinear );
94 physics_Type::factoryPhysics_Type::instance().registerProduct ( OneDFSI::NonLinearPhysics, &createOneDFSIPhysicsNonLinear );
96 flux_Type::factoryFlux_Type::instance().registerProduct ( OneDFSI::LinearFlux, &createOneDFSIFluxLinear );
97 flux_Type::factoryFlux_Type::instance().registerProduct ( OneDFSI::NonLinearFlux, &createOneDFSIFluxNonLinear );
99 source_Type::factorySource_Type::instance().registerProduct ( OneDFSI::LinearSource, &createOneDFSISourceLinear );
100 source_Type::factorySource_Type::instance().registerProduct ( OneDFSI::NonLinearSource, &createOneDFSISourceNonLinear );
110 #ifdef HAVE_LIFEV_DEBUG 111 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::setupData( fileName ) \n";
114 multiscaleModel_Type::setupData ( fileName );
116 GetPot dataFile ( fileName );
118 M_data->setup ( dataFile );
119 if ( M_globalData.get() )
125 M_physics = physicsPtr_Type ( physics_Type::factoryPhysics_Type::instance().createObject ( M_data->physicsType(), OneDFSI::physicsMap ) );
126 M_physics->setData ( M_data );
129 M_flux = fluxPtr_Type ( flux_Type::factoryFlux_Type::instance().createObject ( M_data->fluxType(), OneDFSI::fluxMap ) );
130 M_flux->setPhysics ( M_physics );
133 M_source = sourcePtr_Type ( source_Type::factorySource_Type::instance().createObject ( M_data->sourceType(), OneDFSI::sourceMap ) );
134 M_source->setPhysics ( M_physics );
137 M_linearSolver.reset (
new linearSolver_Type ( M_comm ) );
139 M_linearSolver->setDataFromGetPot ( dataFile,
"1D_Model/solver" );
140 M_linearSolver->setParameter (
"Verbose",
false );
141 M_linearSolver->setParameters();
144 if ( M_data->viscoelasticWall() )
146 M_linearViscoelasticSolver.reset (
new linearSolver_Type ( M_comm ) );
147 M_linearViscoelasticSolver->setParametersList ( M_linearSolver->parametersList() );
148 M_linearViscoelasticSolver->setParameters();
152 M_solver->setCommunicator ( M_comm );
153 M_solver->setProblem ( M_physics, M_flux, M_source );
154 M_solver->setLinearSolver ( M_linearSolver );
155 M_solver->setLinearViscoelasticSolver ( M_linearViscoelasticSolver );
158 M_bc->createHandler();
162 M_data->setPostprocessingDirectory ( multiscaleProblemFolder );
163 M_data->setPostprocessingFile ( multiscaleProblemPrefix +
"_Model_" + number2string ( M_ID ) +
"_" + number2string ( multiscaleProblemStep ) );
166 M_exporterMesh->setComm ( M_comm );
167 regularMesh1D ( *M_exporterMesh, 1, M_data->numberOfElements(),
false, M_data->length(), 0 );
169 M_exporter->setDataFromGetPot ( dataFile );
170 M_exporter->setPrefix ( multiscaleProblemPrefix +
"_Model_" + number2string ( M_ID ) +
"_" + number2string ( multiscaleProblemStep ) );
171 M_exporter->setPostDir ( multiscaleProblemFolder );
173 M_importer->setDataFromGetPot ( dataFile );
174 M_importer->setPrefix ( multiscaleProblemPrefix +
"_Model_" + number2string ( M_ID ) +
"_" + number2string ( multiscaleProblemStep - 1 ) );
175 M_importer->setPostDir ( multiscaleProblemFolder );
184 #ifdef HAVE_LIFEV_DEBUG 185 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::setupModel() \n";
192 M_solver->setupSolution ( *M_solution );
193 M_solver->setupSolution ( *M_solution_tn );
196 M_bc->handler()->setDefaultBC();
197 M_bc->setPhysicalSolver ( M_solver );
198 M_bc->setSolution ( M_solution );
199 M_bc->setFluxSource ( M_flux, M_source );
203 M_exporter->setMeshProcId ( M_exporterMesh, M_comm->MyPID() );
205 DOF tmpDof ( *M_exporterMesh, M_feSpace->refFE() );
206 std::vector<Int> myGlobalElements ( tmpDof.globalElements ( *M_exporterMesh ) );
207 MapEpetra map ( -1, myGlobalElements.size(), &myGlobalElements[0], M_comm );
208 M_solver->setupSolution ( *M_exporterSolution, map,
true );
210 M_exporter->addVariable ( IOData_Type::ScalarField,
"Area ratio (fluid)", M_feSpace, (*M_exporterSolution) [
"AoverA0minus1"],
static_cast <UInt> ( 0 ) );
211 M_exporter->addVariable ( IOData_Type::ScalarField,
"Flow rate (fluid)", M_feSpace, (*M_exporterSolution) [
"Q"],
static_cast <UInt> ( 0 ) );
214 M_exporter->addVariable ( IOData_Type::ScalarField,
"Pressure (fluid)", M_feSpace, (*M_exporterSolution) [
"P"],
static_cast <UInt> ( 0 ) );
218 M_solver->resetOutput ( *M_exporterSolution );
225 if ( M_couplings.size() > 0 )
228 updateLinearBC ( *M_solution );
232 copySolution ( *M_solution, *M_linearSolution );
242 #ifdef HAVE_LIFEV_DEBUG 243 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::buildModel() \n";
250 M_solver->buildConstantMatrices();
253 copySolution ( *M_solution, *M_solution_tn );
256 if ( M_couplings.size() > 0 )
268 #ifdef HAVE_LIFEV_DEBUG 269 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::updateModel() \n";
273 copySolution ( *M_solution, *M_solution_tn );
276 if ( M_couplings.size() > 0 )
288 #ifdef HAVE_LIFEV_DEBUG 289 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::solveModel() \n";
292 displayModelStatus (
"Solve" );
293 solve ( *M_bc->handler(), *M_solution );
296 if ( M_couplings.size() > 0 )
298 updateLinearBC ( *M_solution );
308 #ifdef HAVE_LIFEV_DEBUG 309 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::updateSolution() \n";
318 #ifdef HAVE_LIFEV_DEBUG 319 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::saveSolution() \n";
323 copySolution ( *M_solution, *M_exporterSolution );
326 M_exporter->postProcess ( M_data->dataTime()->time() );
328 if ( M_data->dataTime()->isLastTimeStep() )
330 M_exporter->closeFile();
336 M_solver->postProcess ( *M_exporterSolution, M_data->dataTime()->time() );
344 if ( M_comm->MyPID() == 0 )
346 multiscaleModel_Type::showMe();
348 std::cout <<
"FE order = " <<
"P1" << std::endl
349 <<
"DOF = " << M_data->mesh()->numPoints() << std::endl << std::endl;
351 std::cout <<
"maxH = " << MeshUtility::MeshStatistics::computeSize (*M_data->mesh() ).maxH << std::endl
352 <<
"meanH = " << MeshUtility::MeshStatistics::computeSize (*M_data->mesh() ).meanH << std::endl << std::endl;
359 return (*M_solution) [
"AoverA0minus1"]->norm2() + (*M_solution) [
"Q"]->norm2() + (*M_solution) [
"P"]->norm2();
369 base.setFunction ( std::bind ( function, std::placeholders::_1, std::placeholders::_1, std::placeholders::_1, std::placeholders::_1, std::placeholders::_1 ) );
371 M_bc->handler()->setBC ( flagConverter ( boundaryID ), OneDFSI::first, OneDFSI::Q, base );
378 base.setFunction ( std::bind ( function, std::placeholders::_1, std::placeholders::_1, std::placeholders::_1, std::placeholders::_1, std::placeholders::_1 ) );
380 M_bc->handler()->setBC ( flagConverter ( boundaryID ), OneDFSI::first, OneDFSI::S, base );
392 Real Q = M_solver->boundaryValue ( *M_solution, OneDFSI::Q, bcSide );
393 Real Qdelta = M_solver->boundaryValue ( *M_linearSolution, OneDFSI::Q, bcSide );
395 #ifdef HAVE_LIFEV_DEBUG 396 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::boundaryDeltaFlowRate( boundaryID, solveLinearSystem ) \n";
397 debugStream ( 8130 ) <<
"Q: " << Q <<
"\n";
398 debugStream ( 8130 ) <<
"Qdelta: " << Qdelta <<
"\n";
412 Real S = M_solver->boundaryValue ( *M_solution, OneDFSI::S, bcSide );
413 Real Sdelta = M_solver->boundaryValue ( *M_linearSolution, OneDFSI::S, bcSide );
415 #ifdef HAVE_LIFEV_DEBUG 416 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::boundaryDeltaStress( boundaryID, solveLinearSystem ) \n";
417 debugStream ( 8130 ) <<
"S: " << S <<
"\n";
418 debugStream ( 8130 ) <<
"Sdelta: " << Sdelta <<
"\n";
431 Real T = M_solver->boundaryValue ( *M_solution, OneDFSI::T, bcSide );
432 Real Tdelta = M_solver->boundaryValue ( *M_linearSolution, OneDFSI::T, bcSide );
434 #ifdef HAVE_LIFEV_DEBUG 435 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::boundaryDeltaTotalStress( boundaryID, solveLinearSystem ) \n";
436 debugStream ( 8130 ) <<
"T: " << T <<
"\n";
437 debugStream ( 8130 ) <<
"Tdelta: " << Tdelta <<
"\n";
450 Real A = M_solver->boundaryValue ( *M_solution, OneDFSI::A, bcSide );
451 Real Adelta = M_solver->boundaryValue ( *M_linearSolution, OneDFSI::A, bcSide );
453 #ifdef HAVE_LIFEV_DEBUG 454 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::boundaryDeltaArea( boundaryID, solveLinearSystem ) \n";
455 debugStream ( 8130 ) <<
"A: " << A <<
"\n";
456 debugStream ( 8130 ) <<
"Adelta: " << Adelta <<
"\n";
497 #ifdef HAVE_LIFEV_DEBUG 498 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::setupGlobalData( fileName ) \n";
501 GetPot dataFile ( fileName );
504 M_data->setTimeData ( M_globalData->dataTime() );
507 if ( !dataFile.checkVariable (
"1D_Model/PhysicalParameters/density" ) )
509 M_data->setDensity ( M_globalData->fluidDensity() );
511 if ( !dataFile.checkVariable (
"1D_Model/PhysicalParameters/viscosity" ) )
513 M_data->setViscosity ( M_globalData->fluidViscosity() );
515 if ( !dataFile.checkVariable (
"1D_Model/PhysicalParameters/venousPressure" ) )
517 M_data->setVenousPressure ( M_globalData->fluidVenousPressure() );
519 if ( !dataFile.checkVariable (
"1D_Model/PhysicalParameters/externalPressure" ) )
521 M_data->setExternalPressure ( M_globalData->solidExternalPressure() );
523 if ( !dataFile.checkVariable (
"1D_Model/PhysicalParameters/densityWall" ) )
525 M_data->setDensityWall ( M_globalData->solidDensity() );
527 if ( !dataFile.checkVariable (
"1D_Model/PhysicalParameters/poisson" ) )
529 M_data->setPoisson ( M_globalData->solidPoissonCoefficient() );
531 if ( !dataFile.checkVariable (
"1D_Model/PhysicalParameters/young" ) )
533 M_data->setYoung ( M_globalData->solidYoungModulus() );
537 M_data->updateCoefficients();
544 #ifdef HAVE_LIFEV_DEBUG 545 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::initializeSolution() \n";
551 M_importer->setMeshProcId ( M_exporterMesh, M_comm->MyPID() );
553 M_importer->addVariable ( IOData_Type::ScalarField,
"Area ratio (fluid)", M_feSpace, (*M_exporterSolution) [
"AoverA0minus1"],
static_cast <UInt> ( 0 ) );
554 M_importer->addVariable ( IOData_Type::ScalarField,
"Flow rate (fluid)", M_feSpace, (*M_exporterSolution) [
"Q"],
static_cast <UInt> ( 0 ) );
557 M_importer->addVariable ( IOData_Type::ScalarField,
"Pressure (fluid)", M_feSpace, (*M_exporterSolution) [
"P"],
static_cast <UInt> ( 0 ) );
560 M_exporter->setTimeIndex ( M_importer->importFromTime ( M_data->dataTime()->initialTime() ) + 1 );
562 M_importer->closeFile();
564 std::cout <<
"!!! ERROR: Importer not implemented for this filter !!!" << std::endl;
568 copySolution ( *M_exporterSolution, *M_solution );
571 M_solver->computeArea ( *M_solution );
574 M_solver->computeW1W2 ( *M_solution );
577 M_physics->setArea_tn ( * (*M_solution) [
"A"] );
581 M_solver->initialize ( *M_solution );
582 copySolution ( *M_solution, *M_exporterSolution );
590 #ifdef HAVE_LIFEV_DEBUG 591 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::setupFEspace() \n";
595 std::array< Real,
NDIM > NullTransformation;
596 NullTransformation[0] = 0.;
597 NullTransformation[1] = 0.;
598 NullTransformation[2] = 0.;
601 M_data->mesh()->meshTransformer().transformMesh ( M_geometryScale, NullTransformation, NullTransformation );
603 for ( UInt i (0); i < M_data->numberOfNodes() ; ++i )
605 M_data->setArea0 ( M_data->area0 ( i ) * M_geometryScale[1] * M_geometryScale[2], i );
609 M_data->updateCoefficients();
613 M_exporterMesh->meshTransformer().transformMesh ( M_geometryScale, M_geometryRotate, M_geometryTranslate );
625 M_feSpace.reset (
new feSpace_Type ( M_data->mesh(), *refFE, *qR, *bdQr, 1, M_comm ) );
626 M_solver->setFESpace ( M_feSpace );
633 #ifdef HAVE_LIFEV_DEBUG 634 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::copySolution( solution1, solution2 ) \n";
637 for ( solutionConstIterator_Type i = solution2.begin() ; i != solution2.end() ; ++i )
638 if ( solution1.find ( i->first ) != solution1.end() )
640 *solution2[i->first] = *solution1.find (i->first)->second;
648 #ifdef HAVE_LIFEV_DEBUG 649 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::updateBCPhysicalSolverVariables() \n";
653 M_bc->updatePhysicalSolverVariables();
660 #ifdef HAVE_LIFEV_DEBUG 661 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::solve() \n";
665 copySolution ( *M_solution_tn, solution );
668 UInt subiterationNumber (1);
669 Real timeStep = M_data->dataTime()->timeStep();
671 Real CFL = M_solver->computeCFL ( solution, M_data->dataTime()->timeStep() );
672 if ( CFL > M_data->CFLmax() )
674 subiterationNumber = std::ceil ( CFL / M_data->CFLmax() );
675 timeStep /= subiterationNumber;
678 if ( M_comm->MyPID() == 0 )
679 std::cout << solverType <<
" Number of subiterations " << subiterationNumber
680 <<
" ( CFL = " << CFL* timeStep / M_data->dataTime()->timeStep() <<
" )" << std::endl;
682 for (
UInt i (1) ; i <= subiterationNumber ; ++i )
685 M_physics->setArea_tn ( *solution[
"A"] );
686 M_solver->updateRHS ( solution, timeStep );
687 M_solver->iterate ( bc, solution, M_data->dataTime()->previousTime() + i * timeStep, timeStep );
697 M_bcPreviousTimeSteps.reserve ( std::max ( M_couplings[0]->timeInterpolationOrder(), M_couplings[1]->timeInterpolationOrder() ) );
700 std::map< bcSide_Type, std::map< bcType_Type, Real > > bcSideMap;
701 M_bcPreviousTimeSteps.push_back ( bcSideMap );
704 std::map< bcType_Type, Real > bcTypeMap;
705 M_bcPreviousTimeSteps[0][OneDFSI::left] = bcTypeMap;
706 M_bcPreviousTimeSteps[0][OneDFSI::right] = bcTypeMap;
712 M_bcPreviousTimeSteps[0][OneDFSI::left][OneDFSI::A] = M_solver->boundaryValue ( solution, OneDFSI::A, OneDFSI::left );
713 M_bcPreviousTimeSteps[0][OneDFSI::left][OneDFSI::S] = M_solver->boundaryValue ( solution, OneDFSI::S, OneDFSI::left );
714 M_bcPreviousTimeSteps[0][OneDFSI::left][OneDFSI::Q] = M_solver->boundaryValue ( solution, OneDFSI::Q, OneDFSI::left );
715 M_bcPreviousTimeSteps[0][OneDFSI::right][OneDFSI::A] = M_solver->boundaryValue ( solution, OneDFSI::A, OneDFSI::right );
716 M_bcPreviousTimeSteps[0][OneDFSI::right][OneDFSI::S] = M_solver->boundaryValue ( solution, OneDFSI::S, OneDFSI::right );
717 M_bcPreviousTimeSteps[0][OneDFSI::right][OneDFSI::Q] = M_solver->boundaryValue ( solution, OneDFSI::Q, OneDFSI::right );
724 #ifdef HAVE_LIFEV_DEBUG 725 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::setupLinearModel( ) \n";
729 M_bcBaseDelta.setFunction ( std::bind ( &MultiscaleModelFSI1D::bcFunctionDelta,
this, std::placeholders::_1 ) );
735 M_linearBC->setBC ( OneDFSI::left, OneDFSI::first, M_bc->handler()->bc ( OneDFSI::left )->type ( OneDFSI::first ),
736 M_bc->handler()->bc ( OneDFSI::left )->bcFunction ( OneDFSI::first ) );
738 M_linearBC->setBC ( OneDFSI::right, OneDFSI::first, M_bc->handler()->bc ( OneDFSI::right )->type ( OneDFSI::first ),
739 M_bc->handler()->bc ( OneDFSI::right )->bcFunction ( OneDFSI::first ) );
741 M_linearBC->setDefaultBC();
744 M_solver->setupSolution ( *M_linearSolution );
745 M_linearBC->setSolution ( M_linearSolution );
746 M_linearBC->setFluxSource ( M_flux, M_source );
753 UInt timeInterpolationOrder ( std::max ( M_couplings[0]->timeInterpolationOrder(), M_couplings[1]->timeInterpolationOrder() ) );
755 UInt containerSize ( M_bcPreviousTimeSteps.size() );
758 if ( containerSize <= timeInterpolationOrder )
761 M_bcPreviousTimeSteps.push_back ( M_bcPreviousTimeSteps[0] );
765 for (
UInt i (1) ; i < containerSize ; ++i )
767 M_bcPreviousTimeSteps[containerSize - i] = M_bcPreviousTimeSteps[containerSize - i - 1];
775 #ifdef HAVE_LIFEV_DEBUG 776 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::solveLinearModel() \n";
779 if ( !solveLinearSystem )
786 displayModelStatus (
"Solve linear" );
787 solve ( *M_linearBC, *M_linearSolution,
"L1D-" );
792 solveLinearSystem =
false;
799 #ifdef HAVE_LIFEV_DEBUG 800 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::imposePerturbation() \n";
803 for ( multiscaleCouplingsContainerConstIterator_Type i = M_couplings.begin(); i < M_couplings.end(); ++i )
804 if ( ( *i )->isPerturbed() )
807 M_bcDeltaSide = flagConverter ( ( *i )->boundaryID ( ( *i )->modelGlobalToLocalID ( M_ID ) ) );
808 M_linearBC->bc ( M_bcDeltaSide )->setBCFunction ( OneDFSI::first, M_bcBaseDelta );
811 M_bcDeltaType = M_linearBC->bc ( M_bcDeltaSide )->type ( OneDFSI::first );
817 switch ( M_bcDeltaType )
821 M_bcDelta = M_data->jacobianPerturbationArea();
827 M_bcDelta = M_data->jacobianPerturbationFlowRate();
833 M_bcDelta = M_data->jacobianPerturbationStress();
845 std::cout <<
"Warning: bcType \"" << M_bcDeltaType <<
"\"not available!" << std::endl;
853 #ifdef HAVE_LIFEV_DEBUG 854 debugStream ( 8130 ) <<
"BCDelta: " << M_bcDelta <<
"\n";
863 #ifdef HAVE_LIFEV_DEBUG 864 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::resetPerturbation() \n";
867 M_linearBC->bc ( M_bcDeltaSide )->setBCFunction ( OneDFSI::first, M_bc->handler()->bc ( M_bcDeltaSide )->bcFunction ( OneDFSI::first ) );
874 UInt bcPreviousSize ( M_bcPreviousTimeSteps.size() );
877 std::vector< Real > timeContainer ( bcPreviousSize, 0 );
878 for (
UInt i (0) ; i < bcPreviousSize ; ++i )
880 timeContainer[i] = M_globalData->dataTime()->time() - i * M_globalData->dataTime()->timeStep();
887 for ( UInt i (0) ; i < M_bcPreviousTimeSteps.size() ; ++i )
890 for ( UInt j (0) ; j < M_bcPreviousTimeSteps.size() ; ++j )
893 base *= (t - timeContainer[j]) / (timeContainer[i] - timeContainer[j]);
898 bcValue += base * ( M_bcPreviousTimeSteps[i][M_bcDeltaSide][M_bcDeltaType] + M_bcDelta );
902 bcValue += base * M_bcPreviousTimeSteps[i][M_bcDeltaSide][M_bcDeltaType];
915 #ifdef HAVE_LIFEV_DEBUG 916 debugStream ( 8130 ) <<
"MultiscaleModelFSI1D::tangentProblem( bcOutputSide, bcOutputType ) \n";
1014 #ifdef HAVE_NEUMANN_VISCOELASTIC_BC std::function< Real(const Real &, const Real &, const Real &, const Real &, const ID &) > function_Type
void imposeBoundaryFlowRate(const multiscaleID_Type &boundaryID, const function_Type &function)
Impose the flow rate on a specific interface of the model.
const QuadratureRule quadRuleSeg3pt(pt_seg_3pt, QUAD_RULE_SEG_3PT, "Gauss Legendre 3 points on a segment", LINE, 3, 5)
bcType_Type M_bcDeltaType
void createLinearBC()
Update linear BC.
solutionPtr_Type M_exporterSolution
OneDFSIFunction()
Empty Constructor.
flag_Type multiscaleID_Type
void setupLinearModel()
Setup the linear model.
void updateModel()
Update the model.
#define JACOBIAN_WITH_FINITEDIFFERENCE
MultiscaleModel()
The main constructor.
void setupFESpace()
Setup the FE space for pressure and velocity.
void setupGlobalData(const std::string &fileName)
Setup the global data of the model.
void solveModel()
Solve the model.
void updateInverseJacobian(const UInt &iQuadPt)
OneDFSIFunction - Base class for 1D BC Functions.
MultiscaleModelFSI1D()
Constructor.
void setupData(const std::string &fileName)
Setup the data of the model.
UInt multiscaleProblemStep
physicsPtr_Type M_physics
void solve(bc_Type &bc, solution_Type &solution, const std::string &solverType=" 1D-")
Solve the 1D hyperbolic problem.
void mapsDefinition()
Define the map of the OneDFSIModel objects.
Real boundaryDeltaArea(const multiscaleID_Type &boundaryID, bool &solveLinearSystem)
Get the variation of the integral of the area (on a specific boundary interface) using the linear mod...
void updateSolution()
Update the solution.
void copySolution(const solution_Type &solution1, solution_Type &solution2)
Copy the solution (solution2 = solution1)
void updateLinearModel()
Update the linear system matrix and vectors.
Real boundaryDeltaFlowRate(const multiscaleID_Type &boundaryID, bool &solveLinearSystem)
Get the variation of the flow rate (on a specific boundary interface) using the linear model...
#define HAVE_MATLAB_POSTPROCESSING
MultiscaleModel multiscaleModel_Type
void initializeSolution()
Initialize the solution.
void buildModel()
Build the initial model.
void saveSolution()
Save the solution.
MultiscaleInterface()
The main constructor.
const QuadratureRule quadRuleSeg1pt(pt_seg_1pt, QUAD_RULE_SEG_1PT, "Gauss Legendre 1 point on a segment", LINE, 1, 1)
Real bcFunctionDelta(const Real &t)
void solveLinearModel(bool &solveLinearSystem)
Solve the linear problem.
double Real
Generic real data.
void imposePerturbation()
Impose the coupling perturbation on the correct BC inside the BCHandler.
Real checkSolution() const
Return a specific scalar quantity to be used for a comparison with a reference value.
void updateLinearBC(const solution_Type &solution)
Update linear BC.
The class for a reference Lagrangian finite element.
void showMe()
Display some information about the model.
bcSide_Type M_bcDeltaSide
bcSide_Type flagConverter(const multiscaleID_Type &boundaryID) const
Convert the boundaryID to a bcSide type.
Real boundaryDeltaMeanTotalNormalStress(const multiscaleID_Type &boundaryID, bool &solveLinearSystem)
Get the variation of the integral of the total normal stress (on a specific boundary face) ...
void imposeBoundaryMeanNormalStress(const multiscaleID_Type &boundaryID, const function_Type &function)
Impose the integral of the mean normal stress on a specific boundary interface of the model...
QuadratureRule - The basis class for storing and accessing quadrature rules.
Real boundaryDeltaMeanNormalStress(const multiscaleID_Type &boundaryID, bool &solveLinearSystem)
Get the variation of the integral of the mean normal stress (on a specific boundary interface) using ...
void setupModel()
Setup the model.
MultiscaleInterface - The multiscale interface for fluid problems.
void resetPerturbation()
Reset all the coupling perturbations imposed on the BCHandler.
void updateBCPhysicalSolverVariables()
Update BCInterface physical solver variables.
bcFunction_Type M_bcBaseDelta
uint32_type UInt
generic unsigned integer (used mainly for addressing)