![]() |
Chaste Commit::675f9facbe008c5eacb9006feaeb6423206579ea
|
#include <CardiacElectroMechanicsVtkHandler.hpp>
Inheritance diagram for CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >:
Collaboration diagram for CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >:Public Member Functions | |
| CardiacElectroMechanicsVtkHandler (AbstractNonlinearElasticitySolver< DIM > &rMechanicsSolver, QuadraticMesh< DIM > &rQuadMesh, TetrahedralMesh< DIM, DIM > &rElectricsMesh, ReplicatableVector &rElectricsInitialCondition, const std::string &rOutputDir) | |
| ~CardiacElectroMechanicsVtkHandler () | |
| void | WriteSolution (unsigned counter, ReplicatableVector &rElectricsSolution) |
Private Attributes | |
| AbstractNonlinearElasticitySolver< DIM > & | mrMechanicsSolver |
| std::vector< double > | mInterpolatedVoltagesNodeWise |
| std::vector< c_vector< double, DIM > > | mDisplacements |
| std::vector< c_matrix< double, DIM, DIM > > | mStrains |
| VtkNonlinearElasticitySolutionWriter< DIM > * | mpVtkElastictyWriter |
| VtkDeformedMeshWriter< DIM > * | mpVtkWriter |
| VoltageInterpolaterOntoMechanicsMesh< DIM > * | mpInterpolater |
| QuadraticMesh< DIM > * | mpVtkOutputMesh |
Friends | |
| class | TestCardiacElectroMechanicsVtkHandler |
A convenience class to handle the VTK output of cardiac electromechanics simulations. It makes use of various other classes to compute mechanics qunatities, interpolate electrics quantities, and actually generate files. It outputs voltage, displacements, and deformation gradient in VTU format to be shown in the deformed mechanics mesh.
Definition at line 58 of file CardiacElectroMechanicsVtkHandler.hpp.
| CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler | ( | AbstractNonlinearElasticitySolver< DIM > & | rMechanicsSolver, |
| QuadraticMesh< DIM > & | rQuadMesh, | ||
| TetrahedralMesh< DIM, DIM > & | rElectricsMesh, | ||
| ReplicatableVector & | rElectricsInitialCondition, | ||
| const std::string & | rOutputDir | ||
| ) |
Constructor. It creates all the necessary objects based on the input
| rMechanicsSolver | the mechanics solver used by the EM problem. The deformation that this class uses to write out a VRK deformed mesh is taken from this solver. |
| rQuadMesh | The mesh used by the mechanics problem. A copy is made here. |
| rElectricsMesh | The mesh used by the electrcis problem. |
| rElectricsInitialCondition | the initial value for all the cells in the electrics mesh (V and, if applicable, Phi_e) |
| rOutputDir | The output directory where to write. Files will be written (relative to CHASTE_TEST_OUTPUT) to rOutputDir/vtk/ It will be cleared upon construction. |
Definition at line 40 of file CardiacElectroMechanicsVtkHandler.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), ReplicatableVector::GetSize(), CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::mDisplacements, CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::mInterpolatedVoltagesNodeWise, CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::mpInterpolater, CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::mpVtkElastictyWriter, CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::mpVtkOutputMesh, CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::mpVtkWriter, and CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::mStrains.
| CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::~CardiacElectroMechanicsVtkHandler | ( | ) |
Destructor
Definition at line 98 of file CardiacElectroMechanicsVtkHandler.cpp.
| void CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::WriteSolution | ( | unsigned | counter, |
| ReplicatableVector & | rElectricsSolution | ||
| ) |
Write the solution to file. It will write to rOutputDir/vtk/deformed_mechanics_mesh_X.vtu where X=counter. it writes Voltage ("V"), displacements ("displacements"), and deformation gradient F ("deformation_gradient_F") using the deformed mechanics mesh.
| counter | Used to name the file |
| rElectricsSolution | The solution of the electrcis problem. It will be interpolated onto the mechanics mesh within this method to outoput voltage V. |
Definition at line 109 of file CardiacElectroMechanicsVtkHandler.cpp.
|
friend |
Definition at line 60 of file CardiacElectroMechanicsVtkHandler.hpp.
|
private |
Vector of displacements to be written to file
Definition at line 73 of file CardiacElectroMechanicsVtkHandler.hpp.
Referenced by CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler().
|
private |
A cache for the interpolated voltages from electrics to mechanics mesh but node-wise. Memory is allocated within the constructor. Filled in when WriteSolution() is called.
Definition at line 70 of file CardiacElectroMechanicsVtkHandler.hpp.
Referenced by CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler().
|
private |
Used to interpolate electrics solution onto mechanics mesh for VTK output
Definition at line 87 of file CardiacElectroMechanicsVtkHandler.hpp.
Referenced by CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler().
|
private |
Pointer to the mechanics solution writer class. Used to calculate some mechanics quantities
Definition at line 79 of file CardiacElectroMechanicsVtkHandler.hpp.
Referenced by CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler().
|
private |
Local cache of the mechanics mesh. Object created within the constructor as a local copy of the mesh onto which apply deformation by changing node coordinates.
Definition at line 94 of file CardiacElectroMechanicsVtkHandler.hpp.
Referenced by CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler().
|
private |
Poiunter to the actual mesh VTK writer. Initialized upon construction
Definition at line 83 of file CardiacElectroMechanicsVtkHandler.hpp.
Referenced by CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler().
|
private |
Cache for the mechanics solver (deformed solution is taken from this object)
Definition at line 64 of file CardiacElectroMechanicsVtkHandler.hpp.
|
private |
vector to store strains to be printed out.
Definition at line 76 of file CardiacElectroMechanicsVtkHandler.hpp.
Referenced by CardiacElectroMechanicsVtkHandler< DIM, ELEC_PROB_DIM >::CardiacElectroMechanicsVtkHandler().