33 #ifndef POROELASTICITY_BARRY_MERCER_H_
34 #define POROELASTICITY_BARRY_MERCER_H_
46 namespace Poroelasticity{
51 template <
class TGr
idFunction>
85 for (
int key=0; key<
_SIZE; ++key)
86 {
UG_LOG(
"KEY" << key <<
" \t" <<norms[key] << std::endl); }
89 void CompareNorms(
double *normDesc,
double *errDesc,
double *refDesc)
91 for (
int key=0; key<
_SIZE; ++key)
93 UG_LOG(
"KEY" << key <<
" \t"
94 << normDesc[key] <<
"\t"
95 << errDesc[key] <<
"\t ("
96 << (errDesc[key]/refDesc[key]) <<
")" << std::endl);
117 if (napprox<=0)
return;
118 UG_LOG (
"NAPPROX =" << napprox << std::endl);
122 TVTKOutput vtk = TVTKOutput();
125 const char* mandatory_subsets =
"INNER,SINGULARITY,CORNERS,HORIZONTAL,VERTICAL";
131 const double charTime = dimCoeffs.
tchar;
132 UG_LOG (
"time =" << time <<
"("<< time/charTime <<
")" << std::endl);
135 this->
init(dimCoeffs);
141 vtk.print(
"BarryMercer2D_Sol.vtu", u, step, time);
142 vtk.print(
"BarryMercer2D_Ref.vtu", *uref, step, time);
153 vtk.print(
"BarryMercer2D_Err.vtu", *uref, step, time);
156 UG_LOG (
"SOLUTION/ERROR:" << std::endl);
162 UG_LOG(
"deltaP:\t" << time <<
"\t" << time/charTime <<
"\t"
165 UG_LOG (
"deltaU1A:\t"<<time<<
"\t"<<time/charTime<<
"\t"
168 UG_LOG (
"deltaU2A:\t"<<time<<
"\t"<<time/charTime<<
"\t"
171 UG_LOG (
"deltaU1B:\t"<<time<<
"\t"<<time/charTime<<
"\t"
174 UG_LOG (
"deltaU2B:\t"<<time<<
"\t"<<time/charTime<<
"\t"
189 template <
typename TDomain,
typename TAlgebra>
227 double lambda = (E*nu)/((1.0+nu)*(1.0-2.0*nu));
228 double mu = 0.5*E/(1+nu);
235 double Kv = 2.0*E/(1+nu)*(1.0-nu)/(1.0-2.0*nu) ;
237 double beta_uzawa=(alpha*alpha)/Kv*(2.0-2.0*nu);
266 m_pointSourceDisc->add_source(m_pointSourceFunc, point);
267 dd->add(m_pointSourceDisc.template cast_static<typename TDiracSourceDisc::base_type>());
285 m_spDirichlet->add(0.0,
"p",
"VERTICAL,HORIZONTAL,CORNERS");
286 m_spDirichlet->add(0.0,
"ux",
"HORIZONTAL,CORNERS");
287 m_spDirichlet->add(0.0,
"uy",
"VERTICAL,CORNERS");
289 dd->add(m_spDirichlet.template cast_static<typename TDirichletBoundary::base_type> ());
296 if ((step-1) %
nskip !=0 )
return true;
Auxiliary class for compution errors as 'StdGlobPosData'.
Definition: barry_mercer.h:52
void ComputeNorms(TGridFunction &uref, double *norms)
Definition: barry_mercer.h:61
double m_normRef[_SIZE]
Definition: barry_mercer.h:58
double m_normErr[_SIZE]
Definition: barry_mercer.h:56
void PrintNorms(double *norms)
Definition: barry_mercer.h:83
normTypes
Definition: barry_mercer.h:54
@ L2NORM_UX
Definition: barry_mercer.h:54
@ _SIZE
Definition: barry_mercer.h:54
@ H1SEMI_UX
Definition: barry_mercer.h:54
@ L2NORM_UY
Definition: barry_mercer.h:54
@ L2NORM_P
Definition: barry_mercer.h:54
@ H1SEMI_UY
Definition: barry_mercer.h:54
void CompareNorms(double *normDesc, double *errDesc, double *refDesc)
Definition: barry_mercer.h:89
void init(BarryMercerData &dimCoeffs)
Definition: barry_mercer.h:105
SmartPtr< BarryMercerRefDispX::pos_data_type > m_spDispX
Definition: barry_mercer.h:102
SmartPtr< BarryMercerRefDispY::pos_data_type > m_spDispY
Definition: barry_mercer.h:103
double m_normSol[_SIZE]
Definition: barry_mercer.h:57
SmartPtr< BarryMercerRefPressure::pos_data_type > m_spPressure
Definition: barry_mercer.h:101
void eval(BarryMercerData &dimCoeffs, TGridFunction &u, int step, double time)
Definition: barry_mercer.h:112
static const size_t NAPPROX
Definition: barry_mercer_data.h:49
This defines a point source as 'StdGlobPosData'.
Definition: barry_mercer_data.h:171
Implementation as a Biot problem.
Definition: barry_mercer.h:192
bool post_processing(SmartPtr< typename base_type::TGridFunction > u, size_t step, double time) override
Post-processing (per time step)
Definition: barry_mercer.h:294
BarryMercerProblem(const char *uCmp, const char *pCmp)
Definition: barry_mercer.h:204
void add_elem_discs(SmartPtr< TDomainDisc > dd, bool bSteadyStateMechanics=true) override
Adding all elem discs to domain disc.
Definition: barry_mercer.h:253
double start_time() override
Definition: barry_mercer.h:247
double default_beta() const
Inverse of consolidation coefficient.
Definition: barry_mercer.h:309
size_t nskip
Definition: barry_mercer.h:317
BarryMercerProblem(const BiotDiscConfig &config)
Definition: barry_mercer.h:210
DirichletBoundary< TDomain, TAlgebra > TDirichletBoundary
Definition: barry_mercer.h:200
DomainDiscretization< TDomain, TAlgebra > TDomainDisc
Definition: barry_mercer.h:196
double m_b
Definition: barry_mercer.h:315
double m_a
Definition: barry_mercer.h:314
void interpolate_start_values(SmartPtr< typename base_type::TGridFunction > u, double t0) override
Initial values.
Definition: barry_mercer.h:278
double end_time() override
Definition: barry_mercer.h:250
DiracSourceDisc< TDomain > TDiracSourceDisc
Definition: barry_mercer.h:199
virtual void add_boundary_conditions(SmartPtr< TDomainDisc > dd, bool bSteadyStateMechanics=true) override
Add all boundary conditions.
Definition: barry_mercer.h:282
BiotProblem< TDomain, TAlgebra > base_type
Definition: barry_mercer.h:195
void set_skip(size_t skip)
Definition: barry_mercer.h:303
BarryMercerErrorData< typename base_type::TGridFunction > m_errData
Definition: barry_mercer.h:320
virtual ~BarryMercerProblem()
Definition: barry_mercer.h:217
void set_default_parameters()
Definition: barry_mercer.h:222
Evaluate reference pressure.
Definition: barry_mercer_data.h:127
Evaluate reference pressure.
Definition: barry_mercer_data.h:148
Evaluate reference pressure.
Definition: barry_mercer_data.h:102
A Biot problem consists of several element discs plus boundary conditions.
Definition: biot_tools.h:342
virtual void add_stab_discs(SmartPtr< TDomainDisc > dd, bool bSteadyStateMechanics=true)
Add stabilizationto domain disc.
Definition: biot_tools.h:436
virtual double get_char_time()
Get characteristic time.
Definition: biot_tools.h:389
const BiotDiscConfig & config() const
Definition: biot_tools.h:481
std::vector< BiotSubsetParameters > m_params
Definition: biot_tools.h:487
virtual void add_elem_discs(SmartPtr< TDomainDisc > dd, bool bSteadyStateMechanics=true)
Adding all elem discs to domain disc.
Definition: biot_tools.h:409
Class for Biot parameters (per subset)
Definition: biot_tools.h:111
ParallelVector< Vector< double > > vector_type
number L2Norm(SmartPtr< TGridFunction > spGridFct, const char *cmp, int quadOrder)
void Interpolate(number val, SmartPtr< TGridFunction > spGridFct, const char *cmp)
number H1SemiNorm(SmartPtr< TGridFunction > spGridFct, const char *cmp, int quadOrder)
void VecScaleAdd(double &dest, double alpha1, const double &v1, double alpha2, const double &v2)
SmartPtr< T, FreePolicy > make_sp(T *inst)
Dimensional coefficients for Barry-Mercer benchmark.
Definition: barry_mercer_data.h:82
double tchar
Definition: barry_mercer_data.h:91
Definition: biot_tools.h:73
int m_uOrder
Definition: biot_tools.h:96
int m_pOrder
Definition: biot_tools.h:96