Commit 05d082e9 authored by teo's avatar teo
Browse files

I'm Matteo, sorry I-m commit a worng file.

Matteo
parent 688476e6
......@@ -19,7 +19,7 @@ save = 1
[../time_discretization]
initialtime = 0.
endtime = 0.1
endtime = 0.02
timestep = 0.001
[../space_discretization]
......
......@@ -53,7 +53,6 @@
using namespace LifeV;
Real pi = 3.14159265358979;
Real d0(const Real& t, const Real& x, const Real& y, const Real& z, const ID& i)
......@@ -62,13 +61,11 @@ Real d0(const Real& t, const Real& x, const Real& y, const Real& z, const ID& i)
{
switch(i) {
case 1:
//return -z*(z - 5.)*x/50.;
return 0;
break;
return -z*(z - 5.)*x/50.;
break;
case 2:
//return -z*(z - 5.)*y/50.;
return 0;
break;
return -z*(z - 5.)*y/50.;
break;
case 3:
return 0.0;
break;
......@@ -102,47 +99,6 @@ Real w0(const Real& t, const Real& x, const Real& y, const Real& z, const ID& i)
}
Real f1(const Real& t, const Real& x, const Real& y, const Real& z, const ID& i)
{
switch(i) {
case 1:
return 1e3*y;
break;
case 2:
return 0.0;
break;
case 3:
return 0.0;
break;
default:
ERROR_MSG("This entrie is not allowed: ud_functions.hpp");
break;
}
return 0.0;
}
Real f2(const Real& t, const Real& x, const Real& y, const Real& z, const ID& i)
{
switch(i) {
case 1:
return 0.0;
break;
case 2:
return -1e3*x;
break;
case 3:
return 0.0;
break;
default:
ERROR_MSG("This entrie is not allowed: ud_functions.hpp");
break;
}
return 0.0;
}
Real zero_scalar( const Real& /* t */,
const Real& /* x */,
......@@ -254,44 +210,9 @@ Structure::run3d()
//
BCFunctionBase fixed(dZero);
Real onda_value = 0.0;
vector_type press_lagr(solid.getMap(),Repeated);
press_lagr.getEpetraVector().PutScalar(onda_value);
BCVector onda(press_lagr, solid.dFESpace().dof().numTotalDof(), 1 );
std::cout << "NUMERO GDL BCVECTOR = " << solid.dFESpace().dof().numTotalDof() << std::endl;
std::vector<ID> compxy(2);
compxy[0] = 1;
compxy[1] = 2;
std::vector<ID> compx(1);
compx[0] = 1;
std::vector<ID> compy(1);
compy[0] = 2;
std::vector<ID> compz(1);
compz[0] = 3;
vector_type vect0(solid.getMap(),Repeated);
vect0.getEpetraVector().PutScalar(0.0);
BCVector bcvect0(vect0, solid.dFESpace().dof().numTotalDof(), 1 );
BCFunctionBase fun1(f1);
BCFunctionBase fun2(f2);
BCh.addBC("Base1 ", 1 , Natural, Full, onda, 3);
//BCh.addBC("Base2 ", 2 , Essential, Full, fixed, 3);
BCh.addBC("Base2 ", 2 , Essential, Component, fixed, compz);
//BCh.addBC("Base2 ", 2 , Natural, Component, bcvect0, compxy);
BCh.addBC("Base2 ", 2 , Natural, Component, fun1, compx);
BCh.addBC("Base2 ", 2 , Natural, Component, fun2, compy);
BCh.addBC("Base2 ", 2 , Essential, Full, fixed, 3);
BCh.addBC("Base3 ", 3 , Essential, Full, fixed, 3);
//BCh.addBC("Base3 ", 3 , Essential, Component, fixed, compz);
//BCh.addBC("Base3 ", 3 , Natural, Component, bcvect0, compxy);
//
// Temporal data and initial conditions
//
......@@ -359,11 +280,6 @@ Structure::run3d()
for (Real time = dt; time <= T; time += dt)
{
onda_value = -10000.0 * sin(20*pi*time);
press_lagr.getEpetraVector().PutScalar(onda_value);
std::cout << "VALORE ONDA = " << onda_value << std::endl;
dataStructure.setTime(time);
if (verbose)
......@@ -381,7 +297,6 @@ Structure::run3d()
*solidVel = solid.vel();
exporter->postProcess( time );
}
......
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