#include <AbstractConductivityTensors.hpp>
Inherited by AxisymmetricConductivityTensors< SPACE_DIM >, and OrthotropicConductivityTensors< SPACE_DIM >.
Public Member Functions | |
void | SetFibreOrientationFile (const std::string &rFibreOrientationFilename) |
void | SetConstantConductivities (c_vector< double, 1 > constantConductivities) |
void | SetConstantConductivities (c_vector< double, 2 > constantConductivities) |
virtual void | SetConstantConductivities (c_vector< double, 3 > constantConductivities) |
void | SetNonConstantConductivities (std::vector< c_vector< double, SPACE_DIM > > *pNonConstantConductivities) |
virtual void | Init ()=0 throw (Exception) |
c_matrix< double, SPACE_DIM, SPACE_DIM > & | operator[] (const unsigned index) |
Protected Member Functions | |
void | OpenFibreOrientationFile () |
void | CloseFibreOrientationFile () |
unsigned | GetTokensAtNextLine (std::vector< double > &rTokens) |
unsigned | GetNumElementsFromFile () |
Protected Attributes | |
unsigned | mNumElements |
bool | mUseNonConstantConductivities |
bool | mUseFibreOrientation |
c_vector< double, SPACE_DIM > | mConstantConductivities |
std::vector< c_vector< double, SPACE_DIM > > * | mpNonConstantConductivities |
std::vector< c_matrix< double, SPACE_DIM, SPACE_DIM > > | mTensors |
bool | mInitialised |
std::string | mFibreOrientationFilename |
std::ifstream | mDataFile |
Base class for different representations of conductivity tensors.
Definition at line 41 of file AbstractConductivityTensors.hpp.
void AbstractConductivityTensors< SPACE_DIM >::CloseFibreOrientationFile | ( | ) | [inline, protected] |
Close mDataFile
Definition at line 44 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mDataFile.
Referenced by AbstractConductivityTensors< SPACE_DIM >::GetNumElementsFromFile(), AbstractConductivityTensors< SPACE_DIM >::GetTokensAtNextLine(), OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), OrthotropicConductivityTensors< SPACE_DIM >::ReadOrientationMatrixFromFile(), and AxisymmetricConductivityTensors< SPACE_DIM >::ReadOrientationVectorFromFile().
unsigned AbstractConductivityTensors< SPACE_DIM >::GetNumElementsFromFile | ( | ) | [inline, protected] |
Read number of elements from mDataFile Note: Must be called before GetTokensAtNextLine (it assumes that it's reading the first line.
Definition at line 88 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::CloseFibreOrientationFile(), and AbstractConductivityTensors< SPACE_DIM >::GetTokensAtNextLine().
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), and AxisymmetricConductivityTensors< SPACE_DIM >::Init().
unsigned AbstractConductivityTensors< SPACE_DIM >::GetTokensAtNextLine | ( | std::vector< double > & | rTokens | ) | [inline, protected] |
Read a line of numbers from mDataFile
rTokens | a vector to store the data in |
Definition at line 50 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::CloseFibreOrientationFile(), and AbstractConductivityTensors< SPACE_DIM >::mDataFile.
Referenced by AbstractConductivityTensors< SPACE_DIM >::GetNumElementsFromFile(), OrthotropicConductivityTensors< SPACE_DIM >::ReadOrientationMatrixFromFile(), and AxisymmetricConductivityTensors< SPACE_DIM >::ReadOrientationVectorFromFile().
virtual void AbstractConductivityTensors< SPACE_DIM >::Init | ( | ) | throw (Exception) [pure virtual] |
Computes the tensors based in all the info set
Implemented in AxisymmetricConductivityTensors< SPACE_DIM >, and OrthotropicConductivityTensors< SPACE_DIM >.
void AbstractConductivityTensors< SPACE_DIM >::OpenFibreOrientationFile | ( | ) | [inline, protected] |
Open mDataFile using the name mFibreOrientationFilename
Definition at line 34 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mDataFile, and AbstractConductivityTensors< SPACE_DIM >::mFibreOrientationFilename.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), and AxisymmetricConductivityTensors< SPACE_DIM >::Init().
c_matrix< double, SPACE_DIM, SPACE_DIM > & AbstractConductivityTensors< SPACE_DIM >::operator[] | ( | const unsigned | index | ) | [inline] |
Returns the diffussion tensor of the element number "index"
index | Index of the element of the mesh |
Definition at line 173 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mInitialised, AbstractConductivityTensors< SPACE_DIM >::mNumElements, AbstractConductivityTensors< SPACE_DIM >::mTensors, AbstractConductivityTensors< SPACE_DIM >::mUseFibreOrientation, and AbstractConductivityTensors< SPACE_DIM >::mUseNonConstantConductivities.
void AbstractConductivityTensors< SPACE_DIM >::SetConstantConductivities | ( | c_vector< double, 3 > | constantConductivities | ) | [inline, virtual] |
Sets constant conductivities for all the elements of the mesh.
constantConductivities | Longitudinal, Transverse (y axis) and Normal conductivity (z axis) |
We need explicit instanciation of this method to make sure that c_vector length matches SPACE_DIM. Compiler won't detect mismatches.
Reimplemented in AxisymmetricConductivityTensors< SPACE_DIM >.
Definition at line 154 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mConstantConductivities, and AbstractConductivityTensors< SPACE_DIM >::mUseNonConstantConductivities.
void AbstractConductivityTensors< SPACE_DIM >::SetConstantConductivities | ( | c_vector< double, 2 > | constantConductivities | ) | [inline] |
Sets constant conductivities for all the elements of the mesh.
constantConductivities | Longitudinal, Transverse (y axis) and Normal conductivity (z axis) |
We need explicit instanciation of this method to make sure that c_vector length matches SPACE_DIM. Compiler won't detect mismatches.
Definition at line 142 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mConstantConductivities, and AbstractConductivityTensors< SPACE_DIM >::mUseNonConstantConductivities.
void AbstractConductivityTensors< SPACE_DIM >::SetConstantConductivities | ( | c_vector< double, 1 > | constantConductivities | ) | [inline] |
Sets constant conductivities for all the elements of the mesh.
constantConductivities | Longitudinal, Transverse (y axis) and Normal conductivity (z axis) |
We need explicit instanciation of this method to make sure that c_vector length matches SPACE_DIM. Compiler won't detect mismatches.
Definition at line 130 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mConstantConductivities, and AbstractConductivityTensors< SPACE_DIM >::mUseNonConstantConductivities.
void AbstractConductivityTensors< SPACE_DIM >::SetFibreOrientationFile | ( | const std::string & | rFibreOrientationFilename | ) | [inline] |
Sets a file for reading the fibre orientation from.
rFibreOrientationFilename | Relative path to the file defining the fibre orientation |
Definition at line 123 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mFibreOrientationFilename, and AbstractConductivityTensors< SPACE_DIM >::mUseFibreOrientation.
void AbstractConductivityTensors< SPACE_DIM >::SetNonConstantConductivities | ( | std::vector< c_vector< double, SPACE_DIM > > * | pNonConstantConductivities | ) | [inline] |
pNonConstantConductivities | pointer to vector of conductivities (one per element) |
Definition at line 166 of file AbstractConductivityTensors.cpp.
References AbstractConductivityTensors< SPACE_DIM >::mpNonConstantConductivities, and AbstractConductivityTensors< SPACE_DIM >::mUseNonConstantConductivities.
c_vector<double, SPACE_DIM> AbstractConductivityTensors< SPACE_DIM >::mConstantConductivities [protected] |
Single constant conductivities for all space (when mUseNonConstantConductivities==false)
Definition at line 50 of file AbstractConductivityTensors.hpp.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::SetConstantConductivities(), and AbstractConductivityTensors< SPACE_DIM >::SetConstantConductivities().
std::ifstream AbstractConductivityTensors< SPACE_DIM >::mDataFile [protected] |
File stream to use for GetTokensAtNextLine
Definition at line 65 of file AbstractConductivityTensors.hpp.
Referenced by AbstractConductivityTensors< SPACE_DIM >::CloseFibreOrientationFile(), AbstractConductivityTensors< SPACE_DIM >::GetTokensAtNextLine(), and AbstractConductivityTensors< SPACE_DIM >::OpenFibreOrientationFile().
std::string AbstractConductivityTensors< SPACE_DIM >::mFibreOrientationFilename [protected] |
Name of fibre orienation file (see SetFibreOrientationFile)
Definition at line 62 of file AbstractConductivityTensors.hpp.
Referenced by AbstractConductivityTensors< SPACE_DIM >::OpenFibreOrientationFile(), and AbstractConductivityTensors< SPACE_DIM >::SetFibreOrientationFile().
bool AbstractConductivityTensors< SPACE_DIM >::mInitialised [protected] |
Set by Init() in the base classes
Definition at line 59 of file AbstractConductivityTensors.hpp.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), and AbstractConductivityTensors< SPACE_DIM >::operator[]().
unsigned AbstractConductivityTensors< SPACE_DIM >::mNumElements [protected] |
Number of elements (in the mesh) read from file in the derived classes
Definition at line 44 of file AbstractConductivityTensors.hpp.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), and AbstractConductivityTensors< SPACE_DIM >::operator[]().
std::vector<c_vector<double, SPACE_DIM> >* AbstractConductivityTensors< SPACE_DIM >::mpNonConstantConductivities [protected] |
Non-constant conductivities for each elemenet (when mUseNonConstantConductivities==true)
Definition at line 53 of file AbstractConductivityTensors.hpp.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), and AbstractConductivityTensors< SPACE_DIM >::SetNonConstantConductivities().
std::vector< c_matrix<double,SPACE_DIM,SPACE_DIM> > AbstractConductivityTensors< SPACE_DIM >::mTensors [protected] |
Container for conductivity tensors (single [one for all space] or multiple [one for each element])
Definition at line 56 of file AbstractConductivityTensors.hpp.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), and AbstractConductivityTensors< SPACE_DIM >::operator[]().
bool AbstractConductivityTensors< SPACE_DIM >::mUseFibreOrientation [protected] |
Set by SetFibreOrientationFile so that fibre orientation can be read
Definition at line 47 of file AbstractConductivityTensors.hpp.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), AbstractConductivityTensors< SPACE_DIM >::operator[](), and AbstractConductivityTensors< SPACE_DIM >::SetFibreOrientationFile().
bool AbstractConductivityTensors< SPACE_DIM >::mUseNonConstantConductivities [protected] |
Whether conductivities can be non-constant
Definition at line 46 of file AbstractConductivityTensors.hpp.
Referenced by OrthotropicConductivityTensors< SPACE_DIM >::Init(), AxisymmetricConductivityTensors< SPACE_DIM >::Init(), AbstractConductivityTensors< SPACE_DIM >::operator[](), AxisymmetricConductivityTensors< SPACE_DIM >::SetConstantConductivities(), AbstractConductivityTensors< SPACE_DIM >::SetConstantConductivities(), and AbstractConductivityTensors< SPACE_DIM >::SetNonConstantConductivities().