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

added comment

parent a34f9c0b
{
"files.associations": {
"*.tcc": "cpp",
"deque": "cpp",
"list": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"iostream": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"complex": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"map": "cpp",
"set": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp"
}
}
\ No newline at end of file
//
// EssentialPatchBCCylinder.hpp
// lifev-heart
//
// Created by Thomas Kummer on 30.04.18.
// Copyright © 2018 Thomas Kummer. All rights reserved.
//
#ifndef EssentialPatchBCCylinder_hpp
#define EssentialPatchBCCylinder_hpp
#include <stdio.h>
#include <lifev/em/examples/example_EMHeart/EssentialPatchBC.hpp>
#define PI 3.14159265359
namespace LifeV
{
class EssentialPatchBCCylinder : public EssentialPatchBC
{
public:
EssentialPatchBCCylinder(){}
~EssentialPatchBCCylinder(){}
virtual void setup(const GetPot& dataFile, const std::string& name)
{
super::setup(dataFile, name);
m_Radius= dataFile ( ("solid/boundary_conditions/" + m_Name + "/radius").c_str(), 1.0 );
for ( UInt j (0); j < 3; ++j )
{
m_Center[j] = dataFile ( ("solid/boundary_conditions/" + m_Name + "/center").c_str(), 0, j );
}
m_tmax = dataFile ( "solid/patches/tmax", 0. );
m_tduration = dataFile ( "solid/patches/tduration", 0. );
}
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;
return pointInCylinder;
}
Vector3D m_Center;
Real m_Radius;
};
REGISTER(EssentialPatchBC, EssentialPatchBCCylinder);
}
#endif /* EssentialPatchBCCylinder_hpp */
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