To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 9dc072ce authored by Kristof Sarosi's avatar Kristof Sarosi
Browse files

added cylinder height

parent 7f0132ce
......@@ -53,5 +53,6 @@
"streambuf": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp"
}
},
"cmake.configureOnOpen": true
}
\ No newline at end of file
......@@ -29,6 +29,7 @@ public:
super::setup(dataFile, name);
m_Radius= dataFile ( ("solid/boundary_conditions/" + m_Name + "/radius").c_str(), 1.0 );
m_Height= dataFile ( ("solid/boundary_conditions/" + m_Name + "/height").c_str(), 1.0 );
for ( UInt j (0); j < 3; ++j )
{
......@@ -44,12 +45,13 @@ protected:
virtual const bool nodeOnPatch(const Vector3D& coord) const
{
double distance = std::sqrt(std::pow(coord[0] - m_Center[0], 2.0) + std::pow(coord[2] - m_Center[2], 2.0)); //cylinder -> y direction doesn't matter
bool pointInCylinder = distance < m_Radius;
bool pointInCylinder = (distance < m_Radius && double(coord[1]) < m_Center[1]+m_Height && double(coord[1]) > m_Center[1]-m_Height);
return pointInCylinder;
}
Vector3D m_Center;
Real m_Radius;
Real m_Height;
};
......
......@@ -216,6 +216,7 @@ monodomain_xml_file = ParamListE.xml
center = '-1.8 -7.0 -4.5' #-7.0
#center = '-1.05 -7.0 -3.95' #-1.8 -7.0 -4.5' #-7.0
radius = 2.0
height = 1.0
component = '0 2'
direction = '1.0 0.0 1.73' # '1.0 0.0 1.0'
edgeDispFactor = 0.5
......@@ -228,6 +229,7 @@ monodomain_xml_file = ParamListE.xml
center = '3.5 -7.0 1.0' #-7.0
#center = '2.55 -7.0 2.75' #'3.5 -7.0 1.0' #-7.0
radius = 2.0
height = 1.0
component = '0 2'
direction = '-1.0 0.0 -1.73' # '-1.0 0.0 -1.0'
edgeDispFactor = 0.5
......
Markdown is supported
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