-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,326 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
Copyright (c) 2005-2016, University of Oxford. | ||
All rights reserved. | ||
University of Oxford means the Chancellor, Masters and Scholars of the | ||
University of Oxford, having an administrative office at Wellington | ||
Square, Oxford OX1 2JD, UK. | ||
This file is part of Chaste. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
* Neither the name of the University of Oxford nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#include "ConstantTargetAreaModifier.hpp" | ||
|
||
template<unsigned DIM> | ||
ConstantTargetAreaModifier<DIM>::ConstantTargetAreaModifier() | ||
: AbstractTargetAreaModifier<DIM>() | ||
{ | ||
} | ||
|
||
template<unsigned DIM> | ||
ConstantTargetAreaModifier<DIM>::~ConstantTargetAreaModifier() | ||
{ | ||
} | ||
|
||
template<unsigned DIM> | ||
void ConstantTargetAreaModifier<DIM>::UpdateTargetAreaOfCell(CellPtr pCell) | ||
{ | ||
// Get target area A of a healthy cell in S, G2 or M phase | ||
double cell_target_area = this->mReferenceTargetArea; | ||
|
||
// Set cell data | ||
pCell->GetCellData()->SetItem("target area", cell_target_area); | ||
} | ||
|
||
template<unsigned DIM> | ||
void ConstantTargetAreaModifier<DIM>::OutputSimulationModifierParameters(out_stream& rParamsFile) | ||
{ | ||
// No parameters to output, so just call method on direct parent class | ||
AbstractTargetAreaModifier<DIM>::OutputSimulationModifierParameters(rParamsFile); | ||
} | ||
|
||
// Explicit instantiation | ||
template class ConstantTargetAreaModifier<1>; | ||
template class ConstantTargetAreaModifier<2>; | ||
template class ConstantTargetAreaModifier<3>; | ||
|
||
// Serialization for Boost >= 1.36 | ||
#include "SerializationExportWrapperForCpp.hpp" | ||
EXPORT_TEMPLATE_CLASS_SAME_DIMS(ConstantTargetAreaModifier) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
Copyright (c) 2005-2016, University of Oxford. | ||
All rights reserved. | ||
University of Oxford means the Chancellor, Masters and Scholars of the | ||
University of Oxford, having an administrative office at Wellington | ||
Square, Oxford OX1 2JD, UK. | ||
This file is part of Chaste. | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
* Neither the name of the University of Oxford nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE | ||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef CONSTANTTARGETAREAMODIFIER_HPP_ | ||
#define CONSTANTTARGETAREAMODIFIER_HPP_ | ||
|
||
#include "ChasteSerialization.hpp" | ||
#include "AbstractTargetAreaModifier.hpp" | ||
|
||
/** | ||
* A modifier class in which the target area property of each cell is held constant over time. | ||
*/ | ||
template<unsigned DIM> | ||
class ConstantTargetAreaModifier : public AbstractTargetAreaModifier<DIM> | ||
{ | ||
/** Needed for serialization. */ | ||
friend class boost::serialization::access; | ||
/** | ||
* Boost Serialization method for archiving/checkpointing. | ||
* Archives the object and its member variables. | ||
* | ||
* @param archive The boost archive. | ||
* @param version The current version of this class. | ||
*/ | ||
template<class Archive> | ||
void serialize(Archive & archive, const unsigned int version) | ||
{ | ||
archive & boost::serialization::base_object<AbstractTargetAreaModifier<DIM> >(*this); | ||
} | ||
|
||
public: | ||
|
||
/** | ||
* Default constructor. | ||
*/ | ||
ConstantTargetAreaModifier(); | ||
|
||
/** | ||
* Destructor. | ||
*/ | ||
virtual ~ConstantTargetAreaModifier(); | ||
|
||
/** | ||
* Overridden UpdateTargetAreaOfCell() method. | ||
* | ||
* @param pCell pointer to the cell | ||
*/ | ||
virtual void UpdateTargetAreaOfCell(const CellPtr pCell); | ||
|
||
/** | ||
* Overridden OutputSimulationModifierParameters() method. | ||
* Output any simulation modifier parameters to file. | ||
* | ||
* @param rParamsFile the file stream to which the parameters are output | ||
*/ | ||
void OutputSimulationModifierParameters(out_stream& rParamsFile); | ||
}; | ||
|
||
#include "SerializationExportWrapper.hpp" | ||
EXPORT_TEMPLATE_CLASS_SAME_DIMS(ConstantTargetAreaModifier) | ||
|
||
#endif /*CONSTANTTARGETAREAMODIFIER_HPP_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
|
||
#include "MatteoCellCycleModel.hpp" | ||
#include "DifferentiatedCellProliferativeType.hpp" | ||
#include "Debug.hpp" | ||
|
||
MatteoCellCycleModel::MatteoCellCycleModel() | ||
: AbstractSimpleCellCycleModel(), | ||
mMinCellCycleDuration(12.0), // Hours | ||
mMaxCellCycleDuration(14.0) // Hours | ||
{ | ||
} | ||
|
||
/*called every time step and tells if a cell is aready to divide (using the cell cycle model)*/ | ||
|
||
bool MatteoCellCycleModel::ReadyToDivide() | ||
{ | ||
bool ready = mpCell->GetCellData()->GetItem("divide"); | ||
mpCell->GetCellData()->SetItem("divide", 0); | ||
return ready; | ||
|
||
|
||
} | ||
|
||
MatteoCellCycleModel::MatteoCellCycleModel(const MatteoCellCycleModel& rModel) | ||
: AbstractSimpleCellCycleModel(rModel), | ||
mMinCellCycleDuration(rModel.mMinCellCycleDuration), | ||
mMaxCellCycleDuration(rModel.mMaxCellCycleDuration) | ||
{ | ||
} | ||
|
||
AbstractCellCycleModel* MatteoCellCycleModel::CreateCellCycleModel() | ||
{ | ||
return new MatteoCellCycleModel(*this); | ||
} | ||
|
||
void MatteoCellCycleModel::SetCellCycleDuration() | ||
{ | ||
} | ||
|
||
double MatteoCellCycleModel::GetMinCellCycleDuration() | ||
{ | ||
return mMinCellCycleDuration; | ||
} | ||
|
||
void MatteoCellCycleModel::SetMinCellCycleDuration(double minCellCycleDuration) | ||
{ | ||
mMinCellCycleDuration = minCellCycleDuration; | ||
} | ||
|
||
double MatteoCellCycleModel::GetMaxCellCycleDuration() | ||
{ | ||
return mMaxCellCycleDuration; | ||
} | ||
|
||
void MatteoCellCycleModel::SetMaxCellCycleDuration(double maxCellCycleDuration) | ||
{ | ||
mMaxCellCycleDuration = maxCellCycleDuration; | ||
} | ||
|
||
double MatteoCellCycleModel::GetAverageTransitCellCycleTime() | ||
{ | ||
return 0.5*(mMinCellCycleDuration + mMaxCellCycleDuration); | ||
} | ||
|
||
double MatteoCellCycleModel::GetAverageStemCellCycleTime() | ||
{ | ||
return 0.5*(mMinCellCycleDuration + mMaxCellCycleDuration); | ||
} | ||
|
||
void MatteoCellCycleModel::OutputCellCycleModelParameters(out_stream& rParamsFile) | ||
{ | ||
*rParamsFile << "\t\t\t<MinCellCycleDuration>" << mMinCellCycleDuration << "</MinCellCycleDuration>\n"; | ||
*rParamsFile << "\t\t\t<MaxCellCycleDuration>" << mMaxCellCycleDuration << "</MaxCellCycleDuration>\n"; | ||
|
||
// Call method on direct parent class | ||
AbstractSimpleCellCycleModel::OutputCellCycleModelParameters(rParamsFile); | ||
} | ||
|
||
// Serialization for Boost >= 1.36 | ||
#include "SerializationExportWrapperForCpp.hpp" | ||
CHASTE_CLASS_EXPORT(MatteoCellCycleModel) |
Oops, something went wrong.