Chaste
Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
FixedCentreBasedDivisionRule.cpp
1
/*
2
3
Copyright (c) 2005-2024, University of Oxford.
4
All rights reserved.
5
6
University of Oxford means the Chancellor, Masters and Scholars of the
7
University of Oxford, having an administrative office at Wellington
8
Square, Oxford OX1 2JD, UK.
9
10
This file is part of Chaste.
11
12
Redistribution and use in source and binary forms, with or without
13
modification, are permitted provided that the following conditions are met:
14
* Redistributions of source code must retain the above copyright notice,
15
this list of conditions and the following disclaimer.
16
* Redistributions in binary form must reproduce the above copyright notice,
17
this list of conditions and the following disclaimer in the documentation
18
and/or other materials provided with the distribution.
19
* Neither the name of the University of Oxford nor the names of its
20
contributors may be used to endorse or promote products derived from this
21
software without specific prior written permission.
22
23
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34
*/
35
36
#include "FixedCentreBasedDivisionRule.hpp"
37
38
template
<
unsigned
ELEMENT_DIM,
unsigned
SPACE_DIM>
39
FixedCentreBasedDivisionRule<ELEMENT_DIM, SPACE_DIM>::FixedCentreBasedDivisionRule
(c_vector<double, SPACE_DIM>& rDaughterLocation)
40
{
41
mDaughterLocation = rDaughterLocation;
42
}
43
44
template
<
unsigned
ELEMENT_DIM,
unsigned
SPACE_DIM>
45
const
c_vector<double, SPACE_DIM>&
FixedCentreBasedDivisionRule<ELEMENT_DIM,SPACE_DIM>::rGetDaughterLocation
()
const
46
{
47
return
mDaughterLocation;
48
}
49
50
template
<
unsigned
ELEMENT_DIM,
unsigned
SPACE_DIM>
51
std::pair<c_vector<double, SPACE_DIM>, c_vector<double, SPACE_DIM> >
FixedCentreBasedDivisionRule<ELEMENT_DIM, SPACE_DIM>::CalculateCellDivisionVector
(
52
CellPtr pParentCell,
53
AbstractCentreBasedCellPopulation<ELEMENT_DIM, SPACE_DIM>
& rCellPopulation)
54
{
55
c_vector<double, SPACE_DIM> parent_position = rCellPopulation.
GetLocationOfCellCentre
(pParentCell);
56
c_vector<double, SPACE_DIM> daughter_position = mDaughterLocation;
57
58
std::pair<c_vector<double, SPACE_DIM>, c_vector<double, SPACE_DIM> > positions(parent_position, daughter_position);
59
60
return
positions;
61
}
62
63
// Explicit instantiation
64
template
class
FixedCentreBasedDivisionRule<1,1>
;
65
template
class
FixedCentreBasedDivisionRule<1,2>
;
66
template
class
FixedCentreBasedDivisionRule<2,2>
;
67
template
class
FixedCentreBasedDivisionRule<1,3>
;
68
template
class
FixedCentreBasedDivisionRule<2,3>
;
69
template
class
FixedCentreBasedDivisionRule<3,3>
;
70
71
// Serialization for Boost >= 1.36
72
#include "
SerializationExportWrapperForCpp.hpp
"
73
EXPORT_TEMPLATE_CLASS_ALL_DIMS
(
FixedCentreBasedDivisionRule
)
SerializationExportWrapperForCpp.hpp
EXPORT_TEMPLATE_CLASS_ALL_DIMS
#define EXPORT_TEMPLATE_CLASS_ALL_DIMS(CLASS)
Definition
SerializationExportWrapper.hpp:358
AbstractCentreBasedCellPopulation
Definition
AbstractCentreBasedCellPopulation.hpp:57
AbstractCentreBasedCellPopulation::GetLocationOfCellCentre
c_vector< double, SPACE_DIM > GetLocationOfCellCentre(CellPtr pCell)
Definition
AbstractCentreBasedCellPopulation.cpp:71
FixedCentreBasedDivisionRule
Definition
FixedCentreBasedDivisionRule.hpp:60
FixedCentreBasedDivisionRule::rGetDaughterLocation
const c_vector< double, SPACE_DIM > & rGetDaughterLocation() const
Definition
FixedCentreBasedDivisionRule.cpp:45
FixedCentreBasedDivisionRule::CalculateCellDivisionVector
virtual std::pair< c_vector< double, SPACE_DIM >, c_vector< double, SPACE_DIM > > CalculateCellDivisionVector(CellPtr pParentCell, AbstractCentreBasedCellPopulation< ELEMENT_DIM, SPACE_DIM > &rCellPopulation)
Definition
FixedCentreBasedDivisionRule.cpp:51
FixedCentreBasedDivisionRule::FixedCentreBasedDivisionRule
FixedCentreBasedDivisionRule(c_vector< double, SPACE_DIM > &rDaughterLocation)
Definition
FixedCentreBasedDivisionRule.cpp:39
cell_based
src
population
division_rules
FixedCentreBasedDivisionRule.cpp
Generated by
1.9.8