![]() |
Chaste Commit::675f9facbe008c5eacb9006feaeb6423206579ea
|
#include <VoltageInterpolaterOntoMechanicsMesh.hpp>
Collaboration diagram for VoltageInterpolaterOntoMechanicsMesh< DIM >:Public Member Functions | |
| VoltageInterpolaterOntoMechanicsMesh (TetrahedralMesh< DIM, DIM > &rElectricsMesh, QuadraticMesh< DIM > &rMechanicsMesh) | |
| ~VoltageInterpolaterOntoMechanicsMesh () | |
| void | InterpolateOnCoarseMesh (std::vector< double > &rValuesOnCoarseMesh, ReplicatableVector &rValuesOnFineMesh) |
| void | OutputToCmgui (std::vector< std::string > &rVariableNames, std::string directory, std::string inputFileNamePrefix) |
Private Attributes | |
| TetrahedralMesh< DIM, DIM > & | mrElectricsMesh |
| QuadraticMesh< DIM > & | mrMechanicsMesh |
| FineCoarseMeshPair< DIM > * | mpMeshPair |
A class which can be used to convert the voltage from an electrics (or electromechanics) simulation onto a coarser mechanics mesh, by interpolation. The class provides a method to interpolate values from the fine mesh onto the coarse mesh and the main method to output a HDF5 file corresponding to nodes on the mechanics mesh, and convert it to CMGUI output.
Definition at line 55 of file VoltageInterpolaterOntoMechanicsMesh.hpp.
| VoltageInterpolaterOntoMechanicsMesh< DIM >::VoltageInterpolaterOntoMechanicsMesh | ( | TetrahedralMesh< DIM, DIM > & | rElectricsMesh, |
| QuadraticMesh< DIM > & | rMechanicsMesh | ||
| ) |
Constructor. Sets up the Mesh Pair object used for the interpolation later.
| rElectricsMesh | The electrics mesh |
| rMechanicsMesh | The mechanics mesh |
Definition at line 45 of file VoltageInterpolaterOntoMechanicsMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), and VoltageInterpolaterOntoMechanicsMesh< DIM >::mpMeshPair.
| VoltageInterpolaterOntoMechanicsMesh< DIM >::~VoltageInterpolaterOntoMechanicsMesh | ( | ) |
Destructor.
Definition at line 60 of file VoltageInterpolaterOntoMechanicsMesh.cpp.
| void VoltageInterpolaterOntoMechanicsMesh< DIM >::InterpolateOnCoarseMesh | ( | std::vector< double > & | rValuesOnCoarseMesh, |
| ReplicatableVector & | rValuesOnFineMesh | ||
| ) |
Does the actual interpolation.
| rValuesOnCoarseMesh | It will be filled with the interpolated values. Memory must have been allocated before (this method checks): the vector must be of the same size as the number of nodes of the coarser mesh |
| rValuesOnFineMesh | The values on the fine mesh to be interpolated onto the coarser mesh |
Definition at line 66 of file VoltageInterpolaterOntoMechanicsMesh.cpp.
References AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), and AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNumNodes().
| void VoltageInterpolaterOntoMechanicsMesh< DIM >::OutputToCmgui | ( | std::vector< std::string > & | rVariableNames, |
| std::string | directory, | ||
| std::string | inputFileNamePrefix | ||
| ) |
The main method of the class. It reads the h5 files in directory (filename prefix inputFileNamePrefix) It then considers all the variables whose name is specified in rVariableNames, does the interplation using InterpolateOnCoarseMesh, and creates output for all the variables over all the time steps included in the h5 file. It does so by first writing out to h5 and then converting to CMGUI.
| rVariableNames | vector of names of variables contained in the input h5 file and that you want to be interpolated. |
| directory | Directory the voltage file is in |
| inputFileNamePrefix | Filename (without ".h5") of the electrics solution HDF5 file |
Definition at line 84 of file VoltageInterpolaterOntoMechanicsMesh.cpp.
References Hdf5DataWriter::AdvanceAlongUnlimitedDimension(), RelativeTo::ChasteTestOutput, DistributedVectorFactory::CreateVec(), PetscTools::CreateVec(), Hdf5DataWriter::DefineFixedDimension(), Hdf5DataWriter::DefineUnlimitedDimension(), Hdf5DataWriter::DefineVariable(), PetscTools::Destroy(), Hdf5DataWriter::EndDefineMode(), HeartConfig::GetOutputDirectory(), Hdf5DataReader::GetUnlimitedDimensionValues(), Hdf5DataReader::GetVariableOverNodes(), HeartConfig::Instance(), Hdf5DataWriter::PutUnlimitedVariable(), Hdf5DataWriter::PutVector(), and HeartConfig::SetOutputDirectory().
Referenced by CardiacElectroMechanicsProblem< DIM, ELEC_PROB_DIM >::Solve().
|
private |
Mesh pair object. Initialized by the constructor using the two meshes passed in
Definition at line 65 of file VoltageInterpolaterOntoMechanicsMesh.hpp.
Referenced by VoltageInterpolaterOntoMechanicsMesh< DIM >::VoltageInterpolaterOntoMechanicsMesh().
|
private |
The fine mesh (values will be interpolated from this one)
Definition at line 61 of file VoltageInterpolaterOntoMechanicsMesh.hpp.
|
private |
The coarse mesh (values will be interpolated onto this one)
Definition at line 63 of file VoltageInterpolaterOntoMechanicsMesh.hpp.