LifeV
HeartUtility.hpp File Reference

Utilities. More...

+ Include dependency graph for HeartUtility.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 LifeV
 Default Physical Solver.
 
 LifeV::ElectrophysiologyUtility
 

Methods

HeartUtility

Author
(s) Simone Rossi

HeartUtility contains methods for reading vectorial data from different formats to VectorEpetra objects.

typedef std::function< Real(const Real &t, const Real &x, const Real &y, const Real &z, const ID &i) > function_Type
 
template<typename Mesh >
void importFibers (std::shared_ptr< VectorEpetra > fiberVector, const std::string &fileName, std::shared_ptr< Mesh > localMesh, const std::string &filePath="./")
 Read fiber vector field from HDF5 file. More...
 
template<typename Mesh >
void importScalarField (std::shared_ptr< VectorEpetra > vector, const std::string &fileName, const std::string &fieldName, std::shared_ptr< Mesh > localMesh)
 Read scalar field from HDF5 file. More...
 
template<typename Mesh >
void importVectorField (std::shared_ptr< VectorEpetra > vector, const std::string &fileName, const std::string &fieldName, std::shared_ptr< Mesh > localMesh, const std::string &postDir="./")
 Read vector field from HDF5 file. More...
 
void importFibersFromTextFile (std::shared_ptr< VectorEpetra > fiberVector, std::string fileName, std::string filePath, int format=0)
 Read fiber field from text file. More...
 
void setupFibers (VectorEpetra &fiberVector, VectorSmall< 3 > &fiberDirection)
 Setup fiber field from unidirectional VectorSmall object. More...
 
void setupFibers (VectorEpetra &fiberVector, std::vector< Real > &fiberDirection)
 Setup fiber field from unidirectional std::vector object. More...
 
void setupFibers (VectorEpetra &fiberVector, Real fx, Real fy, Real fz)
 Setup fiber field from three real components. More...
 
void setValueOnBoundary (VectorEpetra &vec, std::shared_ptr< RegionMesh< LinearTetra > > fullMesh, Real value, UInt flag)
 On the boundary with the specified flag, set the wanted value. More...
 
void setValueOnBoundary (VectorEpetra &vec, std::shared_ptr< RegionMesh< LinearTetra > > fullMesh, Real value, std::vector< UInt > flags)
 On the boundary with the specified flags, set the wanted value. More...
 
void rescaleVector (VectorEpetra &vector, Real minValue, Real maxValue, Real scaleFactor=1.0)
 Rescale a scalar field to be between requested bounds. More...
 
void rescaleVector (VectorEpetra &vector, Real scaleFactor=1.0)
 Rescale a scalar field by a constant factor. More...
 
void rescaleVectorOnBoundary (VectorEpetra &vector, std::shared_ptr< RegionMesh< LinearTetra > > fullMesh, UInt flag, Real scaleFactor=1.0)
 Rescale a scalar field by a constant factor on a boundary. More...
 
void normalize (VectorEpetra &vector)
 Normalizes a vector field to unit length. More...
 
void addNoiseToFibers (VectorEpetra &fiberVector, Real magnitude=0.01, std::vector< bool > component=std::vector< bool >(3, true))
 Add random component to the fibers. More...
 
template<typename Mesh >
void setFibersFromFunction (std::shared_ptr< VectorEpetra > vector, std::shared_ptr< Mesh > localMesh, function_Type f)
 

Detailed Description

Utilities.

Contributor:
Simone Rossi simon.nosp@m.e.ro.nosp@m.ssi@e.nosp@m.pfl..nosp@m.ch
Maintainer:
Simone Rossi simon.nosp@m.e.ro.nosp@m.ssi@e.nosp@m.pfl..nosp@m.ch

This file contains a set of base utilities used to read vectorial data (mainly fiber and sheet directions) from different formats to VectorEpetra objects. Also other useful functions are collected here.

Definition in file HeartUtility.hpp.