Commit 2df1b140 authored by malossi's avatar malossi
Browse files

Added range values for generalizedAitken method.

parent 69a64f70
/* -*- Mode : c++; c-tab-always-indent: t; indent-tabs-mode: nil; -*-
//@HEADER
/*
************************************************************************
<short description here>
This file is part of the LifeV Applications.
Copyright (C) 2009-2010 EPFL, Politecnico di Milano
Gilles Fourestey gilles.fourestey@epfl.ch
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
*/
/** \file DataFSI.cpp
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
*/
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
************************************************************************
*/
//@HEADER
/*!
* @file
* @brief DataFSI - File containing a data container for FSI problems
*
* @author Cristiano Malossi <cristiano.malossi@epfl.ch>
* @date 10-06-2010
*
* version 1 + rand(0,1), 3 months earlier
* @author Gilles fourestey <gilles.fourestey@epfl.ch>
*/
#include <life/lifesolver/DataFSI.hpp>
namespace LifeV
{
namespace LifeV {
// ===================================================
// Constructors
// ===================================================
DataFSI::DataFSI( ) :
M_dataFluid ( new dataFluid_Type() ),
M_dataSolid ( new dataSolid_Type() ),
......@@ -35,6 +56,7 @@ DataFSI::DataFSI( ) :
M_method (),
M_algorithm (),
M_defaultOmega (),
M_rangeOmega (),
M_updateEvery (),
M_fluidInterfaceFlag (),
M_solidInterfaceFlag (),
......@@ -47,7 +69,6 @@ DataFSI::DataFSI( ) :
{
}
DataFSI::DataFSI( const DataFSI& DataFSI ) :
M_dataFluid ( DataFSI.M_dataFluid ),
M_dataSolid ( DataFSI.M_dataSolid ),
......@@ -62,6 +83,7 @@ DataFSI::DataFSI( const DataFSI& DataFSI ) :
M_method ( DataFSI.M_method ),
M_algorithm ( DataFSI.M_algorithm ),
M_defaultOmega ( DataFSI.M_defaultOmega ),
M_rangeOmega ( DataFSI.M_rangeOmega ),
M_updateEvery ( DataFSI.M_updateEvery ),
M_fluidInterfaceFlag ( DataFSI.M_fluidInterfaceFlag ),
M_solidInterfaceFlag ( DataFSI.M_solidInterfaceFlag ),
......@@ -78,8 +100,6 @@ DataFSI::DataFSI( const DataFSI& DataFSI ) :
// ===================================================
// Methods
// ===================================================
DataFSI&
DataFSI::operator=( const DataFSI& DataFSI )
{
......@@ -98,6 +118,7 @@ DataFSI::operator=( const DataFSI& DataFSI )
M_method = DataFSI.M_method;
M_algorithm = DataFSI.M_algorithm;
M_defaultOmega = DataFSI.M_defaultOmega;
M_rangeOmega = DataFSI.M_rangeOmega;
M_updateEvery = DataFSI.M_updateEvery;
M_fluidInterfaceFlag = DataFSI.M_fluidInterfaceFlag;
M_solidInterfaceFlag = DataFSI.M_solidInterfaceFlag;
......@@ -112,7 +133,6 @@ DataFSI::operator=( const DataFSI& DataFSI )
return *this;
}
void
DataFSI::setup( const GetPot& dataFile, const std::string& section )
{
......@@ -136,6 +156,8 @@ DataFSI::setup( const GetPot& dataFile, const std::string& section )
// Problem - FixPoint / EJ
M_defaultOmega = dataFile( ( section + "/defOmega" ).data(), 0.001);
M_rangeOmega[0] = dataFile( ( section + "/defOmega" ).data(), std::abs( M_defaultOmega )*1024, 0);
M_rangeOmega[1] = dataFile( ( section + "/defOmega" ).data(), std::abs( M_defaultOmega )/1024, 1);
M_updateEvery = dataFile( ( section + "/updateEvery" ).data(), 1);
// Interface
......@@ -152,14 +174,12 @@ DataFSI::setup( const GetPot& dataFile, const std::string& section )
M_RobinNeumannSolidCoefficient = dataFile( "interface/alphas", 0.5 );
}
bool
DataFSI::isMonolithic()
{
return !( M_method.compare( "monolithic" ) && M_method.compare( "fullMonolithic" ) );
}
void
DataFSI::showMe( std::ostream& output )
{
......@@ -184,6 +204,7 @@ DataFSI::showMe( std::ostream& output )
output << "Algorithm = " << M_algorithm << std::endl;
output << "Default Omega = " << M_defaultOmega << std::endl;
output << "Omega range = " << "(" << M_rangeOmega[0] << " " << M_rangeOmega[1] << ")" << std::endl;
output << "Update every = " << M_updateEvery << std::endl;
output << "\n*** Values for interface\n\n";
......
......@@ -41,6 +41,8 @@
#include <life/lifesolver/dataNavierStokes.hpp>
#include <life/lifesolver/dataElasticStructure.hpp>
#include <boost/array.hpp>
namespace LifeV {
enum Preconditioner
......@@ -72,10 +74,10 @@ public:
//! @name Type definitions
//@{
typedef DataNavierStokes dataFluid_Type;
typedef DataNavierStokes dataFluid_Type;
typedef boost::shared_ptr< dataFluid_Type > dataFluid_PtrType;
typedef DataElasticStructure dataSolid_Type;
typedef DataElasticStructure dataSolid_Type;
typedef boost::shared_ptr< dataSolid_Type > dataSolid_PtrType;
//@}
......@@ -230,6 +232,12 @@ public:
*/
inline Real defaultOmega() const { return M_defaultOmega; }
//! Get the range of omega for Aitken iterations
/*!
* @return range of omega for Aitken iterations
*/
inline boost::array< Real, 2 > OmegaRange() const { return M_rangeOmega; }
//! Get update every
/*!
* If M_updateEvery == 1, normal fixedPoint algorithm
......@@ -313,6 +321,7 @@ private:
// Problem - FixPoint / EJ
Real M_defaultOmega;
boost::array< Real, 2 > M_rangeOmega;
int M_updateEvery;
// Interface
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment